Ffmpeg transcoding profile - native and through plugin

I’m trying to test different transcoding parameters to increase the video quality.

First I looked at the doc to find where ffmpeg parameters are stored. I didn’t find it, but read that they are hard coded in Peertube (exact ?). So I looked at the " PeerTube transcoding custom quality" plugin.

The READ ME of the plugin says :

This plugin creates a transcoding profile in which admins can decide the quality of the transcoding process.

In the web admin of the plugin, I get a dropdown menu with different value (wich I guess correspond to crf value send to ffmepg).

But changing it (for example to VERY GOOD) has no effect. (I’ve tried to restart my containers after the change).
The file size of the 3 resolutions I want is exactly the same as before. (1080, 720, 360 and audio only in HLS only).

So I’m wondering :

  • does this plugin work with Peertube 4.2 and higher ?

  • does it work for HLS, or maybe only for Webtorrent (which I don’t do) ?

  • where can I find the transcode profile file created by the plugin to see what are the crf value (or other ffmpeg parameter) behing each value (GOOD, VERY GOOD, EXCELLENT) ?

Thanks for your help.


CRF settings are not documented but you can find them in the source code: peertube-plugin-transcoding-custom-quality/main.js · master · Framasoft / PeerTube / official-plugins · GitLab

Did you enable this custom profile in admin → configuration → vod transcoding?

Hi Chocobozzz, yes, I think I have set it properly :

Should I change this one to custom ?

(maybe the french translation of this field was guiding me in the wrong direction : I thought it was only for transcoding « live » broadcast, and not VOD)

Yes you should

I’ll update the field description!

1 Like

Ok, thanks for your tip Chocobozzz, it’s now working.

So for other interested, you have to :

  • install the plugin « Transcode custom quality »

  • in the parameters of the plugin, choose a value. Here are the value found inside the code (it could be interresting to write it in the READ ME of the plugin :

options: [
      { label: 'Default', value: 23 },
      { label: 'Good', value: 20 },
      { label: 'Very good', value: 17 },
      { label: 'Excellent', value: 14 }
  • and lastly choose « custom-profile » in Admin → Configuration → VOD transcoding → Transcoding profile

For info, during my test, the same short video weight 38 Mo with the default profile, 59 Mo with the Very Good value (which is a little better than the crf=18 that ffmpeg documentation considers as a visual lossless compression), and 75 Mo with Excellent value.

Thanks for your help on this.

1 Like