Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CetonProxy Transcoder #5

Open
cornesto opened this issue May 14, 2020 · 5 comments
Open

CetonProxy Transcoder #5

cornesto opened this issue May 14, 2020 · 5 comments

Comments

@cornesto
Copy link

Just to start, great work so far on this app. I am also using it with Comcast as my provider and serving the channels through Plex.

Im having issues with the Plex Transcoder when serving the live stream to my devices... no matter what settings Ive used, the image eventually glitches in hues of green and purple. I did the VLC test to tune directly to a channel fron my cp server and get a stable clear image. Is there any tweaking that can be done within cp to do the transcoding before sending it to Plex? This would be similar to what the HD Homerun EXTEND does.

My setup:
cetonproxy (VM)

  • Win10 (6vCPU/8GB RAM)
  • Ceton infinitv 4 - pcie passthrough
  • Quadro FX 380 LP (Incase ffmpeg can make any use of it...)

plex media server

  • ubuntu server 20.04
  • intel i5-3470
  • nvidia gtx 1050
@craigmox
Copy link
Owner

It's a good idea, and I am using ffmpeg in the project already, but I don't have much experience in its transcoding options. I know there's 10 million of them, so I'm worried how much of a black hole a project like that would be. What settings would you like to see configurable if I ever attempted it?

I would guess Plex is transcoding using ffmpeg too, though. Seems like it's everywhere. What if you tried downloading a test video from cetonproxy and tried transcoding it manually with the ffmpeg command-line app, and see if the same glitches occur? It might point to a different problem in the video stream, or maybe a bug in cetonproxy.

@cornesto
Copy link
Author

Completely get it... the ever ending "could do it" vs "should doi it" question.
From what I've read, Plex has developed its on transcoder based of ffmpeg, but its closed source. I am by no means knowledgeable in programming, but I can definitely tinker with ffmpeg to transcode a stream from ceton, test it, and post some parameters. The benefit Im thinking is compressing the stream before it leaves the windows box therefore condensing bandwidth and then have Plex be able to direct play/direct stream it to any agent (including remote users). If it proves useful, maybe something that could be implemented as "experimental"? Enable/disable with a checkbox?

Will post back with test results.

@cornesto
Copy link
Author

BTW, i havent been able to cipher very well through the source code, but how is cp using ffmpeg currently? Is it just re-streaming the channel direct from the ceton card? Are you able to point how its doing the re-stream? (No need to type anything extended, I can read through your code if its easier, just not sure where to start).

@craigmox
Copy link
Owner

So forgive me if you already know this, but an MPEG2 video stream can have multiple channels of video called programs, like when Channel 4 has a bunch of sub channels 4.1, 4.2, etc, it could potentially send all of those video streams in a single MPEG2 stream. When you ask Ceton to tune to a channel, you tell it the program to filter on, so that the video stream it sends back only has a single channel's video stream. However, the Ceton still includes other programs in the stream, but they're completely empty. The DVR software I've seen don't play nice with that and won't play those kind of streams correctly, so cetonproxy uses ffmpeg to strip out those empty programs to only leave the one program that has actual video. This is what the HDHomeRun devices do too.

As far as video streaming flow: Request comes into ProxyWebModuleUnit.pas to start video stream which calls TProxyWebModule.SendTuneResponse. That creates a TCetonVideoStream (inside Ceton.pas) to do the work. That creates a TVideoConverter (inside VideoUtils.pas) to receive video from Ceton and strip out the correct streams for the intended program using ffmpeg. Then it makes the stream data available for the TCetonVideoStream to read, so that it can finally ship it back to the web client.

@cornesto
Copy link
Author

No! Thats great info. Time to dig into the ffmpeg-libav writeups and see what I find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants