View Single Post
Old 9th October 2020, 08:23   #1  |  Link
bjoker
Registered User
 
Join Date: Jan 2013
Posts: 50
ffmpeg CLI syntax for encoding DVD Remux please

Hi,

Source NTSC DVD Remux - specs: ( Mediainfo = https://pastebin.com/dRTLVWFC )
1) It has 720 x 480 resolution.
2) PAR should be 40/33 - tried to pass "--sar 40:33" to x264
3) cropping should be Crop(2,50,-0,-42) so used filter:v "crop=718:390:2:50"
4) De-interlacing needs to be done so used -vf yadif as one of 5 frames is duplicate.

so tried - (to encode first 10 min)
Code:
Z:\>ffmpeg -y -i "ABCD_Source.mkv" -ss 0 -t 600 -filter:v "crop=718:390:2:50" -vf yadif -vcodec libx264 -preset placebo -crf 16 -refs 16 -sar "40:33" -x264-params  "me=umh:subme=11:bframes=16:deblock=-3,-3:no-dct-decimate=1:rc-lookahead=100:me_range=48:keyint_min=23" -acodec copy  ABCD_ffm2.mkv
But it throws the below error:
Code:
[matroska @ 00000199d16f1e80] Aspect ratio mismatch between muxer (186/157) and encoder layer (40/33)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!
Then I tried without "-sar 40:33" , it encodes but with wrong o/p resolution 720:480. Expected is 718x390 with display size 870x390 as 718*(40/33)=870.30.

Please advise correct ffmpeg command with deinterlacing, cropping and SAR/PAR/DAR parameter for a DVD remux source. It would be good to include Color matrix

Thanks!
bjoker is offline   Reply With Quote