[FFmpeg-user] Not able to generate interlaced video

Yogesh Tyagi yogesh.bit2006 at gmail.com
Fri Apr 19 09:05:23 CEST 2013


Hi,

I was trying to generate h.264 interlaced video.I used following command:

./ffmpeg -i simpson.h264 -vcodec libx264 -x264opts tff=1 temp.h264

ffmpeg version N-31424-g1473833, Copyright (c) 2000-2011 the FFmpeg
developers
  built on Feb 19 2013 14:39:47 with gcc 4.4.5
  configuration: --enable-libx264 --enable-gpl --enable-static
--disable-shared
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 24. 4 /  2. 24. 4
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0

[h264 @ 0x8fde380] Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 47.95
(48000/1001) -> 23.98 (48000/2002)
Input #0, h264, from 'simpson.h264':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: h264 (High), yuv420p, 1920x800, 23.98 fps, 23.98
tbr, 1200k tbn, 47.95 tbc
File 'temp.h264' already exists. Overwrite ? [y/N] y
[buffer @ 0x8fe6780] w:1920 h:800 pixfmt:yuv420p tb:1/1000000 sar:0/1
sws_param:
[libx264 @ 0x8fd9be0] Default settings detected, using medium profile
[libx264 @ 0x8fd9be0] using cpu capabilities: MMX2 SSE2Fast SSSE3
FastShuffle SSE4.1 Cache64
[libx264 @ 0x8fd9be0] profile High, level 4.0
Output #0, h264, to 'temp.h264':
  Metadata:
    encoder         : Lavf53.5.0
    Stream #0.0: Video: libx264, yuv420p, 1920x800, q=2-31, 200 kb/s, 90k
tbn, 23.98 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop, [?] for help
frame=   10 fps=  0 q=28.0 Lsize=      30kB time=00:00:00.33 bitrate=
742.3kbits/s dup=0 drop=1
video:30kB audio:0kB global headers:0kB muxing overhead 0.000000%
frame I:1     Avg QP:14.35  size: 30227
[libx264 @ 0x8fd9be0] frame P:3     Avg QP:24.38  size:   101
[libx264 @ 0x8fd9be0] frame B:6     Avg QP:27.82  size:    72
[libx264 @ 0x8fd9be0] consecutive B-frames: 20.0%  0.0%  0.0% 80.0%
[libx264 @ 0x8fd9be0] mb I  I16..4: 88.4%  0.4% 11.2%
[libx264 @ 0x8fd9be0] mb P  I16..4:  0.1%  0.0%  0.0%  P16..4:  0.2%  0.0%
 0.0%  0.0%  0.0%    skip:99.7%
[libx264 @ 0x8fd9be0] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.2%  0.0%
 0.0%  direct: 0.0%  skip:99.8%  L0:35.1% L1:64.9% BI: 0.0%
[libx264 @ 0x8fd9be0] 8x8 transform intra:0.4% inter:25.0%
[libx264 @ 0x8fd9be0] coded y,uvDC,uvAC intra: 8.4% 11.9% 11.5% inter: 0.0%
0.0% 0.0%
[libx264 @ 0x8fd9be0] i16 v,h,dc,p: 95%  2%  2%  0%
[libx264 @ 0x8fd9be0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 51% 14% 27%  0%  0%
 0%  1%  0%  7%
[libx264 @ 0x8fd9be0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 26% 18%  2%  2%
 5%  4%  5%  3%
[libx264 @ 0x8fd9be0] i8c dc,h,v,p: 88%  6%  4%  1%
[libx264 @ 0x8fd9be0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x8fd9be0] ref P L0: 96.7%  0.0%  3.3%
[libx264 @ 0x8fd9be0] ref B L0: 81.5% 14.8%  3.7%
[libx264 @ 0x8fd9be0] ref B L1: 98.0%  2.0%
[libx264 @ 0x8fd9be0] kb/s:593.82


I inspected the video usinf mediainfo and it shows that the file generated
is progressive.

# mediainfo-gui temp.h264

General
Complete name                            : temp.h264
Format                                   : AVC
Format/Info                              : Advanced Video Codec
File size                                : 30.2 KiB
Duration                                 : 417ms
Overall bit rate                         : 594 Kbps

Video
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L4.0
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Duration                                 : 417ms
Width                                    : 1 920 pixels
Height                                   : 800 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Variable
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Writing library                          : x264 core 120
Encoding settings                        : 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=-2 / threads=1 /
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=23
/ 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

Am I missing some options to be passed to ffmpeg to generate interlaced
content ?

Thanks,
Yogesh


More information about the ffmpeg-user mailing list