<p>I have some old videos that were converted from a camcorder to DVD years ago.  On one of the DVD's, the aspect ratio is incorrect.  Most DVD players and applications seem to ignore this and play the video correctly, but some applications aren't so forgiving, and I'd like to fix the VOB files.  </p>

<p>I'm wondering if there's a way that I can use ffmpeg to correct the aspect ratio in the VOB files, without having to re-encode the video (as I assume that would incur some loss of quality)?</p>

<p>Not knowing anything about ffmpeg, and very little about video editing in general, I naively tried <code>ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 test.vob</code>, but the resulting <code>test.vob</code> file still shows an incorrect (i.e. not 4:3) display aspect ratio, at least according to mediainfo.</p>

<p>Here's a mediainfo dump for one of the problem files, note the DAR is 0.094, but it really should be 4:3.</p>

<pre><code>General
Complete name                            : D:\Users\Paul\Videos\Bob's Camera\2006-8\VTS_01_1.VOB
Format                                   : MPEG-PS
File size                                : 99.1 MiB
Duration                                 : 1 min 39 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 8 392 kb/s

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=16
Format settings, picture structure       : Frame
Duration                                 : 1 min 38 s
Bit rate mode                            : Constant
Bit rate                                 : 8 000 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 0.094
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
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.772
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
Stream size                              : 94.0 MiB (95%)

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Muxing mode                              : DVD-Video
Duration                                 : 1 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 3.02 MiB (3%)
Service kind                             : Complete Main
</code></pre>

<p>Here is the output from <code>ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 test.vob</code>:</p>

<pre><code>D:\Users\Paul\Videos\Bob's Camera\2006-8&gt;ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 test.vob
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:01:39.07, start: 0.113011, bitrate: 8391 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Overriding aspect ratio with stream copy may produce invalid files
[svcd @ 000001394d524040] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, svcd, to 'test.vob':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Stream mapping:
  Stream #0:1 -&gt; #0:0 (copy)
  Stream #0:2 -&gt; #0:1 (copy)
Press [q] to stop, [?] for help
[svcd @ 000001394d524040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame= 2967 fps=0.0 q=-1.0 Lsize=  101002kB time=00:01:39.04 bitrate=8354.3kbits/s speed= 101x
video:96673kB audio:3096kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.236023%
</code></pre>

<p>And the results of <code>ffmpeg -i test.vob</code> afterwords:</p>

<pre><code>D:\Users\Paul\Videos\Bob's Camera\2006-8&gt;ffmpeg -i test.vob
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mpeg, from 'test.vob':
  Duration: 00:01:39.07, start: 0.533367, bitrate: 8351 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
At least one output file must be specified
</code></pre>

<p>And finally mediainfo dump from the resulting <code>test.vob</code>, still showing 0.094 DAR:</p>

<pre><code>General
Complete name                            : D:\Users\Paul\Videos\Bob's Camera\2006-8\test.vob
Format                                   : MPEG-PS
File size                                : 98.6 MiB
Duration                                 : 1 min 39 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 8 352 kb/s

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=16
Format settings, picture structure       : Frame
Duration                                 : 1 min 38 s
Bit rate mode                            : Constant
Bit rate                                 : 8 000 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 0.094
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
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.772
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
Stream size                              : 93.6 MiB (95%)

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Muxing mode                              : DVD-Video
Duration                                 : 1 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 3.02 MiB (3%)
Service kind                             : Complete Main
</code></pre>

CC BY-SA 4.0
2019-05-18T05:05:06.373Z
Share full log for `ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 TEST.VOB` and after the op, `ffmpeg -i test.vob`
Gyan
CC BY-SA 4.0
2019-05-20T06:55:38.820Z
thanks, I've updated above with the requested details
Paul Galbraith
CC BY-SA 4.0
2019-05-20T07:04:09.710Z
Input already has DAR of 4:3, and so does the output. Ignore mediainfo for now and check with one of these unforgiving applications.
Gyan
CC BY-SA 4.0
2019-06-09T07:36:53.437Z
Read my [long answer](https://video.stackexchange.com/a/27792/18155) which explains, why is the transcoding inevitable in your case - or at least the ffmpeg command near the end, which you may adjust for your input file.
MarianD
<ffmpeg><aspect>
Lossless way to fix aspect ratio in VOB?
Paul Galbraith
# Lossless way to fix aspect ratio in VOB?

(Asked by: username_0 on 2019-05-17)

I have some old videos that were converted from a camcorder to DVD years ago.  On one of the DVD's, the aspect ratio is incorrect.  Most DVD players and applications seem to ignore this and play the video correctly, but some applications aren't so forgiving, and I'd like to fix the VOB files.  
I'm wondering if there's a way that I can use ffmpeg to correct the aspect ratio in the VOB files, without having to re-encode the video (as I assume that would incur some loss of quality)?
Not knowing anything about ffmpeg, and very little about video editing in general, I naively tried ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 test.vob, but the resulting test.vob file still shows an incorrect (i.e. not 4:3) display aspect ratio, at least according to mediainfo.
Here's a mediainfo dump for one of the problem files, note the DAR is 0.094, but it really should be 4:3.
General
Complete name                            : D:\Users\Paul\Videos\Bob's Camera\2006-8\VTS_01_1.VOB
Format                                   : MPEG-PS
File size                                : 99.1 MiB
Duration                                 : 1 min 39 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 8 392 kb/s

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=16
Format settings, picture structure       : Frame
Duration                                 : 1 min 38 s
Bit rate mode                            : Constant
Bit rate                                 : 8 000 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 0.094
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
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.772
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
Stream size                              : 94.0 MiB (95%)

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Muxing mode                              : DVD-Video
Duration                                 : 1 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 3.02 MiB (3%)
Service kind                             : Complete Main

Here is the output from ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 test.vob:
D:\Users\Paul\Videos\Bob's Camera\2006-8>ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 test.vob
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:01:39.07, start: 0.113011, bitrate: 8391 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Overriding aspect ratio with stream copy may produce invalid files
[svcd @ 000001394d524040] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, svcd, to 'test.vob':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], q=2-31, 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[svcd @ 000001394d524040] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame= 2967 fps=0.0 q=-1.0 Lsize=  101002kB time=00:01:39.04 bitrate=8354.3kbits/s speed= 101x
video:96673kB audio:3096kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.236023%

And the results of ffmpeg -i test.vob afterwords:
D:\Users\Paul\Videos\Bob's Camera\2006-8>ffmpeg -i test.vob
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.3.1 (GCC) 20190414
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mpeg, from 'test.vob':
  Duration: 00:01:39.07, start: 0.533367, bitrate: 8351 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 8:9 DAR 4:3], 8000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
