vexorian / dizquetv

Create live TV channels from your own media. Access the streams using the simulated HDHomerun tuner or the generated M3U URl.
zlib License
1.44k stars 92 forks source link

Intel VAAPI or Quick Sync support #429

Open stcbus opened 1 year ago

stcbus commented 1 year ago

Hi. I looked through old posts and am unsure if the status- but if needed I’d like to re-investigate supporting Intel hardware offload as it really helps on lower powered devices and multiple client viewings. This works for Plex and I see it mentioned in the codec list so I would think it should be supported.

0dragosh commented 1 year ago

I'm also interested in this. @vexorian any idea what is currently blocking this?

truxnell commented 1 year ago

+1 here, I've been running Dizquetv for 18 or so months and this would be a really appreciated feature

19wolf commented 1 year ago

I'm also interested in this. @vexorian any idea what is currently blocking this?

https://github.com/vexorian/dizquetv/issues/59 blocks this

stcbus commented 1 year ago

@19wolf thanks. What makes those filters so important?

19wolf commented 1 year ago

¯\_(ツ)_/¯

Healzangels commented 1 year ago

This would be an awesome/much appreciate feature! Would gladly test etc if helpful.

minermartijn commented 1 year ago

Do really hope there is someone who could help with this. Would make this app even greater :)

cplmayo commented 1 year ago

Bump! What would be required to try and fix this issue?

I just found DizqueTV and with how I have everything deployed this would be a game changer for me. If anyone and point me the right direction I am willing to try my hand at fixing; just not sure where to start.

jasongdove commented 1 year ago

I started working on this today at https://github.com/jasongdove/dizquetv and have a docker image that works with the QSV encoders. I hope to get VAAPI working as well, but that will require ffmpeg pipeline/dtv code changes as opposed to simple dockerfile changes.

The image is jasongdove/dizquetv:develop-vaapi

cplmayo commented 1 year ago

Really looking forward to this!

I wanted to test it and I'm getting an error from ffmpeg: Incompatible pixel format 'yuv420p' for codec 'h264_qsv', auto-selecting format 'nv12' [h264_qsv @ 0x5566937ef2c0] Error initializing an internal MFX session: unsupported (-3) Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed! Played video for: 279 ms Client Closed Stream FFMPEG RECEIVED kill() command Stream FFMPEG this.ffmpeg.kill() Stream FFMPEG exited with code 1.

jasongdove commented 1 year ago

Yeah, there are some cases where QSV requires more configuration, like with particular content, or in multi-video card setups. I hope to extract and incorporate much of the transcoding and normalization logic from https://github.com/jasongdove/ErsatzTV - but we'll see, the projects are written in different languages and stream from different sources (from plex vs from disk) which brings many challenges.

cplmayo commented 1 year ago

Yeah, there are some cases where QSV requires more configuration, like with particular content, or in multi-video card setups. I hope to extract and incorporate much of the transcoding and normalization logic from https://github.com/jasongdove/ErsatzTV - but we'll see, the projects are written in different languages and stream from different sources (from plex vs from disk) which brings many challenges.

If you need another testing machine or any other help I will do what ever I can to assist.

jasongdove commented 1 year ago

I think I have a path forward: I'm converting the C# pipeline stuff from ErsatzTV here to a new TypeScript lib here.

I have the software pipeline mostly working within dizquetv, and NVIDIA partially working. Slow process, but it'll get there.

jasongdove commented 1 year ago

@cplmayo if you want to pull the latest image and try again, QSV is mostly working for me on Windows and Linux (docker). Note that with my images, you have to force direct play from Plex to use the new ffmpeg pipeline.

cplmayo commented 1 year ago

@jasongdove Still getting the same error about the incompatible pixel format. I probably need to figure out a better way to do this. I use an NFS share for my media and Plex pulls from that for media. I wanted to avoid a bunch of unnecessary network traffic by running DizqueTV and Plex on the same Docker host for this but I probably need to find a better way.