<p>I'm in a similar position to you and I suspect part of the problem is that my CPU can't transcode the stream fast enough, especially when running a player on the same machine.</p>

<p>Check your CPU usage, if it's maxing out that's probably the reason for the frame drops.</p>

<p>Apparently mp4box can be used to stream live DASH (it has a -dash-live option) but I haven't managed to get this working yet either.  This link is quite old, but seems to have a working example:</p>

<p><a href="http://www.slideshare.net/cconcolato/live-streaming-of-video-and-subtitles-with-mpegdash" rel="nofollow">http://www.slideshare.net/cconcolato/live-streaming-of-video-and-subtitles-with-mpegdash</a></p>

CC BY-SA 3.0
2016-07-15T14:16:53.957Z
2016-07-15T14:16:53.957Z
Japes55
<p>after a lot of googling and after I've read tons of forums, I'm still not able to do a live stream using my cam to another device.
My system is made up by a server ( a windows laptop ), that capture the scene and stream the acquired video, untill now I tried to use ffmpeg, MP4Box and DashCast obviously without results, and by a client ( some device ) that should be able to read the video flow by using a simple html5 page equipped with dash.js.</p>

<p>At the very beginning, in order to understand how dash works, I tried to stream some "static" video and all work perfectly thanks to <a href="http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-adaptive-webm-using-dash" rel="nofollow">this tutorial</a>. The issues arise when I tried to stream live video and I followed <a href="http://wiki.webmproject.org/adaptive-streaming/instructions-to-do-webm-live-streaming-via-dash" rel="nofollow">this tutorial</a>, because ffmpeg failed when it was trying to create .mpd file, but it can be divide in two sub-problem:</p>

<ol>
<li><p>When I try to handle audio and video together the system say that audio channel doesn't contain any stream. Following I list the inserted command:</p>

<pre><code>ffmpeg -f dshow -i video="USB2.0 VGA UVC WebCam":audio="Microfono /
(Realtek   High Definition Audio)" -map 0:0 -pix_fmt yuv420p /
-c:v libvpx -b:v 3000k -keyint_min 30 -g 30 -speed 6 /
-tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 /
-max-intra-rate 300 -deadline realtime -lag-in-frames 0 /
-error-resilient 1 -f webm_chunk -header live.hdr /
-chunk_start_index 1 live_%d.chk -map 0:1 -c:a libvorbis -b:a 128k /
-ar 44100 -f webm_chunk -audio_chunk_duration 2000 -header /
live_audio.hdr -chunk_start_index 1 live_audio_%d.chk
</code></pre>

<p>The above rows call audio and video hardware and save the multimedia streams 
in chunks.</p>

<pre><code>ffmpeg -f webm_dash_manifest -live 1 -i live.hdr -f webm_dash_manifest /
-live 1 live_audio.hdr -c copy -map 0 -map 1 -f webm_dash_manifest /
-live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" /
-chunk_start_index 1 -chunk_duration_ms 2000 /
-time_shift_buffer_depth 7200 -minimum_update_period 7200 manifest.mpd
</code></pre>

<p>This last command failed to attach audio stream in the .mpd file and in console appeared "Output file #0 does not contain any stream" as error. </p></li>
<li><p>So I try only with video using essentially the same options, but when I tried to create the manifest an error of this type "Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input" arise, so I'm curious to know what kind of parameters are wrong.</p></li>
</ol>

<p>At this point I change completely my strategy, so I create a fragmeted version of the live stream and I tried to use MP4Box to create .mpd file, but seem that MP4Box works only with finite time video, or at least I can't to use it in live.</p>

<p>And finally I used Dashcast and I able to see some frame from my client page, but simply it doesn't work. The last command I inserted is the following:</p>

<pre><code>DashCast -vf dshow -vfr 15 -v video="USB2.0 VGA UVC WebCam" /
-live -seg-dur 500 -frag-dur 100 -time-shift 10
</code></pre>

<p>Actually I played a little with the parameters etc... but the result is still the same, simply I not able to see my face in the browser. In this case the error is "real-time buffer 101% full! frame dropped!" or "real-time buffer 80% full! frame dropped!".</p>

<p>So my question is what's wrong with my FFmpeg commands? </p>