At least one output file must be specified

And finally mediainfo dump from the resulting test.vob, still showing 0.094 DAR:
General
Complete name                            : D:\Users\Paul\Videos\Bob's Camera\2006-8\test.vob
Format                                   : MPEG-PS
File size                                : 98.6 MiB
Duration                                 : 1 min 39 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 8 352 kb/s

Video
ID                                       : 224 (0xE0)
Format                                   : MPEG Video
Format version                           : Version 2
Format profile                           : Main@Main
Format settings                          : CustomMatrix / BVOP
Format settings, BVOP                    : Yes
Format settings, Matrix                  : Custom
Format settings, GOP                     : M=3, N=16
Format settings, picture structure       : Frame
Duration                                 : 1 min 38 s
Bit rate mode                            : Constant
Bit rate                                 : 8 000 kb/s
Width                                    : 720 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 0.094
Frame rate                               : 29.970 (30000/1001) FPS
Standard                                 : NTSC
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.772
Time code of first frame                 : 00:00:00:00
Time code source                         : Group of pictures header
GOP, Open/Closed                         : Closed
Stream size                              : 93.6 MiB (95%)

Audio
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Muxing mode                              : DVD-Video
Duration                                 : 1 min 39 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 16 bits
Compression mode                         : Lossy
Stream size                              : 3.02 MiB (3%)
Service kind                             : Complete Main

**Tags:** ffmpeg, aspect

> **Comments:**
> **username_1**: Share full log for `ffmpeg -i VTS_01_1.VOB -c copy -aspect 4:3 TEST.VOB` and after the op, `ffmpeg -i test.vob`  
> **username_0**: thanks, I've updated above with the requested details  
> **username_1**: Input already has DAR of 4:3, and so does the output. Ignore mediainfo for now and check with one of these unforgiving applications.  
> **username_2**: Read my [long answer](https://video.stackexchange.com/a/27792/18155) which explains, why is the transcoding inevitable in your case - or at least the ffmpeg command near the end, which you may adjust for your input file.  

---

## 0 answers

