Skip to content

Instantly share code, notes, and snippets.

@zcot

zcot/README.md Secret

Created August 27, 2021 02:12
Show Gist options
  • Save zcot/accd7033dc41a037e2a63f4f15e8c52b to your computer and use it in GitHub Desktop.
Save zcot/accd7033dc41a037e2a63f4f15e8c52b to your computer and use it in GitHub Desktop.

Audio CD ripping helper OMG

mederi created the Audio CD ripping helper extension, he is really the master of most of this stuff: https://forum.videolan.org/viewtopic.php?p=436477#p436477

idrinkwater added functionality to pre-name the files and using a naming scheme: https://forum.videolan.org/viewtopic.php?p=518698#p518698

zcot wanted the metadata, artwork, and not have to type out anything, just rip, so it has all led to the OMG version, -way too much going on, overdrive, but a fun thing to program!

So, here we have "Audio CD ripping helper OMG", and it should encompass each of the useful scenarios.

The extension can operate in two modes. Manual mode or Metadata mode.

Metadata mode will use the network collected metadata, and so for that reason you should clear the playlist, load the cd, and let it collect the network metadata first, before you even start this extension. If you do this, you will not have to type any Artist, Album, or Titles, and you can save the metadata and artwork into the saved(transcoded) tracks.

Some of the cddb servers have been shut down or changed and will not work now. The most recent stable one might be gnudb.gnudb.org

Tools -> Preferences -> All : Input/Codecs -> Access Modules -> Audio CD : gnudb.gnudb.org

General Usage:

You just follow the GUI from top to bottom and change things as needed. For Metadata mode, view the playlist, clear it, load the cd, then open the extension(so it can read the album metadata).

Manual mode, you just type everything that is needed.

Setting defaults: Use these to set a good starting point for the extension. Edit the .lua file and change the local variables as noted.

Default optical disk path:

--local cdr_user_default_cd_path = "D:/" --Windows users, use / instead of \ in paths(vlc handles it, this extension does not).
local cdr_user_default_cd_path = "/dev/sr0" --Linux users

Default destination path:

--local cdr_user_default_destination_path = "C:/rip/"
local cdr_user_default_destination_path = "/home/zcot/Music/"

Default track count in GUI:

--using manual mode, set how many tracks for default display, the extras are not used and will be ignored.
local cdr_user_default_manual_track_count = 15

Default "magic file name" scheme. You can use more than the typical simple file name.

--the following 4 markers, among any other various character you like: ARTIST ALBUM NUMBER TITLE
local cdr_user_default_autofilename_magic = "NUMBER - TITLE"

Default "profile" selection:

--currently available profiles are for .flac, .mp3, and .wav, -they are numbered starting at 1.
local cdr_user_default_profile_selection = 2

Destination:

You can create folders within a path, but not multiple folders deep, only 1 at a time. If your default is the Music folder and you want to save the transcoded files into /Dubstep/jazzy/ then you need to make it create Dubstep/ first, then jazzy/ next.

You can automatically use the metadata Artist name for a folder.

You can automatically use the metadata Album name for a folder.

Each of the Apply buttons are all the same thing in that section.

Filename magic:

You can set a scheme for building the destination file name. You get 4 specific markers: ARTIST ALBUM NUMBER TITLE

You can use various other markings, spaces, or whatever, create the filename.

TITLE will use the specific "Title" that is shown in the extension window for that particular track.

ARTIST and ALBUM will also use the text that is shown in the extension GUI.

NUMBER will be the track numbers in order. -single digit numbers are padding with a leading 0. (01, 02, 03, ...)

Enqueue tracks:

This will populate the playlist with a section of Convert tracks. You must "Play" it through all of them for the transcoding and file saving process to complete, -just let it run through each track.

Just make sure that "Random" and "Loop" VLC features are turned off.

Reload playlist - save metadata:

At this point the cd tracks have been transcoded and saved to the local disk. But, we could not use the metadata save functions during that previous transcoding process, so we have to reload the list, from the local files, and the collected metadata will be interjected back into those files on the playlist. However, vlc does not automatically save that metadata, so we must open the "Information" popup, for each track, make any change to the metadata chart(add a letter then delete it, or make any desired actual change to the data) and then the "Save Metadata" option will appear and be enabled, we save, and now the local files do contain the track metadata including artwork, if present. Do this for each track. The process is complete.