<p>How I can use MP4Box for live purpose( with examples because I don't find a sigle example in the whole net)? </p>

<p>And finally, why DashCast is so slow?</p>

<p>Obviously every suggestions about alternative methods to perform a live stream with some other tool are accepted.</p>

CC BY-SA 3.0
2016-03-30T02:06:51.160Z
Have you tried this? http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-adaptive-webm-using-dash
Hans Meiser
CC BY-SA 3.0
2016-03-30T02:10:25.390Z
Sorry, didn't see you linked that before. Your Ffmpeg line looks much more complex than the one in the example given there, why is that?
Hans Meiser
CC BY-SA 3.0
2016-03-30T02:11:18.610Z
And just out of curiosity, did you research if VLC can do what you need?
Hans Meiser
CC BY-SA 3.0
2016-03-30T07:05:18.393Z
Hi @HansMeiser, thanks for the comments, anyway my string look more complex because I used the variable ${VP9_DASH_PARAMS} in plain text version -speed 6 -tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 -max-intra-rate 300 -deadline realtime -lag-in-frames 0 -error-resilient 1 , that are the parameters for live stream. Actually is the parameters for VP9 encoder, but I used VP8, because VP9 give me some problems. Finally no, I didn't research on VLC, now I'll take a look on VLC stuff
user66350
CC BY-SA 3.0
2018-04-25T07:34:00.700Z
I have similar problem as yours and it seems windows ffmpeg is broken. The same commands that give me errors in Windows work in Linux.
astrowalker
<ffmpeg><streaming><live>
Dash live streaming
user66350
# Dash live streaming

(Asked by: username_0 on 2016-03-29)

after a lot of googling and after I've read tons of forums, I'm still not able to do a live stream using my cam to another device.
My system is made up by a server ( a windows laptop ), that capture the scene and stream the acquired video, untill now I tried to use ffmpeg, MP4Box and DashCast obviously without results, and by a client ( some device ) that should be able to read the video flow by using a simple html5 page equipped with dash.js.
At the very beginning, in order to understand how dash works, I tried to stream some "static" video and all work perfectly thanks to this tutorial. The issues arise when I tried to stream live video and I followed this tutorial, because ffmpeg failed when it was trying to create .mpd file, but it can be divide in two sub-problem:

When I try to handle audio and video together the system say that audio channel doesn't contain any stream. Following I list the inserted command:
ffmpeg -f dshow -i video="USB2.0 VGA UVC WebCam":audio="Microfono /
(Realtek   High Definition Audio)" -map 0:0 -pix_fmt yuv420p /
-c:v libvpx -b:v 3000k -keyint_min 30 -g 30 -speed 6 /
-tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 /
-max-intra-rate 300 -deadline realtime -lag-in-frames 0 /
-error-resilient 1 -f webm_chunk -header live.hdr /
-chunk_start_index 1 live_%d.chk -map 0:1 -c:a libvorbis -b:a 128k /
-ar 44100 -f webm_chunk -audio_chunk_duration 2000 -header /
live_audio.hdr -chunk_start_index 1 live_audio_%d.chk

The above rows call audio and video hardware and save the multimedia streams 
in chunks.
ffmpeg -f webm_dash_manifest -live 1 -i live.hdr -f webm_dash_manifest /
-live 1 live_audio.hdr -c copy -map 0 -map 1 -f webm_dash_manifest /
-live 1 -adaptation_sets "id=0,streams=0 id=1,streams=1" /
-chunk_start_index 1 -chunk_duration_ms 2000 /
-time_shift_buffer_depth 7200 -minimum_update_period 7200 manifest.mpd

This last command failed to attach audio stream in the .mpd file and in console appeared "Output file #0 does not contain any stream" as error. 
So I try only with video using essentially the same options, but when I tried to create the manifest an error of this type "Could not write header for output file #0 (incorrect codec parameters ?): Invalid data found when processing input" arise, so I'm curious to know what kind of parameters are wrong.

At this point I change completely my strategy, so I create a fragmeted version of the live stream and I tried to use MP4Box to create .mpd file, but seem that MP4Box works only with finite time video, or at least I can't to use it in live.
And finally I used Dashcast and I able to see some frame from my client page, but simply it doesn't work. The last command I inserted is the following:
DashCast -vf dshow -vfr 15 -v video="USB2.0 VGA UVC WebCam" /
-live -seg-dur 500 -frag-dur 100 -time-shift 10

Actually I played a little with the parameters etc... but the result is still the same, simply I not able to see my face in the browser. In this case the error is "real-time buffer 101% full! frame dropped!" or "real-time buffer 80% full! frame dropped!".
So my question is what's wrong with my FFmpeg commands? 
How I can use MP4Box for live purpose( with examples because I don't find a sigle example in the whole net)? 
And finally, why DashCast is so slow?
Obviously every suggestions about alternative methods to perform a live stream with some other tool are accepted.

**Tags:** ffmpeg, streaming, live

> **Comments:**
> **username_1**: Have you tried this? http://wiki.webmproject.org/adaptive-streaming/instructions-to-playback-adaptive-webm-using-dash  
> **username_1**: Sorry, didn't see you linked that before. Your Ffmpeg line looks much more complex than the one in the example given there, why is that?  
> **username_1**: And just out of curiosity, did you research if VLC can do what you need?  
> **username_0**: Hi @HansMeiser, thanks for the comments, anyway my string look more complex because I used the variable ${VP9_DASH_PARAMS} in plain text version -speed 6 -tile-columns 4 -frame-parallel 1 -threads 8 -static-thresh 0 -max-intra-rate 300 -deadline realtime -lag-in-frames 0 -error-resilient 1 , that are the parameters for live stream. Actually is the parameters for VP9 encoder, but I used VP8, because VP9 give me some problems. Finally no, I didn't research on VLC, now I'll take a look on VLC stuff  
> **username_2**: I have similar problem as yours and it seems windows ffmpeg is broken. The same commands that give me errors in Windows work in Linux.  

---

## 1 answers

### Answer by username_3 on 2016-07-15. Score: 1

I'm in a similar position to you and I suspect part of the problem is that my CPU can't transcode the stream fast enough, especially when running a player on the same machine.

Check your CPU usage, if it's maxing out that's probably the reason for the frame drops.

Apparently mp4box can be used to stream live DASH (it has a -dash-live option) but I haven't managed to get this working yet either. This link is quite old, but seems to have a working example:

<http://www.slideshare.net/cconcolato/live-streaming-of-video-and-subtitles-with-mpegdash>


---

