Jellyfin Forum
SOLVED: Issue Recording IPTV Streams - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Issue Recording IPTV Streams (/t-solved-issue-recording-iptv-streams)



Issue Recording IPTV Streams - ??? - 2024-01-01

Issue:
I've been having issues recording IPTV streams. When I play the recorded movie in Jellyfin it seems to stop after about 10 - 20 minutes, but it also shows how long the movie should be in the video control menu. When I look at the file location for the recordings, it says that they are only 10 - 20 minutes long, even though the movies I'm recording are over an hour long.

What I expect to happen:
I would like to be able to record the entire movie or episode on the live stream (including commercials), and then play it back when I am available to watch it.

The clients I have tested the issue on:
I have attempted to play the videos on a Roku device using the app, and two Windows 10 computer using Microsoft Edge. The issue manifests itself by creating a buffering screen, and it does not progress.

My Investigation and Troubleshooting:
I believe that I am experiencing the issue because ffmpeg doesn't support #EXT-X-DISCONTINUITY. Most of the threads that I've read about this issue seem to be at least 3 years old, and although there is at least one thread that seems to still active, it seems that this capability has not been added to ffmpeg yet. I think that ffmpeg has an issue with #EXT-X-DISCONTINUITY when a commercial break begins, although I don't really know what causes this tag to appear. I also see the #EXT-X-DISCONTINUITY tag appear in the logs, but tbh I don't really know much about it. Also, when I tried to convert the .ts video file to .mp4 using VLC, it created a video file that had the correct length of the recording, but the audio was off by a few seconds, and it also stopped playing sometime between 10-20 minutes.

Reason for Posting:
Mainly, I'm posting this because I would like to know if this is really what my issue is. If this is what is causing my issue, then I would like recommendations on different ways to record live tv since I don't think that there will be a patch for this released any time soon. One thought I had was to watch the stream on another computer, record until there was a commercial break, wait for the commercial break was over and then start recording again, and then compile all of the recordings at the end.

Also, I apologize in advance if I used incorrect terminology, or posted something that shouldn't have been posted. Also, feel free to ask me to clarify something I said. Thanks in advance for your help!

_________________________________

OS: Windows 10 Installer
Jellyfin Server Version: 10.8.13

RAM: 16 GB
Storage Space (unused): 327 GB


RE: Issue Recording IPTV Streams - ??? - 2024-01-03

It appears that the record-transcode logs keep repeating this message or a very similar message over and over (about every 5 milliseconds):

Code:
[hls @ 000001ccb0c8b540] Skip ('#EXT-X-VERSION:3')
[hls @ 000001ccb0c8b540] Skip ('#EXT-X-DISCONTINUITY-SEQUENCE:40')
[hls @ 000001ccb0c8b540] Skip ('#EXT-X-PROGRAM-DATE-TIME:2024-01-03T02:18:09.518Z')

frame=28602 fps=6.1 q=-1.0 size=  355840kB time=01:18:17.83 bitrate= 620.5kbits/s speed=  1x   

This is the code that appears in the general logs after finishing the recording:

Code:
[2024-01-02 20:44:59.906 -07:00] [INF] [74] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Stopping ffmpeg recording process for "C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts"
[2024-01-02 20:44:59.910 -07:00] [INF] [74] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Calling recording process.WaitForExit for "C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts"
[2024-01-02 20:45:09.907 -07:00] [INF] [74] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Killing ffmpeg recording process for "C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts"
[2024-01-02 20:45:09.927 -07:00] [INF] [41] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: FFMpeg recording exited with code -1 for "C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts"
[2024-01-02 20:45:09.931 -07:00] [ERR] [55] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Error recording to "C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts"
System.Exception: Recording for C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts failed. Exit code -1
  at Emby.Server.Implementations.LiveTv.EmbyTV.EncodedRecorder.RecordFromFile(MediaSourceInfo mediaSource, String inputFile, String targetFile, Action onStarted, CancellationToken cancellationToken)
  at Emby.Server.Implementations.LiveTv.EmbyTV.EncodedRecorder.Record(IDirectStreamProvider directStreamProvider, MediaSourceInfo mediaSource, String targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken)
  at Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV.RecordStream(TimerInfo timer, DateTime recordingEndDate, ActiveRecordingInfo activeRecordingInfo)
[2024-01-02 20:45:09.939 -07:00] [INF] [55] Emby.Server.Implementations.Library.MediaSourceManager: Live stream "153bca905e4eeeb8d7b03da652cd108c" consumer count is now 0
[2024-01-02 20:45:09.943 -07:00] [INF] [55] Emby.Server.Implementations.Library.MediaSourceManager: Closing live stream "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_153bca905e4eeeb8d7b03da652cd108c"
[2024-01-02 20:45:09.947 -07:00] [INF] [55] Emby.Server.Implementations.LiveTv.TunerHosts.M3UTunerHost: Closing "LiveStream"
[2024-01-02 20:45:09.950 -07:00] [INF] [55] Emby.Server.Implementations.Library.MediaSourceManager: Live stream "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_153bca905e4eeeb8d7b03da652cd108c" closed successfully
[2024-01-02 20:45:09.954 -07:00] [INF] [55] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Triggering refresh on "C:\Jellyfin\LiveTV Recordings\Movies\The Terminal (2004)\The Terminal (2004).ts"
[2024-01-02 20:45:09.957 -07:00] [INF] [55] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Refreshing recording parent "C:\Jellyfin\LiveTV Recordings"

I don't know if this is relevant, but this also appears in my general logs a lot:

Code:
[2024-01-02 20:33:41.427 -07:00] [INF] [80] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:34:41.518 -07:00] [INF] [74] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:35:41.576 -07:00] [INF] [77] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:36:41.629 -07:00] [INF] [56] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:37:41.680 -07:00] [INF] [52] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:38:41.727 -07:00] [INF] [22] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:39:41.786 -07:00] [INF] [22] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:40:41.846 -07:00] [INF] [75] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:41:41.904 -07:00] [INF] [22] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:42:41.949 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:43:42.009 -07:00] [INF] [60] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
[2024-01-02 20:44:42.082 -07:00] [INF] [18] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.



RE: Issue Recording IPTV Streams - ??? - 2024-01-10

Just giving this thread a bump. Is there anymore information that I can provide that might be helpful?


RE: Issue Recording IPTV Streams - TheDreadPirate - 2024-01-10

We would need to see your ffmpeg logs.


RE: Issue Recording IPTV Streams - tmsrxzar - 2024-01-10

i have information but it's probably not helpful to your question

if you hadn't noticed, matt huisman took down the pluto streams you linked above and are trying to record due to threat of DMCA


RE: Issue Recording IPTV Streams - TheDreadPirate - 2024-01-10

(2024-01-10, 11:26 PM)tmsrxzar Wrote: i have information but it's probably not helpful to your question

if you hadn't noticed, matt huisman took down the pluto streams you linked above and are trying to record due to threat of DMCA

I figured they weren't legal.  95% certain that Pluto TV doesn't allow streaming outside of their app.


RE: Issue Recording IPTV Streams - ??? - 2024-01-10

Oh, okay. That would probably explain why I'm not able to record the stream. Thanks for letting me know!
I'm going to mark that response as the solution, and I've removed the links to the stream.

[Edit]:
Yeah, it seems like the issue was caused by the channel that I was recording. I'm able to record LiveTV now using a different channel.