LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-31-2020, 09:16 AM   #1
GPGAgent
Member
 
Registered: Oct 2018
Location: Cornwall UK
Distribution: Mint 20 xfce 64bit
Posts: 583
Blog Entries: 2

Rep: Reputation: 87
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.
 
Old 10-31-2020, 09:30 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,827
Blog Entries: 9

Rep: Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637Reputation: 4637
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?

Last edited by ondoho; 11-01-2020 at 02:16 AM. Reason: differs lightly = differ slightly
 
Old 10-31-2020, 11:22 AM   #3
GPGAgent
Member
 
Registered: Oct 2018
Location: Cornwall UK
Distribution: Mint 20 xfce 64bit
Posts: 583

Original Poster
Blog Entries: 2

Rep: Reputation: 87
Quote:
Originally Posted by ondoho View Post
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
 
Old 10-31-2020, 12:30 PM   #4
GPGAgent
Member
 
Registered: Oct 2018
Location: Cornwall UK
Distribution: Mint 20 xfce 64bit
Posts: 583

Original Poster
Blog Entries: 2

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can ffmpeg, mencoder, handbrake fix fluctuating audio like VLC can? Bret W Linux - Newbie 6 07-10-2015 08:16 AM
Why does handbrake encodes videos faster than ffmpeg? linuxhater Linux - Software 4 11-17-2012 12:08 AM
Question - GPG on two different machines (different results) DarthWeasel Linux - Security 1 04-23-2010 03:51 PM
LXer: Linux Performance: Different Distributions, Very Different Results LXer Syndicated Linux News 0 03-09-2009 10:20 PM
Different commands, different results jadukor Slackware 8 12-16-2005 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration