Dark's Code Dump

Possibly useful

Tvheadend smooth output for 60hz display

Tvheadend 4.3 adds support for custom ffmpeg parameters via the 'spawn' stream profile. The following command line facilitates smooth output from interlaced 25/50hz Freeview to 60hz, without introducing the soap opera effect (only simple linear blending is used).

/usr/bin/ffmpeg -i pipe:0 -vf "yadif=1, minterpolate='mi_mode=blend:fps=60'" -bitrate 3000k -bufsize 3000k -c:v libx264 -preset veryfast -c:a aac -c:s copy -f mpegts pipe:1

This uses a disgusting amount of CPU time, but given there are no alternative ways of producing a watchable output on many devices, it's well worth it. For example there is no alternative on Android, Kodi, etc. You can either have linear blending or questionable deinterlacing, but not both, and certainly not as nice deinterlacing as yadif=1.

Update: I stand corrected on the Kodi front, at least on Windows if you disable DXVA2, set output to Pixel Shaders and set deinterlacing to Deinterlace (not half), you can get high quality deinterlacing and linear blending, but it comes at a substantial CPU/GPU cost.

Leave a Reply