If you want to rip another disc, then start over, close the extension. Clear the playlist, load the cd and let the metadata become retrieved, and then open this extension again.

## Audio CD ripping helper OMG
mederi created the Audio CD ripping helper extension, he is really the master of most of this stuff: https://forum.videolan.org/viewtopic.php?p=436477#p436477
idrinkwater added functionality to pre-name the files and using a naming scheme: https://forum.videolan.org/viewtopic.php?p=518698#p518698
zcot wanted the metadata, artwork, and not have to type out anything, just rip, so it has all led to the OMG version, -way too much going on, overdrive, but a fun thing to program!
So, here we have **"Audio CD ripping helper OMG"**, and it should encompass each of the useful scenarios.
The extension can operate in two modes. **Manual** mode or **Metadata** mode.
Metadata mode will use the network collected metadata, and so for that reason you should clear the playlist, load the cd, and let it collect the network metadata first, before you even start this extension. If you do this, you will not have to type any Artist, Album, or Titles, and you can save the metadata and artwork into the saved(transcoded) tracks.
_Some of the cddb servers have been shut down or changed and will not work now. The most recent stable one might be `gnudb.gnudb.org`_
> Tools -> Preferences -> All : Input/Codecs -> Access Modules -> Audio CD : gnudb.gnudb.org
### General Usage:
You just follow the GUI from top to bottom and change things as needed. For Metadata mode, view the playlist, clear it, load the cd, then open the extension(so it can read the album metadata).
Manual mode, you just type everything that is needed.
### Setting defaults: Use these to set a good starting point for the extension. Edit the .lua file and change the local variables as noted.
Default optical disk path:
```lua
--local cdr_user_default_cd_path = "D:/" --Windows users, use / instead of \ in paths(vlc handles it, this extension does not).
local cdr_user_default_cd_path = "/dev/sr0" --Linux users
```
Default destination path:
```lua
--local cdr_user_default_destination_path = "C:/rip/"
local cdr_user_default_destination_path = "/home/zcot/Music/"
```
Default track count in GUI:
```lua
--using manual mode, set how many tracks for default display, the extras are not used and will be ignored.
local cdr_user_default_manual_track_count = 15
```
Default "magic file name" scheme. You can use more than the typical simple file name.
```lua
--the following 4 markers, among any other various character you like: ARTIST ALBUM NUMBER TITLE
local cdr_user_default_autofilename_magic = "NUMBER - TITLE"
```
Default "profile" selection:
```lua
--currently available profiles are for .flac, .mp3, and .wav, -they are numbered starting at 1.
local cdr_user_default_profile_selection = 2
```
### Destination:
You can create folders within a path, but not multiple folders deep, only 1 at a time. If your default is the Music folder and you want to save the transcoded files into /Dubstep/jazzy/ then you need to make it create Dubstep/ first, then jazzy/ next.
You can automatically use the metadata Artist name for a folder.
You can automatically use the metadata Album name for a folder.
Each of the **Apply** buttons are all the same thing in that section.
### Filename magic:
You can set a scheme for building the destination file name. You get 4 specific markers: ARTIST ALBUM NUMBER TITLE
You can use various other markings, spaces, or whatever, create the filename.
TITLE will use the specific "Title" that is shown in the extension window for that particular track.
ARTIST and ALBUM will also use the text that is shown in the extension GUI.
NUMBER will be the track numbers in order. -single digit numbers are padding with a leading 0. (01, 02, 03, ...)
### Enqueue tracks:
This will populate the playlist with a section of **Convert** tracks. You must "Play" it through all of them for the transcoding and file saving process to complete, -just let it run through each track.
_Just make sure that "Random" and "Loop" VLC features are turned off._
### Reload playlist - save metadata:
At this point the cd tracks have been transcoded and saved to the local disk. But, we could not use the metadata save functions during that previous transcoding process, so we have to reload the list, from the local files, and the collected metadata will be interjected back into those files on the playlist. However, vlc does not automatically save that metadata, so we must open the "Information" popup, for each track, make any change to the metadata chart(add a letter then delete it, or make any desired actual change to the data) and then the "Save Metadata" option will appear and be enabled, we save, and now the local files do contain the track metadata including artwork, if present. Do this for each track. The process is complete.
If you want to rip another disc, then start over, close the extension. Clear the playlist, load the cd and let the metadata become retrieved, and then open this extension again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment