Re: [Libav-user] Force low-delay handling? question + feature suggestion
Camera Man writes: > would it work to patch ff_h264_decode_init() and decode_postinit() to also > check the AV_DISCARD mode, and if we are discarding B and/or nonref frames, > would set avctx->has_b_frames=0 and low_delay=1 ? I don't know but I suggest that you write such a patch (optionally test it on streams with B-frames) and post it on ffmpeg-devel where it can be discussed. Carl Eugen PS: Your mail is nearly unreadable here. In case you are sending HTML-mails: Please don't do that. ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
Re: [Libav-user] Security Camera App - multiplexing and visual timestamps
Camera Man writes: > e.g., for (2) there might be a way to multiplex macroblocks from > different pictures, without actually decoding them to image and > re-encoding (thus avoiding the motion compensation estimation, > which is super expensive, and the effects of requantization) > for (1), there might be a way to increase the picture size to e.g > 1280x1000, and somehow encode the timestamp into the new 40 pixels > (again, without decoding and re-encoding everything?) While both may be possible in theory (I don't know) it would certainly require some effort to program this. (It is not supported by current FFmpeg.) > And assuming that I have to re-encode, is there a some > hw-assisted encoder supported by ffmpeg that would be able to do > this encoding in real time and without eating too many watts? I thought for any given hardware encoder, there is a software encoder that is both faster (fps) and produces better quality (but I did not test myself) ;-) But seriously: What encoder are you using with what options? I would be surprised if that couldn't be accelerated. And no, FFmpeg does not support hardware encoders. Apart from "patch welcome", I assumed above is the reason nobody sent one. Carl Eugen ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X
Simon Daniels writes: > Thanks guys but omitting -fomit-frame-pointer in the last gcc call or > replacing it with -fno-omit-frame-pointer resulted in the same error > (trying both gcc and clang). [...] > make V=1 of clang is: > clang -m32 -I. -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H > -std=c99 -mdynamic-no-pic -fomit-frame-pointer -fPIC -g > -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch > -Wdisabled-optimization -Wpointer-arith -Wredundant-decls > -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef > -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno > -fno-signed-zeros -mllvm -stack-alignment=16 -Qunused-arguments -MMD > -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c This does not look as if you omitted -fomit-frame-pointer or replaced it with -fno-omit-frame-pointer ;-( Please: Configure with one of the mentioned configure lines (either gcc or clang, it is possible that one of them fails at another point in the compilation, to save time you can test this preliminary with configure --disable-decoder=h264) Run make (it fails) Run make V=1 Copy everything from "gcc"/"clang" to "libavcodec/h264_cabac.c" and paste it into your shell. Add -fno-omit-frame-pointer to the end (this should be sufficient since iirc later compiling options overwrite earlier ones) / remove -fomit-frame-pointer from the pasted command (this may actually not work because I believe -O3 implies -fomit-frame-pointer) / replace -fomit-frame-pointer with -fno-omit-frame-pointer. Press enter. If the compilation does not succeed, report back, there are other things you can try. Run make. Carl Eugen PS: Please use current git head, the releases are only for distributors, and I suspect you are a user. ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
[Libav-user] Creating a standard MP4 file using exisiting H264 Elementary stream
Hi, I have an application which is required to create a video file (only video no audio) which is readable by the Microsoft media player (latest version). The video data is pre encoded (received from a hardware encoder) H264 Elementary stream. Currently I have a version that is able to create an AVI wrapper around that stream and save it to file. The file is readable by media player. When I change the format passed into av_guess_format function from "avi" to "mp4" the file is still created but now it is only readable by VLC and is no longer playable using media player. Can anyone advice why is the MP4 file created is no longer compatible with the windows media player? Thanks, Shachar ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
Re: [Libav-user] Force low-delay handling? question + feature suggestion
On Thu, Nov 24, 2011 at 12:06, Carl Eugen Hoyos wrote: > Camera Man writes: > >> would it work to patch ff_h264_decode_init() and decode_postinit() to also >> check the AV_DISCARD mode, and if we are discarding B and/or nonref frames, >> would set avctx->has_b_frames=0 and low_delay=1 ? > > I don't know but I suggest that you write such a patch (optionally test it on > streams with B-frames) and post it on ffmpeg-devel where it can be discussed. Maybe I am missing something, but if you discard B frames you may have problems with the P frames that follow (and that until you get the next I frame). Also, note that the codecs check avctx->skip_loop_filter not as bitfield, but priority. Thus, AVDISCARD_BIDIR means also AVDISCARD_NONREF, which is probably not what you want. I believe that the correct way to fix is to modify SPS/PPS, because these are simply wrong in your case. BR, Alex Cohn ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X
Hi Carl, Apologies - I had tried without -fomit-frame-pointer and replacing it with -fno-omit-frame-pointer but that wasn't what I pasted in the email. I'll be more detailed this time. Here's what I did this time. I'm sticking to ffmpeg-0.8.7 because I am a distributor. 1. Ran ./configure --cc="gcc -m32" --disable-decoder=h264 2. Ran make. Resulted in: CC libavcodec/h264_cabac.o cc1: error in backend: Ran out of registers during register allocation! make: *** [libavcodec/h264_cabac.o] Error 1 3. Ran make V=1. Resulted in: gcc -m32 -I. -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 -mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno -mllvm -stack-alignment=16 -MMD -MF libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c cc1: error in backend: Ran out of registers during register allocation! make: *** [libavcodec/h264_cabac.o] Error 1 4. Added -fno-omit-frame-pointer to end and ran gcc -m32 -I. -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 -mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno -mllvm -stack-alignment=16 -MMD -MF libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o -fno-omit-frame-pointer libavcodec/h264_cabac.c Resulted in: cc1: error in backend: Ran out of registers during register allocation! 5. Tried removing -fomit-frame-pointer from original command and ran gcc -m32 -I. -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 -mdynamic-no-pic -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno -mllvm -stack-alignment=16 -MMD -MF libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c Resulted in: cc1: error in backend: Ran out of registers during register allocation! 6. Tried replacing -fomit-frame-pointer with -fno-omit-frame-pointer and ran gcc -m32 -I. -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 -mdynamic-no-pic -fno-omit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno -mllvm -stack-alignment=16 -MMD -MF libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c Resulted in: cc1: error in backend: Ran out of registers during register allocation! 7. I'm repeating steps 1-6 now using clang. Ran ./configure --cc="clang -m32" --disable-decoder=h264 8. Run make. Resulted in: CC libavcodec/h264_cabac.o fatal error: error in backend: Ran out of registers during register allocation! Cannot allocate: %vreg6948,inf = [162608u,162612d:0) 0@162608u Please check your inline asm statement for invalid constraints: INLINEASM [sideeffect], $0:[regdef-ec], %vreg6948, $1:[regdef-ec], %vreg3438, $2:[regdef-ec], %vreg3439, $3:[regdef-ec], %vreg3440, $4:[reguse], %vreg3441, $5:[reguse], %vreg6882, $6:[imm], 4, $7:[imm], 0, $8:[imm], 16, $9:[clobber], %ECX, $10:[clobber], %EFLAGS, <>; GR32_ABCD:%vreg6948,%vreg3440 GR32:%vreg3438,%vreg3439,%vreg3441,%vreg6882 dbg:libavcodec/x86/cabac.h:93:5 @[ libavcodec/cabac.h:340:5 @[ libavcodec/h264_cabac.c:1726:13 @[ libavcodec/h264_cabac.c:1737:5 @[ libavcodec/h264_cabac.c:1762:5 @[ libavcodec/h264_cabac.c:2322:21 ] ] ] ] ] make: *** [libavcodec/h264_cabac.o] Error 1 9. Ran make V=1. Resulted in: clang -m32 -I. -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H -std=c99 -mdynamic-no-pic -fomit-frame-pointer -fPIC -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -O3 -fno-math-errno -fno-signed-zeros -mllvm -stack-alignment=16 -Qunused-arguments -MMD -c -o libavcodec/h264_cabac.o libavcodec/h264_cabac.c fatal error: error in backend: Ran out of
Re: [Libav-user] Creating a standard MP4 file using exisiting H264 Elementary stream
Shachar Arieli writes: > I have an application which is required to create a video file (only video no > audio) which is readable by the Microsoft media player (latest version). Which version? Carl Eugen ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X
Simon Daniels writes: > Here's what I did this time. I'm sticking to ffmpeg-0.8.7 because I am > a distributor. Does it work with current git head? If yes, we could backport the change... > 1. Ran ./configure --cc="gcc -m32" --disable-decoder=h264 Should have been --disable-decoder=h264,svq3 --disable-parser=h264 (sorry for not testing myself). [...] > 4. Added -fno-omit-frame-pointer to end and ran gcc -m32 -I. > -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 > -mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement > -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization > -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual > -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast > -O3 -fno-math-errno -mllvm -stack-alignment=16 -MMD -MF > libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o > libavcodec/h264_cabac.o -fno-omit-frame-pointer > libavcodec/h264_cabac.c You can try to replace -O3 with -O2 (or -O1) Carl Eugen ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user
Re: [Libav-user] Unable to compile i386 compatible ffmpeg dylibs on Mac OS X
Hi Carl, 1. ./configure --cc="gcc -m32" --disable-decoder=h264,svq3 --disable-parser=h264 completed just fine without any errors on 0.8.7. 2. I ran ./configure --cc="gcc-m32" on the current git head and got the same error as before. 3. Ran last gcc command with O1 and O2 and got same error on current git head (with -fno-omit-frame-pointer at the end). 4. Repeated #2 and #3 with clang on current git head and got the same errors Thanks! On Thu, Nov 24, 2011 at 12:32 PM, Carl Eugen Hoyos wrote: > Simon Daniels writes: > >> Here's what I did this time. I'm sticking to ffmpeg-0.8.7 because I am >> a distributor. > > Does it work with current git head? If yes, we could backport the change... > >> 1. Ran ./configure --cc="gcc -m32" --disable-decoder=h264 > > Should have been --disable-decoder=h264,svq3 --disable-parser=h264 (sorry for > not testing myself). > > [...] > >> 4. Added -fno-omit-frame-pointer to end and ran gcc -m32 -I. >> -I"/Users/user/Downloads/ffmpeg-0.8.7" -D_ISOC99_SOURCE >> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DHAVE_AV_CONFIG_H -std=c99 >> -mdynamic-no-pic -fomit-frame-pointer -g -Wdeclaration-after-statement >> -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization >> -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual >> -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast >> -O3 -fno-math-errno -mllvm -stack-alignment=16 -MMD -MF >> libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o >> libavcodec/h264_cabac.o -fno-omit-frame-pointer >> libavcodec/h264_cabac.c > > You can try to replace -O3 with -O2 (or -O1) > > Carl Eugen > > ___ > Libav-user mailing list > Libav-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user