chrisbenincasa / tunarr

Create a classic TV experience using your own media - IPTV backed by Plex/Jellyfin
https://tunarr.com/
zlib License
178 stars 14 forks source link

[Bug][Software]: Stream times out on initialization with watermark #784

Open sloothy420 opened 2 months ago

sloothy420 commented 2 months ago

Contact Details

ggabb92@gmail.com

What happened?

With Watermarks Enabled on at least one channel, it does not stream. Plex outputs "Could not tune channel. Please check your tuner or antenna." However, the FFMPEG log shows a successful stream with some errors like "Stream not ready yet. Retry" (Full logs below) Same result when streaming in the Tunarr guide through the web UI and also same result regardless if the channel has an active watermark or not. Can be resolved by disabling Watermarks Globally in the FFMPEG settings. Important to note that my first channel and first stream worked flawlessly with watermarks enabled for that particular channel.

Version

0.10.3

What browser did you experience the the problem on?

Chrome Version 129.0.6668.58

What operating system are you using?

Windows Server 2019 Standard

Relevant log output

Stream starting. Channel: 1 (Golden Era Movies)
(node:11348) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `tunarr-windows-x64 --trace-deprecation ...` to show where the warning was created)
2024-09-20T20:33:26.170Z [info]:
Stream starting. Channel: 1 (Golden Era Movies)
2024-09-20T20:33:26.395Z [info]: First stretch to 1920 x 815. Then add padding to make it 1920 x 1080  {"channel":"1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a"}
Input #0, concat, from 'http://localhost:8000/playlist?channel=1&audioOnly=false&hls=true':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 23.98 tbr, 95904 tbn
      Metadata:
        encoder         : Lavc61.15.100 rawvideo
  Stream #0:1: Audio: flac ([172][241][0][0] / 0xF1AC), 48000 Hz, 5.1(side), s32 (24 bit)
      Metadata:
        encoder         : Lavc61.15.100 flac
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (flac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 00000214a457bd00] using SAR=1/1
[libx264 @ 00000214a457bd00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000214a457bd00] profile High, level 4.0, 4:2:0, 8-bit
[libx264 @ 00000214a457bd00] 264 - core 164 r3191 4613ac3 - H.264/MPEG-4 AVC codec - Copyleft 2003-2024 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=34 lookahead_threads=5 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=23 scenecut=0 intra_refresh=0 rc_lookahead=40 rc=cbr mbtree=1 bitrate=10000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=10000 vbv_bufsize=1000 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
Output #0, hls, to 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8':
  Metadata:
    service_provider: "tunarr"
    service_name    : "Golden Era Movies"
    encoder         : Lavf61.5.101
  Stream #0:0: Video: h264, yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 10000 kb/s, 23.98 fps, 90k tbn
      Metadata:
        encoder         : Lavc61.15.100 libx264
      Side data:
        cpb: bitrate max/min/avg: 10000000/0/10000000 buffer size: 1000000 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp, 192 kb/s
      Metadata:
        encoder         : Lavc61.15.100 aac
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00000.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a/master.m3u8' for writing
2024-09-20T20:34:08.765Z [error]: Error starting stream after retrying {"sessionId":"c00644a8-ceae-411b-8924-9c7083fdcc11","sessionType":"hls","channel":"1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a"}
    err: {
      "type": "Error",
      "message": "Stream not ready yet. Retry",
      "stack":
          Error: Stream not ready yet. Retry
              at retries (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:270341:19)
              at async HlsSession.waitForStreamReady (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:270316:7)
              at async HlsSession.waitForStreamReadyInternal (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:269240:24)
              at async HlsSession.startStream (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:269182:5)
              at async HlsSession.start (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:269135:7)
              at async file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:270533:11
    }
[in#0 @ 0000026a60129540] Error opening input: Server returned 5XX Server Error reply
Error opening input file http://localhost:8000/media-player/1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a/hls.
Error opening input files: Server returned 5XX Server Error reply
2024-09-20T20:34:08.798Z [info]: HLS Concat FFMPEG exited. (signal=null, code=2812791304)
2024-09-20T20:34:08.799Z [info]: HLS Concat FFMPEG exited with code 2812791304.
2024-09-20T20:34:08.800Z [error]: FFMPEG ERROR {"code":2812791304,"cmd":"C:\Plex Server Apps\Tunarr\ffmpeg-2024-09-19-git-0d5b68c27c-full_build\bin\ffmpeg.exe -nostdin -threads 1 -hide_banner -loglevel error -nostats -fflags +genpts+discardcorrupt+igndts -readrate 1 -i http://localhost:8000/media-player/1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a/hls -map 0 -c copy -f mpegts pipe:1"}
2024-09-20T20:34:08.802Z [error]: Error playing video {"code":2812791304,"cmd":"C:\Plex Server Apps\Tunarr\ffmpeg-2024-09-19-git-0d5b68c27c-full_build\bin\ffmpeg.exe -nostdin -threads 1 -hide_banner -loglevel error -nostats -fflags +genpts+discardcorrupt+igndts -readrate 1 -i http://localhost:8000/media-player/1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a/hls -map 0 -c copy -f mpegts pipe:1"}
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00001.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00002.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[tls @ 00000211cf7acfc0] Error in the pull function. bitrate=N/A speed=0.208x
[tls @ 00000211cf7acfc0] IO error: Error number -10054 occurred
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00003.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00004.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00005.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00006.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00007.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00008.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00009.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00010.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00011.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\data00012.ts' for writing
[hls @ 00000214a45774c0] Opening 'streams\stream_1f0b3efc-9440-4c00-99cb-c5f7a04fcc0a\stream.m3u8.tmp' for writing
2024-09-20T20:37:18.351Z [info]: Raw Stream FFMPEG exited. (signal=null, code=0)
2024-09-20T20:37:18.356Z [info]: Raw Stream FFMPEG exited normally.
2024-09-20T20:37:18.381Z [error]: Error on /stream: /stream?channel=1&session=0&audioOnly=false&hls=true&index=1. %O
    err: {
      "type": "Error",
      "message": "No HLS session found for channel when one was expected.",
      "stack":
          Error: No HLS session found for channel when one was expected.
              at _VideoStream.startStream (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:275973:17)
              at async Object.<anonymous> (file:///C:/Plex%20Server%20Apps/Tunarr/bundle.js:276323:31)
    }
frame= 1254 fps=3.4 q=10.0 size=N/A time=00:00:52.30 bitrate=N/A speed=0.14x
sloothy420 commented 2 months ago

Did a fresh install and re added all of my channels with logos and watermarks. Had the same issue. After disabling watermarks globally the stream started working again, however i did see the watermark pop up on the stream for maybe a minute before disappearing. I have my watermarks and logos uploaded to an image hosting site and have urls set for them in the channel settings in case that might be an issue.

chrisbenincasa commented 2 months ago

Might be a dupe of #768