VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Hi,

    I have a video from a capturing device that has captured footage from an old computer (MDA graphics 720x350). The captured video file has a resolution of 1024x768 (dictated by the capturing device), but the video shows the content way too narrow (it is captured like a square, so I need to increase the width of the video somehow or change the aspect ratio).

    If I load up the file in VLC player, it looks like this

    Image
    [Attachment 50868 - Click to enlarge]


    If I change the aspect ratio in VLC player to 16:9 it actually looks a lot better and resembles more what I see on the monitor.
    So I would like to have it permanently look like that by modifying the video file itself, so other players will play it automatically like that

    Image
    [Attachment 50869 - Click to enlarge]


    As you can see the image is stretched out, and resembles more what I see on the monitor.

    What I've tried :

    - I tried using the VLC convert / stream function by changing the resolution (width / height) but it doesn't seem to change the aspect ratio.
    - I've also tried using mp4muxer, but if I multiplex and change the width / height, the output file always looks exactly the same.

    Any ideas how I should proceed in exporting this to a video file where it is stretched out and resembles the 16:9 playback in VLC ?

    Thx a lot.
    Last edited by ddewaele; 16th Nov 2019 at 10:43.
    Quote Quote  
  2. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Ok. Better start with an upload to here of a mediainfo (text mode) report of the original .mp4

    Frankly, I have never heard of any capture device that could capture at 124*768 and if your previous graphics were only 720*350 I can hardly see it capturing at more than double the vertical resolution.
    Quote Quote  
  3. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    Do you need the mp4 container? Is not drop it into mkvtoolnix and under the video tab set the appropriate aspect or display resolution
    if all else fails read the manual
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    https://superuser.com/questions/907933/correct-aspect-ratio-without-re-encoding-video-file

    To scale the image and change SAR (while transcoding), try:
    Code:
    ffmpeg -i <INPUT_FILE> -vf scale=854:480 -c:v <Video_Codec> <OUTPUT_FILE>
    On the other hand, if you just want to change the metadata flag and adjust the DAR, you will be able to stream copy the video. To do this, try:
    Code:
    ffmpeg -i <INPUT_FILE> -aspect 16:9 -c copy [OUTPUT_FILE]
    -aspect[tream_specifier] aspect (output,per-stream)
    Set the video display aspect ratio specified by aspect.

    aspect can be a floating point number string, or a string of the form num:den, where num and den are the numerator and denominator of the aspect ratio. For example "4:3", "16:9", "1.3333", and "1.7777" are valid argument values.
    Quote Quote  
  5. Originally Posted by DB83 View Post
    Ok. Better start with an upload to here of a mediainfo (text mode) report of the original .mp4

    Frankly, I have never heard of any capture device that could capture at 124*768 and if your previous graphics were only 720*350 I can hardly see it capturing at more than double the vertical resolution.
    Sorry about the typo .. should have been 1024x768.

    Going to add the media info.
    Quote Quote  
  6. I ended up using the following tool / command

    Code:
    mp4box original.mp4 -out out-4.mp4 -par 2=4:3
    Here is the original file

    Code:
    General
    Complete name                            : Y:\video\original.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/isom)
    File size                                : 34.3 MiB
    Duration                                 : 58 s 880 ms
    Overall bit rate                         : 4 884 kb/s
    Encoded date                             : UTC 2019-11-14 20:07:25
    Tagged date                              : UTC 2019-11-14 20:07:25
    
    Video
    ID                                       : 2
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.1
    Format settings                          : CABAC / 1 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 1 frame
    Format settings, GOP                     : M=1, N=30
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 58 s 880 ms
    Source duration                          : 58 s 867 ms
    Bit rate                                 : 4 762 kb/s
    Width                                    : 1 024 pixels
    Height                                   : 768 pixels
    Display aspect ratio                     : 4:3
    Frame rate mode                          : Variable
    Frame rate                               : 29.970 (29970/1000) FPS
    Minimum frame rate                       : 20.000 FPS
    Maximum frame rate                       : 30.000 FPS
    Original frame rate                      : 30.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.202
    Stream size                              : 33.4 MiB (97%)
    Source stream size                       : 33.4 MiB (97%)
    Language                                 : English
    Encoded date                             : UTC 2019-11-14 20:07:25
    Tagged date                              : UTC 2019-11-14 20:07:25
    Color range                              : Limited
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    mdhd_Duration                            : 58866
    Codec configuration box                  : avcC
    Image
    [Attachment 50881 - Click to enlarge]


    And after executing the mp4box command above I got this file :

    Code:
    General
    Complete name                            : Y:\video\out-4.mp4
    Format                                   : MPEG-4
    Format profile                           : Base Media / Version 2
    Codec ID                                 : mp42 (mp42/isom)
    File size                                : 34.3 MiB
    Duration                                 : 58 s 888 ms
    Overall bit rate                         : 4 889 kb/s
    Encoded date                             : UTC 2019-11-14 20:07:25
    Tagged date                              : UTC 2019-11-14 20:07:25
    
    Video
    ID                                       : 2
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L4.1
    Format settings                          : CABAC / 1 Ref Frames
    Format settings, CABAC                   : Yes
    Format settings, Reference frames        : 1 frame
    Format settings, GOP                     : M=1, N=30
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 58 s 866 ms
    Source duration                          : 58 s 867 ms
    Bit rate                                 : 4 762 kb/s
    Width                                    : 1 024 pixels
    Height                                   : 768 pixels
    Display aspect ratio                     : 16:9
    Original display aspect ratio            : 4:3
    Frame rate mode                          : Variable
    Frame rate                               : 29.970 (29970/1000) FPS
    Minimum frame rate                       : 20.000 FPS
    Maximum frame rate                       : 30.000 FPS
    Original frame rate                      : 30.000 FPS
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.202
    Stream size                              : 33.4 MiB (97%)
    Source stream size                       : 33.4 MiB (97%)
    Language                                 : English
    Encoded date                             : UTC 2019-11-14 20:07:25
    Tagged date                              : UTC 2019-11-15 09:13:45
    Color range                              : Limited
    Image
    [Attachment 50882 - Click to enlarge]


    This was pretty much the visual I was looking for. So if I understand correctly only a parameter (meta-data) was changed (Display aspect ratio) and not the actual file.
    But why did it end up setting 16:9 in the meta-data when I specified "-par 2=4:3" in the mp4box command ?
    When I specified "-par 2=16:9" in the mp4box command the Display aspect ratio was set to 2.40:1
    Quote Quote  
  7. Keep in mind that changing the flagged aspect ratio will not work with all players. Media players built into TVs, Blu-ray players, and other devices may ignore the flags.
    Quote Quote  
  8. Member DB83's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Search Comp PM
    Originally Posted by ddewaele View Post
    Originally Posted by DB83 View Post
    Ok. Better start with an upload to here of a mediainfo (text mode) report of the original .mp4

    Frankly, I have never heard of any capture device that could capture at 124*768 and if your previous graphics were only 720*350 I can hardly see it capturing at more than double the vertical resolution.
    Sorry about the typo .. should have been 1024x768.

    Going to add the media info.
    Well I guess as much.

    The mediainfo report confirms that the original video is 4:3 which also agrees to the 1024*768 (just check the maths)

    It is possible that you were fooled by the display and the monitor somewhat hid the black borders that merged into the original frame.

    I can not answer your Q. as to why that command should result in a 16:9 DAR. A 1024*768 4:3 should result in 1366*768 and you may wish to create a vid with those parameters. Be warned, however, that such a stretch will change the display of all text. For purely text it will not be so obvious but for general video such a stretching is not desirable.

    Yet I still struggle to understand where the 1024*768 came from in the first place.
    Quote Quote  



Similar Threads