[FFmpeg-user] Capture from USB Dazzle: Interlaced or not interlaced. FFV1 level3 vs h264

MrNice wxcvbn2006 at iol.ie
Thu Oct 29 16:24:14 CET 2015


Hi,

When I capture some video with the CL
./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -c:v ffv1 -level
3 -g 1 -aspect 4:3 -pix_fmt yuv422p /Store3/Test/t_`date
+%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"

from a S-VHS tape and Dazzle DVC100, I was thinking to get an interlaced
video file.
When I check with
ffprobe -show_frames t_20151029_1430.mkv
ffprobe version 2.6.4 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
--enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopencv
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl
--disable-debug --disable-stripping --shlibdir=/usr/lib64
--enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 't_20151029_1430.mkv':
  Metadata:
    ENCODER         : Lavf57.10.101
  Duration: 00:00:02.20, start: 0.000000, bitrate: 36231 kb/s
    Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, SAR
16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc57.9.100 ffv1
      DURATION        : 00:00:02.200000000
[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=40
pkt_duration_time=0.040000
pkt_pos=760
pkt_size=186767
width=720
height=576
pix_fmt=yuv422p
sample_aspect_ratio=16:15
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
[/FRAME]

I was expecting "interlaced_frame" set to 1


I check again with mediainfo
 mediainfo t_20151029_1430.mkv
General
Unique ID                                :
156290806743187840040559793487750112396 (0x759483B48FFCFC5E381A877E288C248C)
Complete name                            : t_20151029_1430.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 9.50 MiB
Duration                                 : 2s 200ms
Overall bit rate                         : 36.2 Mbps
Writing application                      : Lavf57.10.101
Writing library                          : Lavf57.10.101

Video
ID                                       : 1
Format                                   : FFV1
Format version                           : Version 3.4
Format settings, GOP                     : N=1
Codec ID                                 : V_MS/VFW/FOURCC / FFV1
Duration                                 : 2s 200ms
Bit rate                                 : 35.5 Mbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Compression mode                         : Lossless
Bits/(Pixel*Frame)                       : 3.425
Stream size                              : 9.31 MiB (98%)
Writing library                          : Lavc57.9.100 ffv1
Default                                  : Yes
Forced                                   : No
DURATION                                 : 00:00:02.200000000
coder_type                               : Golomb Rice
MaxSlicesCount                           : 4
ErrorDetectionType                       : Per slice

I was expecting "Scan type" set to interlaced

To confirm I have an interlaced USB video, I tried

./ffmpeg -debug 1 -f v4l2 -ts mono2abs -channel 1 -video_size 720x576
-pix_fmt yuyv422 -thread_queue_size 512 -i /dev/video0 -c:v libx264
-preset slow -qp 0 -flags +ilme+ildct -aspect 4:3 -pix_fmt yuv422p
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv -aspect 4:3 -f sdl "Dazzle output"

and I get
ffprobe -show_frames t_20151029_1453.mkv
ffprobe version 2.6.4 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --prefix=/usr --bindir=/usr/bin
--datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg
--libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64
--optflags='-O2 -g -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
--enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls
--enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394
--disable-indev=jack --enable-libfreetype --enable-libgsm
--enable-libmp3lame --enable-openal --enable-libopencv
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx
--enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
--enable-avfilter --enable-avresample --enable-postproc
--enable-pthreads --disable-static --enable-shared --enable-gpl
--disable-debug --disable-stripping --shlibdir=/usr/lib64
--enable-runtime-cpudetect
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 't_20151029_1453.mkv':
  Metadata:
    ENCODER         : Lavf57.10.101
  Duration: 00:00:01.68, start: 0.000000, bitrate: 31092 kb/s
    Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv422p, 720x576
[SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
    Metadata:
      ENCODER         : Lavc57.9.100 libx264
      DURATION        : 00:00:01.680000000
[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=N/A
pkt_duration_time=N/A
pkt_pos=727
pkt_size=137433
width=720
height=576
pix_fmt=yuv422p
sample_aspect_ratio=16:15
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=1
top_field_first=0
repeat_pict=0
[/FRAME]

This looks OK
with mediainfo

mediainfo t_20151029_1453.mkv
General
Unique ID                                :
179807949913181140760257626143137053634 (0x8745C06226B14B9BB7A91A7AE7E9BBC2)
Complete name                            : t_20151029_1453.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 6.23 MiB
Duration                                 : 1s 680ms
Overall bit rate                         : 31.1 Mbps
Writing application                      : Lavf57.10.101
Writing library                          : Lavf57.10.101

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive at L3
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 5 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1s 680ms
Bit rate                                 : 30.5 Mbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : MBAFF
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 2.939
Stream size                              : 6.10 MiB (98%)
Writing library                          : x264 core 142 r2495 6a301b6
Encoding settings                        : cabac=1 / ref=5 /
deblock=1:0:0 / analyse=0x1:0x111 / me=umh / subme=8 / psy=0 /
mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 /
deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=12 /
lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 /
interlaced=tff / bluray_compat=0 / constrained_intra=0 / bframes=0 /
weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 /
rc=cqp / mbtree=0 / qp=0
Default                                  : Yes
Forced                                   : No
DURATION                                 : 00:00:01.680000000

Looks OK

I was told FFV1 encode as it is.
Where is my mistake?
Thanks


More information about the ffmpeg-user mailing list