Re: [Libav-user] G.711 audio in mkv container

2016-09-23 Thread Alex Grosu
Arghh, I forgot to add in my previous mail these settings : c->sample_fmt = SAMPLE_FMT_S16; c->flags = CODEC_FLAG_GLOBAL_HEADER; On 9/23/2016 2:16 PM, Alex Grosu wrote: One correction, c->frame_size = 2560 (not 2650, typo) Sorry for this On 9/23/2016 2:13 PM, Alex Grosu wrote: Dear

[Libav-user] Server out stream as RTP

2016-09-23 Thread Simon Brown
Hi, I'm trying to serve a transport stream generated by hardware out on as an RTP stream. Is there an example I can use to help me do this? I've been looking through ffserver.c but that is much more complicated than I need, and seems to be largely aimed at serving files out. Cheers, Simon

[Libav-user] G.711 audio in mkv container

2016-09-23 Thread Alex Grosu
Dear all I am having some issues in creating a G711 audio mkv container with libavcodec on windows. I set the codec context (header) like this: c->codec_id = CODEC_ID_PCM_ALAW; c->codec_type = CODEC_TYPE_AUDIO; c->bit_rate = 64000; c->sample_rate = 8000; c->channels = 1; c->frame_size = 2650;

Re: [Libav-user] G.711 audio in mkv container

2016-09-23 Thread Alex Grosu
Ok, I figured it out. The frame_size should not have been set to 2560, but instead let it in the initial state (0). After that, the frames are coming with 1280 as frame_size So anyway, for anyone who want to put G7111 audio codec in a mkv container (Windows), here is the header: c->codec_id

Re: [Libav-user] G.711 audio in mkv container

2016-09-23 Thread Alex Grosu
One correction, c->frame_size = 2560 (not 2650, typo) Sorry for this On 9/23/2016 2:13 PM, Alex Grosu wrote: Dear all I am having some issues in creating a G711 audio mkv container with libavcodec on windows. I set the codec context (header) like this: c->codec_id = CODEC_ID_PCM_ALAW;

Re: [Libav-user] Server out stream as RTP

2016-09-23 Thread Simon Brown
On 23 September 2016 at 09:27, Simon Brown wrote: > Hi, > I'm trying to serve a transport stream generated by hardware out on as an > RTP stream. Is there an example I can use to help me do this? I've been > looking through ffserver.c but that is much more complicated

Re: [Libav-user] Server out stream as RTP

2016-09-23 Thread Charles
On 09/23/2016 07:04 AM, Simon Brown wrote: On 23 September 2016 at 09:27, Simon Brown > wrote: Hi, I'm trying to serve a transport stream generated by hardware out on as an RTP stream. Is there an example I can use to help me

Re: [Libav-user] Generated H264 video is only 1 second long with only 1 frame shown (Probably a PTS/DTS problem)

2016-09-23 Thread Charles
On 09/21/2016 03:23 PM, M N wrote: Hi, so I guess it is a PTS problem. How do I set the PTS/DTS for a packet in H264? [...] //pktr->pts = av_rescale_q_rnd(pkts->pts, ps->streams[pkts->stream_index]->time_base, ps2->streams[pkts->stream_index]->time_base,