Stream profile - QSV HEVC+deinterlace to Kodi
Added by Nicolas Will over 3 years ago
Hello,
I am running Tvheadend 4.3.0~pre+202103120326-0~built202103120418~gitd67fff914~ubuntu20.10.1 on a Kaby Lake Intel NUC, Ubuntu 20.10 kept up-to-date.
ffmpeg has all the Intel Quick Sync Video decoders, encoders and filters, including deinterlace.
Me endpoints are Raspberry Pi 4s, running LibreELEC 10 test builds, with Kodi 19 and the proper pvr add-on. Kodi on RPi 4 is now using DRM PRIME for hardware acceleration. Unfortunately, while this adds a lot of good things for me (HEVC decoding, 4K HDR and HBR audio), deinterlacing is not implemented yet, and may not be for a while.
I'm in the UK, using Freeview DVB-T and T2. There is still a lot of MPEG2 interlaced SD content.
Quite a bit of Googling showed that I should be able to create an MPEG-TS Spawn that I could use deinterlace and transcode the video to HEVC in real-time both live TV and recordings straight on the capable server before sending to Kodi.
I even have an ffmpeg command line that I have tested on files. The machine performs all this at 4.3x real-time with minimal CPU impact, so all should be good for my use case.
/usr/bin/ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -hwaccel qsv -c:v mpeg2_qsv -f mpegts -i pipe:0 -c:a copy -vf 'deinterlace_qsv,format=qsv,hwupload=extra_hw_frames=64' -c:v hevc_qsv -global_quality 25 -look_ahead 1 pipe:1
I have created the stream profile:
And assigned it to my user:
But no dice.
Could I enlist the community's help in making this work, pointing me in the right direction, or telling me that I'm doing it the wrong way?
Additional question: is there a way to apply this only to MPEG-2 SD content?
Thanks!