Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How can I improve my Blu Ray audio ripping script?
1 point by austinallegro on Dec 4, 2023 | hide | past | favorite
Hello.

I like to rip commentary tracks from my DVD and Blu Ray discs so I can put them on my DAP and listen to them at a later time, usually on a commute or while doing something else. This saves time having to rewatch a film or telelvision program again, and also means I can listen to more commentary tracks on media as I rarely would listen to them otherwise. I treat them like audio books and have learned lots of trivia from some commentary tracks.

My script assumes you have already ripped your disc to MKV, untouched and have ffmpeg installed. The script will then use the following input to scan the MKV file for audio streams, present them in a reasonably easy to read format and allow the end user to select multiple audio streams to process and convert ultimately to .ogg format in another folder.

./SCRIPTNAME.sh <srcExt> <srcDir> <destDir>

I'd like to improve this script as follows but wondered how other users might approach it:

1. Get more metadata for each audio stream, taking the lottery of choosing a stream to convert out of it. Presently I would look to convert the last 2 or 3 audio streams and hope one (or somethimes more) of them is a commentary track.

2. Per point 1, maybe integrate something like BDInfo/MediaInfo in to the script? Assuming the software is installed on the machine as a prerequesite, call the app, analyse the stream and use that output to bolster the 'ffprobe' output?

3. I only chose .ogg in order to save space. An alternative could be to offer a user input somewhere in the script select from a numbered menu of output formats e.g. .wav, .flac, *.mp3 etc

This is the script I have so far:

https://privatebin.net/?a19c10e154b382d1#3tqNHKCsLiRkDF3k8n3WdxjG3opkVRHEWmAehSyvoDZW

All comments and suggestions for changes and improvements are very welcome!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: