VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. I have a TV season I downloaded from Amazon (I did actually buy it) but whatever. The problem is whoever encoded this series set Season 1 to 4:3 and it's squeezed. Season 2 is correct.

    I don't want to re-encode. The best I was able to do was use mp4box and correct the PAR, which only works half-ass as the original AR is left in and players still play it at 4:3.

    How do I delete the original par since it's not needed?

    Code:
    mp4box -add input.mp4#video:par=64:45 -add input.mp4#audio fixed.mp4
    The resulting file is:

    Code:
    Width : 720 pixels 
    Height : 576 pixels 
    Display aspect ratio : 16:9 
    Original display aspect ratio : 4:3 
    Frame rate mode : Constant 
    Frame rate : 29.970 (30000/1001) FPS
    The correct second season does not have that "original aspect ratio" present, that's what I want to take out.

    Thanks.
    Quote Quote  
  2. I doubt mp4box can do what's needed. You should use ffmpeg:

    Code:
    ffmpeg -i "%~dpnx1" -aspect 16:9 -map 0 -c copy -bsf:v h264_metadata=sample_aspect_ratio=64/45 "%~dpn1_16x9.mp4"
    That's a batch file suitable for drag/drop operations. In Explorer you can drag a file onto it and a new file will be produced in the same folder. You may need to specify the full path to ffmpeg.exe.
    Quote Quote  
  3. Thanks that was a big help. The only issue is it only works on the modified PAR file w/ mp4box. It removed the "Original display aspect ratio : 4:3" and is now D1 PAL Widescreen like Season 2. That's an extra step.

    When I try the batch file on the original 4:3 file I get:
    Code:
    J:\he-man fix\ffmpeg-6.0-full_build\bin>ffmpeg -i "J:\he-man fix\ffmpeg-6.0-full_build\bin\1.mp4" -aspect 16:9 -map 0 -c copy -bsf:v h264_metadata=sample_aspect_ratio=64/45 "J:\he-man fix\ffmpeg-6.0-full_build\bin\1_16x9.mp4"
    ffmpeg version 6.0-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
      built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
      configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
      libavutil      58.  2.100 / 58.  2.100
      libavcodec     60.  3.100 / 60.  3.100
      libavformat    60.  3.100 / 60.  3.100
      libavdevice    60.  1.100 / 60.  1.100
      libavfilter     9.  3.100 /  9.  3.100
      libswscale      7.  1.100 /  7.  1.100
      libswresample   4. 10.100 /  4. 10.100
      libpostproc    57.  1.100 / 57.  1.100
    [mov,mp4,m4a,3gp,3g2,mj2 @ 000001ca33f01240] stream 0, timescale not set
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'J:\he-man fix\ffmpeg-6.0-full_build\bin\1.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomdby1iso2avc1mp41
        title           : The Beginning, Part 2
        date            : 2003
        encoder         : Lavf60.3.100
        description     : When Skeletor attacks his kingdom, King Randor and his men fight to stop him. Adam decides that it is time to accept his destiny and becomes, He-Man.
        show            : He-Man and the Masters of the Universe (2002)
        episode_id      : 1
      Duration: 00:23:06.75, start: 0.000000, bitrate: 1078 kb/s
      Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 720x576 [SAR 16:15 DAR 4:3], 844 kb/s, 29.97 fps, 29.97 tbr, 120k tbn (default)
        Metadata:
          handler_name    : USP Video Handler
          vendor_id       : [0][0][0][0]
          encoder         : AVC Coding
      Stream #0:1[0x3](eng): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, stereo, fltp, 224 kb/s (default)
        Metadata:
          handler_name    : USP Sound Handler
          vendor_id       : [0][0][0][0]
        Side data:
          audio service type: main
      Stream #0:2[0x4](eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
        Metadata:
          handler_name    : SubtitleHandler
      Stream #0:3[0x0]: Video: png, rgb24(pc), 720x540 [SAR 4724:4724 DAR 4:3], 90k tbr, 90k tbn (attached pic)
    [vost#0:0/copy @ 000001ca33f1f3c0] Overriding aspect ratio with stream copy may produce invalid files
    [vost#0:3/copy @ 000001ca33fcc140] Overriding aspect ratio with stream copy may produce invalid files
    [h264_metadata @ 000001ca33ee7340] Codec 'png' (61) is not supported by the bitstream filter 'h264_metadata'. Supported codecs are: h264 (27)
    [vost#0:3/copy @ 000001ca33fcc140] Error initializing bitstream filter: h264_metadata
    [vost#0:3/copy @ 000001ca33fcc140] Error initializing output stream:
    Stream mapping:
      Stream #0:0 -> #0:0 (copy)
      Stream #0:1 -> #0:1 (copy)
      Stream #0:2 -> #0:2 (copy)
      Stream #0:3 -> #0:3 (copy)
        Last message repeated 1 times
    
    J:\he-man fix\ffmpeg-6.0-full_build\bin>Pause
    Press any key to continue . . .
    Is there anyway to make this 1 step and avoid using the mp4box par file? WOrse comes to worse this will work.

    Thanks
    Quote Quote  
  4. Nevermind, the problem was the original 4:3 had subtitles in the them and SRT was stopping it. No big deal. Works fine. Thanks again.
    Quote Quote  
  5. Was it the subs or the PNG image ?


    You have 2 video streams (the 2nd video stream 0:3 is a PNG image, not h264, so h264 bitstream filter will produce an error) . If wanted to keep all streams (subs, PNG image), try limiting the bsf to stream 0:0

    Stream #0:3[0x0]: Video: png, rgb24(pc), 720x540 [SAR 4724:4724 DAR 4:3], 90k tbr, 90k tbn (attached pic)
    [h264_metadata @ 000001ca33ee7340] Codec 'png' (61) is not supported by the bitstream filter 'h264_metadata'. Supported codecs are: h264 (27)

    Try
    Code:
    -bsf:v:0
    instead of

    Code:
    -bsf:v
    Quote Quote  
  6. Ah that worked perfectly You were spot on. I thought it was SRT because I removed it in ffmpeg batch, guess it also removed the png. I assume the PNG is the screen shot that Amazon uses on the video and the program just packed it that way.

    Thanks you're a life savior!
    Quote Quote  
  7. You should report the issue to Amazon, because the average viewer will not have any clue about of any this, or what ffmpeg even is . Maybe their QCer will pay more attention next time
    Quote Quote  
  8. I left a review, but can try contacting support.
    Quote Quote  
  9. I just told Amazon support, hopefuly they will fix it.
    Quote Quote  



Similar Threads

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