#HLS Direct

1 messages · Page 1 of 1 (latest)

tiny flare
#

[ERR] [43] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL GET /videos/ae34e766-105e-02b6-e6ae-3f033ecc1570/live.m3u8.

molten tree
#

looks like there is an ffmpeg error judging from the status code (251). can you provide ffmpeg error logs?

tiny flare
#

I'm hoping this is what you were looking for, if not I'm going to need some guidance.

molten tree
#

this url looks pretty messed up: http:\\192.168.21.4:8096/Videos/8670a26fe6c861cebf0c00af5a3b155d/stream?static=true

craggy crescent
#

yarp. Thats an odd spot for backslashes, should be forward (at the very least) http:// instead of http:\\

molten tree
#

that particular URL would be configured in the media source settings

tiny flare
#

lol. Wow. That’s what I get for just using the autofill. Didn’t even notice that. It all seems to be working great!
Thanks

molten tree
#

Nice! Glad to hear it

tiny flare
#

Not sure what these errors are but it was dropping frames while playing and I saw there was an update so I updated and now it won't play

molten tree
#

Need the ffmpeg logs

tiny flare
molten tree
#

This looks like a bug with generating the copy command

#

“aost#0:1 @ 0x56384ecdcfc0] Streamcopy requested for output stream fed from a complex filtergraph. Filtering and streamcopy cannot be used together.”

Can take a look later, I’m afk

#

Was definitely working before for me so i probably regressed something recently

tiny flare
#

It was working great after I fixed the backslashes. Then it updated and broke it again (took some time to get it fixed but it was dropping frames while playing. then updated again and broken again. It was great though for some positivity👍

molten tree
#

Sorry! still experimental

molten tree
#

hm this is kinda strange, i can't reproduce this on my end

#

there is also an explicit check to not add that filter in hls_direct mode.... so that's sorta weird

tiny flare
#

So, I redid everything beside delete Jellyfin and got this

molten tree
#

looks like the same error, pretty weird.

#

how are you trying to load the stream

tiny flare
#

I use Jellyfin live tv with the m3u link from Tunarr

#

I also cant get it to work with vlc with the download m3u file

molten tree
#

gotcha. just tested with the link from the m3u on my setup and it seemed to work. let me try with a JF source perhaps (not sure why that would change things)

#

ok think i got a repro - does seem related to streaming from JF. i'll look into it

#

got it

#

that was a fun(ny) one - i was only testing w/ plex which didnt experience the issue. seems there are still some inconsistencies in the pipelines there

tiny flare
#

It's back to working like a champ. Great app BTW. The overall simplicity is great compared to others

molten tree
#

awesome, glad to hear! appreciate the kind words too 🙂

tiny flare
#

when a show ends and another begins I get this

#

versionString: '7.0',
majorVersion: 7,
minorVersion: 0,
patchVersion: null,
versionDetails: '',
isUnknown: false
}
hls_direct
2025-01-11T18:10:09.657Z [info]: channel-2-concat still running after SIGTERM. Sending SIGKILL
2025-01-11T18:10:09.660Z [info]: channel-2-concat exited. (signal=SIGKILL, code=-1, expected?=true) {"args":"-nostdin -hide_banner -threads 1 -loglevel error -nostats -fflags +genpts+discardcorrupt+igndts -reconnect 1 -reconnect_at_eof 1 -readrate 1.0 -i http://localhost:8000/stream/channels/c54ed80f-942b-4b2b-a27f-48d1f8bd6cbc.m3u8?mode=hls_direct -map 0 -c copy -metadata service_name="Educational" -metadata service_provider="Tunarr" -f mpegts pipe:1"}
2025-01-11T18:10:24.660Z [info]: channel-2-transcode still running after SIGTERM. Sending SIGKILL
2025-01-11T18:10:24.662Z [info]: channel-2-transcode exited. (signal=SIGKILL, code=-1, expected?=true) {"args":"-threads 4 -nostdin -hide_banner -nostats -loglevel error -fflags +genpts+discardcorrupt+igndts -headers 'X-Emby-Token: REDACTED' -ss 399.07099360004065s -reconnect 1 -reconnect_on_network_error 1 -reconnect_streamed 1 -multiple_requests 1 -i http://192.168.21.4:8096/Videos/2fb8b483ea2718315dcbb8291ae28eaa/stream?static=true -map 0:0 -map 0:1 -muxdelay 0 -muxpreload 0 -flags cgop -movflags +faststart -t 1040566.0063999593ms -c:v copy -c:a copy -f matroska pipe:1"}
2025-01-11T18:26:35.629Z [info]: channel-1-transcode exited. (signal=null, code=0, expected?=true) {"args":"-threads 4 -nostdin -hide_banner -nostats -loglevel error -fflags +genpts+discardcorrupt+igndts -headers 'X-Emby-Token: REDACTED' -ss 235.82400239992143s -reconnect 1 -reconnect_on_network_error 1 -reconnect_streamed 1 -multiple_requests 1 -i http://192.168.21.4:8096/Videos/6ecfa415919451fa1e44a7dd1ba1ac4f/stream?static=true -map 0:0 -map 0:1 -muxdelay 0 -muxpreload 0 -flags cgop -movflags +faststart -t 1157006.9975000785ms -c:v copy -c:a copy -f matroska pipe:1"}

