LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ffmpeg / handbrake different results (https://www.linuxquestions.org/questions/linux-software-2/ffmpeg-handbrake-different-results-4175684495/)

GPGAgent 10-31-2020 08:16 AM

ffmpeg / handbrake different results
 
I use ffmpeg (Version 4.2.4) and HandBrakeCli (Version 1.3.1) but they produce slightly different aspect ratios for the encoded output, here's the relevant info:
Code:

Input vob file (from a dvd)

FFprobe of the vob file:
ffprobe: Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first),
720x576 [SAR 16:15 DAR 4:3], 4000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
 

ffmpeg process
=========
The command:
ffmpeg -i V/Title-9.vob -vf yadif -crf 28 -c:v libx265 -preset medium ff-09.mp4

ffprobe of the output:
Stream #0:0(und): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive),
720x576 [SAR 16:15 DAR 4:3], 567 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)



HandBrakeCli process
==============
The command:
 HandBrakeCLI -i V/*.iso -t 9 -e x265 --x265-preset medium  -2 -T -q 28 -d -m -o hb-09.mp4


 ffprobe of the output:
Stream #0:0(und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, smpte170m/bt470bg/bt709),
700x576 [SAR 16:15 DAR 35:27], 549 kb/s, 24.99 fps, 25 tbr, 90k tbn, 25 tbc (default)

I can see that HandBrake works out the DAR values differently from the vob file.



The question is what settings do I need to get HandBrake to preserve the aspect ratio? I don't want to enter the width and height, I'd rather HandBrake did this for me. I've tried the obvious like --keep-display-aspect and other flags but to no affect.

ondoho 10-31-2020 08:30 AM

On my system, handbrake doesn't even depend on ffmpeg, so it's not surprising that results differ slightly.
Not getting the aspect ratio right despite "--keep-display-aspect" is more than lightly, though. Maybe the pixel aspect is not 1:1?

GPGAgent 10-31-2020 10:22 AM

Quote:

Originally Posted by ondoho (Post 6180420)
On my system, handbrake doesn't even depend on ffmpeg, so it's not surprising that results differs lightly.
Not getting the aspect ratio right despite "--keep-display-aspect" is more than lightly, though. Maybe the pixel aspect is not 1:1?

On my system as well, HandBrake doesn't depend on ffmpeg - both run independently

GPGAgent 10-31-2020 11:30 AM

Handy as HandBrake Cli is, I'm going to stick with using dvdbackup to extract the titles, and ffmpeg to encode to mp4.


All times are GMT -5. The time now is 11:45 PM.