<div dir="ltr"><div><div><div>ok, I started from mux sample here: <br></div><a href="http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/muxing.c;h=7305cc6284a0e04aaddd3d79a0bc830b9dd53256;hb=HEAD">http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/muxing.c;h=7305cc6284a0e04aaddd3d79a0bc830b9dd53256;hb=HEAD</a><br>
<br></div><div>I made these changes:<br></div>1. I forced mpegts as muxer <br>2. I set output file as udp://ipaddr:port<br></div>3. The while cicle that writes packets runs forever (it never checks if pts >= STREAM_DURATION).<br>
<div><br></div><div>I test stream with: ffplay udp://ipaddr:port<br><br></div><div>I can hear audio but no video (I can only see first frame), plus cpu is too high (> 65%)<br><br></div><div>Do I have to control the speed at which I output packets? How? If adding Sleep(x) in the while cicle, it goes well for the first 10 seconds, then video starts loosing frames and audio becomes choppy.<br>
</div><div><br></div><div>thanks<br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/8 Kalileo <span dir="ltr"><<a href="mailto:kalileo@universalx.net" target="_blank">kalileo@universalx.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Jun 9, 2013, at 00:19 , Massimo Battistel wrote:<br>
<br>
> hello,<br>
> I would like to know if there are some code samples and/or tutorials for programmatically output streaming (mpeg-ts over udp) using libavformat/avcodec.<br>
> I can't find anything on ffmpeg web site.<br>
<br>
Nothing special needed, because it's not different then writing to a file, select mpegts as muxer and your target udp url as filename.<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Massimo Battistel.
</div>