Tvheadend transcoding


I’ve been using tvheadend for quite in oscm.
It works great when watching content in the Raspberry Pi.
But when I try to stream it, it is almost impossible to watch HD and in some cases I even got some “hiccups” in SD,

At the moment tvheadend in oscm is not compiled with transcoding, but tTranscoding to lower resolutions could be nice.

I know a raspberry pi may not be the best thing for transcoding, but as the included matroska container is working ok,
Wouldn’t it be possible to add transcoding for lower resolutions (Like 240 and 480 to watch in a phone / tablet) ?



Hardware supported transcoding isn’t possible.
Doing this in software would probably be too demanding


You are absolutely right !
I’ve compiled tvheadend 4.2.6 with transcoding support and x264 and mpe2video encoders.

Created a “transcode” profile, just to see my pi struggling with 200% CPU usage !!! And completelly hangged,

The best approach was:
libx264, ultrafast profile, 320x240 resolution, max vid bitrate=1000K:
120% cpu usage, but the pi is able to sustain a transmission. Only for SD input streams (no way for HD).

Externally using ffmpeg to “pipe” into tvheadend, only 70% cpu usage (perfectly accepatable) for transcoding - and this can be done with osmc “standard” tvheadend binary:

pipe:///usr/bin/ffmpeg -loglevel quiet -re -i http://user:pass@ -vcodec libx264 -preset ultrafast -vb 1024k -s 320x240 -acodec copy -f mpegts pipe:1

(tvheadend is more demanding in its integration with lib-av than having ffmpeg feeding a pipe)

Well … it is a issue for tvheadend. Not bothering osmc boards with it - I will come back here if an acceptable solution is found.