#is it possible to pass a stream directly to emby without double ffmpegs?

1 messages · Page 1 of 1 (latest)

halcyon belfry
#

i brought up to emby devs that when i run a 4k stream from etv i see in emby that im only getting 4k 20mbps displayed in the emby dashboard. they think i might be able to get the full source output higher than 20mbps if there was an option in etv to bypass etvs ffmpeg and pass the stream directly into emby so embys ffmpeg can handle it. is it possible to pass a stream directly to emby without double ffmpegs?

junior temple
#

Didn't they just push for normalization? That requires ffmpeg

#

For movies I usually use hls direct, which passes the video and audio untouched

#

But the client has to support it

#

Emby probably doesn't, idk

halcyon belfry
#

oh yeah a few days ago when they were trying to tell us how to solve the 8bit 10 bit thing?

junior temple
#

Yes

#

Those are conflicting asks

halcyon belfry
#

oh

junior temple
#

Either ffmpeg normalizes things and the stream doesn't break. Or you use hls direct and it will probably break after each item

halcyon belfry
#

well they just said they couldnt control the outcome before that since it goes through your ffmpeg first so they have no control over that. i was just wondering if you could had a setting that we could choose to disable etv ffmpeg as another option

#

then i guess maybe they could work on something if etv had that option

junior temple
#

The hls direct streaming mode is the only way to get full quality video, but the client needs to support range requests since it's delivered as a single segment

halcyon belfry
#

ok ill pass that on

junior temple
#

You could try that in emby, but again, it removes all normalization, which they said was a requirement in the other thread

halcyon belfry
#

yeah

junior temple
#

The normalization shouldn't be required since discontinuity tags are used between each item, but most clients don't handle those tags properly

#

EXT-X-DISCONTINUITY: Indicates an encoding discontinuity between the media file that follows it and the one that preceded it.

halcyon belfry
#

ok i passed it on to them here

#
#

Luke
System Architect
LukeEmby Team

Administrators
31769
207412
3491
Posted 3 minutes ago
Ok well another option might be to have them add an option to at least retain original bitrate.

junior temple
#

you can set the bitrate in the ffmpeg profile

#

there are bitrate and buffer settings that are used by the video encoder

halcyon belfry
#

i have tried setting the bitrate to 12000 and buffer to 24000 but emby still shows 4k 20mbps

#

im not sure what other bitrate to try

#

since i read that 4k bitrate goes up to 18000

#

oh 14000

junior temple
#

1mpbs = 1000kbps

#

so you have it set to 12mbps

halcyon belfry
#

yeah

#

ohh

#

ill try 40000

#

still showing 20

junior temple
#

did you let it time out? are you using the segmenter?

halcyon belfry
#

im not using hls

junior temple
#

you have to wait for it to terminate, then start the channel again

halcyon belfry
#

oh ok

junior temple
#

you should use hls if emby has the option, it's better than mpeg-ts

halcyon belfry
#

ill restart my server and keep trying mpegts then ill try hls after

#

i change to hls in emby settings? or etv settings?

junior temple
#

make sure channels are using hls segmenter in etv, idk what emby settings are for live tv. just dont use it as hdhomerun

halcyon belfry
#

oh ok

#

in emby im on m3u

#

theres hdhomerun and m3u option and i think a 3rd option too

#

my server

junior temple
#

m3u

halcyon belfry
#

yeah thats what im on

junior temple
#

ok

#

can you paste the ffmpeg args from etv when you try to stream

halcyon belfry
junior temple
#

-b:v 40000k -maxrate:v 40000k -bufsize:v 80000k it should be giving you more than 20

halcyon belfry
#

still 20 though

#

oh maybe i need to set the emby quality in th emby app

#

right now its on auto

#

ok i set the app to 40 but its still only 20 in the dashboard

junior temple
#

🤷‍♂️

halcyon belfry
#

ok ill ask Luke

#

ill try hls segmenter now

