LIVE packaging for low latency #744
Labels
status: archived
Archived and locked; will not be updated
status: duplicate
A duplicate of another issue; should be closed after linking to the original issue
System info
Operating System: <e.g. macOS Sierra, Ubuntu 14.04 trusty etc>
Ubuntu 18
Shaka Packager Version: <e.g. v1.6.1, commit SHA etc>
2.4.1
Issue and steps to reproduce the problem
I am using ffmpeg+shaka-packager for LIVE streaming. Currently the latency is around 20 sec. To reduce the latency I am facing some issues:
ffmpeg -y -listen 1 -thread_queue_size 200 -i "rtmp://127.0.0.1:1437/live/abc" -an -preset veryfast -pix_fmt yuv420p -flags +cgop -c:v h264 -profile:v baseline -level 3.0 -r 30 -crf 23 -keyint_min 30 -g 30 -vf scale=-2:640,setsar=1:1 -f mpegts "udp://127.0.0.1:40000" -an -preset veryfast -pix_fmt yuv420p -flags +cgop -c:v h264 -profile:v baseline -level 3.0 -r 30 -crf 23 -keyint_min 30 -g 30 -vf scale=-2:360,setsar=1:1 -f mpegts "udp://127.0.0.1:40001"
packager "in=udp://127.0.0.1:40000,stream=video,init_segment=./livedata/HQVideo_init.mp4,segment_template=./livedata/HQVideo_$Number$.m4s" --segment_duration 1 "in=udp://127.0.0.1:40001,stream=video,init_segment=./livedata/MQVideo_init.mp4,segment_template=./livedata/MQVideo_$Number$.m4s" --segment_duration 1 --mpd_output "./livedata/$1/$2/$3/livestream1.mpd" --allow_approximate_segment_timeline --segment_template_constant_duration
FFMPEG generate 2 video streams which are sent to shaka-packager with udp. Below is the mpd generated:
As you can see there is no segment-duration and still it has SegmentTimeline. Because of this periodic manifest updates are required.
ffmpeg -y -listen 1 -thread_queue_size 200 -i "rtmp://127.0.0.1:1437/live/abc" -vn -ac 1 -c:a aac -b:a 128k -r 44100 -f mpegts -strict experimental "udp://127.0.0.1:40000" -an -preset veryfast -pix_fmt yuv420p -flags +cgop -c:v h264 -profile:v baseline -level 3.0 -r 30 -crf 23 -keyint_min 30 -g 30 -vf scale=-2:640,setsar=1:1 -f mpegts "udp://127.0.0.1:40001" -an -preset veryfast -pix_fmt yuv420p -flags +cgop -c:v h264 -profile:v baseline -level 3.0 -r 30 -crf 23 -keyint_min 30 -g 30 -vf scale=-2:360,setsar=1:1 -f mpegts "udp://127.0.0.1:40002"
packager "in=udp://127.0.0.1:40000,stream=audio,init_segment=./livedata/audio_init.mp4,segment_template=./livedata//audio_$Number$.m4s" --segment_duration 1 "in=udp://127.0.0.1:40001,stream=video,init_segment=./livedata/HQVideo_init.mp4,segment_template=./livedata/HQVideo_$Number$.m4s" --segment_duration 1 "in=udp://127.0.0.1:40002,stream=video,init_segment=./livedata/MQVideo_init.mp4,segment_template=./livedata/MQVideo_$Number$.m4s" --segment_duration 1 --mpd_output "./livedata/$1/$2/$3/livestream1.mpd" --allow_approximate_segment_timeline --segment_template_constant_duration
Below is the MPD I am getting:
Packager Command:
Extra steps to reproduce the problem?
All the details I have given above
What is the expected result?
shaka-packager should generate mpd with SegmentTemplate with duration so that the mpd is small and also mpd updates are not required as per shaka-project/shaka-player#1287
What happens instead?
shaka-packager is generating mpd with segment timelines.
<Please attach the input files or email to shaka-packager-issues@google.com.>
The text was updated successfully, but these errors were encountered: