VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member ItaloFan's Avatar
    Join Date
    Jul 2018
    Location
    Colorado, USA
    Search Comp PM
    I am trying to losslessly (if possible) fix the aspect ratio of an MPEG-2 video in a VOB file.
    (You can get the first few seconds here: input.vob)

    Its actual pixel dimensions are 720x480, but SAR 32:27 DAR 16:9 (according to ffmpeg -i), and I want it to be DAR 4:3. I figure it should be just a matter of changing some metadata to get the DAR to be 4:3. But I tried every combination of ffmpeg options I could think of, to no avail. These did not help:

    Code:
    ffmpeg -i input.vob -aspect 4/3 -c copy output.vob
    ffmpeg -i input.vob -bsf:v mpeg2_metadata=display_aspect_ratio=4/3 -c copy output.vob
    ffmpeg -i input.vob -bsf:v mpeg2_metadata=display_aspect_ratio=4/3 -aspect 4/3 -c copy output.vob
    In each case, the output.vob still has SAR 32:27 DAR 16:9, even though FFmpeg claimed it was going to write SAR 8:9 DAR 4:3. The same thing happens if the output is specified as output.m2v; it's not specific to the VOB container.

    Various attempts at transcoding also fail in the same way:

    Code:
    ffmpeg -i input.vob -vf setdar=dar=4/3 -b:v 6000k -maxrate 7000k -bufsize 1835k -c:v mpeg2video -c:a copy output.vob
    ffmpeg -i input.vob -aspect 4/3 -vf setdar=dar=4/3 -b:v 6000k -maxrate 7000k -bufsize 1835k -c:v mpeg2video -c:a copy output.vob
    ffmpeg -i input.vob -bsf:v mpeg2_metadata=display_aspect_ratio=4/3 -vf setdar=dar=4/3 -b:v 6000k -maxrate 7000k -bufsize 1835k -c:v mpeg2video -c:a copy output.vob
    ffmpeg -i input.vob -aspect 4/3 -bsf:v mpeg2_metadata=display_aspect_ratio=4/3 -vf setdar=dar=4/3 -b:v 6000k -maxrate 7000k -bufsize 1835k -c:v mpeg2video -c:a copy output.vob
    Weirdly, the setsar filter seems to be more effective than any other at getting ffmpeg -i to show the right SAR/DAR for output.vob, but it still plays as 16:9 in VLC:

    Code:
    ffmpeg -i input.vob -vf setsar=sar=8/9 -aspect 4/3 -c:v mpeg2video -b:v 6000k -maxrate 7000k -bufsize 1835k -c:a copy output.vob
    However, if I transcode to H.264, then there is no problem, I get 4:3 output as expected:

    Code:
    ffmpeg -i input.vob -aspect 4/3 -c:a copy output.mp4
    Is there no way to fix this video's DAR when writing MPEG-2 output? (losslessly, I hope)
    Last edited by ItaloFan; 12th Jul 2018 at 13:31. Reason: fixed video link
    Quote Quote  
  2. If you have a VOB, then you have the DVD as well? If so, open the DVD in PGCEdit. Right-click on the video in question and hit 'Domain Stream Attributes'. In there change from 16:9 to 4:3. Save your work and test.

    If you have only the VOB, you can demux, fix the M2V in ReStream, followed by remuxing.
    Quote Quote  
  3. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    VOBs are more than just MPEG ProgramStreams, they contain also DVD Video specific metadata. And IFO files as companion to these VOB segments contain some as well.

    If you want to patch attributes in a DVD Video medium, try to use the DVDPatcher. – And manono knows good advices too.
    Quote Quote  
  4. Member ItaloFan's Avatar
    Join Date
    Jul 2018
    Location
    Colorado, USA
    Search Comp PM
    It is a VHS transfer that someone decided to put into a VOB, so no DVD source available.

    Thanks for suggesting ReStream. At first I thought it would not work because it was reading the demuxed m2v as 4:3 and thus makes no changes to it. But then I looked at the other info it provided, and saw "Sequence Display Extension" with horizontal size 540. Not sure what it means, but changing the drop-down in that section from "don't change" to "remove" solved the problem and made the DAR be 4:3 per ffmpeg and playing with the correct ratio in VLC.
    Quote Quote  
  5. Originally Posted by ItaloFan View Post
    Thanks for suggesting ReStream. At first I thought it would not work because it was reading the demuxed m2v as 4:3 and thus makes no changes to it. But then I looked at the other info it provided, and saw "Sequence Display Extension" with horizontal size 540. Not sure what it means, but changing the drop-down in that section from "don't change" to "remove" solved the problem and made the DAR be 4:3 per ffmpeg and playing with the correct ratio in VLC.
    this 540 is related to Horizontal PanScan vector - important when your decoder use letter/pillar box mode. Sequence Display Extension is place where such information can be stored.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!