Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


Making a movie out of a .tif sequence

Discussions about problems encountered using ffmpeg.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

Making a movie out of a .tif sequence

Postby relaht » Tue Jan 29, 2013 7:26 pm

Hello to all. I'am very new to ffmpeg, so forgive me if I ask dump questions...

I have a bunch of .tif images ( image_00001.tif -> image_00250.tif

I want to make a movie out of it ( .mp4 (h264) / 25 fps )

I tried this line:
Code: Select all
-f image2 -r 25 -i image_%5d.tif -vcodec libx264 movie.mp4


The result is a 10 sec. movie but everything is black (like the first tif image)

This is the output:
Code: Select all
~# ffmpeg -f image2 -r 25 -i /Volumes/MUSIC/E_ZL/E_ZL_%5d.tif -vcodec libx264 /Users/tooloo/Desktop/Test/bla2.mp4
ffmpeg version 1.1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 23 2013 07:54:41 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
  configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libgsm --arch=x86_64 --enable-runtime-cpudetect
  libavutil      52. 13.100 / 52. 13.100
  libavcodec     54. 86.100 / 54. 86.100
  libavformat    54. 59.106 / 54. 59.106
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[image2 @ 0x7fd3fc006600] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, image2, from '/Volumes/MUSIC/E_ZL/E_ZL_%5d.tif':
  Duration: 00:00:10.00, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: tiff, rgb24, 1920x1080, 25 tbr, 25 tbn, 25 tbc
File '/Users/tooloo/Desktop/Test/bla2.mp4' already exists. Overwrite ? [y/N] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x7fd3fc02da00] profile High 4:4:4 Predictive, level 4.0, 4:4:4 8-bit
[libx264 @ 0x7fd3fc02da00] 264 - core 129 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - xxxx.videolan_org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '/Users/tooloo/Desktop/Test/bla2.mp4':
  Metadata:
    encoder         : Lavf54.59.106
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv444p, 1920x1080, q=-1--1, 12800 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (tiff -> libx264)
Press [q] to stop, [?] for help
frame=   35 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A   
frame=   50 fps= 49 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A   
frame=   60 fps= 38 q=28.0 size=      17kB time=00:00:00.08 bitrate=1708.1kbits/s   
frame=   72 fps= 35 q=28.0 size=     134kB time=00:00:00.56 bitrate=1964.2kbits/s   
frame=   81 fps= 30 q=28.0 size=     254kB time=00:00:00.92 bitrate=2257.7kbits/s   
frame=   92 fps= 29 q=28.0 size=     356kB time=00:00:01.36 bitrate=2142.8kbits/s   
frame=  103 fps= 27 q=28.0 size=     478kB time=00:00:01.80 bitrate=2176.0kbits/s   
frame=  116 fps= 27 q=28.0 size=     601kB time=00:00:02.32 bitrate=2121.5kbits/s   
frame=  130 fps= 27 q=28.0 size=     693kB time=00:00:02.88 bitrate=1969.8kbits/s   
frame=  143 fps= 27 q=28.0 size=     803kB time=00:00:03.40 bitrate=1935.8kbits/s   
frame=  156 fps= 27 q=28.0 size=     901kB time=00:00:03.92 bitrate=1883.5kbits/s   
frame=  169 fps= 26 q=28.0 size=    1003kB time=00:00:04.44 bitrate=1850.9kbits/s   
frame=  182 fps= 26 q=28.0 size=    1106kB time=00:00:04.96 bitrate=1825.9kbits/s   
frame=  196 fps= 26 q=28.0 size=    1235kB time=00:00:05.52 bitrate=1833.4kbits/s   
frame=  209 fps= 26 q=28.0 size=    1339kB time=00:00:06.04 bitrate=1816.7kbits/s   
frame=  220 fps= 26 q=28.0 size=    1441kB time=00:00:06.48 bitrate=1821.3kbits/s   
frame=  232 fps= 26 q=28.0 size=    1548kB time=00:00:06.96 bitrate=1822.6kbits/s   
frame=  244 fps= 25 q=28.0 size=    1659kB time=00:00:07.44 bitrate=1826.3kbits/s   
frame=  250 fps= 20 q=32766.0 Lsize=    2426kB time=00:00:09.92 bitrate=2003.1kbits/s   
video:2422kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.149874%
[libx264 @ 0x7fd3fc02da00] frame I:1     Avg QP:18.65  size:  1139
[libx264 @ 0x7fd3fc02da00] frame P:85    Avg QP:20.51  size: 21633
[libx264 @ 0x7fd3fc02da00] frame B:164   Avg QP:24.75  size:  3899
[libx264 @ 0x7fd3fc02da00] consecutive B-frames:  7.6%  9.6% 15.6% 67.2%
[libx264 @ 0x7fd3fc02da00] mb I  I16..4: 14.4% 85.6%  0.0%
[libx264 @ 0x7fd3fc02da00] mb P  I16..4:  6.9%  7.7%  0.7%  P16..4: 28.6% 11.2%  4.0%  0.0%  0.0%    skip:40.9%
[libx264 @ 0x7fd3fc02da00] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 26.5%  1.0%  0.1%  direct: 0.2%  skip:72.0%  L0:36.4% L1:61.0% BI: 2.6%
[libx264 @ 0x7fd3fc02da00] 8x8 transform intra:52.9% inter:82.5%
[libx264 @ 0x7fd3fc02da00] coded y,u,v intra: 17.0% 8.4% 7.0% inter: 7.0% 3.1% 2.2%
[libx264 @ 0x7fd3fc02da00] i16 v,h,dc,p: 69% 17%  6%  8%
[libx264 @ 0x7fd3fc02da00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 12% 42%  3%  3%  3%  6%  4%  2%
[libx264 @ 0x7fd3fc02da00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 28% 23%  4%  6%  5%  8%  5%  3%
[libx264 @ 0x7fd3fc02da00] Weighted P-Frames: Y:37.6% UV:14.1%
[libx264 @ 0x7fd3fc02da00] ref P L0: 70.9% 11.9% 13.5%  3.2%  0.5%
[libx264 @ 0x7fd3fc02da00] ref B L0: 96.1%  3.3%  0.6%
[libx264 @ 0x7fd3fc02da00] ref B L1: 98.7%  1.3%
[libx264 @ 0x7fd3fc02da00] kb/s:1983.49


if I do this:
Code: Select all
-f image2 -r 25 -i image_%5d.tif movie.mpg

It works fine, but I need h264/.mp4 (quality!)

Any ideas? I really need help... :roll:
relaht
 
Posts: 18
Joined: Fri Jan 25, 2013 2:29 pm

Re: Making a movie out of a .tif sequence

Postby llogan » Tue Jan 29, 2013 9:10 pm

relaht wrote:
Code: Select all
Output #0, mp4, to '/Users/tooloo/Desktop/Test/bla2.mp4':
  Metadata:
    encoder         : Lavf54.59.106
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv444p, 1920x1080, q=-1--1, 12800 tbn, 25 tbc


Notice that your output is yuv444p. I don't know any non-FFmpeg based players that can properly decode this. As an output option you can add:
Code: Select all
-pix_fmt yuv420p

to convert to 4:2:0 subsampling which is supported by any player worth using.
llogan
 
Posts: 869
Joined: Fri Jan 25, 2013 9:47 pm
Location: Alaska

Re: Making a movie out of a .tif sequence

Postby relaht » Wed Jan 30, 2013 1:25 am

Thank you very much! That works! :P
relaht
 
Posts: 18
Joined: Fri Jan 25, 2013 2:29 pm


Return to ffmpeg

Who is online

Users browsing this forum: Bing [Bot] and 6 guests