lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
540 stars 24 forks source link

Other transcode vs classic transcode quality metrics #177

Closed bolognasammich closed 1 year ago

bolognasammich commented 1 year ago

Hello,

I've ran a few movies through both recommendations given previously and I ran them through FFmetrics (I know its a separate program but I fully intend to rip my collection using your programs) and basically classictranscode blew othertranscode out of the water and I'm just trying to inquire the how and why.

I used this command for othertranscode

other-transcode --crop auto --add-subtitle 1 --x264-cbr --eac3 C:\Rips\Gravity.mkv

and this command for classic transcode

ruby classic-transcode.rb --eac3 C:\Rips\Gravity.mkv

metrics

and the screenshot enclosed is what the metrics said. I know psnr, ssim aren't the end all be all of quality checking but I'm just trying to get a decent frame of reference. Any thoughts or opinions on any quality metric is welcome. I wonder if it could be because othertranscode is set at 800p? Or maybe because my PC is a few years behind hardware-wise? Really not sure.

Also, minor thing, will classictranscode output to mkv or just mp4?

As always, any help is appreciated.

Thanks!

lisamelton commented 1 year ago

@bolognasammich I have no idea why you're getting such different results. You could use the --dry-run option with each and show me which FFmpeg commands are being run and that might tell me something. BTW, I've never heard of FFmetrics nor understand how it works so I can't determine if it's actually capturing data for both scripts correctly.

Also, the final output from classic-transcode.rb is always an MKV file. The MP4 output is temporary and deleted after muxing.

bolognasammich commented 1 year ago

Here is the dry run for classic

ruby classic-transcode.rb --eac3 --dry-run C:\Rips\Gravity.mkv Configuring... Scanning media... duration = 01:30:58.494 Stream mapping: 0 = 7500 Kbps video 1 = eac3 audio 3 = (no name) subtitle classic-transcode.rb: subtitles file already exists: Gravity.mkv.subtitles.mkv

And other transcode

other-transcode --crop auto --add-subtitle 1 --x264-cbr --eac3 --dry-run C:\Rips\Gravity.mkv Verifying "ffprobe" availability... Verifying "ffmpeg" availability... Verifying "mkvpropedit" availability... Finding encoders... Scanning media... Detecting crop... ... crop = 1920:800:0:140 duration = 01:30:58.494 Stream mapping: 0 = libx264 / 7500 Kbps 1 = eac3 3 = hdmv_pgs_subtitle Command line: ffmpeg -loglevel error -stats -i C:\Rips\Gravity.mkv -map 0:0 -filter:v crop=1920:800:0:140 -c:v libx264 -b:v 7500k -maxrate:v 7500k -bufsize:v 7500k -profile:v high -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 -metadata:s:v title= -disposition:v default -map 0:1 -c:a:0 eac3 -metadata:s:a:0 title= -disposition:a:0 default -map 0:3 -c:s:0 copy -disposition:s:0 0 -metadata:g title= -default_mode passthrough Gravity.mkv

Ive just been using CLI for othertranscode and CLI with ruby for classictranscode.

Is there a video quality checker you'd recommend that'd fill a similar role to ffmetrics?

I've exited out of CLI after file was done converting and its still displaying as mp4. Do I need to reset PC? A little confused on muxing lol.

lisamelton commented 1 year ago

@bolognasammich Thanks, but you need to run classic_transcode.rb again and remove the output file from the current directory. Because, if you'll notice, no FFmpeg command was output.

bolognasammich commented 1 year ago

My bad, here it is

ruby classic-transcode.rb --eac3 --dry-run C:\Rips\Gravity.mkv Configuring... Scanning media... duration = 01:30:58.494 Stream mapping: 0 = 7500 Kbps video 1 = eac3 audio 3 = (no name) subtitle Command line: ffmpeg -loglevel error -stats -i C:\Rips\Gravity.mkv -map 0:0 -c:v libx264 -level:v 4 -b:v 7500k -maxrate:v 7500k -bufsize:v 7500k -bsf:v filter_units=pass_types=1-5 -color_primaries:v bt709 -color_trc:v bt709 -colorspace:v bt709 -metadata:s:v title= -disposition:v default -map 0:1 -c:a eac3 -b:a 640k -metadata:s:a title= -disposition:a default -sn -map_chapters -1 -metadata:g title= Gravity.mp4 -vn -an -map 0:3 -c:s:0 copy -metadata:s:s:0 title= -disposition:s:0 0 -map_chapters -1 Gravity.mkv.subtitles.mkv

lisamelton commented 1 year ago

@bolognasammich Thanks. OK, other than the crop, there's nothing of significance different between the video encoding commands. So I suspect something is whacky with the FFmetrics tool.

And I wouldn't recommend any video comparison tool other than your Mark I eyeballs.

bolognasammich commented 1 year ago

You underestimate how thick my glasses are lol.

I'll be sure to take a close look on my monitor at both rips playing. But the classic transcode is still mp4? And could the cropping be why the other transcode rip registers at 800p instead of 1080p? Would that be something I want when ripping?

samhutchins commented 1 year ago

800p/1080p is referencing the height of the video, either 800 or 1080 pixels respecivelty. The crop you do with other-transcode takes the video height down to 800 pixels.

Given that the output dimensions are different from the input dimensions, I'm not surpised that the stats are different. Try either cropping both or cropping neither, and see what happens

bolognasammich commented 1 year ago

I will try both! Could someone please tell me what the command for cropping is in classic transcode? I'm getting this error message and I don't see anything in help

ruby classic-transcode.rb --eac3 --crop auto C:\Rips\Gravity.mkv classic-transcode.rb: invalid option: --crop Try classic-transcode.rb --help for more information.

What would be the reasoning for wanting 800p over 1080p from cropping?

lisamelton commented 1 year ago

@bolognasammich There is no cropping option in classic-transocde.rb and that is by design.

bolognasammich commented 1 year ago

Would you recommend cropping at all? Or the pros and cons of cropping. Sorry to ask so many questions I just want to get this right lol.

lisamelton commented 1 year ago

@bolognasammich If you're including image-based subtitles as separate tracks, which is the default behavior of classic-transcode.rb, then I would not crop your video. This is because the subtitles may not be displayed correctly.

bolognasammich commented 1 year ago

Okay, I think that makes sense. So cropping video is really only necessary to prevent subtitles being obscured?

klogg416 commented 1 year ago

Cropping isn't necessary at all. Any black bars don't steal meaningful bitrate and there can be unintended consequences like breaking subtitles or introducing edge artifacts. If you are looking to do comparisons the general advice around here is start with stock settings and tweak to solve issues you find. The default values come about from pretty thorough testing and reflect the best compression that works for the most test cases.

I'd start with other-transcode --add-subtitle 1 --x264-cbr --eac3 C:\Rips\Gravity.mkv and ruby classic-transcode.rb --eac3 C:\Rips\Gravity.mkv

Happy testing.