#

and when the next show does start it drops frames and is very choppy. audio is fine

molten tree
#

I’ll take a look

tiny flare
molten tree
#

thanks - sorry i have been back to this. i'm kinda at a loss right now by how hls direct is ever supposed to work. most clients i've tested with (in both Tunarr and ETV) get completely borked on transitions

#

i've tested with mpv, ffplay, vlc, and jellyfin, so far.

tiny flare
#

I'm currently testing it and in jellyfin it says it's transcoding

#

Transcoding
The media is being converted into a format that is compatible with the device that is playing the media.
Framerate: 26fps

1.3 Mbps MP4 HEVC AAC

Reason for transcoding
There was an error starting direct playback

molten tree
#

JF is transcoding it then, not tunarr

tiny flare
#

even though it's on Direct and everything plays direct from jellyfin

molten tree
#

yeah, not sure why JF would say that then. it's def not transcoding in tunarr, based on the logs you just sent: -c:v copy -c:a copy it';s just straight copying both video/audio streams

tiny flare
#

I figured that. Just wondering if that what was causing issues

molten tree
#

yea, not sure. i was having issues across many clients. this is what i've seen so far:

  • mpv / ffplay will play the first item just fine and then basically explode on transition seemingly due to timebase issues
  • vlc will not play the generated m3u playlist for hls direct. it will play it if its wrapped in an mpegts stream, but the same issues persist on transitions
  • JF behaves similarly to VLC
#

@jaunty talon - wondering if you have thoughts here. i saw similar behavior in ETV with HLS direct, so maybe I'm just doing something wrong

tiny flare
#

I have had the exact same. The only other thing I've noticed is if it plays the same show it seems to play fine. Then switching to a different show it gets messed up

#

So, same series not episode

molten tree
#

interesting. i actually just had a smooth transition in mpv, so it's definitely flaky

#

this was a same show transition too... chances are all of these files are encoded similarly bc they were grabbed as part of a season pack. my guess is that varying formats, etc will have hard times transitioning from one another with this mode; this is one of the purposes behind having a transcode pipeline to begin with...

tiny flare
#

Just weird because everything on my jellyfin plays Direct with zero issues. it might downmix audio for my kids tv but that's it

molten tree
#

afaik both plex and JF live tv clients "transcode" their streams to allow for you to rewind / record them

tiny flare
#

I Can't. it only plays but I don't have Demand on in Tunarr

molten tree
#

i'm able to seek backwards on a JF live TV stream

#

