Thanks Noggin, I sort of had a feeling it was a Handbrake thing. It is a Pi 3B I have. I should have probably said I used LibreElec as a boot OS on the Pi too.
I'll rip a DVD with MakeMKV to see how it looks in its raw form through Kodi and then see if I can use FFMPEG directly or something to cut the file size down rather then letting Handbrake make a hash of it.
Thanks
I'd probably deinterlace to 50p if I were transcoding (and I do) - which will avoid problems on platforms that don't handle deinterlacing properly.
The w3fdif deinterlacer in ffmpeg is pretty good - so a
-vf "w3fdif=complex:all"
filter in your ffmpeg command line is a good bet. (It's a deinterlacer designed by the BBC for use in standards converters and digital video effects gear, and uses a neat V/T filtering approach that avoids motion compensation or adaption that can go wrong)
I'd probably use h.264 for the video codec - and use libx264 (not any hardware accelerated encoding - as the quality hit you take will mean an increased file size or lower quality pictures at a given bitrate) You can chose to run at a constant bitrate, constant quality, or do a two pass encode that increases quality at the expense of encode time (for a target average bitrate)
I used to use two-pass encoding when storage space was tight, I know just use a reasonable -crf (constant quality) option (-crf 18 is pretty visually lossless, but won't reduce file sizes much. -crf 23 is a default that is OK - and lower bitrate - but I can see additional artefacts being introduced)
So I'd use
-vcodec libx264 -crf 18
for my video codec parameters.
For audio I'd usually keep that untouched using
-acodec copy
unless I was going to playback DVDs (which usually use AC3/Dolby Digital) on a system without Dolby support . If that is the case I'd transcode to AAC, using something like
-acodec aac -ab 256k
for a decent quality stereo AAC
I'd usually .mp4 as my output wrapper as it has good support (though mkv can be more flexible)
Example would be - with an input 576i25 MPEG2 + AC3 DVD in a .mkv wrapper where I want the first track (video) and second track (audio) and no subtitles or additional audio tracks output as 576p50 h.264 with AAC audio.
ffmpeg -i "DVD.mkv" -map 0:0 -map 0:1 -acodec aac -ab 256k -vcodec libx264 -crf 18 -vf "w3fdif=complex:all" "DVD.transcoded.mp4"
If you don't know how many tracks there are in a file, and which ones are which, then you can run ffmpeg on the file with nothing other than the -i option with the source filename and it will tell you.
(And yes - ffmpeg experts - I know I should have switched to the new format of -v:c -a:b -v:filter etc. but I can never remember the precise syntax!)
Last edited by noggin on 17 March 2019 9:46am - 8 times in total