Podcast mode is an additional feature mainly designed to create highly compressed and fully tagged audio files organised in directories by title in a specified location outside VDR, for listening on a media player or uploading to a phone etc. At default settings described below, it will reduce a 48MB half-hour MP2 recording to 10MB while maintaining very high quality, certainly perfect for vocal material and more than adequate for most music.
The --podcast option can also be used to output converted videos into subdirectories organised by title, with the normal compression settings.
- Configurable audio codec parameters in the $podcastaudioprofile variable near top of script which can be amended
- By default audio-only podcasts use HE-AAC V2 for ultimate compression, smallest file size, while maintaining very good quality and compatibility. This requires ffmpeg built with libfdk_aac library support. However you can also specify the built-in aac codec if you don't have the Fraunhofer library (use a higher bitrate). Specify libmp3lame for mp3 (again you will need to adjust the bitrate up considerably to get comparable quality), or libopus for Opus if your ffmpeg is built with support, though you cannot currently resample to 44.1kHz with Opus. Working podcastaudioprofile strings are commented out in the script for Opus and MP3
USAC/xHE-AAC will be supported when/if encoding support is available in ffmpeg in the future (decode only available in Android 9 via the fdk2 library). more info
- By default, the script resamples audio podcasts to 44.1kHz because some older players cannot handle the standard DVB broadcast sample rate of 48kHz. vdr-convert prefers ffmpeg built with libsoxr for best quality, but it will fall back to ffmpeg's built-in resampler with marginally lower quality if libsoxr is not found. This is configured in $podcastaudioprofile
- By default audio podcasts use the M4A container and file extension
Override this with the -f option if required
- Optionally runs a command after podcast file conversion - see the $podcastcmd variable near top of script which can be amended.
In the author's case the command tells VDR to re-read the recordings directory in case the original recording has been deleted (-d option), and tells a local Squeezeserver to reindex. (The author uses a Squeezeserver to play and manage the podcasts locally, directly accessing and indexing the podcast target directory specified above)
- All recordings now have comprehensive metadata tags added, using VDR's recording info file, ensuring podcasts can be easily organised and searched by media players. Example below.
- You can still optionally automatically upload podcasts by FTP after file conversion, see options
Using the --podcast option to specify the target podcast directory (which must already exist, with write permissions)
vdr-convert will put each podcast in a subdirectory according to it's Title tag, creating subdirectories if required
- Recording has 1 audio-only stream
- Recording must have a life less than that configured with -l option (or default), otherwise a normal audio transcode is performed
If the -k (--keep) option is set, it is reset when the above 2 conditions are met.
If a video is transcoded with -k, the podcast option is ignored
If a video is transcoded without -k, the podcast option causes the output to be created in the specified directory structure
As usual, original recordings are deleted after successful conversion only if the -d option is set.
Other than the ffmpeg build requirements above for the various codec libraries, correct decoding of "Genre" metadata requires a genre lookup file using the -g option. This is because EN 300 468 (ETSI standard) genres are numeric (e.g. "14") and recorded by VDR in its "G" tag in the info file, but media players expect a textual representation, such as "Comedy". The author's example lookup file source:genres.conf has been added to the repository.
The author's command in vdr-auto, run after every recording is
vdr-convert -a libfdk_aac -k -c -d --podcast /mnt/lvm/Radio -g /etc/vdr/xmltv2vdr/genres.conf -i $2 &
Following the logic above, in this configuration, podcast settings are only activated on short-lifetime radio recordings, so this command works for HD, SD, and radio recordings
Collection : More or Less Album : 2018 Album/Performer : More or Less Track name : More or Less-2018-08-24-Fri_16-30 Track name/Position : 34 Performer : BBC Radio 4 Genre : Current Affairs Description : Investigating the numbers in the news. Tim Harford on no-frills living, automated fact-checking and Lord of the Rings maths. Recorded date : 2018 Comment : Investigating the numbers in the news. Tim Harford on no-frills living, automated fact-checking and Lord of the Rings maths.