[Libav-user] udp: Video multicasring

Dmitry Adjiev adjiev.dmitry at gmail.com
Tue Aug 12 16:08:09 CEST 2014


Hello.
I work for video streamer for android.
For now I just read file and send it in network.

                if (stream.stream->codec->coded_frame->key_frame)
                    p.flags |= AV_PKT_FLAG_KEY;

                if (got_packet_ptr) {

                    p.dts = av_rescale_q_rnd(p.dts,

stream.output_format_context->streams[0]->codec->time_base,

stream.output_format_context->streams[0]->time_base,
                            AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
                    p.pts = av_rescale_q_rnd(p.pts,

stream.output_format_context->streams[0]->codec->time_base,

stream.output_format_context->streams[0]->time_base,
                            AV_ROUND_NEAR_INF|AV_ROUND_PASS_MINMAX);
                    p.duration = av_rescale_q(p.duration,

stream.output_format_context->streams[0]->codec->time_base,

stream.output_format_context->streams[0]->time_base);


av_interleaved_write_frame(stream.output_format_context, &p);
                    av_frame_free(&frame);
                    av_free_packet(&p);
                }
            }

But this occupies the entire channel it works, but it occupies the entire
network channel.
What can I do with sending for decrease network lodaing..
What I do wrong?
-- 
Regards,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140812/dd564b29/attachment.html>


More information about the Libav-user mailing list