this is what JF is doing on my stream: jellyfin 192187 0.0 1.2 543092 26760 ? Sl 16:39 0:06 /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 3000000 -probesize 1G -user_agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 -fflags +igndts+genpts -f hls -i http://192.168.0.172:8409/iptv/channel/1.m3u8?mode=hls-direct -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 copy -bsf:v h264_mp4toannexb -start_at_zero -flags -global_header -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af volume=2 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_base_url hls/6c5a5ec71ef438c235d833686cf2e657/ -hls_segment_filename /var/lib/jellyfin/transcodes/6c5a5ec71ef438c235d833686cf2e657%d.ts -hls_playlist_type event -hls_list_size 0 -y /var/lib/jellyfin/transcodes/6c5a5ec71ef438c235d833686cf2e657.m3u8

in my case it is copying the video stream

#

i imagine it varies

tiny flare
#

That log might as well be in chinese for me

#

I know just enough to get things working

#

Also I did change the HLS output to MP4 and it does seem to be working better. It did just change series and its working

#

Jellyfin likes it too

#

Remuxing
The media is in an incompatible file container (MKV, AVI, WMV, etc) but both the video stream and audio stream are compatible with the device. The media will be repackaged losslessly on the fly before being sent to the device.

Remux uses very little processing power with a completely lossless media quality.

jaunty talon
#

can't speak to how tunarr does things, but with etv's hls direct, the only reason it ever works with any client is if the client restarts/reloads the playlist (and the player) when it reaches the end of one item. this usually works with tivimate, mpv and jellyfin desktop

#

if it tries to continue playback without resetting internally, it won't work because hls direct specifically doesn't do anything to normalize

#

browser players are less likely to support the codecs that are copied from the source content

#

it also got more complicated when i looked at which codecs are supported by which container (ts vs mp4 vs mkv). i think those distinctions were mostly about subtitles (dvdsub, pgs, srt, etc)

molten tree
#

(Was dealing with music player streams)

tiny flare
#

Exactly. I can manually restart after every episode and it works fine

molten tree
#

I think he means that internally the player totally reinitializes on transition which is the quirk that allows the implementation to work

jaunty talon
#

yeah. back when i watched movie channels that i created, i used hls direct because i didnt usually sit down for multiple movies, just wanted whatever was on at original quality

molten tree
#

Because it treats each stream completely separately

jaunty talon
#

so breaking after an item didnt really matter to me

molten tree
#

that makes sense

#

i just had another JF stream stop on a transition

#

(ETV)

#

i have a tunarr hls direct running on mpv as well, it made one transition but i'll see if it can do another

#

they are playing the same content

#

Im not sure it’s totally possible- they seem like opposite ideas: stitching streams with NO normalization (assuming the client is doing nothing or minimal things)

#

The ETV hls direct stream made like 2-3 transitions before freezing up

jaunty talon
#

have you tried tivimate on android? that's the client that worked the best. i really don't troubleshoot this much, it either works in your setup because of how the client handles the end of the playlist, or it doesn't, generally

molten tree
#

I haven’t - I was just using JF to try and recreate Xanders issue. Unfortunately I don’t have any devices I can try tivimate on 🙈

#

I’m gonna give it a go on UHF for tvOS out of curiosity

tiny flare
#

Well, I guess I'll try something else then. Just seems like it should work and it would be great if it did

#

Seems like I might be the only idiot trying to direct stream kids show though. lol

molten tree
#

lol

#

I mean it’d be great if it were all that simple

#

I wouldn’t spend so much time on twiddling with transcoding to begin with really if that were the case

#

I’ll brainstorm, maybe there’s another way, but atm it seems incongruous to want to seamlessly stitch files which could be wildly different without changing them at all

tiny flare
#

I'll transcode for now and I'll fiddle with it if I feel like getting a headache. Thanks for trying boys, I appreciate it

molten tree
#

For sure - lmk if you get any additional insights in your testing

jaunty talon
#

Sorry missed that context, which jf client?

tiny flare
#

Android TV