#
[13:58:53 DBG] Desired pixel format ErsatzTV.FFmpeg.Format.PixelFormatYuv420P
[13:58:53 DBG] Adding colorspace filter
[13:58:53 DBG] Format ["p010le"] doesn't equal yuv420p
[13:58:53 WRN] HDR tone mapping is not implemented; colors may appear incorrect
[13:58:53 INF] ffmpeg hls arguments -threads 1 -nostdin -hide_banner -nostats -loglevel error -fflags +genpts+discardcorrupt+igndts -hwaccel cuda -ss 01:30:09.4651574 -c:v hevc_cuvid -hwaccel_output_format cuda -i "N:\24_7_Channels\ChristmasFavouritesOnlyMovies\4K\Movies\The Santa Clause 2 (2002) WEBRip-2160p.mkv" -filter_complex [0:1]loudnorm=I=-16:TP=-1.5:LRA=11,apad=whole_dur=6262272ms[a];[0:0]scale_cuda=format=p010le,hwdownload,format=p010le,pad=3840:2160:-1:-1:color=black[v] -map [a] -map [v] -muxdelay 0 -muxpreload 0 -movflags +faststart -flags cgop -sc_threshold 0 -t 00:14:12.8068426 -r 24 -vsync cfr -video_track_timescale 90000 -b:v 40000k -maxrate:v 40000k -bufsize:v 80000k -c:a aac -ac 2 -b:a 192k -maxrate:a 192k -bufsize:a 384k -ar 48k -c:v hevc_nvenc -map_metadata -1 -metadata "service_provider=\"ErsatzTV\"" -metadata "service_name=\"Christmas Favs 4K 3\"" -metadata:s:a:0 language=eng -g 96 -keyint_min 96 -force_key_frames expr:gte(t,n_forced*4) -f hls -hls_time 4 -hls_list_size 0 -segment_list_flags +live -hls_segment_filename C:\Users\User0\AppData\Local\etv-transcode\253\live%06d.ts -hls_flags program_date_time+append_list+discont_start+omit_endlist+independent_segments -mpegts_flags +initial_discontinuity C:\Users\User0\AppData\Local\etv-transcode\253\live.m3u8
[13:58:56 DBG] Playlist exists
[13:58:56 DBG] Segment count 0 of 1
[13:58:56 DBG] WaitForPlaylistSegments took 00:00:02.7267319
[13:58:56 DBG] Session started; returning multi-variant playlist for channel 253```
#

awesome

#

now i need to check the transitions with this hls segmenter setting

#

on my sony tv i mean

#

oh wait

#

last night i had the scrambled video transition issue only on my 4k channels

#

do you need to do the fix for all the different resolutions? 8bit 10bit transition fix i mean

junior temple
#

Hdr is not normalized

#

That's another step beyond the 8 but and 10 bit stuff, and the solution will probably be to remove the hdr

#

Did you try hls direct at all?

halcyon belfry
#

oh

#

no i havent tried hls direct ever

junior temple
#

Probably won't work, but worth a shot. It uses very little cpu

halcyon belfry
#

ok ill try it

#

ok so i waited for the next transition while still on hls segementer and i remeber now why i dont use it. its because it does not transition at all. i think thats whay tou meant by xdiscontinuity errors and the client has to support hls segmenter.

#

im going to try hls direct now

#

every hls direct channel gives this

#

and the channel doesnt play

#

it happens as soon as i click play. doesnt even have a chance to try to load

#

oh heres a more complete ffmpeg log

#

with hls direct

#

im going t o switch back to mpegts for now

junior temple
#

ok looks like hls direct is broken in the branch that normalizes color, but it doesnt work for hdr anyway, so maybe try with the other version

halcyon belfry
#

what other version?

#

of etv?

junior temple
#

yes, the version you were using before i built the custom one for you to test transitions

halcyon belfry
#

oh

#

ill try loaidng up my backup

#

and see what hls direct looks like like you said

#

the backup is the previous version

junior temple
#

you shouldn't need to change the database or anything, just close etv and launch the other one

halcyon belfry
#

oh ok

halcyon belfry
#

im on hls direct now playing but the most any streams go up to is 20mbps

#

some are at 10mbps

#

i think the emby devs were trying to tell me the file only allows 20mbps

#

but again with hls direct the same thing as hls segmenter is it wont transition to the next movie

junior temple
#

hls direct copies the video stream, so you will literally get the source video untouched

#

which is why some clients dont transition properly (like emby). tivimate supports it fine on android though. i use that for some of my movie channels since i dont like the transcoding quality loss

halcyon belfry
#

oh ok

halcyon belfry
#

im replacing my 4k content with bigger files that definitly have hdr this time. im going to see if the mbps changes in emby dahsboard from 20mbps to something higher like 40 since someone on the emby forum mentioned that my file only outputs up to 20mbps.

#

the files will be hdr 10bit 53gb in size

#

also i noticed emby was transcoding VOD which made my VOD 4k look blurry and crappy. i found the setting in my emby server to disable transcoding per user and now my vod looks great and very detailed. its a releif because i though it was my tv that was broken. i even called the store i bought it from to start up a warranty claim which im going to cancel on monday.