I got a comment on my Elisa Viihde page from “Pekka” asking whether it would be possible to get an encoding link for a recording considering the size of the “raw” downloaded recordings. He suggested a script to tmpgenc.
I decided to dig around and experiment a bit, and came up with a small additional function to the ViihdeHelper extension that generates a small command for downloading and encoding the recording in one go using ffmpeg. I chose to not re-encode the sound track, use x264 as video codec, and mkv (Matroska) as the container. This is what it looks like:
This part of the UI is activated by clicking the “film strip” icon. The functionality is not available in the list of recordings, you need to enter the “details” view to get the film strip icon.
Note that I am NOT an expert when it comes to video encoding etc, this was just something that works for me. I am more than willing to receive suggestions how to make things better.
Short introduction to the functionality:
The first field is for the CRF value. This can be thought of as ‘quality’, the smaller number the better quality, but also larger output file size. Something around 18-24 should be ok.
The second field is for selecting the preset setting. Basically this is a selection of how much time the encoding process should put on analysing the data trying to make the size smaller and the quality better. Choose as slow a value as you have patience for.
The following fields are for skipping time at the start of the recording (commercials etc), and to determine the length of the output. If these are empty, the entire recording is encoded. Also note that you need to specify something in every field for the setting if you want it to be active, e.g. Skip 1 min and 0 sec at the beginning. For some recordings I had problems skipping to the correct position immediately, so that why it is seeking the position to start, rather than skipping to it. This means that it will take a while for the actual processing to start.
For recordings that have the subtitles as a separate track, a checkbox in the subtitle setting will overlay the text on the video track. It defaults in the output to the 0:2 track, which is usually Finnish subtitles (dvb_subtitles). If the desired subtitles are on another track, you need to manually modify the command.
Finally, the file name field takes the value from the title of the recording, but it can of course be modified.
The resulting command that is shown in the text box can then be copied and pasted into the command line in the folder where you want the recording to be saved.
With the settings in the screenshot above, the recording of Tomb Raider, 1h 59min ended up as 1.4GB on disc, compared to 2.6GB as reported by Chrome in the raw download.
Please let me know how it works.
The download link can be found on the Elisa Viihde page of my blog.