STREAM_IP=$(docker-machine ip default) # I run Shaka in Docker container
ffmpeg \
-re -i samples/SampleVideo_1280x720_keyframe_24.mp4 \
-c:v libx264 -an -f mpegts udp://$STREAM_IP:5004 \
-c:a aac -vn -f mpegts udp://$STREAM_IP:5002
packager \
'input=udp://0.0.0.0:5002,stream=audio,init_segment=dash-socket/audio_init.mp4,segment_template=dash-socket/audio_$Number$.m4s' \ 'input=udp://0.0.0.0:5004,stream=video,init_segment=dash-socket/video_init.mp4,segment_template=dash-socket/video_$Number$.m4s' \
--mpd_output dash-socket/manifest.mpd
packager \ 'input=samples/SampleVideo_1280x720_keyframe_24.mp4,stream=audio,init_segment=dash/audio_init.mp4,segment_template=dash/audio_$Number$.m4s' \
'input=samples/SampleVideo_1280x720_keyframe_24.mp4,stream=video,init_segment=dash/video_init.mp4,segment_template=dash/video_$Number$.m4s' \
--generate_static_mpd --mpd_output dash/manifest.mpd
<AdaptationSet id="0" contentType="video" width="1280" height="720" frameRate="90000/3600" segmentAlignment="true" par="16:9"><Representation id="0" bandwidth="995470" codecs="avc1.4d401f" mimeType="video/mp4" sar="1:1"> <SegmentTemplate timescale="90000" initialization="video_init.mp4" media="video_$Number$.m4s" startNumber="1"> <SegmentTimeline> <S t="126000" d="1166400"/> <S t="1292400" d="788400"/> <S t="2080800" d="946800"/> <S t="3027600" d="882000"/> <S t="3909600" d="900000"/> <S t="4809600" d="1162800"/> <S t="5972400" d="475200"/> <S t="6447600" d="802800"/> <S t="7250400" d="900000"/> <S t="8150400" d="856800"/> <S t="9007200" d="1299600"/> <S t="10306800" d="648000"/> <S t="10954800" d="874800"/> <S t="11829600" d="1044000"/> <S t="12873600" d="680400"/> <S t="13554000" d="950400"/> </SegmentTimeline> </SegmentTemplate></Representation></AdaptationSet><AdaptationSet id="0" contentType="video" width="1280" height="720" frameRate="12288/512" segmentAlignment="true" par="16:9"><Representation id="0" bandwidth="1277207" codecs="avc1.64001f" mimeType="video/mp4" sar="1:1"> <SegmentTemplate timescale="12288" initialization="video_init.mp4" media="video_$Number$.m4s" startNumber="1"> <SegmentTimeline> <S t="1024" d="122880"/> <S t="123904" d="124928"/> <S t="248832" d="141312"/> <S t="390144" d="122880" r="2"/> <S t="758784" d="105984"/> <S t="864768" d="134144"/> <S t="998912" d="122880"/> <S t="1121792" d="117248"/> <S t="1239040" d="118272"/> <S t="1357312" d="138752"/> <S t="1496064" d="122880"/> <S t="1618944" d="104960"/> <S t="1723904" d="135680"/> <S t="1859584" d="122368"/> <S t="1981952" d="110080"/> <S t="2092032" d="9216"/> </SegmentTimeline> </SegmentTemplate></Representation></AdaptationSet>ffprobe -i samples/SampleVideo_1280x720_keyframe_24.mp4ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers built with Apple LLVM version 9.0.0 (clang-900.0.38) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'samples/SampleVideo_1280x720_keyframe_24.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf57.83.100 Duration: 00:02:50.92, start: 0.000000, bitrate: 1693 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1304 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default) Metadata: handler_name : SoundHandlerOutput #0, mpegts, to 'udp://192.168.99.100:5004': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf57.83.100 Stream #0:0(und): Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 24 fps, 90k tbn, 24 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc57.107.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1--
You received this message because you are subscribed to the Google Groups "Shaka Packager Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-packager-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-packager-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-packager-users/adb7e230-72f2-42c4-b093-008b4abffa4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[1208/082509:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://0.0.0.0:5002'.[1208/082509:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://0.0.0.0:5002'.[1208/082509:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://0.0.0.0:5004'.[1208/082509:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://0.0.0.0:5004'.Thank you for the answer.
Sorry, I forgot to mention that I definitely start packager first, it prints[1208/082509:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://0.0.0.0:5002'.[1208/082509:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://0.0.0.0:5002'.[1208/082509:INFO:demuxer.cc(88)] Demuxer::Run() on file 'udp://0.0.0.0:5004'.[1208/082509:INFO:demuxer.cc(160)] Initialize Demuxer for file 'udp://0.0.0.0:5004'.and only then I run FFmpeg.
Yes, maybe for really live stream it wouldn't be so much problem, but with plain file it worries me a lot.
The file duration is 02:51. But playback starts only at ~01:50.
So, it is not about few seconds delay but even more that a half.
I would like to figure it out to better understand a process.
Maybe I am missing something important.Is there any additional information I could check to investigate what is going on?
--
You received this message because you are subscribed to the Google Groups "Shaka Packager Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-packager-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-packager-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-packager-users/d8bbb141-b26a-437f-bdc4-e51923ba4594%40googlegroups.com.
<html lang="en">
<head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.5.0/video-js.min.css"></head><body> <video id=example-video width=600 height=300 class="video-js vjs-default-skin" controls> </video>
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/6.5.0/video.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.6.3/dash.all.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-dash/2.9.2/videojs-dash.min.js"></script> <script> var player = videojs('example-video');
player.src({ src: 'http://127.0.0.1:8887/dash-socket/manifest.mpd', type: 'application/dash+xml'}); player.play();
</script></body></html>--
You received this message because you are subscribed to the Google Groups "Shaka Packager Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-packager-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-packager-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-packager-users/075072d1-42a5-4b08-a9bd-f6197849e344%40googlegroups.com.
KQ,I have uploaded DASH files to my server: https://194.67.209.117:89.
Browser downloads MPD, but it can't download any of segments. There are a lot of warnings in console and no playback starts at all.However, I am able to download those file via curl.
Could you please take a look?I use self-signed certificate, so you should to open https://194.67.209.117:89/manifest.mpd directly in browser first to add certificate exception.Is it anything wrong with my configuration?
--
You received this message because you are subscribed to the Google Groups "Shaka Packager Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-packager-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-packager-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-packager-users/fe7fbf77-8f7f-4b00-99bc-67aff991ddb7%40googlegroups.com.
Hi KQ,For some season, I started to watch video only after it was completely packaged.
I forgot about it must be "live-like" stream. It is totally my bad, sorry.
Now I try to watch the video while it is being packaged and I am able to see it at ~00:08-00:09.But the playback is available only about 01:10-01:15 from packaging start. Is it the way it should be?
You have mentioned few times concept of "live edge". Could you please tell me more about that?
What is it? How is it calculated? Can one detect a position of that "live edge" in time?
Could you please also tell me why exactly playback starts at the position of ~00:08-00:09?
What does it depend on?
I wonder can I choose any video file, do some sort of calculations and tell exact time position that video would be started from?
--
You received this message because you are subscribed to the Google Groups "Shaka Packager Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-packager-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-packager-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-packager-users/634d65c4-d494-46d7-bc40-0ee2a1845465%40googlegroups.com.