[FFmpeg-user] loop

Bas Kamer bas at bushbaby.nl
Mon Mar 12 21:55:58 CET 2012


On 12 mrt. 2012, at 19:27, Carl Eugen Hoyos wrote:

> Bas Kamer <bas <at> bushbaby.nl> writes:
> 
>> Question: Does someone have some examples that do this? 
>> JPEG to QT with looping enabled
> 
> $ ./ffmpeg -loop 1 -i tests/lena.pnm -vcodec mjpeg -vframes 100 out.mov
> 

short answer
-loop 1 gives 'invalid value '1' for option loop
-loop_output 0 does finish but does not loop...

note
I tried two version, unfortunatly it seems i am stuck

= AS SUGGESTED ======================
Rattletrap:1330031941993 bas$ ffmpeg -loop 1 -i tests/lena.pnm -vcodec mjpeg -vframes 100 out.mov
ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
  built on Mar 12 2012 13:27:22 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-apple-4.2 --arch=x86_64 --enable-yasm
  libavutil    50. 43. 0 / 50. 43. 0
  libavcodec   52.123. 0 / 52.123. 0
  libavformat  52.111. 0 / 52.111. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter   1. 80. 0 /  1. 80. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
Invalid value '1' for option 'loop'


ffmpeg -loop 1 -i lena.pnm -vcodec mjpeg -vframes 100 out.mov
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 23:56:18 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Invalid value '1' for option 'loop'


= TRIED ======================
Rattletrap:1330031941993 bas$ ffmpeg -loop_output 0  -i tests/lena.pnm -vcodec mjpeg -vframes 100 out.mov
ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
  built on Mar 12 2012 13:27:22 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-apple-4.2 --arch=x86_64 --enable-yasm
  libavutil    50. 43. 0 / 50. 43. 0
  libavcodec   52.123. 0 / 52.123. 0
  libavformat  52.111. 0 / 52.111. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter   1. 80. 0 /  1. 80. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from 'tests/lena.pnm':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
File 'out.mov' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'rgb24' for codec 'mjpeg', auto-selecting format 'yuvj420p'
[buffer @ 0x7ffddac31da0] w:256 h:256 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x7ffddac32620] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
[scale @ 0x7ffddac32960] w:256 h:256 fmt:rgb24 -> w:256 h:256 fmt:yuvj420p flags:0x4
Output #0, mov, to 'out.mov':
  Metadata:
    encoder         : Lavf52.111.0
    Stream #0.0: Video: mjpeg, yuvj420p, 256x256, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
frame=    1 fps=  0 q=4.1 Lsize=      13kB time=00:00:00.04 bitrate=2618.0kbits/s    
video:12kB audio:0kB global headers:0kB muxing overhead 5.470953%


[lumasol at srv1 ~]$ ffmpeg -loop_output 1 -i lena.pnm -vcodec mjpeg -vframes 100 out.mov
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jan 29 2012 23:56:18 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Input #0, image2, from 'lena.pnm':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: ppm, rgb24, 256x256, 25 tbr, 25 tbn, 25 tbc
File 'out.mov' already exists. Overwrite ? [y/N] y
Output #0, mov, to 'out.mov':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0: Video: mjpeg, yuvj420p, 256x256, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=    1 fps=  0 q=4.1 Lsize=      13kB time=0.04 bitrate=2621.6kbits/s    
video:12kB audio:0kB global headers:0kB muxing overhead 5.454545%



More information about the ffmpeg-user mailing list