SumpnFishy 4 Posted October 28 Posted October 28 Issue: On the Roku connection it connects, and looks great for a few seconds but then goes blurry and drops the connection. Playing around with a new home security camera from ReoLink. I found an old topic from 2019 on connections using IPTV that works, except on Roku. Just wondering if anyone had any ideas on how to make that work or is it just a limitation of what the Roku app can do on the Roku hardware? I've tried to find info on using http but don't seem to find anything describing the stream requirements. Everything I've tried just gives me error on the http. So neither RTSP or Http seems to work for Roku. Has anyone found anything that works on Roku? (most my TV's are Roku thus the hope I can get something that works). Also played with m3u files with no luck but maybe I'm just doing that wrong. Any detailed documentation would be great. Old topic: Thanks! Dennis
Luke 43745 Posted October 28 Posted October 28 Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks!
SumpnFishy 4 Posted October 28 Author Posted October 28 Roku app doesn't seem to be creating any logs in debug mode. Nothing shows 'send files' at the bottom of the home page. FIY: Tested on both Windows and Theater clients and works fine. Web client struggles to load but not an issue for me. Other ways to access via web. ffmpeg-transcode-4b0ddcdf-6568-41a2-b5c7-c5d9d812257d_1.txtembyserver.txt
ebr 17109 Posted October 28 Posted October 28 23 minutes ago, SumpnFishy said: Nothing shows 'send files' at the bottom of the home page It is "Send Logs" and it is under the user menu at the top.
SumpnFishy 4 Posted October 29 Author Posted October 29 Sorry, that was the instructions that came up in my search. Just sent the file.
SumpnFishy 4 Posted October 29 Author Posted October 29 Further testing on my MX Linux server. In this case I used a new program called Reostream to setup an http link in IPTV. It did the exact same thing as the RTSP, it connects for a few seconds, pixilates and then drops the connection without errors. Not sure if this helps but attached logs and send debug from Roku client. Let me know if you need me to do anything else. Thanks! Dennis embyserver MX Linux.txt ffmpeg-transcode-2d6a5af7-7bdc-42d4-9974-d8c7b0a3f0d2_1MX Linux.txt
Luke 43745 Posted October 29 Posted October 29 hi, rtsp is always difficult so this isn't a guarantee, but are you able to update to the latest version of emby server?
ebr 17109 Posted October 29 Posted October 29 3 hours ago, SumpnFishy said: send debug from Roku client If I found your log (you didn't provide the identifying info), there were no errors on the player side.
SumpnFishy 4 Posted October 30 Author Posted October 30 Upgraded the MX Linux system with same results. At this point I'm going to say Roku is the problem here. Both HTTP (via Reostream) and RTSP exabit the same behaviors. Seems to initially connect fine but then something goes wrong in the processing and drops the connection in about a second or two. I recently have been playing with Gnome Network Displays with pretty much the same results, initial connections fine, then suddenly drops. Apparently Roku is just picky about these things...
Luke 43745 Posted October 30 Posted October 30 2 hours ago, SumpnFishy said: Upgraded the MX Linux system with same results. At this point I'm going to say Roku is the problem here. Both HTTP (via Reostream) and RTSP exabit the same behaviors. Seems to initially connect fine but then something goes wrong in the processing and drops the connection in about a second or two. I recently have been playing with Gnome Network Displays with pretty much the same results, initial connections fine, then suddenly drops. Apparently Roku is just picky about these things... can you please attach new log file examples? Thanks.
SumpnFishy 4 Posted October 30 Author Posted October 30 Here you go. Thx embyserver MX Linux2.txt ffmpeg-transcode-2d6a5af7-7bdc-42d4-9974-d8c7b0a3f0d2_1MX Linux2.txt
Luke 43745 Posted October 30 Posted October 30 as a test, if you turn off hardware transcoding in server transcoding settings, does that help ?
ebr 17109 Posted October 31 Posted October 31 Can you please reproduce the problem and then follow the instructions to send a log from the app? Please be sure and provide the information requested. Thanks,
SumpnFishy 4 Posted November 2 Author Posted November 2 Just sent. User Jack Time 9:23 Attempting to play RTSP Sub in IPTV. Plays for one second then drops.
SumpnFishy 4 Posted November 2 Author Posted November 2 Corresponding server logs. embyserver MX Linux3.txt ffmpeg-transcode-2d6a5af7-7bdc-42d4-9974-d8c7b0a3f0d2_1MX Linux3.txt
ebr 17109 Posted November 2 Posted November 2 Looks like the player goes into a buffering state and then you back out of it. No errors on the player side.
SumpnFishy 4 Posted November 2 Author Posted November 2 So maybe more on server side? I originally was trying to use m3u files to created a live tv channel. Is that a better approach in this case? If so what file configuration would help address buffering?
SumpnFishy 4 Posted November 3 Author Posted November 3 I don't back out, it drops the connection after a few seconds and I'm back at the playback screen. Originally it would get blurry and then drop the connection but now it's clear until it drops. Not sure what would change that.
speechles 2131 Posted November 3 Posted November 3 (edited) "AverageFrameRate":10,"RealFrameRate":25.166666, Can you get your stream to use constant frame rate instead of variable? The Roku uses audio timing to sync video. This is impossible to do with variable frame rates. It is also in a TS format with a short duration which is why it ends abruptly. It desyncs cannot find more video frames and exits. To fix RTSP variable frame rate (VFR) streams freezing or stopping on Roku, you need to transcode the stream into a Constant Frame Rate (CFR) HLS format with proper PTS (Presentation Time Stamp) re-generation. Roku's media player engine is notoriously strict about timestamp gaps and erratic frame timing, which are common hallmarks of IP camera RTSP streams. The Recommended FFmpeg Command Run the following background command to ingest your RTSP stream, force a constant frame rate, align the audio/video timestamps, and segment it into a Roku-compliant HLS stream: bash ffmpeg -rtsp_transport tcp -i "rtsp://YOUR_CAMERA_IP:554/stream" \ -c:v libx264 -preset superfast -tune zerolatency \ -vsync cfr -r 30 -g 60 -sc_threshold 0 \ -c:a aac -b:a 128k -ar 44100 -async 1 \ -f hls -hls_time 2 -hls_list_size 5 -hls_flags delete_segments \ -hls_segment_type mpegts /path/to/www/stream.m3u8 Use code with caution. The AI (SI in the USA..lol) shows this which might be useful since the protocol is known prior to Emby launch ffmpeg. It likely can be fixed via ffmpeg. But all this would need to exist in the Emby ffmpeg version. Not sure if it does. @softworkzwould know better than I. Edited November 3 by speechles
ebr 17109 Posted November 3 Posted November 3 1 hour ago, SumpnFishy said: I don't back out, it drops the connection after a few seconds and I'm back at the playback screen That is odd as I do not see the player getting a stream end notification nor an error.
speechles 2131 Posted November 3 Posted November 3 (edited) 2 minutes ago, ebr said: That is odd as I do not see the player getting a stream end notification nor an error. It is the variable frame rate. It might jump right to the end and bail. It may not give us an error. It sees this as an unrecoverable problem and might just skip frames until it can find one that matches the timestamp. When it cannot find any matching timestamps in the data it has it just ends the stream. It is being fed via m3u8 with ts slices. Those play horrible with variable frame rates. If the player has to skip frames to sync to audio timestamps it might skip out of bounds and see that as the end. Edited November 3 by speechles
softworkz 5741 Posted November 4 Posted November 4 8 hours ago, speechles said: ffmpeg -rtsp_transport tcp -i "rtsp://YOUR_CAMERA_IP:554/stream" \ -c:v libx264 -preset superfast -tune zerolatency \ -vsync cfr -r 30 -g 60 -sc_threshold 0 \ -c:a aac -b:a 128k -ar 44100 -async 1 \ -f hls -hls_time 2 -hls_list_size 5 -hls_flags delete_segments \ -hls_segment_type mpegts /path/to/www/stream.m3u8 Use code with caution. The AI (SI in the USA..lol) shows this which might be useful since the protocol is known prior to Emby launch ffmpeg. It likely can be fixed via ffmpeg. But all this would need to exist in the Emby ffmpeg version. Not sure if it does. @softworkzwould know better than I. We're actually transcoding to a constant framerate already, it could only reach the client as vfr when just remuxing. I'm not sure whether the command is meant for the user to execute, but if yes, then they should not encode anything to hls but rather to mp4 or mkv.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now