PrismCast Docker Issues on Unraid

So I made some observations with Prismcast on Docker. The first one is at least on my system, which is powerful. It's a i7-12700K with 128 GB of RAM all available to the Docker environment, I can't maintain a consistent frame rate. It drops up and down, which is causing some of the stuttering I'm seeing. The separate issue is dropped output frames that are consistent.

Now I was messing around and I built my own Docker container around PrismCast just to kind of test things and debug. And I found that the frame rate stabilized when I forced it to use my own FFmpeg that handled the heavy lifting instead of Chrome handling the heavy lifting of transcoding. That stabilized the frame rate and got output frames to drop significantly less, although it didn't resolve the issue.

I just figured I'd mention my findings here just in case it's helpful for development down the line. What I did was super hacky and probably not recommended, it was just more for testing purposes. I just wanted to take my robot and kind of get to work and try to debug the issue and I got a little bit of the way!

1 Like

Does it transcode the video when running in docker?
I thought it remuxed the video and transcoded the audio?
Running native in macOS, the ffmpeg command looks like this

ffmpeg -hide_banner -loglevel warning -probesize 16384 -i pipe:0 -c:v copy -c:a aac_at -b:a 256000 -f mp4 -movflags frag_keyframe+empty_moov+default_base_moof+skip_sidx+skip_trailer -flush_packets 1 -metadata comment=PrismCast - Magnolia Network (Pacific) pipe:1

Video -c:v copy
Audio -c:a aac_at -b:a 256000

Have you tried lowering the PrismCast config bitrate as a test?
I'm finding a config setting of 4 Mbps results in an acceptable 1920x1080p @60fps 8 Mbps output to CDVR.

No, it copies. It just remuxes the video in Docker.
I was saying I overrode the ffmpeg that was built into the Docker. I forced it to re-encode the stream from Chrome and it got much more stable, although still jittery, just not as jittery on Docker.

It seems almost like to me that whatever is being used to capture the stream on Docker just can't handle it in that environment. Whereas on Mac it's totally fine, Windows is totally fine, perhaps on Linux natively it's totally fine. Just once you're in Docker, for some reason whatever VNC client is being used is just not up to the task of capturing that stream. That was proven because I offloaded the heavy duty lifting to ffmpeg and it got a lot better but still dropped output frames like crazy. Prior to that, it was just dropping frames like crazy, like it could not maintain a steady frame rate. I spent a lot of time debugging this and just came to the conclusion that something related to Chrome's capture is not able to maintain the frame pacing needed.

As soon as I threw it on a Mac Mini, it was perfect. I just use my Mac Mini for other stuff and it wouldn't be a good place to put this.

As a test

2 Likes

@mackid1993 I'm breaking this discussion off into its own topic, since this hasn't been reported by other Docker users. We can always change the thread title if it turns out to be something more than just Unraid related.

1 Like

No worries @bnhf I tried to debug this. I honestly pulled an all nighter Sat->Sun with Claude Code to try and find something I could contribute back to the community.

Have you been using the test.ha container or latest, in your testing?

Your reply to me was broken when bnhf moved the posts.
Did you try lowering the bitrate?

test.ha. I also built (a few) of my own with different distros.

@chDVRuser I did lower the bitrate.

Apologies for the accidental PRs, I was pretty tired!!!

Wait, what do you mean by this? VNC is just to be used for logging in.

I wasn't sure, it can see in Channels that it can't maintain a framerate. When I passed through /dev/dri and forced the containers FFMPEG that I installed in my test docker above the homebridge one and forced a re-encode it got A LOT better just still dropped output frames but was watchable. I guess what I observed is Chrome seems to be struggling with encoding on Unraid at least.

Let's see what happens with this. If there's a wider issue running this project in Docker, I'm sure it'll get fully exposed at some point.

We're both in somewhat similar situations, in that we both have excellent ADBTuner setups. For users like us, PrismCast likely represents a backup to ADBTuner, both for extra tuners and as an alternative in case something were to change in the Android world.

I'm sure we'll both keep doing what we can to nudge PrismCast forward, however things shake out in terms of which platforms work well, and which don't. Hopefully we can continue to move the ball on alternative platforms like Docker and Windows.

Thanks for your efforts.

1 Like

I agree it's a backup option for me. I just wanted to see if I can get it working just for the benefit of others.

My goal was to try to figure out what was causing it and maybe contribute a fix back. I was never gonna daily drive Prismcast given my Osprey setup and hefty LinkPi investment. I mean I even bought furniture to store my whole rig! I was just intrigued by the issue and I wanted to see if I could solve the problem and help others. I see a lot of value in this tool because encoders are expensive.

I haven't gone down that road because of the expense and time needed for setup and maintenance.
I agree it's a great tool. It can get me every YTTV channel I sub to and more.

I'm sure, given time, it will work fine on Windows and Docker.
There are lots of enthusiastic users on the forum.

I agree and then for my case it'll be a great backup option!
Well I have to say the picture quality coming out of the LinkPi's is transparent to what you'd get from a native DirecTV stream, I find. If you're nitpicky about picture quality, it's definitely worth the investment. I also managed to get mine to tune in about three to four seconds, which is really nice.

My only issue with it is on the first tune of a channel.
It does what I call the "curtain drop".
You can see the stream starting and going full screen.
Might be because I'm using tv.YTTV as the source.