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?
The resulting file is:Code:mp4box -add input.mp4#video:par=64:45 -add input.mp4#audio fixed.mp4
The correct second season does not have that "original aspect ratio" present, that's what I want to take out.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
Thanks.
+ Reply to Thread
Results 1 to 9 of 9
-
-
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"
-
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 . . .
Thanks -
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.
-
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
Code:-bsf:v
Similar Threads
-
DVD - Change aspect ratio by editing ifo files?
By Just_a_boy in forum EditingReplies: 2Last Post: 1st Feb 2022, 19:07 -
Change aspect ratio with MKVMerge from command line?
By Rekrul in forum Newbie / General discussionsReplies: 4Last Post: 6th Feb 2021, 14:54 -
Incorrect aspect ratio on video?
By hairychickenlegs in forum Software PlayingReplies: 2Last Post: 22nd Jan 2021, 09:57 -
Videos from Dailymotion with incorrect aspect ratio?
By amgray19 in forum Video Streaming DownloadingReplies: 5Last Post: 18th Feb 2020, 01:05 -
Incorrect aspect ratio after authoring in FMPGEnc Authoring Works 6
By ibzomie in forum Authoring (DVD)Replies: 2Last Post: 19th Dec 2018, 09:14