Hello, I have 7 seasons of a rare old TV show that can't be found anywhere else. I want to avoid a generation loss by converting the file. The uploader probably thought that it would be a good idea to do 700 episodes in 16x9 even though it was originally shot in 4x3. I wrote this script with the help of chat GPT and no matter what I do batch is complaining about a track#4, which I don't understand where that comes from. My script and the video files don't even have any mention of track #4.
Error
Here's my scriptA track with the ID 4 was requested but not found in the file. The corresponding option will be ignored.
I tried many things like --video-tracks all but it doesn't work. I'm at loss and would like to preserve those file.Code:@echo off if [%1]==[] goto:eof set "sourceFolder=%~dp1" set "outputFolder=%sourceFolder%\remuxed" if not exist "%outputFolder%" ( mkdir "%outputFolder%" ) :loop "C:\Program Files\MKVToolNix\mkvmerge.exe" -o "%outputFolder%\%~nx1" --aspect-ratio 4:3 --track-order 0:0,0:0 "%~1" shift if not [%1]==[] goto:loop :eof pause exit
Thanks to anyone who can help with this!
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 7 of 7
Thread
-
-
I'm dumb, it's always when you post it that you see you had it in big caps in your face that whole time.
0:4/3
Fixed it all! -
Here's the remuxed MediaInfo of the file.
Code:General Format : Matroska Format version : Version 4 File size : 244 MiB Duration : 24 min 38 s Overall bit rate : 1 387 kb/s Encoded date : UTC 2023-05-27 01:19:18 Writing application : mkvmerge v71.1.0 ('Fortitude') 64-bit Writing library : libebml v1.4.4 + libmatroska v1.7.1 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4.1 Format settings : CABAC / 16 Ref Frames Format settings, CABAC : Yes Format settings, Reference frames : 16 frames Codec ID : V_MPEG4/ISO/AVC Duration : 24 min 38 s Bit rate : 1 001 kb/s Width : 624 pixels Height : 352 pixels Display aspect ratio : 4:3 Original display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 29.970 (30000/1001) FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.152 Stream size : 176 MiB (72%) Writing library : x264 core 148 r2638 7599210 Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=62500 / vbv_bufsize=78125 / crf_max=0.0 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:1.00 Default : Yes Forced : No
Display aspect ratio : 4:3
Original display aspect ratio : 16:9 -
ffmpeg can set the h.264 sar flags with a remux. See sample_aspect_ratio:
https://ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmetadata
Code:ffmpeg -i input.mp4 -c copy -bsf:v "h264_metadata=sample_aspect_ratio=3/4" output.mp4
-
-
You would probably want to do both. Some players will obey the codec's flag, some the container's flag, and some will ignore both of them.
Note that the sar flag I used in the example assumes the source is square pixel (SAR 1:1) with a 16:9 frame size. So the pixels need to squeezed horizontally to force a 4:3 display size.
Similar Threads
-
Mkvmerge, batch to mkvmerge add multiple audio tracks
By SrBills in forum Newbie / General discussionsReplies: 5Last Post: 15th Mar 2024, 11:03 -
anyone know if the following python script work ?
By DRMdec in forum Video Streaming DownloadingReplies: 2Last Post: 21st Feb 2023, 19:02 -
Batch Script for mux mp4 to mkv using mkvmerge
By iKron in forum Newbie / General discussionsReplies: 4Last Post: 20th Jun 2022, 07:47 -
MP_Pipeline does not work. PLEASE check my script.
By JeremyVN in forum RestorationReplies: 1Last Post: 28th Feb 2022, 00:42 -
Looking for Batch MP4 Normalization Script of existing script
By VideoFanatic in forum Video ConversionReplies: 6Last Post: 31st Jul 2021, 19:50