31

I have the following VOB file:

ffmpeg -i input.vob output:

ffmpeg version N-77455-g4707497 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
  libavutil      55. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 20.100 / 57. 20.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 21.101 /  6. 21.101
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpeg, from 'input.vob':
  Duration: 00:31:36.96, start: 0.335967, bitrate: 6517 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg), 720x576 [SAR 64:45 DAR 16:9], max. 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s

mediainfo input.vob output:

General
Complete name                            : input.vob
Format                                   : MPEG-PS
File size                                : 1.44 GiB
Duration                                 : 31mn 36s
Overall bit rate mode                    : Variable
Overall bit rate                         : 6 518 Kbps

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Default
Format settings, GOP                     : M=3, N=12
Format settings, picture structure       : Frame
Duration                                 : 31mn 36s
Bit rate mode                            : Variable
Bit rate                                 : 6 132 Kbps
Maximum bit rate                         : 9 800 Kbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.591
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
Stream size                              : 1.35 GiB (94%)
Color primaries                          : BT.601 PAL
Transfer characteristics                 : BT.470 System B, BT.470 System G
Matrix coefficients                      : BT.601

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 31mn 36s
Bit rate mode                            : Constant
Bit rate                                 : 256 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 57.9 MiB (4%)

I have converted it to mp4 with the following command:

ffmpeg -i input.vob -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k -threads 0 output.mp4

In the resulting video I see this effect:

img1 img2 img3

How can I solve?

1

1 Answer 1

48

Add the yadif filter i.e.

ffmpeg -i input.vob -vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k output.mp4

See yadif docs for more info.

3
  • 5
    From empirical comparison I think the bwdif deinterlacing algorithm is superior to yadif, however QTGMC is superior to all of those. If you have to stick with FFmpeg, the nnedi filter is definitely superior but at the cost of massive reduction in processing speed. What is your use case, how critical is rendering time and must you stick with FFmpeg or could you branch out into other tools which use FFmpeg along with other things like Vapoursynth? May 25, 2021 at 22:54
  • 1
    -vf yadif_cuda if you have NVidia and CUDA installed. Jun 9, 2021 at 11:46
  • To expand on Woods' comment, QTGMC, by default, uses nnedi to deint. What makes QTGMC special is the extra filtering it does before and after nnedi. It also has presets to make it easy to use without fiddling with settings for days. nnedi can be 4x slower or more if you turn off the prescreener--which is not suggested because it gains you little. Otherwise, ffmpeg's default nnedi slowed my overall job by only 25% vs bwdif default. Without QTGMC, nnedi is slightly better than bwdif. With QTGMC, it is massively better. Hybrid makes QTGMC easy: forum.videohelp.com/threads/401770
    – juanitogan
    yesterday

Not the answer you're looking for? Browse other questions tagged or ask your own question.