[FFmpeg-user] Interlaced frames not recognized as such
Robert Krüger
krueger at lesspain.de
Fri Apr 25 16:57:34 CEST 2014
Summary: Frames from an interlaced file created using ffmpeg's
tinterlace and fieldorder filters are not recognized as interlaced by
ffmpeg. Now I wonder if I used the wrong CL for creating the file or
if interlaced detection fails in this case.
I created an interlaced file by this command line (full output included):
ffmpeg -i color_frames_png_1080_50p.mov -vf
"tinterlace=interleave_top,fieldorder=tff" -vcodec mpeg2video -q 1
-pix_fmt yuv422p -r 25 -y color_frames_mpeg2_1080_50i_tff_3f.mov
ffmpeg version N-62704-g92cc6d5 Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 25 2014 15:47:16 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --enable-gpl
libavutil 52. 78.100 / 52. 78.100
libavcodec 55. 59.100 / 55. 59.100
libavformat 55. 37.101 / 55. 37.101
libavdevice 55. 13.100 / 55. 13.100
libavfilter 4. 4.100 / 4. 4.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'color_frames_png_1080_50p.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf55.24.100
Duration: 00:00:00.12, start: 0.000000, bitrate: 3202 kb/s
Stream #0:0(eng): Video: png (png / 0x20676E70), rgb24, 1920x1080
[SAR 1:1 DAR 16:9], 3151 kb/s, 50 fps, 50 tbr, 12800 tbn, 12800 tbc
(default)
Metadata:
handler_name : DataHandler
Output #0, mov, to 'color_frames_mpeg2_1080_50i_tff_3f.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf55.37.101
Stream #0:0(eng): Video: mpeg2video (m2v1 / 0x3176326D), yuv422p,
1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 12800 tbn, 25 tbc
(default)
Metadata:
handler_name : DataHandler
Stream mapping:
Stream #0:0 -> #0:0 (png -> mpeg2video)
Press [q] to stop, [?] for help
frame= 3 fps=0.0 q=1.0 Lsize= 1996kB time=00:00:00.08
bitrate=204347.0kbits/s
video:1995kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.038675%
And then ran ffprobe on it like this:
ffprobe -show_frames color_frames_mpeg2_1080_50i_tff_3f.mov
ffprobe version N-62704-g92cc6d5 Copyright (c) 2007-2014 the FFmpeg developers
built on Apr 25 2014 15:47:16 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --enable-gpl
libavutil 52. 78.100 / 52. 78.100
libavcodec 55. 59.100 / 55. 59.100
libavformat 55. 37.101 / 55. 37.101
libavdevice 55. 13.100 / 55. 13.100
libavfilter 4. 4.100 / 4. 4.100
libswscale 2. 6.100 / 2. 6.100
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'color_frames_mpeg2_1080_50i_tff_3f.mov':
Metadata:
major_brand : qt
minor_version : 512
compatible_brands: qt
encoder : Lavf55.37.101
Duration: 00:00:00.12, start: 0.000000, bitrate: 136231 kb/s
Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5e / 0x65356478),
yuv422p(tv), 1920x1080 [SAR 1:1 DAR 16:9], 136178 kb/s, 25 fps, 25
tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : DataHandler
[FRAME]
media_type=video
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=512
pkt_duration_time=0.040000
pkt_pos=36
pkt_size=428246
width=1920
height=1080
pix_fmt=yuv422p
sample_aspect_ratio=1:1
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
[FRAME]
media_type=video
key_frame=0
pkt_pts=512
pkt_pts_time=0.040000
pkt_dts=512
pkt_dts_time=0.040000
best_effort_timestamp=512
best_effort_timestamp_time=0.040000
pkt_duration=512
pkt_duration_time=0.040000
pkt_pos=428282
pkt_size=890034
width=1920
height=1080
pix_fmt=yuv422p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=1
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
[FRAME]
media_type=video
key_frame=0
pkt_pts=1024
pkt_pts_time=0.080000
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=1024
best_effort_timestamp_time=0.080000
pkt_duration=512
pkt_duration_time=0.040000
pkt_pos=1318316
pkt_size=724400
width=1920
height=1080
pix_fmt=yuv422p
sample_aspect_ratio=1:1
pict_type=P
coded_picture_number=2
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]
A you can see, none of the frames are recognized as such by ffprobe.
The actual problem I had was that using the api
AVFrame.interlaced_frame was set to 0 which seems incorrect. So I do
not think it is an ffprobe problem. I merely used it to build a
reproducible test case with fftools. The file is reported as
interlaced by ffmbc, mediainfo if anyone cares to know.
Thanks for any hints,
Robert
More information about the ffmpeg-user
mailing list