Project

General

Profile

Set options for encoding

Added by Mr. Blond almost 10 years ago

Hey guys,
I am using TVH with much joy and it is getting better and better. I use transcoding when I am on the road and do not want to throttle my dataplan. I always use SD channels as input when I want to do transcoding because it is less CPU hungry and output quality is equal.

However, my provider decided to remove quite a lot of SD channels recently so I can only use HD channels for transcoding. Now, I notice that the video starts stuttering after about 10 seconds, and eventually completely stops after about 20 seconds.
From previous tests I learned that Matroska/x264/AAC was the combination that worked best for me. Resolution is already quite low (384) and I do not want to go any lower.

I have read that setting "-preset ultrafast" with libav(/ffmpeg) could solve this problem. How can I force TVH to use "-preset ultrafast".

Thanks and keep up the good work!


Replies (2)

RE: Set options for encoding - Added by tommi ^_^ almost 10 years ago

Hi, I'm all but a dev, though I'm having fun too playing with transcoding options to receive the best possible from my pooor line with 1Mb upload.

Anyway, after a quick search I've found

// Default = "medium". We gain more encoding speed compared to the loss of quality when lowering it _slightly_.
av_dict_set(&opts, "preset", "faster", 0);

in src/plumbing/transcoding.c
You might wanna try to put ultrafast on there, and compile, and see the results.

RE: Set options for encoding - Added by Mr. Blond almost 10 years ago

Thanks that does the trick. I have also been playing around with adding a channel that opens an existing channel with the pipe:// command (see https://tvheadend.org/projects/tvheadend/wiki/Custom_MPEG-TS_Input) and encoding that one. That gives me total control of the transcoding options. However, for HD streams the stream always start to stutter after a few minutes... SD is ok. CPU and mem usage seem OK.

    (1-2/2)