any known fix to get baseline & main/high live ABR hls with unified streaming without #EXT-X-DISCONTINUITY

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

any known fix to get baseline & main/high live ABR hls with unified streaming without #EXT-X-DISCONTINUITY

andrei ka
hello,

i use ffmpeg (4.1) to stream live hls using unified streamnig.

if in my abr encoding i mix baseline with main/high, live hls generated by
unified (USP) would
have #EXT-X-DISCONTINUITY on each segment :

encoding :

ffmpeg-y -re -i 'udp://239.255.255.1:21007?localaddr=127.0.0.1' \
-filter_complex "[0:v]yadif[prg];
[prg]unsharp=5:5:0.4:5:5:0.0,split=2[br1][br2]" -movflags
isml+frag_keyframe -f ismv -threads 0 -ism_offset 15468673780000000 \
-c:a libfdk_aac -ac 2 -af
'aresample=async=1:min_hard_comp=0.100000:first_pts=0' -c:v libx264 -tune
grain -g 50 -r 25 -keyint_min 50 -sc_threshold 0 \
-map '[br1]' -b:v:0 400k -s:v:0 426x240 -preset:v:0 superfast -profile:v:0
baseline -level:v:0 2.1 \
-map '[br2]' -b:v:1 800k -s:v:1 640x360 -preset:v:1 veryfast -profile:v:1
high -level:v:1 3.0 \
-map 0:a:0 -b:a 128k \
-metadata:s:a:0 language=fre '
http://usp_url/live_event/live_event.isml/Streams(video)'

==============
m3u8 on 800k br:

#EXTM3U
#EXT-X-VERSION:3
## Created with Unified Streaming Platform(version=1.7.25)
#EXT-X-MEDIA-SEQUENCE:193358423
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:8
#USP-X-TIMESTAMP-MAP:MPEGTS=994987456,LOCAL=2019-01-07T13:22:58Z
#EXT-X-PROGRAM-DATE-TIME:2019-01-07T13:22:58Z
#EXTINF:6.08, no desc
#EXT-X-KEY:METHOD=AES-128,URI="https://usp_url/hls_aes.key"
smooth-audio_fre=128000-video=800000-193358423.ts
#EXT-X-PROGRAM-DATE-TIME:2019-01-07T13:23:04.040000Z
#EXT-X-DISCONTINUITY
#EXTINF:8.04, no desc
smooth-audio_fre=128000-video=800000-193358424.ts
#EXT-X-PROGRAM-DATE-TIME:2019-01-07T13:23:12.040000Z
#EXT-X-DISCONTINUITY
#EXTINF:8.04, no desc
smooth-audio_fre=128000-video=800000-193358425.ts

ffmpeg screws it up pnly when baseline is involved, this one would get
clean m3u8 :

-map '[br1]' -b:v:0 400k -s:v:0 426x240 -preset:v:0 superfast -profile:v:0
main -level:v:0 2.1 ;
-map '[br2]' -b:v:1 800k -s:v:1 640x360 -preset:v:1 veryfast -profile:v:1
high -level:v:1 3.0 ;

#EXTM3U
#EXT-X-VERSION:3
## Created with Unified Streaming Platform(version=1.7.25)
#EXT-X-MEDIA-SEQUENCE:193358423
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:8
#USP-X-TIMESTAMP-MAP:MPEGTS=994994656,LOCAL=2019-01-07T13:22:58.080000Z
#EXT-X-PROGRAM-DATE-TIME:2019-01-07T13:22:58.080000Z
#EXTINF:6, no desc
#EXT-X-KEY:METHOD=AES-128,URI="https://usp_url/hls_aes.key"
smooth-audio_fre=128000-video=800000-193358423.ts
#EXTINF:8, no desc
smooth-audio_fre=128000-video=800000-193358424.ts
#EXTINF:8, no desc
smooth-audio_fre=128000-video=800000-193358425.ts

it's ffmpeg encoing issue, i've encoded the same, 2 bitrates with baseline
& high, 30 secs with carbon and then used the ismv files as sources instead
of udp multicast without trancoding, in this case no #EXT-X-DISCONTINUITY
observed. i didn't delve into details with elecard, at unified they know
the issue. it's not a tragedy for me, i would rather encode low bitrates
with high anyway, but i'm curious, is it a know issue. i could comment out
#EXT-X-DISCONTINUITY insertion and recompile ffmpeg to see if my live would
still be steady, but why not to ask first , may be someone knows some
option or particular way of encoding to fix this.

cheers, &rei
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: any known fix to get baseline & main/high live ABR hls with unified streaming without #EXT-X-DISCONTINUITY

Carl Eugen Hoyos-2
2019-01-10 17:48 GMT+01:00, andrei ka <[hidden email]>:

> i use ffmpeg (4.1) to stream live hls using unified streamnig.

Is the issue reproducible with current FFmpeg?

Please provide a minimal usecase (using testsrc2 instead
of an udp source) that allows us to reproduce.

(What is "unified streaming"?)

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".