From cehoyos at ag.or.at Sun Apr 1 13:45:46 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 1 Apr 2012 11:45:46 +0000 (UTC) Subject: [Libav-user] extracting audio References: Message-ID: Craig Murray writes: > Next question if I'm taking a series of jpgs and converting > them into an avi, how can i embed a .wav file into that avi? ffmpeg -i in%5d.jpg -i in.wav out.avi I am not sure how to concatenate audio, I suggest you first prepare the audio file with another application, then mux it as above. (Or search for the concat: protocol in FFmpeg, I have not used it yet.) Carl Eugen From lizhang at utelisys.com Sun Apr 1 22:15:24 2012 From: lizhang at utelisys.com (Li Zhang) Date: Sun, 1 Apr 2012 22:15:24 +0200 Subject: [Libav-user] Continuity check failed for pid 519 expected 14 got 13 Message-ID: Hi, That is again a problem about my transcoding. After some time my code will fail and I got lots of information from ffmpeg like: [mpegts @ 0x632860] Continuity check failed for pid 519 expected 14 got 13. At the same time, the decoding and encoding were all stop. I think it just grab a packet from input and found something wrong and threw it. I am wondering what was happening? And I used the VLC transcoding the same input and there was no this situation. So what I can do in order to avoid this situation? Best regards, Li From umanga.forums at gmail.com Mon Apr 2 06:30:23 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Mon, 2 Apr 2012 13:30:23 +0900 Subject: [Libav-user] Opening an UDP stream for reading : using avformat_open_input()? Message-ID: Greetings all, I have successfully used "avformat_open_input()" to read from a container file. I am wondering,whether it is possible to open and listen an UDP stream from a server using this API call ? Best Regards, umanga -------------- next part -------------- An HTML attachment was scrubbed... URL: From francesco at bltitalia.com Tue Apr 3 08:48:45 2012 From: francesco at bltitalia.com (francesco at bltitalia.com) Date: Tue, 3 Apr 2012 08:48:45 +0200 (added by postmaster@virgilio.it) Subject: [Libav-user] Bit rate not changing Message-ID: <4F6667710180A5BD@vsmtp14.tin.it> (added by postmaster@virgilio.it) Hi to all I am attempting to transcode compressed SD video in JP2K format to MPEG-2 compressed video at 30, 40 and 50Mbit using libavcodec only for compressing. Here is the code: pQTcodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); // find the mpeg2 video encoder if (!pQTcodec) {str1="Unable to find codec MPEG2";ferr=-1; goto _CoreMakeMPEG2Video_err;} pQTCodecCtx = avcodec_alloc_context3(pQTcodec); if(pQTCodecCtx==NULL) {str1="Unable to alloc codec context";ferr=-2; goto _CoreMakeMPEG2Video_err;} pQTFrame = avcodec_alloc_frame(); if(pQTFrame==NULL) {str1="Unable to alloc frame";ferr=-3; goto _CoreMakeMPEG2Video_err;} switch(comp_drate) { case 0 :cvbr=30000000; break; // 30Mbs case 1 :cvbr=40000000; break; // 40Mbs case 2 :cvbr=50000000; break; // 50Mbs default :cvbr=25000000; break; // 25Mbs } pQTCodecCtx->bit_rate = cvbr; pQTCodecCtx->rc_max_rate = pQTCodecCtx->rc_min_rate =pQTCodecCtx->bit_rate = cvbr; pQTCodecCtx->flags = CODEC_FLAG_INTERLACED_DCT | CODEC_CAP_AUTO_THREADS;// | CODEC_FLAG_SVCD_SCAN_OFFSET ; pQTCodecCtx->flags2 = CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT; pQTCodecCtx->qmin = 1; pQTCodecCtx->vbv_delay = 3600; pQTCodecCtx->rtp_payload_size = 1; pQTCodecCtx->rc_buffer_size = 2000000; pQTCodecCtx->rc_initial_buffer_occupancy = 2000000; pQTCodecCtx->lmin = 1*FF_QP2LAMBDA; pQTCodecCtx->rc_max_available_vbv_use = 1; pQTCodecCtx->rc_min_vbv_overflow_use = 1; vform.num = 4; vform.den = 3; pQTCodecCtx->sample_aspect_ratio = vform; pQTCodecCtx->rc_buffer_aggressivity = 0.25F; pQTCodecCtx->intra_dc_precision = 2; pQTCodecCtx->qmax = 3; after this I call a routine that expands original frame (jpeg 2000 compressed) and recompress in MPEG2 format. To this routine I pass the pointer to Codec Context (pQTCodecCtx) , the pointer to a frame (pQTFrame) and the pointer to the codec; that is int Expand_Inter_MPEG2Comp_Image(unsigned char * frame, void *pCodecCtx, void *pFrame,void *p_codec) { AVFrame *locpFrame; AVCodecContext *locpCodecCtx; AVCodec *codec; locpCodecCtx = (AVCodecContext*) pCodecCtx; locpFrame = (AVFrame*)pFrame; codec = (AVCodec*) p_codec; locpCodecCtx->width = Hsize; locpCodecCtx->height = (Vsize<<1) + 32; // Add 32 blank rows on top for compatibility /* frames per second */ locpCodecCtx->time_base.num = 1; locpCodecCtx->time_base.den = 25; locpCodecCtx->gop_size = 0; /* emit only intra frame */ locpCodecCtx->max_b_frames=0; locpCodecCtx->pix_fmt = PIX_FMT_YUV422P; ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples) rtv = av_image_alloc(locpFrame->data, locpFrame->linesize, locpCodecCtx->width, locpCodecCtx->height, locpCodecCtx->pix_fmt, 1); data array> locpFrame->qscale_type = 1; locpFrame->top_field_first = 1; locpFrame->interlaced_frame = 1; if (avcodec_open2(locpCodecCtx, codec,NULL) < 0) {rtv=-6;str1="on av codec open";goto __end_rdec;} encBufSize = 0x500000; out_size = avcodec_encode_video(locpCodecCtx, &tempBuffer[kagsz],encBufSize , locpFrame); return out_size; } in this case if I set different frame rates, the result is a file of different size for each frame. The size is congruent with frame rate, the headers are set accordingly, but the remainig content is the same! ! As if the only thing is to adjust headers. The only difference is that files with highter frame rate are filled with zeroes at the end. I upload the compressed images of the first frame compressed at 50M and at 40M. Here you can see that the only diference is the header and the zero fill at the end in order to obtain the size. The same frame recompressed with final cut pro gives compressed stream very different. From jan.hoelscher at codergrid.de Tue Apr 3 09:09:52 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Tue, 3 Apr 2012 09:09:52 +0200 Subject: [Libav-user] Bit rate not changing In-Reply-To: <4f7a9d51.cf43d80a.7d6b.1049SMTPIN_ADDED@mx.google.com> References: <4f7a9d51.cf43d80a.7d6b.1049SMTPIN_ADDED@mx.google.com> Message-ID: 2012/4/3 > Hi to all > I am attempting to transcode compressed SD video in JP2K format to MPEG-2 > compressed video at 30, 40 and 50Mbit > using libavcodec only for compressing. Here is the code: > > pQTcodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); // find the mpeg2 > video encoder > if (!pQTcodec) {str1="Unable to find codec MPEG2";ferr=-1; goto > _CoreMakeMPEG2Video_err;} > > pQTCodecCtx = avcodec_alloc_context3(pQTcodec); > if(pQTCodecCtx==NULL) {str1="Unable to alloc codec context";ferr=-2; goto > _CoreMakeMPEG2Video_err;} > pQTFrame = avcodec_alloc_frame(); > if(pQTFrame==NULL) {str1="Unable to alloc frame";ferr=-3; goto > _CoreMakeMPEG2Video_err;} > > switch(comp_drate) > { > case 0 :cvbr=30000000; break; // 30Mbs > case 1 :cvbr=40000000; break; // 40Mbs > case 2 :cvbr=50000000; break; // 50Mbs > default :cvbr=25000000; break; // 25Mbs > } > > pQTCodecCtx->bit_rate = cvbr; > > pQTCodecCtx->rc_max_rate = pQTCodecCtx->rc_min_rate =pQTCodecCtx->bit_rate > = cvbr; > > pQTCodecCtx->flags = CODEC_FLAG_INTERLACED_DCT | > CODEC_CAP_AUTO_THREADS;// > | CODEC_FLAG_SVCD_SCAN_OFFSET ; > > pQTCodecCtx->flags2 = CODEC_FLAG2_INTRA_VLC | > CODEC_FLAG2_NON_LINEAR_QUANT; > > pQTCodecCtx->qmin = 1; > pQTCodecCtx->vbv_delay = 3600; > pQTCodecCtx->rtp_payload_size = 1; > pQTCodecCtx->rc_buffer_size = 2000000; > pQTCodecCtx->rc_initial_buffer_occupancy = 2000000; > > pQTCodecCtx->lmin = 1*FF_QP2LAMBDA; > pQTCodecCtx->rc_max_available_vbv_use = 1; > pQTCodecCtx->rc_min_vbv_overflow_use = 1; > vform.num = 4; > vform.den = 3; > pQTCodecCtx->sample_aspect_ratio = vform; > pQTCodecCtx->rc_buffer_aggressivity = 0.25F; > pQTCodecCtx->intra_dc_precision = 2; > pQTCodecCtx->qmax = 3; > > after this I call a routine that expands original frame (jpeg 2000 > compressed) and recompress in MPEG2 format. To this routine I pass the > pointer to Codec Context (pQTCodecCtx) , the pointer to a frame (pQTFrame) > and the pointer to the codec; that is > > > int Expand_Inter_MPEG2Comp_Image(unsigned char * frame, void *pCodecCtx, > void *pFrame,void *p_codec) > { > AVFrame *locpFrame; > AVCodecContext *locpCodecCtx; > AVCodec *codec; > > locpCodecCtx = (AVCodecContext*) pCodecCtx; > locpFrame = (AVFrame*)pFrame; > codec = (AVCodec*) p_codec; > > locpCodecCtx->width = Hsize; > locpCodecCtx->height = (Vsize<<1) + 32; // Add 32 blank rows on top for > compatibility > /* frames per second */ > > locpCodecCtx->time_base.num = 1; > locpCodecCtx->time_base.den = 25; > locpCodecCtx->gop_size = 0; /* emit only intra frame */ > locpCodecCtx->max_b_frames=0; > locpCodecCtx->pix_fmt = PIX_FMT_YUV422P; ///< planar YUV 4:2:2, 16bpp, (1 > Cr & Cb sample per 2x1 Y samples) > > rtv = av_image_alloc(locpFrame->data, locpFrame->linesize, > locpCodecCtx->width, locpCodecCtx->height, > locpCodecCtx->pix_fmt, 1); > > > locpFrame->data array> > > locpFrame->qscale_type = 1; > locpFrame->top_field_first = 1; > locpFrame->interlaced_frame = 1; > > if (avcodec_open2(locpCodecCtx, codec,NULL) < 0) {rtv=-6;str1="on av codec > open";goto __end_rdec;} > > encBufSize = 0x500000; > out_size = avcodec_encode_video(locpCodecCtx, > &tempBuffer[kagsz],encBufSize > , locpFrame); > > > return out_size; > } > > in this case if I set different frame rates, the result is a file of > different size for each frame. > The size is congruent with frame rate, the headers are set accordingly, but > the remainig content is the same! ! > As if the only thing is to adjust headers. The only difference is that > files with highter frame rate are filled with zeroes at the end. > I upload the compressed images of the first frame compressed at 50M and at > 40M. Here you can see that the only diference is the header and the zero > fill at the end in order to obtain the size. The same frame recompressed > with final cut pro gives compressed stream very different. > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > did you set the right PTS Timestamps for the Frames to be encoded? The PTS Timestamps are needed by the Encoder to calculate the right bitrate. -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From francesco at bltitalia.com Tue Apr 3 09:33:51 2012 From: francesco at bltitalia.com (francesco at bltitalia.com) Date: Tue, 3 Apr 2012 09:33:51 +0200 (added by postmaster@virgilio.it) Subject: [Libav-user] Bit rate not changing Message-ID: <4F666545016AD84F@vsmtp3.tin.it> (added by postmaster@virgilio.it) How can I set It ? In the examples included I didn't find this. best regards At 09.09 03/04/2012 +0200, you wrote: >2012/4/3 > >> Hi to all >> I am attempting to transcode compressed SD video in JP2K format to MPEG-2 >> compressed video at 30, 40 and 50Mbit >> using libavcodec only for compressing. Here is the code: >> >> pQTcodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); // find the mpeg2 >> video encoder >> if (!pQTcodec) {str1="Unable to find codec MPEG2";ferr=-1; goto >> _CoreMakeMPEG2Video_err;} >> >> pQTCodecCtx = avcodec_alloc_context3(pQTcodec); >> if(pQTCodecCtx==NULL) {str1="Unable to alloc codec context";ferr=-2; goto >> _CoreMakeMPEG2Video_err;} >> pQTFrame = avcodec_alloc_frame(); >> if(pQTFrame==NULL) {str1="Unable to alloc frame";ferr=-3; goto >> _CoreMakeMPEG2Video_err;} >> >> switch(comp_drate) >> { >> case 0 :cvbr=30000000; break; // 30Mbs >> case 1 :cvbr=40000000; break; // 40Mbs >> case 2 :cvbr=50000000; break; // 50Mbs >> default :cvbr=25000000; break; // 25Mbs >> } >> >> pQTCodecCtx->bit_rate = cvbr; >> >> pQTCodecCtx->rc_max_rate = pQTCodecCtx->rc_min_rate =pQTCodecCtx->bit_rate >> = cvbr; >> >> pQTCodecCtx->flags = CODEC_FLAG_INTERLACED_DCT | >> CODEC_CAP_AUTO_THREADS;// >> | CODEC_FLAG_SVCD_SCAN_OFFSET ; >> >> pQTCodecCtx->flags2 = CODEC_FLAG2_INTRA_VLC | >> CODEC_FLAG2_NON_LINEAR_QUANT; >> >> pQTCodecCtx->qmin = 1; >> pQTCodecCtx->vbv_delay = 3600; >> pQTCodecCtx->rtp_payload_size = 1; >> pQTCodecCtx->rc_buffer_size = 2000000; >> pQTCodecCtx->rc_initial_buffer_occupancy = 2000000; >> >> pQTCodecCtx->lmin = 1*FF_QP2LAMBDA; >> pQTCodecCtx->rc_max_available_vbv_use = 1; >> pQTCodecCtx->rc_min_vbv_overflow_use = 1; >> vform.num = 4; >> vform.den = 3; >> pQTCodecCtx->sample_aspect_ratio = vform; >> pQTCodecCtx->rc_buffer_aggressivity = 0.25F; >> pQTCodecCtx->intra_dc_precision = 2; >> pQTCodecCtx->qmax = 3; >> >> after this I call a routine that expands original frame (jpeg 2000 >> compressed) and recompress in MPEG2 format. To this routine I pass the >> pointer to Codec Context (pQTCodecCtx) , the pointer to a frame (pQTFrame) >> and the pointer to the codec; that is >> >> >> int Expand_Inter_MPEG2Comp_Image(unsigned char * frame, void *pCodecCtx, >> void *pFrame,void *p_codec) >> { >> AVFrame *locpFrame; >> AVCodecContext *locpCodecCtx; >> AVCodec *codec; >> >> locpCodecCtx = (AVCodecContext*) pCodecCtx; >> locpFrame = (AVFrame*)pFrame; >> codec = (AVCodec*) p_codec; >> >> locpCodecCtx->width = Hsize; >> locpCodecCtx->height = (Vsize<<1) + 32; // Add 32 blank rows on top for >> compatibility >> /* frames per second */ >> >> locpCodecCtx->time_base.num = 1; >> locpCodecCtx->time_base.den = 25; >> locpCodecCtx->gop_size = 0; /* emit only intra frame */ >> locpCodecCtx->max_b_frames=0; >> locpCodecCtx->pix_fmt = PIX_FMT_YUV422P; ///< planar YUV 4:2:2, 16bpp, (1 >> Cr & Cb sample per 2x1 Y samples) >> >> rtv = av_image_alloc(locpFrame->data, locpFrame->linesize, >> locpCodecCtx->width, locpCodecCtx->height, >> locpCodecCtx->pix_fmt, 1); >> >> >> > locpFrame->data array> >> >> locpFrame->qscale_type = 1; >> locpFrame->top_field_first = 1; >> locpFrame->interlaced_frame = 1; >> >> if (avcodec_open2(locpCodecCtx, codec,NULL) < 0) {rtv=-6;str1="on av codec >> open";goto __end_rdec;} >> >> encBufSize = 0x500000; >> out_size = avcodec_encode_video(locpCodecCtx, >> &tempBuffer[kagsz],encBufSize >> , locpFrame); >> >> >> return out_size; >> } >> >> in this case if I set different frame rates, the result is a file of >> different size for each frame. >> The size is congruent with frame rate, the headers are set accordingly, but >> the remainig content is the same! ! >> As if the only thing is to adjust headers. The only difference is that >> files with highter frame rate are filled with zeroes at the end. >> I upload the compressed images of the first frame compressed at 50M and at >> 40M. Here you can see that the only diference is the header and the zero >> fill at the end in order to obtain the size. The same frame recompressed >> with final cut pro gives compressed stream very different. >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> > >did you set the right PTS Timestamps for the Frames to be encoded? >The PTS Timestamps are needed by the Encoder to calculate the right bitrate. > > >-- >*Media Encoding Cluster , * >*the first Open Source Cluster Encoding Solution * >*for distributed Media Encoding.* > > > >__________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 7014 (20120330) __________ > >Il messaggio ? stato controllato da ESET NOD32 Antivirus. > >www.nod32.it > >

2012/4/3 <francesco at bltitalia.com>
>Hi to all
>I am attempting to transcode compressed SD video in JP2K format to MPEG-2
>compressed video at 30, 40 and 50Mbit
>using libavcodec only for compressing. ?Here is the code:
>
>?pQTcodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); // find the mpeg2
>video encoder
>?if (!pQTcodec) {str1="Unable to find codec MPEG2";ferr=-1; goto
>_CoreMakeMPEG2Video_err;}
>
>?pQTCodecCtx = avcodec_alloc_context3(pQTcodec);
>?if(pQTCodecCtx==NULL) {str1="Unable to alloc codec context";ferr=-2; goto
>_CoreMakeMPEG2Video_err;}
>?pQTFrame = avcodec_alloc_frame();
>?if(pQTFrame==NULL) {str1="Unable to alloc frame";ferr=-3; goto
>_CoreMakeMPEG2Video_err;}
>
>?switch(comp_drate)
>?{
> ?case ?0 :cvbr=30000000; ?break; ? // 30Mbs
> ?case ?1 :cvbr=40000000; ?break; ? // 40Mbs
> ?case ?2 :cvbr=50000000; ?break; ? // 50Mbs
> ?default :cvbr=25000000; ?break; ? // 25Mbs
>?}
>
>?pQTCodecCtx->bit_rate = cvbr;
>
>?pQTCodecCtx->rc_max_rate = pQTCodecCtx->rc_min_rate =pQTCodecCtx->bit_rate
>= cvbr;
>
>?pQTCodecCtx->flags = ?CODEC_FLAG_INTERLACED_DCT | CODEC_CAP_AUTO_THREADS;//
>| CODEC_FLAG_SVCD_SCAN_OFFSET ;
>
>?pQTCodecCtx->flags2 = ?CODEC_FLAG2_INTRA_VLC | CODEC_FLAG2_NON_LINEAR_QUANT;
>
>?pQTCodecCtx->qmin = 1;
>?pQTCodecCtx->vbv_delay = 3600;
>?pQTCodecCtx->rtp_payload_size = 1;
>?pQTCodecCtx->rc_buffer_size = 2000000;
>?pQTCodecCtx->rc_initial_buffer_occupancy = 2000000;
>
> ?pQTCodecCtx->lmin = 1*FF_QP2LAMBDA;
> ?pQTCodecCtx->rc_max_available_vbv_use = 1;
> ?pQTCodecCtx->rc_min_vbv_overflow_use = 1;
> ?vform.num = 4;
> ?vform.den = 3;
> ?pQTCodecCtx->sample_aspect_ratio = vform;
> ?pQTCodecCtx->rc_buffer_aggressivity = 0.25F;
> ?pQTCodecCtx->intra_dc_precision = 2;
> ?pQTCodecCtx->qmax = 3;
>
>after this I call a routine that expands original frame (jpeg 2000
>compressed) and recompress in MPEG2 format. ?To this routine I pass the
>pointer to Codec Context (pQTCodecCtx) , the pointer to a frame (pQTFrame)
>and the pointer to the codec; that is
>
>
>int Expand_Inter_MPEG2Comp_Image(unsigned char * frame, void *pCodecCtx,
>void *pFrame,void *p_codec)
>{
>?AVFrame ? ? ? ? *locpFrame;
>?AVCodecContext ?*locpCodecCtx;
>?AVCodec ? ? ? ? *codec;
>
>?locpCodecCtx = (AVCodecContext*) pCodecCtx;
>?locpFrame = (AVFrame*)pFrame;
>?codec = (AVCodec*) p_codec;
>
>?locpCodecCtx->width = Hsize;
>?locpCodecCtx->height = ?(Vsize<<1) + 32; ?// Add 32 blank rows on top for
>compatibility
> ? ?/* frames per second */
>
>?locpCodecCtx->time_base.num = ?1;
>?locpCodecCtx->time_base.den = ?25;
>?locpCodecCtx->gop_size = 0; ? ? /* emit only intra frame ?*/
>?locpCodecCtx->max_b_frames=0;
>?locpCodecCtx->pix_fmt = PIX_FMT_YUV422P; ?///< planar YUV 4:2:2, 16bpp, (1
>Cr & Cb sample per 2x1 Y samples)
>
>?rtv = av_image_alloc(locpFrame->data, locpFrame->linesize,
> ? ? ? ? ? ? ? ? ? locpCodecCtx->width, locpCodecCtx->height,
>locpCodecCtx->pix_fmt, 1);
>
>
><code for expanding original JP2K frame and setting raw data in
>locpFrame->data array>
>
>?locpFrame->qscale_type = 1;
>?locpFrame->top_field_first = 1;
>?locpFrame->interlaced_frame = 1;
>
>?if (avcodec_open2(locpCodecCtx, codec,NULL) < 0) {rtv=-6;str1="on av codec
>open";goto __end_rdec;}
>
>?encBufSize = 0x500000;
>?out_size = avcodec_encode_video(locpCodecCtx, &tempBuffer[kagsz],encBufSize
>, locpFrame);
>
>
>?return out_size;
>}
>
>in this case if I set different frame rates, the result is a file of
>different size for each frame.
>The size is congruent with frame rate, the headers are set accordingly, but
>the remainig content is the same! !
>As if the only thing is to adjust headers. ?The only difference is that
>files with highter frame rate are filled with zeroes at the end.
>I upload the compressed images of the first frame compressed at 50M and at
>40M. Here you can see that the only diference is the header and the zero
>fill at the end in order to obtain the size. The same frame recompressed
>with final cut pro gives compressed stream very different.
>
>_______________________________________________
>Libav-user mailing list
>Libav-user at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/libav-user
>

did you set the?right?PTS Timestamps for the Frames to be encoded?
The PTS Timestamps are needed by the Encoder to calculate the right bitrate.


--
Media Encoding Cluster,?
>the first Open Source Cluster Encoding Solution?
for distributed Media Encoding.
>
>
>_______________________________________________ >Libav-user mailing list >Libav-user at ffmpeg.org >http://ffmpeg.org/mailman/listinfo/libav-user > > > >__________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 7014 (20120330) __________ > >Il messaggio ? stato controllato da ESET NOD32 Antivirus. > >www.nod32.it > > From francesco at bltitalia.com Tue Apr 3 10:19:44 2012 From: francesco at bltitalia.com (francesco at bltitalia.com) Date: Tue, 3 Apr 2012 10:19:44 +0200 (added by postmaster@virgilio.it) Subject: [Libav-user] Bit rate not changing Message-ID: <4F6643C1018155B7@vsmtp2.tin.it> (added by postmaster@virgilio.it) I set the pts and the pkt_pts but nothing changes. Keep account that I have only I-Frames. best regards At 09.33 03/04/2012 +0200, you wrote: > >How can I set It ? In the examples included I didn't find this. >best regards > >At 09.09 03/04/2012 +0200, you wrote: >>2012/4/3 >> >>> Hi to all >>> I am attempting to transcode compressed SD video in JP2K format to MPEG-2 >>> compressed video at 30, 40 and 50Mbit >>> using libavcodec only for compressing. Here is the code: >>> >>> pQTcodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); // find the mpeg2 >>> video encoder >>> if (!pQTcodec) {str1="Unable to find codec MPEG2";ferr=-1; goto >>> _CoreMakeMPEG2Video_err;} >>> >>> pQTCodecCtx = avcodec_alloc_context3(pQTcodec); >>> if(pQTCodecCtx==NULL) {str1="Unable to alloc codec context";ferr=-2; goto >>> _CoreMakeMPEG2Video_err;} >>> pQTFrame = avcodec_alloc_frame(); >>> if(pQTFrame==NULL) {str1="Unable to alloc frame";ferr=-3; goto >>> _CoreMakeMPEG2Video_err;} >>> >>> switch(comp_drate) >>> { >>> case 0 :cvbr=30000000; break; // 30Mbs >>> case 1 :cvbr=40000000; break; // 40Mbs >>> case 2 :cvbr=50000000; break; // 50Mbs >>> default :cvbr=25000000; break; // 25Mbs >>> } >>> >>> pQTCodecCtx->bit_rate = cvbr; >>> >>> pQTCodecCtx->rc_max_rate = pQTCodecCtx->rc_min_rate =pQTCodecCtx->bit_rate >>> = cvbr; >>> >>> pQTCodecCtx->flags = CODEC_FLAG_INTERLACED_DCT | >>> CODEC_CAP_AUTO_THREADS;// >>> | CODEC_FLAG_SVCD_SCAN_OFFSET ; >>> >>> pQTCodecCtx->flags2 = CODEC_FLAG2_INTRA_VLC | >>> CODEC_FLAG2_NON_LINEAR_QUANT; >>> >>> pQTCodecCtx->qmin = 1; >>> pQTCodecCtx->vbv_delay = 3600; >>> pQTCodecCtx->rtp_payload_size = 1; >>> pQTCodecCtx->rc_buffer_size = 2000000; >>> pQTCodecCtx->rc_initial_buffer_occupancy = 2000000; >>> >>> pQTCodecCtx->lmin = 1*FF_QP2LAMBDA; >>> pQTCodecCtx->rc_max_available_vbv_use = 1; >>> pQTCodecCtx->rc_min_vbv_overflow_use = 1; >>> vform.num = 4; >>> vform.den = 3; >>> pQTCodecCtx->sample_aspect_ratio = vform; >>> pQTCodecCtx->rc_buffer_aggressivity = 0.25F; >>> pQTCodecCtx->intra_dc_precision = 2; >>> pQTCodecCtx->qmax = 3; >>> >>> after this I call a routine that expands original frame (jpeg 2000 >>> compressed) and recompress in MPEG2 format. To this routine I pass the >>> pointer to Codec Context (pQTCodecCtx) , the pointer to a frame (pQTFrame) >>> and the pointer to the codec; that is >>> >>> >>> int Expand_Inter_MPEG2Comp_Image(unsigned char * frame, void *pCodecCtx, >>> void *pFrame,void *p_codec) >>> { >>> AVFrame *locpFrame; >>> AVCodecContext *locpCodecCtx; >>> AVCodec *codec; >>> >>> locpCodecCtx = (AVCodecContext*) pCodecCtx; >>> locpFrame = (AVFrame*)pFrame; >>> codec = (AVCodec*) p_codec; >>> >>> locpCodecCtx->width = Hsize; >>> locpCodecCtx->height = (Vsize<<1) + 32; // Add 32 blank rows on top for >>> compatibility >>> /* frames per second */ >>> >>> locpCodecCtx->time_base.num = 1; >>> locpCodecCtx->time_base.den = 25; >>> locpCodecCtx->gop_size = 0; /* emit only intra frame */ >>> locpCodecCtx->max_b_frames=0; >>> locpCodecCtx->pix_fmt = PIX_FMT_YUV422P; ///< planar YUV 4:2:2, 16bpp, (1 >>> Cr & Cb sample per 2x1 Y samples) >>> >>> rtv = av_image_alloc(locpFrame->data, locpFrame->linesize, >>> locpCodecCtx->width, locpCodecCtx->height, >>> locpCodecCtx->pix_fmt, 1); >>> >>> >>> >> locpFrame->data array> >>> >>> locpFrame->qscale_type = 1; >>> locpFrame->top_field_first = 1; >>> locpFrame->interlaced_frame = 1; >>> >>> if (avcodec_open2(locpCodecCtx, codec,NULL) < 0) {rtv=-6;str1="on av codec >>> open";goto __end_rdec;} >>> >>> encBufSize = 0x500000; >>> out_size = avcodec_encode_video(locpCodecCtx, >>> &tempBuffer[kagsz],encBufSize >>> , locpFrame); >>> >>> >>> return out_size; >>> } >>> >>> in this case if I set different frame rates, the result is a file of >>> different size for each frame. >>> The size is congruent with frame rate, the headers are set accordingly, but >>> the remainig content is the same! ! >>> As if the only thing is to adjust headers. The only difference is that >>> files with highter frame rate are filled with zeroes at the end. >>> I upload the compressed images of the first frame compressed at 50M and at >>> 40M. Here you can see that the only diference is the header and the zero >>> fill at the end in order to obtain the size. The same frame recompressed >>> with final cut pro gives compressed stream very different. >>> >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >> >>did you set the right PTS Timestamps for the Frames to be encoded? >>The PTS Timestamps are needed by the Encoder to calculate the right bitrate. >> >> >>-- >>*Media Encoding Cluster , * >>*the first Open Source Cluster Encoding Solution * >>*for distributed Media Encoding.* >> >> >> >>__________ Informazioni da ESET NOD32 Antivirus, versione del database >delle firme digitali 7014 (20120330) __________ >> >>Il messaggio ? stato controllato da ESET NOD32 Antivirus. >> >>www.nod32.it >> >>

2012/4/3 <href="mailto:francesco at bltitalia.com">francesco at bltitalia.com> >
>>Hi to all
>>I am attempting to transcode compressed SD video in JP2K format to MPEG-2
>>compressed video at 30, 40 and 50Mbit
>>using libavcodec only for compressing. ?Here is the code:
>>
>>?pQTcodec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); // find the mpeg2
>>video encoder
>>?if (!pQTcodec) {str1="Unable to find codec MPEG2";ferr=-1; goto
>>_CoreMakeMPEG2Video_err;}
>>
>>?pQTCodecCtx = avcodec_alloc_context3(pQTcodec);
>>?if(pQTCodecCtx==NULL) {str1="Unable to alloc codec >context";ferr=-2; goto
>>_CoreMakeMPEG2Video_err;}
>>?pQTFrame = avcodec_alloc_frame();
>>?if(pQTFrame==NULL) {str1="Unable to alloc frame";ferr=-3; goto
>>_CoreMakeMPEG2Video_err;}
>>
>>?switch(comp_drate)
>>?{
>> ?case ?0 :cvbr=30000000; ?break; ? // 30Mbs
>> ?case ?1 :cvbr=40000000; ?break; ? // 40Mbs
>> ?case ?2 :cvbr=50000000; ?break; ? // 50Mbs
>> ?default :cvbr=25000000; ?break; ? // 25Mbs
>>?}
>>
>>?pQTCodecCtx->bit_rate = cvbr;
>>
>>?pQTCodecCtx->rc_max_rate = pQTCodecCtx->rc_min_rate >=pQTCodecCtx->bit_rate
>>= cvbr;
>>
>>?pQTCodecCtx->flags = ?CODEC_FLAG_INTERLACED_DCT | >CODEC_CAP_AUTO_THREADS;//
>>| CODEC_FLAG_SVCD_SCAN_OFFSET ;
>>
>>?pQTCodecCtx->flags2 = ?CODEC_FLAG2_INTRA_VLC | >CODEC_FLAG2_NON_LINEAR_QUANT;
>>
>>?pQTCodecCtx->qmin = 1;
>>?pQTCodecCtx->vbv_delay = 3600;
>>?pQTCodecCtx->rtp_payload_size = 1;
>>?pQTCodecCtx->rc_buffer_size = 2000000;
>>?pQTCodecCtx->rc_initial_buffer_occupancy = 2000000;
>>
>> ?pQTCodecCtx->lmin = 1*FF_QP2LAMBDA;
>> ?pQTCodecCtx->rc_max_available_vbv_use = 1;
>> ?pQTCodecCtx->rc_min_vbv_overflow_use = 1;
>> ?vform.num = 4;
>> ?vform.den = 3;
>> ?pQTCodecCtx->sample_aspect_ratio = vform;
>> ?pQTCodecCtx->rc_buffer_aggressivity = 0.25F;
>> ?pQTCodecCtx->intra_dc_precision = 2;
>> ?pQTCodecCtx->qmax = 3;
>>
>>after this I call a routine that expands original frame (jpeg 2000
>>compressed) and recompress in MPEG2 format. ?To this routine I pass the
>>pointer to Codec Context (pQTCodecCtx) , the pointer to a frame (pQTFrame)
>>and the pointer to the codec; that is
>>
>>
>>int Expand_Inter_MPEG2Comp_Image(unsigned char * frame, void *pCodecCtx,
>>void *pFrame,void *p_codec)
>>{
>>?AVFrame ? ? ? ? *locpFrame;
>>?AVCodecContext ?*locpCodecCtx;
>>?AVCodec ? ? ? ? *codec;
>>
>>?locpCodecCtx = (AVCodecContext*) pCodecCtx;
>>?locpFrame = (AVFrame*)pFrame;
>>?codec = (AVCodec*) p_codec;
>>
>>?locpCodecCtx->width = Hsize;
>>?locpCodecCtx->height = ?(Vsize<<1) + 32; ?// Add 32 blank rows on >top for
>>compatibility
>> ? ?/* frames per second */
>>
>>?locpCodecCtx->time_base.num = ?1;
>>?locpCodecCtx->time_base.den = ?25;
>>?locpCodecCtx->gop_size = 0; ? ? /* emit only intra frame ?*/
>>?locpCodecCtx->max_b_frames=0;
>>?locpCodecCtx->pix_fmt = PIX_FMT_YUV422P; ?///< planar YUV 4:2:2, >16bpp, (1
>>Cr & Cb sample per 2x1 Y samples)
>>
>>?rtv = av_image_alloc(locpFrame->data, locpFrame->linesize,
>> ? ? ? ? ? ? ? ? ? locpCodecCtx->width, locpCodecCtx->height,
>>locpCodecCtx->pix_fmt, 1);
>>
>>
>><code for expanding original JP2K frame and setting raw data in
>>locpFrame->data array>
>>
>>?locpFrame->qscale_type = 1;
>>?locpFrame->top_field_first = 1;
>>?locpFrame->interlaced_frame = 1;
>>
>>?if (avcodec_open2(locpCodecCtx, codec,NULL) < 0) {rtv=-6;str1="on >av codec
>>open";goto __end_rdec;}
>>
>>?encBufSize = 0x500000;
>>?out_size = avcodec_encode_video(locpCodecCtx, >&tempBuffer[kagsz],encBufSize
>>, locpFrame);
>>
>>
>>?return out_size;
>>}
>>
>>in this case if I set different frame rates, the result is a file of
>>different size for each frame.
>>The size is congruent with frame rate, the headers are set accordingly, but
>>the remainig content is the same! !
>>As if the only thing is to adjust headers. ?The only difference is that
>>files with highter frame rate are filled with zeroes at the end.
>>I upload the compressed images of the first frame compressed at 50M and at
>>40M. Here you can see that the only diference is the header and the zero
>>fill at the end in order to obtain the size. The same frame recompressed
>>with final cut pro gives compressed stream very different.
>>
>>_______________________________________________
>>Libav-user mailing list
>>Libav-user at ffmpeg.org
>>target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user
>>

did you set the?right?PTS Timestamps for the Frames >to be encoded?
The PTS Timestamps are needed by the Encoder to calculate >the right bitrate.


--
style="color:rgb(51,51,51);font-family:'Lucida >Grande',Helvetica,Verdana,sans-serif;font-size:12px;line-height:20px">>Media Encoding >Cluster,?
>>>the first Open Source Cluster Encoding Solution?
style="color:rgb(51,51,51);font-family:'Lucida >Grande',Helvetica,Verdana,sans-serif;font-size:12px;line-height:20px">>for distributed Media Encoding.
>>
>>
>>_______________________________________________ >>Libav-user mailing list >>Libav-user at ffmpeg.org >>http://ffmpeg.org/mailman/listinfo/libav-user >> >> >> >>__________ Informazioni da ESET NOD32 Antivirus, versione del database >delle firme digitali 7014 (20120330) __________ >> >>Il messaggio ? stato controllato da ESET NOD32 Antivirus. >> >>www.nod32.it >> >> > >_______________________________________________ >Libav-user mailing list >Libav-user at ffmpeg.org >http://ffmpeg.org/mailman/listinfo/libav-user > >__________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 7014 (20120330) __________ > >Il messaggio ? stato controllato da ESET NOD32 Antivirus. > >www.nod32.it > > > > From lizhang at utelisys.com Tue Apr 3 10:58:56 2012 From: lizhang at utelisys.com (Li Zhang) Date: Tue, 3 Apr 2012 10:58:56 +0200 Subject: [Libav-user] Continuity check failed for pid 519 expected 14 got 13 In-Reply-To: References: Message-ID: Hi, Dose anyone has some suggestion for this problem? I hope I can deal with this problem not just let them popping up and stopping decode. In other words, it can resume the decoding again when the continuity check failed. Best regards, Li ________________________________________ From: libav-user-bounces at ffmpeg.org [libav-user-bounces at ffmpeg.org] On Behalf Of Li Zhang [lizhang at utelisys.com] Sent: Sunday, April 01, 2012 10:15 PM To: libav-user at ffmpeg.org Subject: [Libav-user] Continuity check failed for pid 519 expected 14 got 13 Hi, That is again a problem about my transcoding. After some time my code will fail and I got lots of information from ffmpeg like: [mpegts @ 0x632860] Continuity check failed for pid 519 expected 14 got 13. At the same time, the decoding and encoding were all stop. I think it just grab a packet from input and found something wrong and threw it. I am wondering what was happening? And I used the VLC transcoding the same input and there was no this situation. So what I can do in order to avoid this situation? Best regards, Li _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user From hozone at tiscali.it Tue Apr 3 12:40:45 2012 From: hozone at tiscali.it (hozone) Date: Tue, 3 Apr 2012 03:40:45 -0700 (PDT) Subject: [Libav-user] Baus - an open source video streaming server Message-ID: <1333449645652-4528398.post@n4.nabble.com> Baus is an open source video streaming server. Baus is build on ffmpeg libs (libav). Baus can stream in jpeg format, and swf over http. The server also can record flv videos. Baus streams in public and private mode using a token authentication method to ensure only authorized clients to watch videos. Baus run on linux and works with /dev/video devices. The server can also stream from low-cost multi-plexed DVR cards. It is written in ANSI C, using the Eclipse IDE. A sample PHP client is provided for test purpose. Website: http://code.google.com/p/baus/ -- View this message in context: http://libav-users.943685.n4.nabble.com/Baus-an-open-source-video-streaming-server-tp4528398p4528398.html Sent from the libav-users mailing list archive at Nabble.com. From ert at csp.at Tue Apr 3 13:31:49 2012 From: ert at csp.at (Ludwig Ertl) Date: Tue, 3 Apr 2012 13:31:49 +0200 Subject: [Libav-user] Baus - an open source video streaming server In-Reply-To: <1333449645652-4528398.post@n4.nabble.com> Message-ID: <047c01cd118d$5cb996e0$c7d2a8c0@ERT> libav-user-bounces at ffmpeg.org wrote: > Baus is an open source video streaming server. > Baus is build on ffmpeg libs (libav). > > Baus can stream in jpeg format, and swf over http. The server also can > record flv videos. Baus streams in public and private mode What are the advantages over ffserver, if I may ask? It's not really clear to me, because mentioned streaming formats can also be served using ffserver. From hozone at tiscali.it Tue Apr 3 13:37:28 2012 From: hozone at tiscali.it (hozone) Date: Tue, 3 Apr 2012 04:37:28 -0700 (PDT) Subject: [Libav-user] Baus - an open source video streaming server In-Reply-To: <047c01cd118d$5cb996e0$c7d2a8c0@ERT> References: <1333449645652-4528398.post@n4.nabble.com> <047c01cd118d$5cb996e0$c7d2a8c0@ERT> Message-ID: <1333453048028-4528537.post@n4.nabble.com> it use an authentication method (username / password) to stream only to authenticated users. for example admin can set user Pinco to stream only camera 1 and 3. it can record stream to flv at predefined times. of course this is a simple project, i've release it open because the source can be usefull to other developers. -- View this message in context: http://libav-users.943685.n4.nabble.com/Baus-an-open-source-video-streaming-server-tp4528398p4528537.html Sent from the libav-users mailing list archive at Nabble.com. From cehoyos at ag.or.at Tue Apr 3 15:59:57 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 3 Apr 2012 13:59:57 +0000 (UTC) Subject: [Libav-user] Baus - an open source video streaming server References: <1333449645652-4528398.post@n4.nabble.com> Message-ID: hozone writes: > Website: http://code.google.com/p/baus/ The README and the LICENSE files disagree about the license that you used to published your project. The FFmpeg libraries you used seem outdated. Carl Eugen From kalileo at universalx.net Tue Apr 3 16:05:59 2012 From: kalileo at universalx.net (Kalileo) Date: Tue, 3 Apr 2012 21:05:59 +0700 Subject: [Libav-user] Continuity check failed for pid 519 expected 14 got 13 In-Reply-To: References: Message-ID: On Apr 3, 2012, at 15:58 , Li Zhang wrote: > > Hi, > > Dose anyone has some suggestion for this problem? > > I hope I can deal with this problem not just let them popping up and stopping decode. In other words, it can resume the decoding again when the continuity check failed. > > ________________________________________ > From: libav-user-bounces at ffmpeg.org [libav-user-bounces at ffmpeg.org] On Behalf Of Li Zhang [lizhang at utelisys.com] > Sent: Sunday, April 01, 2012 10:15 PM > To: libav-user at ffmpeg.org > Subject: [Libav-user] Continuity check failed for pid 519 expected 14 got 13 > > Hi, > > That is again a problem about my transcoding. After some time my code will fail and I got lots of information from ffmpeg like: > > [mpegts @ 0x632860] Continuity check failed for pid 519 expected 14 got 13. > > At the same time, the decoding and encoding were all stop. I think it just grab a packet from input and found something wrong and threw it. > > I am wondering what was happening? And I used the VLC transcoding the same input and there was no this situation. So what I can do in order to avoid this situation? > > As far as I remember the message "Continuity check failed for?" is just a warning and not an error. I recommend checking that there is not another error causing your program to stop. From hozone at tiscali.it Tue Apr 3 17:12:55 2012 From: hozone at tiscali.it (hozone) Date: Tue, 3 Apr 2012 08:12:55 -0700 (PDT) Subject: [Libav-user] Baus - an open source video streaming server In-Reply-To: References: <1333449645652-4528398.post@n4.nabble.com> Message-ID: <1333465975966-4529070.post@n4.nabble.com> i know, libav library are outdated, this project is a 2010 project. README file should now be correct, thank you for information. anyway license is GPL3 -- View this message in context: http://libav-users.943685.n4.nabble.com/Baus-an-open-source-video-streaming-server-tp4528398p4529070.html Sent from the libav-users mailing list archive at Nabble.com. From jettoblack at gmail.com Tue Apr 3 23:23:27 2012 From: jettoblack at gmail.com (jettoblack) Date: Tue, 3 Apr 2012 14:23:27 -0700 (PDT) Subject: [Libav-user] Add MPEG-2 user data or H.264 SEI metadata while remuxing Message-ID: <1333488207782-4530217.post@n4.nabble.com> Hello, I'm imagining a program that will accept an incoming MPEG-2 transport stream, demux, add some metadata to the video packets, then remux and write/stream back out. There will be no decompression or recompression of the a/v codec data. For MPEG-2 video, the data would be added as MPEG-2 user data packets (appended to each video frame, in frame encoded order). H.264 in MPEG-2 TS would use SEI RBSP packets. Audio or other packets would be passed through to the remuxed stream without any changes. I can generate the bytes for the actual metadata content, but I'm not sure how to get this appended within a user data packet or SEI packet to the video frames while remuxing. Does anyone have some ideas, example code or maybe some pointers on where to look to get started? Thanks! -- View this message in context: http://libav-users.943685.n4.nabble.com/Add-MPEG-2-user-data-or-H-264-SEI-metadata-while-remuxing-tp4530217p4530217.html Sent from the libav-users mailing list archive at Nabble.com. From wagner.patriota at gmail.com Wed Apr 4 00:37:45 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Tue, 3 Apr 2012 19:37:45 -0300 Subject: [Libav-user] Best Place to Set Codec Private Data... Message-ID: Hello, I have a file with a custom codec private data [H264] Where in FFMPEG is the best place for me to set the codec private data for this file? As I could understand, the codec private data is basically a structure defined by the "AVClass" of each codec, right? So, when I set the parameters, I am actually changing the private data too... is this correct? or not? so, is there a way for me to set the entire buffer directly? Or I never should not do it? Example of codec data: "000000016764001EACD940C037B01100000303E90000EA600F162D960000000168EEBCB0" what do I do with this thing? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Wed Apr 4 01:05:14 2012 From: kalileo at universalx.net (Kalileo) Date: Wed, 4 Apr 2012 06:05:14 +0700 Subject: [Libav-user] Baus - an open source video streaming server In-Reply-To: <1333465975966-4529070.post@n4.nabble.com> References: <1333449645652-4528398.post@n4.nabble.com> <1333465975966-4529070.post@n4.nabble.com> Message-ID: Nice project, thanks for open-sourcing it! From xtingray at gmail.com Thu Apr 5 02:14:56 2012 From: xtingray at gmail.com (=?ISO-8859-1?Q?Gustav_Gonz=E1lez?=) Date: Wed, 4 Apr 2012 19:14:56 -0500 Subject: [Libav-user] Linking ffmpeg libraries on Windows Message-ID: Hi, Currently I'm trying to compile my C++ project on Windows 7. I want to know if there are any kind of considerations about how to link the ffmpeg libraries from a C/C++ program on MS platforms. I downloaded these files: http://ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-0.8-win32-dev.7z http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-0.8-win32-shared.7z For the compilation process I'm using this option and it seems to work: -I"c:\QtSDK\Desktop\ffmpeg\include" My linking option is this: -LC:/QtSDK/Desktop/ffmpeg/bin/avcodec-53.dll -LC:/QtSDK/Desktop/ffmpeg/bin/avformat-53.dll -LC:/QtSDK/Desktop/ffmpeg/bin/avutil-51.dll But the linking process fails printing a lot of these messages: ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x390): undefined reference to `avcodec_close' ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x39c): undefined reference to `av_free' ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3a6): undefined reference to `av_free' ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3b7): undefined reference to `av_free' ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3c2): undefined reference to `av_free' ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x408): undefined reference to `av_write_trailer' Any hint? Any suggestion? Thanks! -- ============================ ? Gustav Gonzalez ? xtingray at gmail.com ============================ From moiein2000 at gmail.com Thu Apr 5 02:37:16 2012 From: moiein2000 at gmail.com (Matthew Einhorn) Date: Wed, 4 Apr 2012 20:37:16 -0400 Subject: [Libav-user] Linking ffmpeg libraries on Windows In-Reply-To: References: Message-ID: 2012/4/4 Gustav Gonz?lez : > Hi, > > Currently I'm trying to compile my C++ project on Windows 7. > I want to know if there are any kind of considerations about how to link the > ffmpeg libraries from a C/C++ program on MS platforms. > > I downloaded these files: > http://ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-0.8-win32-dev.7z > http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-0.8-win32-shared.7z > > For the compilation process I'm using this option and it seems to work: > -I"c:\QtSDK\Desktop\ffmpeg\include" > > My linking option is this: > > ?-LC:/QtSDK/Desktop/ffmpeg/bin/avcodec-53.dll > -LC:/QtSDK/Desktop/ffmpeg/bin/avformat-53.dll > -LC:/QtSDK/Desktop/ffmpeg/bin/avutil-51.dll > > But the linking process fails printing a lot of these messages: > > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x390): > undefined reference to `avcodec_close' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x39c): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3a6): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3b7): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3c2): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x408): > undefined reference to `av_write_trailer' > > Any hint? Any suggestion? > Dunno if you're using VC++, but to use the exported dll functions in a c++ project you have to place the includes (e.g. avformat.h) in extern "C" braces. Otherwise the names get mangled up. Matt From xtingray at gmail.com Thu Apr 5 03:03:17 2012 From: xtingray at gmail.com (=?ISO-8859-1?Q?Gustav_Gonz=E1lez?=) Date: Wed, 4 Apr 2012 20:03:17 -0500 Subject: [Libav-user] Linking ffmpeg libraries on Windows In-Reply-To: References: Message-ID: 2012/4/4 Matthew Einhorn : > Dunno if you're using VC++, but to use the exported dll functions in a > c++ project you have to place the includes (e.g. avformat.h) in extern > "C" braces. Otherwise the names get mangled up. I'm using MinGw and I'm using the extern C braces: #ifdef __cplusplus extern "C" { #include "libavformat/avformat.h" #include "libavcodec/avcodec.h" #include "libavutil/mathematics.h" } #endif The cause of the problem must be other :( -- ============================ ? Gustav Gonzalez ? xtingray at gmail.com ============================ From huanggh0108 at sina.com Thu Apr 5 04:21:25 2012 From: huanggh0108 at sina.com (=?utf-8?B?aHVhbmdnaDAxMDg=?=) Date: Thu, 5 Apr 2012 10:21:25 +0800 Subject: [Libav-user] =?utf-8?q?Opening_an_UDP_stream_for_reading_=3A_usin?= =?utf-8?b?Z2F2Zm9ybWF0X29wZW5faW5wdXQoKT8=?= Message-ID: <201204051021244538353@sina.com> Of course. If the parametric filename like "udp://?localport=7899", it will receive data from port 7899. huanggh0108 ???? ashika umanga ????? 2012-04-02 12:30:34 ???? Development with the libav* APIs; This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. ??? ??? [Libav-user] Opening an UDP stream for reading : usingavformat_open_input()? Greetings all, I have successfully used "avformat_open_input()" to read from a container file. I am wondering,whether it is possible to open and listen an UDP stream from a server using this API call ? Best Regards, umanga -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Thu Apr 5 11:06:28 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 5 Apr 2012 12:06:28 +0300 Subject: [Libav-user] Opening an UDP stream for reading : usingavformat_open_input()? In-Reply-To: <201204051021244538353@sina.com> References: <201204051021244538353@sina.com> Message-ID: 2012/4/5 huanggh0108 : > Of course. > > If the parametric filename like "udp://?localport=7899", it will receive > data?from port 7899. Wrong. udp://127.0.0.1:7899 will do that. Maybe ip part can be eliminated, haven't try it. localport option is used on udp output, not input. -- Andrey Utkin From kalileo at universalx.net Thu Apr 5 12:22:07 2012 From: kalileo at universalx.net (Kalileo) Date: Thu, 5 Apr 2012 17:22:07 +0700 Subject: [Libav-user] Opening an UDP stream for reading : usingavformat_open_input()? In-Reply-To: References: <201204051021244538353@sina.com> Message-ID: <6F0229AD-E640-408A-95E5-3921ACB8B5BD@universalx.net> On Apr 5, 2012, at 16:06 , Andrey Utkin wrote: > 2012/4/5 huanggh0108 : >> Of course. >> >> If the parametric filename like "udp://?localport=7899", it will receive >> data from port 7899. > > Wrong. udp://127.0.0.1:7899 will do that. Maybe ip part can be > eliminated, haven't try it. > localport option is used on udp output, not input. udp://@:7899 works too (on input). From alexcohn at netvision.net.il Thu Apr 5 13:10:46 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Thu, 5 Apr 2012 14:10:46 +0300 Subject: [Libav-user] Linking ffmpeg libraries on Windows In-Reply-To: References: Message-ID: On Thu, Apr 5, 2012 at 03:14, Gustav Gonz?lez wrote: > Hi, > > Currently I'm trying to compile my C++ project on Windows 7. > I want to know if there are any kind of considerations about how to link the > ffmpeg libraries from a C/C++ program on MS platforms. > > I downloaded these files: > http://ffmpeg.zeranoe.com/builds/win32/dev/ffmpeg-0.8-win32-dev.7z > http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-0.8-win32-shared.7z > > For the compilation process I'm using this option and it seems to work: > -I"c:\QtSDK\Desktop\ffmpeg\include" > > My linking option is this: > > ?-LC:/QtSDK/Desktop/ffmpeg/bin/avcodec-53.dll > -LC:/QtSDK/Desktop/ffmpeg/bin/avformat-53.dll > -LC:/QtSDK/Desktop/ffmpeg/bin/avutil-51.dll > > But the linking process fails printing a lot of these messages: > > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x390): > undefined reference to `avcodec_close' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x39c): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3a6): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3b7): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x3c2): > undefined reference to `av_free' > ./release\kffmpegmoviegenerator.o:kffmpegmoviegenerator.cpp:(.text+0x408): > undefined reference to `av_write_trailer' > > Any hint? Any suggestion? > > Thanks! > > -- > ============================ > ? Gustav Gonzalez > ? xtingray at gmail.com > ============================ Do you use any av_* functions that the linker does not complain about? I think you have the linking syntax wrong. -L normally points to a directory, not a file. Also, zeranoe provides the import libraries in /lib directory. Thus, you probably need something like: -L C:/QtSDK/Desktop/ffmpeg/lib -lavformat-53.dll -lavutil-51.dll BR, Alex Cohn PS: to understand how Mingw works with dlls and "import libraries", look at http://www.mingw.org/wiki/CreateImportLibraries. From craigmurray100 at gmail.com Thu Apr 5 20:01:01 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Thu, 5 Apr 2012 14:01:01 -0400 Subject: [Libav-user] problem with image2 to mov Message-ID: I'm having some strange behavior if I try to do the following: ffmpeg -f image2 -r 60 -i /input-%02.png -i /input.wav out.mov The first few secounds of video are black and then it almost fades in with the black and white being messed up and almost looking like they went through a Gaussian filter. Any clue why this would fail? I can supply samples if that would help Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From bstewart at ais-sim.com Thu Apr 5 16:36:32 2012 From: bstewart at ais-sim.com (Bryan Stewart) Date: Thu, 05 Apr 2012 07:36:32 -0700 Subject: [Libav-user] AVFilter abuffer Buffering limit reached Message-ID: <4F7DADF0.5000808@ais-sim.com> I am trying to merge two audio streams with different sample rates in to a single s16 stereo stream: -lavfi "[I1] aresample=44100, ashowinfo, aconvert=s16:stereo [L1]; [I2] aresample=44100, ashowinfo, aconvert=s16:stereo [L2]; [L1] [l2] amerge, aconvert=s16:stereo [out]" The input audio files: [I1] <= file.mpg (48000HZ, stereo, s16, 224 kb/s) [I2] <= file.avi (44100HZ, stereo, s16, 1411 kb/s) [I1] and [I2] are AVFilterContext *, and are added to an AVFilter graph: AVFilterContext *I1Ctx; AVFilterContext *I2Ctx; AVFilterContext *OCtx; AVFilterBufferRef *bufref; AVFilterGraph *graph; ... graph = avfilter_graph_alloc (); int result (0); char args[255]; ... result = avfilter_graph_create_filter ( I1Ctx, avfilter_get_by_name ("abuffer"), "I1", args, NULL, graph); result = avfilter_graph_create_filter ( I2Ctx, avfilter_get_by_name ("abuffer"), "I2", args, NULL, graph); result = avfilter_graph_create_filter ( OCtx, avfilter_get_by_name ("abuffersink"), "out", NULL, abufferSinkParams, graph); ... Each frame, I add decoded data from the audio files in to the buffer sources I1Ctx and I2Ctx, and then retrieve the resulting data from the filter graph and encode that result. ... result = av_asrc_buffer_add_buffer ( I1Ctx, decodedFrame1->data[0], frame1Size, ...); ... result = av_asrc_buffer_add_buffer ( I2Ctx, decodedFrame2->data[0], frame2Size, ...); ... if (av_buffersink_get_buffer_ref (OCtx, bufref) { AVFrame frame; myFillFrameFromBufferRef (frame, bufref); myEncodeAudioFrame (frame); } Here is the issue, at certain frames, the I1 abuffer_source does not output data from its fifo, eventhough a valid bufref is returned in that frame: [ashowinfo @ 0370BD60] n:0 pts:95038 pts_time:2.15506 pos:0 fmt:s16 chlayout:ste reo nb_samples:1049 rate:44100 planar:0 checksum:00000000 plane_checksum[0000000 0] [ashowinfo @ 0370BEC0] n:0 pts:11264 pts_time:0.25542 pos:0 fmt:s16 chlayout:ste reo nb_samples:1024 rate:44100 planar:0 checksum:A373FABB plane_checksum[A373FAB B] - bufref pts 95038 ...- 1.3.3, 47528 ...frame packet: dts|pts|duration: 36 | 36 | 1 - avpkt start size: 153600, index: 0 - enqueue capture video packet ...frame packet: dts|pts|duration: 105603 | 105603 | 2160 - avpkt start size: 672, index: 1 - transcode current media audio packet - decode capture audio packet, 12288 | 12288 - insert capture audio frame, 1 [ashowinfo @ 0370BEC0] n:1 pts:12288 pts_time:0.278639 pos:0 fmt:s16 chlayout:st ereo nb_samples:1024 rate:44100 planar:0 checksum:95304463 plane_checksum[953044 63] - bufref pts 95038 ...- 1.3.3, 40184 ...frame packet: dts|pts|duration: 37 | 37 | 1 - avpkt start size: 153600, index: 0 - enqueue capture video packet ...frame packet: dts|pts|duration: 107763 | 107763 | 2160 - avpkt start size: 672, index: 1 - transcode current media audio packet - decode capture audio packet, 13312 | 13312 - insert capture audio frame, 1 [ashowinfo @ 0370BD60] n:1 pts:97023 pts_time:2.20007 pos:0 fmt:s16 chlayout:ste reo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[0000000 0] [ashowinfo @ 0370BEC0] n:2 pts:13312 pts_time:0.301859 pos:0 fmt:s16 chlayout:st ereo nb_samples:1024 rate:44100 planar:0 checksum:A0E3C8B0 plane_checksum[A0E3C8 B0] Since I continue to place data into the buffer sources at the same rate, I will eventually get the I1Ctx buffer source to overflow its fifo and the following error is returned continuously: [abuffer @ 0106BBC0] Buffering limit reached. Please consume some available frames before adding new ones. Why does the abuffer_src not return data from its fifo when the two input sources have the same sample rate for the amerge? -- #-----------------------------------------------------------------# # Bryan C. Stewart Email: bstewart at ais-sim.com # # Web: www.ais-sim.com # # Advanced Interactive Systems, Inc. Phone: (831)655-0440 # # 8 Harris Ct, Suite B5, Fax: (831)655-0885 # # Monterey, CA 93940 # #-----------------------------------------------------------------# * * CONFIDENTIALITY NOTICE ---------------------- This message, together with any attachments, may be legally privileged and is confidential information intended only for the use of the individual or entity to which it is addressed. It is exempt from disclosure under applicable law including court orders. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution or copy of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender and delete this message, along with any attachments, from your computer. In addition, Data contained in this email may be subject to the International Traffic in Arms Regulation (ITAR) or the Export Administration Regulation (EAR) of 1979. Regulated data may not be exported, released, or disclosed to foreign nationals inside or outside the United States without obtaining the prior written approval of Advanced Interactive Systems, Inc. and licenses as required by the U.S. Department of State. From cehoyos at ag.or.at Fri Apr 6 00:51:03 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 5 Apr 2012 22:51:03 +0000 (UTC) Subject: [Libav-user] problem with image2 to mov References: Message-ID: Craig Murray writes: > I'm having some strange behavior if I try to do the following: > ffmpeg -f image2 -r 60 -i /input-%02.png -i /input.wav out.mov Please provide complete, uncut console output. Carl Eugen From huanggh0108 at sina.com Fri Apr 6 04:01:59 2012 From: huanggh0108 at sina.com (huanggh0108) Date: Fri, 6 Apr 2012 10:01:59 +0800 Subject: [Libav-user] Opening an UDP stream for reading :usingavformat_open_input()? References: <201204051021244538353@sina.com> Message-ID: <201204061000295629672@sina.com> >> Of course. >> >> If the parametric filename like "udp://?localport=7899", it will receive >> data from port 7899. >Wrong. udp://127.0.0.1:7899 will do that. Maybe ip part can be >eliminated, haven't try it. >localport option is used on udp output, not input. Please don't jump to conclusions when you haven't try it. the ffmpeg source code will tell us all. There are several forms(including yours) to achieve his aim. libavformat/udp.c: static int udp_open(URLContext *h, const char *uri, int flags); -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Fri Apr 6 10:31:53 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 6 Apr 2012 11:31:53 +0300 Subject: [Libav-user] Opening an UDP stream for reading :usingavformat_open_input()? In-Reply-To: <201204061000295629672@sina.com> References: <201204051021244538353@sina.com> <201204061000295629672@sina.com> Message-ID: 2012/4/6 huanggh0108 : > ?>>?Of?course. >>> >>>?If?the?parametric?filename?like?"udp://?localport=7899",?it?will?receive >>>?data?from?port?7899. > >>Wrong.?udp://127.0.0.1:7899?will?do?that.?Maybe?ip?part?can?be >>eliminated,?haven't?try?it. >>localport?option?is?used?on?udp?output,?not?input. > > Please don't jump to conclusions when you haven't try it. the ffmpeg source > code will tell?us?all.?There are several forms(including yours) to achieve > his aim. > > libavformat/udp.c: > static?int?udp_open(URLContext?*h,?const?char?*uri,?int?flags); if ((s->is_multicast || !s->local_port) && (h->flags & AVIO_FLAG_READ)) s->local_port = port; Indeed, i was wrong. My apologies. -- Andrey Utkin From andrey.krieger.utkin at gmail.com Fri Apr 6 10:39:55 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 6 Apr 2012 11:39:55 +0300 Subject: [Libav-user] AVFilter abuffer Buffering limit reached In-Reply-To: <4F7DADF0.5000808@ais-sim.com> References: <4F7DADF0.5000808@ais-sim.com> Message-ID: 2012/4/5 Bryan Stewart : > I am trying to merge two audio streams with different sample rates in to a > single s16 stereo stream: > > ?-lavfi "[I1] aresample=44100, ashowinfo, aconvert=s16:stereo [L1]; > ? ? ? ? ?[I2] aresample=44100, ashowinfo, aconvert=s16:stereo [L2]; > ? ? ? ? ?[L1] [l2] amerge, aconvert=s16:stereo [out]" Did you try it with ffmpeg utility? Just to check that it's not ffmpeg internal problem. -- Andrey Utkin From personlin118 at gmail.com Sat Apr 7 16:21:20 2012 From: personlin118 at gmail.com (Person) Date: Sat, 7 Apr 2012 22:21:20 +0800 Subject: [Libav-user] about muxing an mp4 with AAC Message-ID: Hi, I have to record bit-stream to mp4 format. What kind of AAC stream could be muxed to mp4? The VLC player can play video well, but can't decode any AAC frame in my mp4. (audio decode frames always is zero) I am sure that audio is in the mp4 file. I tried to mux to AVI that is got no sound too. PS: My AAC stream is without ADTS or AU_HEADER. // read AAC samples from file, and using av_interleaved_write_frame to write audio frame. if((fread(audio_outbuf, 1, size_to_read, fv_a)) <= 0) { return -1; } av_init_packet(&pkt); pkt.pts = pkt.dts = AV_NOPTS_VALUE; pkt.flags |= AV_PKT_FLAG_KEY; pkt.stream_index = st->index; pkt.data = audio_outbuf; pkt.size = size_to_read; /* write the compressed frame in the media file */ if (av_interleaved_write_frame(oc, &pkt) != 0) { fprintf(stderr, "Error while writing audio frame\n"); exit(1); } // I use mp4box to dump file info MP4Box -info test.mp4 * Movie Info * Timescale 1000 - Duration 00:00:23.500 Fragmented File no - 2 track(s) File Brand isom - version 512 Created: GMT Sat Apr 7 13:58:17 2012 File has no MPEG4 IOD/OD iTunes Info: Encoder Software: Lavf53.31.100 Track # 1 Info - TrackID 1 - TimeScale 25 - Duration 00:00:12.040 Media Info: Language "Undetermined" - Type "vide:avc1" - 301 samples Visual Track layout: x=0 y=0 width=352 height=288 MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21 AVC/H264 Video - Visual Size 352 x 288 AVC Info: 1 SPS - 1 PPS - Profile Baseline @ Level 2 NAL Unit length bits: 32 Self-synchronized Best Regards, Person -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Sat Apr 7 17:28:05 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Sat, 7 Apr 2012 18:28:05 +0300 Subject: [Libav-user] about muxing an mp4 with AAC In-Reply-To: References: Message-ID: On Apr 7, 2012 5:21 PM, "Person" wrote: > > Hi, > > I have to record bit-stream to mp4 format. > What kind of AAC stream could be muxed to mp4? > The VLC player can play video well, but can't decode any AAC frame in my mp4. (audio decode frames always is zero) > I am sure that audio is in the mp4 file. > I tried to mux to AVI that is got no sound too. > > PS: My AAC stream is without ADTS or AU_HEADER> > > Best Regards, > Person> Can you transcode your mp4 with command line ffmpeg? BR, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From personlin118 at gmail.com Sun Apr 8 09:47:48 2012 From: personlin118 at gmail.com (Person) Date: Sun, 8 Apr 2012 15:47:48 +0800 Subject: [Libav-user] about muxing an mp4 with AAC In-Reply-To: References: Message-ID: Hi Alex, Thank you. It is strange that was always no sound yesterday. It just has sound that I start to play mp4 file again. I am sure the speaker is tested yesterday. I tried for 3 hours... Anyway, the answer is to mux AAC into mp4 just only need raw AAC stream. Alex Cohn ? 2012?4?7???11:28 ??? > > On Apr 7, 2012 5:21 PM, "Person" wrote: > > > > Hi, > > > > I have to record bit-stream to mp4 format. > > What kind of AAC stream could be muxed to mp4? > > The VLC player can play video well, but can't decode any AAC frame in my > mp4. (audio decode frames always is zero) > > I am sure that audio is in the mp4 file. > > I tried to mux to AVI that is got no sound too. > > > > PS: My AAC stream is without ADTS or AU_HEADER> > > > > Best Regards, > > Person> > > Can you transcode your mp4 with command line ffmpeg? > > BR, > Alex > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Sun Apr 8 10:19:32 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Sun, 8 Apr 2012 11:19:32 +0300 Subject: [Libav-user] about muxing an mp4 with AAC In-Reply-To: References: Message-ID: On Sun, Apr 8, 2012 at 10:47, Person wrote: > Hi Alex, > > Thank you. > It is strange that was always no sound yesterday. > It just has sound that I start to play mp4 file again. I am sure the speaker > is tested yesterday. I tried for 3 hours... Yes, it's frustrating when such things happen. > Anyway, the answer is to mux AAC into mp4 just?only need raw AAC stream. Nice to know! BR, Alex Cohn From trn200190 at gmail.com Mon Apr 9 09:49:09 2012 From: trn200190 at gmail.com (i m what i m ~~~~) Date: Mon, 9 Apr 2012 13:19:09 +0530 Subject: [Libav-user] h264 parser Message-ID: hey is there any project made from the ffmpeg libraries which can tell where the h264 header start/end,I,B-Frames,NAL units.... the input to the project must be a file with extension .264 or .h264.... -------------- next part -------------- An HTML attachment was scrubbed... URL: From srkntmondal at gmail.com Mon Apr 9 11:13:52 2012 From: srkntmondal at gmail.com (srikanta mondal) Date: Mon, 9 Apr 2012 14:43:52 +0530 Subject: [Libav-user] H.264 nal decode Message-ID: Hi all, I am Srikanta Mondal from India. I am working on video compression and sending each compressed frame to network. I have done H.264 compression by using libx264 and the function x264_encoder_encode() and I have got the x264_nal_t for each frame. Now I have sent each compressed x264_nal_t in the network and in the receiver side that that x264_nal_t are dumping in a file. And another program just play the video using Opencv lib. But I want to just decode the x264_nal_t structure in the receiver side without using the file. I have found there are some guidance with using ffmpeg library but unfortunately I have failed to use the decoder. Anybody please help me. Thanks and regards Srikanta Mondal -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Mon Apr 9 11:51:35 2012 From: kalileo at universalx.net (Kalileo) Date: Mon, 9 Apr 2012 16:51:35 +0700 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: Message-ID: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> On Apr 9, 2012, at 16:13 , srikanta mondal wrote: > Hi all, > I am Srikanta Mondal from India. I am working on video compression and sending each compressed frame to network. I have done H.264 compression by using libx264 and the function x264_encoder_encode() and I have got the x264_nal_t for each frame. Now I have sent each compressed x264_nal_t in the network and in the receiver side that that x264_nal_t are dumping in a file. And another program just play the video using Opencv lib. But I want to just decode the x264_nal_t structure in the receiver side without using the file. I have found there are some guidance with using ffmpeg library but unfortunately I have failed to use the decoder. Anybody please help me. Sorry, I don't understand what you are trying to do. Please explain, and show also what you have done so far, and where exactly you have a problem. From nitinkumgoyal at gmail.com Mon Apr 9 11:57:20 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Mon, 9 Apr 2012 15:27:20 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: Read the dranger docs on how to decode the NALs or see the example program from libav source to start with. And if you have already done that, please share the issue you are finding. On Mon, Apr 9, 2012 at 3:21 PM, Kalileo wrote: > > On Apr 9, 2012, at 16:13 , srikanta mondal wrote: > > > Hi all, > > I am Srikanta Mondal from India. I am working on video compression and > sending each compressed frame to network. I have done H.264 compression by > using libx264 and the function x264_encoder_encode() and I have got the > x264_nal_t for each frame. Now I have sent each compressed x264_nal_t in > the network and in the receiver side that that x264_nal_t are dumping in a > file. And another program just play the video using Opencv lib. But I want > to just decode the x264_nal_t structure in the receiver side without using > the file. I have found there are some guidance with using ffmpeg library > but unfortunately I have failed to use the decoder. Anybody please help me. > > Sorry, I don't understand what you are trying to do. > > Please explain, and show also what you have done so far, and where exactly > you have a problem. > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From srkntmondal at gmail.com Mon Apr 9 12:56:04 2012 From: srkntmondal at gmail.com (srikanta mondal) Date: Mon, 9 Apr 2012 16:26:04 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: Dear all, Thank you for reply. I have used x264 library. And I have the following code .... AVCodecContext* m_pContext; void Encoding() { IplImage *image; av_register_all() ; avcodec_init(); codec = avcodec_find_encoder(CODEC_ID_H264); m_pContext = avcodec_alloc_context(); picture = avcodec_alloc_frame(); avcodec_get_context_defaults(m_pContext); m_pContext->flags |= CODEC_FLAG_4MV; m_pContext->flags |= CODEC_FLAG_PART; m_pContext->flags |=CODEC_FLAG_TRUNCATED; m_pContext->flags2 |= CODEC_FLAG2_CHUNKS; m_pContext->pix_fmt = PIX_FMT_YUV420P /*It can be RGB also*/; m_pContext->skip_frame = AVDISCARD_DEFAULT; m_pContext->error_concealment = 3; m_pContext->error_recognition = 1; m_pContext->skip_loop_filter = AVDISCARD_DEFAULT; m_pContext->workaround_bugs = 1; m_pContext->codec_type = AVMEDIA_TYPE_VIDEO; m_pContext->codec_id = CODEC_ID_H264; x264_param_t param; x264_t *encoder; x264_param_default(¶m); if(x264_param_default_preset(¶m, "veryfast", "zerolatency") < 0) { cout<<"Error on preset"; } param.i_threads = 1; param.i_width = col; param.i_height = row; param.i_fps_num = fps; param.i_fps_den = 1; // Intra refres: param.i_keyint_max = fps; param.b_intra_refresh = 1; //Rate control: param.rc.i_rc_method = X264_RC_CRF; //X264_RC_CRF X264_ANALYSE_BSUB16x16 X264_ANALYSE_BSUB16x16 param.i_csp = X264_CSP_I420; //X264_CSP_I420 X264_CSP_YV16 param.rc.f_rf_constant = 25;//25 param.rc.f_rf_constant_max = 25;//35 //For streaming: param.b_repeat_headers =1; param.b_annexb = 1; //1 x264_param_apply_profile(¶m, "baseline"); encoder = x264_encoder_open(¶m); x264_encoder_parameters(encoder, ¶m ); int row = 480, col = 640; CvCapture *capt = cvCaptureFromCAM(0); while(true) { image = cvQueryFrame(capt); convertCtx = sws_getContext (col, row , PIX_FMT_RGB24, col, row , PIX_FMT_YUV420P, SWS_FAST_BILINEAR, NULL, NULL, NULL); sws_scale ( convertCtx , (uint8_t**)&image->imageData, & srcstride, 0, col, pic_in.img.plane, pic_in.img.i_stride); i_frame_size = x264_encoder_encode( encoder, &headers, &i_nal, &pic_in, &pic_out ); decoding(heders[0].p_payload, i_frame_size); } } void decoding(uint8_t *data, int size) { AVPacket *pkt; pkt = new AVPacket(); int gotpicture; av_init_packet(pkt); avcodec_get_frame_defaults(picture); pkt->data = data; pkt->size = size; int outSize = avcodec_decode_video2(m_pContext, picture, &gotpicture, pkt); } This is my brief code sniff.Please guide me how could I able to decode directly without using file. Thanks and regards Srikanta Mondal On Mon, Apr 9, 2012 at 3:27 PM, NITIN GOYAL wrote: > Read the dranger docs on how to decode the NALs or see the example program > from libav source to start with. > > And if you have already done that, please share the issue you are finding. > > > On Mon, Apr 9, 2012 at 3:21 PM, Kalileo wrote: > >> >> On Apr 9, 2012, at 16:13 , srikanta mondal wrote: >> >> > Hi all, >> > I am Srikanta Mondal from India. I am working on video compression and >> sending each compressed frame to network. I have done H.264 compression by >> using libx264 and the function x264_encoder_encode() and I have got the >> x264_nal_t for each frame. Now I have sent each compressed x264_nal_t in >> the network and in the receiver side that that x264_nal_t are dumping in a >> file. And another program just play the video using Opencv lib. But I want >> to just decode the x264_nal_t structure in the receiver side without using >> the file. I have found there are some guidance with using ffmpeg library >> but unfortunately I have failed to use the decoder. Anybody please help me. >> >> Sorry, I don't understand what you are trying to do. >> >> Please explain, and show also what you have done so far, and where >> exactly you have a problem. >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Mon Apr 9 13:36:17 2012 From: kalileo at universalx.net (Kalileo) Date: Mon, 9 Apr 2012 18:36:17 +0700 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: On Apr 9, 2012, at 17:56 , srikanta mondal wrote: > Dear all, Thank you for reply. I have used x264 library. And I have the following code .... > [snip] > This is my brief code sniff.Please guide me how could I able to decode directly without using file. What do you mean with this: "decode directly without using file" ? From alexcohn at netvision.net.il Mon Apr 9 13:39:03 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 9 Apr 2012 14:39:03 +0300 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: On Mon, Apr 9, 2012 at 13:56, srikanta mondal wrote: > Dear all, Thank you for reply. I have used x264 library. And I have the > following code .... [..] > void decoding(uint8_t *data, int size) > { > ??? AVPacket *pkt; > ??? pkt = new AVPacket(); > ??? int gotpicture; > > ??? av_init_packet(pkt); > ??? avcodec_get_frame_defaults(picture); > > ??? pkt->data = data; > ??? pkt->size = size; > ??? int outSize = avcodec_decode_video2(m_pContext, picture, &gotpicture, > pkt); > } > > This is my brief code sniff.Please guide me how could I able to decode > directly without using file. > > Thanks and regards > Srikanta Mondal h264 decoder produces output after some delay. Minimum delay for simple Profile is one frame, but if you allow B frames, the delay is even longer. So, it's OK if you see that the first call to decoding() function above does not generate a picture. BR, Alex From hskim095 at naver.com Mon Apr 9 13:56:21 2012 From: hskim095 at naver.com (=?UTF-8?B?6rmA7Z2s7IiZ?=) Date: Mon, 9 Apr 2012 20:56:21 +0900 (KST) Subject: [Libav-user] How to decode H.263 Mode B? Message-ID: Hi All, How to decode H.263 Mode B? In case Mode A, avcodec_decode_video2() function is called. But Mode B, It does not work even though 8 header length is emited. I'm refering to rtpdec_h263_rfc2190.c, I don't know how to handle h263 data. I can not use that function direclty because another rtp module is used. Could you give some advice? Regards, KHS -------------- next part -------------- An HTML attachment was scrubbed... URL: From srkntmondal at gmail.com Mon Apr 9 14:02:22 2012 From: srkntmondal at gmail.com (srikanta mondal) Date: Mon, 9 Apr 2012 17:32:22 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: Thank you for your reply. @kalileo I am doing the H.264 compression by opening a file with binary mode and write each encoded x264_nal_t* (p_payload[0]) frame into the file. And another thread is continuing to show the images of the file. Both thread are continuing separately. But basically I want to make a live video application. So, I want to decoded just that encoded x264_nal_t* (p_payload[0]). That's why I told I don't want to use file. @Alex I have used also the following sizeDelay = x264_encoder_delayed_frames(encoder); But all are in vein. Thanks all of You Srikanta Mondal On Mon, Apr 9, 2012 at 5:09 PM, Alex Cohn wrote: > On Mon, Apr 9, 2012 at 13:56, srikanta mondal > wrote: > > Dear all, Thank you for reply. I have used x264 library. And I have the > > following code .... > [..] > > void decoding(uint8_t *data, int size) > > { > > AVPacket *pkt; > > pkt = new AVPacket(); > > int gotpicture; > > > > av_init_packet(pkt); > > avcodec_get_frame_defaults(picture); > > > > pkt->data = data; > > pkt->size = size; > > int outSize = avcodec_decode_video2(m_pContext, picture, &gotpicture, > > pkt); > > } > > > > This is my brief code sniff.Please guide me how could I able to decode > > directly without using file. > > > > Thanks and regards > > Srikanta Mondal > > h264 decoder produces output after some delay. Minimum delay for > simple Profile is one frame, but if you allow B frames, the delay is > even longer. So, it's OK if you see that the first call to decoding() > function above does not generate a picture. > > BR, > Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Mon Apr 9 14:54:55 2012 From: kalileo at universalx.net (Kalileo) Date: Mon, 9 Apr 2012 19:54:55 +0700 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: On Apr 9, 2012, at 19:02 , srikanta mondal wrote: > Thank you for your reply. > @kalileo I am doing the H.264 compression by opening a file with binary mode and write each encoded x264_nal_t* (p_payload[0]) frame into the file. Then copy the picture - before you encode it - to the playing thread and display it there. Or, if your input picture is encoded already, then copy the encoded frame to the playing thread, decode it there, and display it. From jgraham at cs.unc.edu Mon Apr 9 22:56:15 2012 From: jgraham at cs.unc.edu (Jeremy Graham) Date: Mon, 09 Apr 2012 16:56:15 -0400 Subject: [Libav-user] avcodec_open seg fault? Message-ID: <4F834CEF.3080706@cs.email.edu> Hello, everyone: I just thought that I'd start out by asking a general question. Can anyone tell me the possible reasons why avcodec_open might generate a segementation fault? It appears that I have properly created a codec and a codec context so I do not know where to begin. Thank you to anyone who is able to help a ffmpeg newbie out. From mbradshaw at sorensonmedia.com Mon Apr 9 23:01:21 2012 From: mbradshaw at sorensonmedia.com (Michael Bradshaw) Date: Mon, 9 Apr 2012 15:01:21 -0600 Subject: [Libav-user] avcodec_open seg fault? In-Reply-To: <4F834CEF.3080706@cs.email.edu> References: <4F834CEF.3080706@cs.email.edu> Message-ID: On Mon, Apr 9, 2012 at 2:56 PM, Jeremy Graham wrote: > Hello, everyone: > > I just thought that I'd start out by asking a general question. Can > anyone tell me the possible reasons why avcodec_open might generate a > segementation fault? Just out of curiosity, are you using avcodec_open or avcodec_open2? avcodec_open is deprecated and should be avoided if possible. --Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From wagner.patriota at gmail.com Mon Apr 9 23:07:34 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Mon, 9 Apr 2012 18:07:34 -0300 Subject: [Libav-user] h264_mp4toannexb_filter Message-ID: What's wrong with my MP4? I am trying to demux a MP4 file with this extra_data: 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 This data was generated by Expression Encoder. Because I need to transmux this MP4 to Transport Stream, I need to use the bitstream filter "-vbsf h264_mp4toannexb"... Reading the h264_mp4toannexb_bsf.c there is a part for 'retrieve sps and pps unit(s)'. [I don't know exactly what is means] but I get to the following line and then I get an error: if (total_size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE || *extradata + 2 + unit_size > avctx->extradata+avctx->extradata_size* ) { ... SOME ERROR... 'Invalid argument' } Because of the red part... Where do I get information about what is inside this data and why it's wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jgraham at cs.unc.edu Mon Apr 9 23:11:02 2012 From: jgraham at cs.unc.edu (Jeremy Graham) Date: Mon, 09 Apr 2012 17:11:02 -0400 Subject: [Libav-user] avcodec_open seg fault? In-Reply-To: References: <4F834CEF.3080706@cs.email.edu> Message-ID: <4F835066.30905@cs.email.edu> Thank you for responding, Michael. I did try using avcodec_open2 as well but I still got a seg fault out of it. I set the third parameter to NULL, however. Is that what I am doing wrong? Should I also be making a call to avcodec_init? I am not doing that currently. Actually, I will go ahead and try to post what I think is the relevant code. This comes almost directly from the api_example found at this URL: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/api-example_8c-source.html ---------------------------------------------------------------------------------------------- //These were declared globally static uint8_t* pixbuf_data = NULL; static vp_os_mutex_t video_update_lock = PTHREAD_MUTEX_INITIALIZER; static AVCodec *codec; static AVCodecContext *c= NULL; int out_size, size, outbuf_size; static FILE *f; static AVFrame *picture; static uint8_t *outbuf; . . . . . av_register_all(); /* find the mpeg1 video encoder */ codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); if (!codec) { fprintf(stderr, "codec not found\n"); exit(1); } c= avcodec_alloc_context(); picture= avcodec_alloc_frame(); /* put sample parameters */ c->bit_rate = 400000; /* resolution must be a multiple of two */ c->width = 352; c->height = 288; /* frames per second */ c->time_base= (AVRational){1,25}; c->gop_size = 10; /* emit one intra frame every ten frames */ c->max_b_frames=1; c->pix_fmt = PIX_FMT_YUV420P; /* open it */ if (avcodec_open(c, codec) < 0) { fprintf(stderr, "could not open codec\n"); exit(1); } --------------------------------------------------------------------------------------------------- Jeremy On 04/09/2012 05:01 PM, Michael Bradshaw wrote: > On Mon, Apr 9, 2012 at 2:56 PM, Jeremy Graham > wrote: > > Hello, everyone: > > I just thought that I'd start out by asking a general question. > Can anyone tell me the possible reasons why avcodec_open might > generate a segementation fault? > > Just out of curiosity, are you using avcodec_open or avcodec_open2? > avcodec_open is deprecated and should be avoided if possible. > > --Michael > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Tue Apr 10 03:34:52 2012 From: kalileo at universalx.net (Kalileo) Date: Tue, 10 Apr 2012 08:34:52 +0700 Subject: [Libav-user] avcodec_open seg fault? In-Reply-To: <4F835066.30905@cs.email.edu> References: <4F834CEF.3080706@cs.email.edu> <4F835066.30905@cs.email.edu> Message-ID: On Apr 10, 2012, at 04:11 , Jeremy Graham wrote: > I did try using avcodec_open2 as well but I still got a seg fault out of it. I set the third parameter to NULL, however. Is that what I am doing wrong? No, NULL is ok there. Try setting these 2 values before you open the codec: c->codec_id = codec->id; c->codec_type = AVMEDIA_TYPE_VIDEO ; From srkntmondal at gmail.com Tue Apr 10 06:31:52 2012 From: srkntmondal at gmail.com (srikanta mondal) Date: Tue, 10 Apr 2012 10:01:52 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: @kalileo Actually I want to send the encoded frame over the network by UDP and on the client side it will decode. And on the client side I want to decode from memory, ie using array, not using file or hard disk. Simply I want to decode that particular encoded array with function like avcodec_decode_video2(). I have read this function. But this function have crashed when it call. I think there is some parameter missing or some header portion should have to added or remove from the encoded array which is x264_nal_t* (p_payload). Please give me some suggestion. Thanks and regards Srikanta Mondal On Mon, Apr 9, 2012 at 6:24 PM, Kalileo wrote: > > On Apr 9, 2012, at 19:02 , srikanta mondal wrote: > > > Thank you for your reply. > > @kalileo I am doing the H.264 compression by opening a file with binary > mode and write each encoded x264_nal_t* (p_payload[0]) frame into the file. > > Then copy the picture - before you encode it - to the playing thread and > display it there. > > Or, if your input picture is encoded already, then copy the encoded frame > to the playing thread, decode it there, and display it. > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Tue Apr 10 06:41:53 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 10 Apr 2012 07:41:53 +0300 Subject: [Libav-user] h264_mp4toannexb_filter In-Reply-To: References: Message-ID: On Apr 10, 2012 12:08 AM, "Wagner Patriota" wrote: > > What's wrong with my MP4? > > I am trying to demux a MP4 file with this extra_data: > 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 > > This data was generated by Expression Encoder. This is annex B already. BR,. Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Tue Apr 10 07:03:53 2012 From: kalileo at universalx.net (Kalileo) Date: Tue, 10 Apr 2012 12:03:53 +0700 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: <4EEB68F9-52CE-4D5E-8F94-BA22AAA689DB@universalx.net> On Apr 10, 2012, at 11:31 , srikanta mondal wrote: > @kalileo Actually I want to send the encoded frame over the network by UDP Open the target udp url as output file and then use av_write_frame() to stream. > and on the client side it will decode. And on the client side I want to decode from memory, ie using array, not using file or hard disk. Simply I want to decode that particular encoded array with function like avcodec_decode_video2(). I have read this function. But this function have crashed when it call. I think there is some parameter missing or some header portion should have to added or remove from the encoded array which is x264_nal_t* (p_payload). Please give me some suggestion. Are you receiving the udp stream? If yes, then you have it in memory already. Simply demux and decode it. It is not much of a difference for the whole process if you read from a file or from a udp url. From jgraham at cs.unc.edu Tue Apr 10 07:11:31 2012 From: jgraham at cs.unc.edu (Jeremy Graham) Date: Tue, 10 Apr 2012 01:11:31 -0400 Subject: [Libav-user] avcodec_open seg fault? In-Reply-To: References: <4F834CEF.3080706@cs.email.edu> <4F835066.30905@cs.email.edu> Message-ID: <4F83C103.8000502@cs.email.edu> I changed the code to this and it still produces a seg fault. I changed the avcodec_alloc_context and avcodec_open calls to the new versions of the functions as well. This is so strange to me. av_register_all(); /* find the mpeg1 video encoder */ codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); if (!codec) { fprintf(stderr, "codec not found\n"); exit(1); } c= avcodec_alloc_context3(codec); picture= avcodec_alloc_frame(); /* put sample parameters */ c->bit_rate = 400000; /* resolution must be a multiple of two */ c->width = 352; c->height = 288; /* frames per second */ c->time_base= (AVRational){1,25}; c->gop_size = 10; /* emit one intra frame every ten frames */ c->max_b_frames=1; c->pix_fmt = PIX_FMT_YUV420P; c->codec_id = codec->id; c->codec_type = AVMEDIA_TYPE_VIDEO ; /* open it */ if (avcodec_open2(c, codec,NULL) < 0) { fprintf(stderr, "could not open codec\n"); exit(1); } On 04/09/2012 09:34 PM, Kalileo wrote: > On Apr 10, 2012, at 04:11 , Jeremy Graham wrote: > >> I did try using avcodec_open2 as well but I still got a seg fault out of it. I set the third parameter to NULL, however. Is that what I am doing wrong? > No, NULL is ok there. > > Try setting these 2 values before you open the codec: > > c->codec_id = codec->id; > c->codec_type = AVMEDIA_TYPE_VIDEO ; > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From alexcohn at netvision.net.il Tue Apr 10 07:39:44 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 10 Apr 2012 08:39:44 +0300 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: On Mon, Apr 9, 2012 at 15:02, srikanta mondal wrote: > Thank you for your reply. > > @Alex? I have used also the following > ???????????? sizeDelay = x264_encoder_delayed_frames(encoder); > But all are in vein. > > Thanks all of You > Srikanta Mondal It's not clear what kind of failure you see. Alex From srkntmondal at gmail.com Tue Apr 10 08:19:00 2012 From: srkntmondal at gmail.com (srikanta mondal) Date: Tue, 10 Apr 2012 11:49:00 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: Thank you for reply. @kalileo I have simply got the UDP socket and get the byte array from it. Now that byte array is basically the x264_nal_t*(p_payload[0]) from sender side. That encoded byte array come to client side. Now I want to decode that array with its corresponding parameter values. I think it can be done by using avcodec_decode_video2(). But unfortunately the encoded array may be not appropriate for the decoding. There may some addition of bytes with the array. Please help. @Alex I get the error of segmentation fault by gdb debugger. Thanks and regards Srikanta Mondal On Tue, Apr 10, 2012 at 11:09 AM, Alex Cohn wrote: > On Mon, Apr 9, 2012 at 15:02, srikanta mondal > wrote: > > Thank you for your reply. > > > > @Alex I have used also the following > > sizeDelay = x264_encoder_delayed_frames(encoder); > > But all are in vein. > > > > Thanks all of You > > Srikanta Mondal > > It's not clear what kind of failure you see. > > Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Tue Apr 10 09:00:56 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 10 Apr 2012 12:30:56 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: Hey do all ur raw payload u r sending to the decoding function are in NAL format like 0001xRawpayload format?? I have done the same thing with the RTP packets. Removed RTP headers inserted NAL start prefix headers i.e. 0001 before each NAL and then entered the data to decoding functions. And if the output is greater than zero, you will get the decoded output in YUV format in the output buffer. On Tue, Apr 10, 2012 at 11:49 AM, srikanta mondal wrote: > Thank you for reply. > @kalileo I have simply got the UDP socket and get the byte array from > it. Now that byte array is basically the x264_nal_t*(p_payload[0]) from > sender side. That encoded byte array come to client side. Now I want to > decode that array with its corresponding parameter values. I think it can > be done by using avcodec_decode_video2(). But unfortunately the encoded > array may be not appropriate for the decoding. There may some addition of > bytes with the array. Please help. > > @Alex I get the error of segmentation fault by gdb debugger. > > > Thanks and regards > Srikanta Mondal > > > > On Tue, Apr 10, 2012 at 11:09 AM, Alex Cohn wrote: > >> On Mon, Apr 9, 2012 at 15:02, srikanta mondal >> wrote: >> > Thank you for your reply. >> > >> > @Alex I have used also the following >> > sizeDelay = x264_encoder_delayed_frames(encoder); >> > But all are in vein. >> > >> > Thanks all of You >> > Srikanta Mondal >> >> It's not clear what kind of failure you see. >> >> Alex >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Tue Apr 10 09:03:50 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 10 Apr 2012 10:03:50 +0300 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: On Tue, Apr 10, 2012 at 09:19, srikanta mondal wrote: [...] > x264_param_t param; [...] > x264_param_default(¶m); [...] > //For streaming: > param.b_repeat_headers =1; > param.b_annexb = 1; //1 [...] > i_frame_size = x264_encoder_encode( encoder, &headers, &i_nal, &pic_in, &pic_out ); > decoding(heders[0].p_payload, i_frame_size); [...] > void decoding(uint8_t *data, int size) > { > AVPacket *pkt; > pkt = new AVPacket(); > int gotpicture; > > av_init_packet(pkt); > avcodec_get_frame_defaults(picture); > > pkt->data = data; > pkt->size = size; > int outSize = avcodec_decode_video2(m_pContext, picture, &gotpicture, > pkt); > } > > I get the error of segmentation fault by gdb debugger. > > Thanks and regards > Srikanta Mondal You asked for annexb format of payload. To avcodec_decode_video2() you must pass the stripped data. Try to simply replace the call decoding(heders[0].p_payload, i_frame_size) with decoding(heders[0].p_payload+4, i_frame_size-4); BR, Alex From kalileo at universalx.net Tue Apr 10 09:07:01 2012 From: kalileo at universalx.net (Kalileo) Date: Tue, 10 Apr 2012 14:07:01 +0700 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> Message-ID: <3B5D84DB-5791-43B7-9138-162C4EE41846@universalx.net> On Apr 10, 2012, at 13:19 , srikanta mondal wrote: > Thank you for reply. > @kalileo I have simply got the UDP socket and get the byte array from it. you could also use the ffmpeg libraries to do that. > Now that byte array is basically the x264_nal_t*(p_payload[0]) from sender side. Is it? or is it in a container, such as mpegts? Then you should demux first. > That encoded byte array come to client side. Now I want to decode that array with its corresponding parameter values. I think it can be done by using avcodec_decode_video2(). How are you passing that byte array to avcodec_decode_video2()? From andrey.krieger.utkin at gmail.com Tue Apr 10 10:28:32 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 10 Apr 2012 11:28:32 +0300 Subject: [Libav-user] avcodec_open seg fault? In-Reply-To: <4F835066.30905@cs.email.edu> References: <4F834CEF.3080706@cs.email.edu> <4F835066.30905@cs.email.edu> Message-ID: 2012/4/10 Jeremy Graham : > Actually, I will go ahead and try to post what I think is the relevant > code.? This comes almost directly from the api_example found at this URL: > http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/api-example_8c-source.html That seem to be quite old revision of api usage example. First of all ensure you have installed recent ffmpeg (from git, or last release (0.10.2 afaik)), and start with these examples: http://git.videolan.org/?p=ffmpeg.git;a=tree;f=doc/examples;hb=HEAD If these examples are hard for you to work on, you may ask here in another post, describing the exact scenario you need, and we'll show you ways to do that, and maybe other api usage examples closer to what you need. -- Andrey Utkin From pavel at sokolov.me Tue Apr 10 11:06:31 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Tue, 10 Apr 2012 13:06:31 +0400 Subject: [Libav-user] How to get current pts after 'av_seek_frame' without calling 'av_read_frame'? Message-ID: <4F83F817.9070807@sokolov.me> Hi All! How to get current pts after 'av_seek_frame' without calling 'av_read_frame'? -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Tue Apr 10 12:39:01 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 10 Apr 2012 16:09:01 +0530 Subject: [Libav-user] ffmpeg support for GTP and IPSEc???? Message-ID: Do ffmpeg supports stream with IPsec and GPRS tunneling (GTP)? I have not found any reference of any of them? I have a RTP stream which is GTP and protected by IPSec so, will i able to decode or depacketize the content using ffmpeg? Any idea on this. If someone have idea about any other tool for the same, do let me know. Thanks Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From srkntmondal at gmail.com Tue Apr 10 13:26:58 2012 From: srkntmondal at gmail.com (srikanta mondal) Date: Tue, 10 Apr 2012 16:56:58 +0530 Subject: [Libav-user] H.264 nal decode In-Reply-To: <3B5D84DB-5791-43B7-9138-162C4EE41846@universalx.net> References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> <3B5D84DB-5791-43B7-9138-162C4EE41846@universalx.net> Message-ID: Thanks all for reply. However I have got the H.264 compression using libX264 from * http://stackoverflow.com/questions/2940671/how-to-encode-series-of-images-into-h264-using-x264-api-c-c * and it is working fine for making video. @NITIN GOYAL I have found in each nal frame contain the starting code 0 0 0 1. But still it is not working. @Alex Cohn I have omitted first 4 bytes and reduce the size. But still avcodec_decode_video2() cann't decode the encoded array. @Kalileo Sorry I have not try H.264 compression with ffmpeg library and if possible please give me some suggestion how can I do with ffmpeg library. I have use avcodec_decode_video2( m_pContext, picture, &gotpicture, pkt); where AVCodecContext* m_pContext; AVPacket *pkt = new AVPacket(); av_init_packet(pkt); ................ .................. pkt->data = (heders[0].p_payload+4); pkt->size = i_frame_size - 4; int gotpicture; AVFrame* picture = avcodec_alloc_frame(); I have fill up the parameters with these values and pass it to avcodec_decode_video2() Thanks and regards Srikanta Mondal On Tue, Apr 10, 2012 at 12:37 PM, Kalileo wrote: > > On Apr 10, 2012, at 13:19 , srikanta mondal wrote: > > > Thank you for reply. > > @kalileo I have simply got the UDP socket and get the byte array from > it. > > you could also use the ffmpeg libraries to do that. > > > Now that byte array is basically the x264_nal_t*(p_payload[0]) from > sender side. > > Is it? or is it in a container, such as mpegts? Then you should demux > first. > > > That encoded byte array come to client side. Now I want to decode that > array with its corresponding parameter values. I think it can be done by > using avcodec_decode_video2(). > > How are you passing that byte array to avcodec_decode_video2()? > > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From william.kreamer at systemstechnologyresearch.com Tue Apr 10 14:02:47 2012 From: william.kreamer at systemstechnologyresearch.com (William Kreamer) Date: Tue, 10 Apr 2012 12:02:47 +0000 Subject: [Libav-user] Compiling ffmpeg libraries on Windows 64-bit with x264 decoding support Message-ID: Hello, I'm trying to compile ffmpeg developer libraries with support for decoding with the x264 decoder. I found the instructions below. Before I try them out, has anyone successfully used the instructions below? Is there any other tutorial you could point me toward? Here are the instructions I found: http://doom10.org/index.php?topic=26.0 Thanks for your help, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Tue Apr 10 15:17:34 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 10 Apr 2012 16:17:34 +0300 Subject: [Libav-user] Compiling ffmpeg libraries on Windows 64-bit with x264 decoding support In-Reply-To: References: Message-ID: 2012/4/10 William Kreamer : > Hello, > > I'm trying to compile ffmpeg developer libraries with support for decoding > with the x264 decoder. I found the instructions below. Before I try them > out, has anyone successfully used the instructions below? Is there any other > tutorial you could point me toward? To _decode_ h264, you don't need x264 library support. -- Andrey Utkin From craigmurray100 at gmail.com Tue Apr 10 18:39:15 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Tue, 10 Apr 2012 12:39:15 -0400 Subject: [Libav-user] -itoffset issue Message-ID: Sorry for all the newbie questions, I'm doing my best and spending lots of time working at it before I mail the list. :) given two one-second sounds I'm trying to concatenate them using several approaches. None of them seem to be working: Using -itsoffset >*ffmpeg -i beep-1.mp3 -itsoffset 00:00:02 -i beep-2.mp3 output.mp3* ffmpeg version N-38292-ga4c22e3 Copyright (c) 2000-2012 the FFmpeg developers built on Feb 27 2012 14:50:39 with gcc 4.6.2 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger - -enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 51. 41.100 / 51. 41.100 libavcodec 54. 4.100 / 54. 4.100 libavformat 54. 1.100 / 54. 1.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 62.101 / 2. 62.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 7.100 / 0. 7.100 libpostproc 52. 0.100 / 52. 0.100 [mp3 @ 01CE9AA0] Estimating duration from bitrate, this may be inaccurate Input #0, mp3, from 'beep-1.mp3': Metadata: artist : SoundJay.com Sound Effects Duration: 00:00:00.39, start: 0.000000, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 44100 Hz, mono, s16, 128 kb/s [mp3 @ 01DB5D20] Estimating duration from bitrate, this may be inaccurate Input #1, mp3, from 'beep-2.mp3': Metadata: artist : SoundJay.com Sound Effects Duration: 00:00:00.55, start: 0.000000, bitrate: 128 kb/s Stream #1:0: Audio: mp3, 44100 Hz, mono, s16, 128 kb/s Output #0, mp3, to 'output.mp3': Metadata: TPE1 : SoundJay.com Sound Effects TSSE : Lavf54.1.100 Stream #0:0: Audio: mp3, 44100 Hz, mono, s16 Stream mapping: Stream #0:0 -> #0:0 (mp3 -> libmp3lame) Press [q] to stop, [?] for help size= 3kB time=00:00:00.41 bitrate= 68.4kbits/s video:0kB audio:3kB global headers:0kB muxing overhead 6.820221% Result is only the first mp3 in the output. Do I need to be using -map? I suspect I'm just being stupid and missing something obvious. Craig -------------- next part -------------- An HTML attachment was scrubbed... URL: From craigmurray100 at gmail.com Tue Apr 10 18:45:13 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Tue, 10 Apr 2012 12:45:13 -0400 Subject: [Libav-user] -itoffset issue In-Reply-To: References: Message-ID: I should add that if I -map 0:0 -map 1:0 it seems to merge them, but still no -itsoffset on the 2nd one. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xtingray at gmail.com Tue Apr 10 19:29:53 2012 From: xtingray at gmail.com (=?ISO-8859-1?Q?Gustav_Gonz=E1lez?=) Date: Tue, 10 Apr 2012 12:29:53 -0500 Subject: [Libav-user] Linking ffmpeg libraries on Windows In-Reply-To: References: Message-ID: 2012/4/5 Alex Cohn : > > Do you use any av_* functions that the linker does not complain about? > > I think you have the linking syntax wrong. -L normally points to a > directory, not a file. Also, zeranoe provides the import libraries in > /lib directory. Thus, you probably need something like: > > -L C:/QtSDK/Desktop/ffmpeg/lib -lavformat-53.dll -lavutil-51.dll Now it works! In my case: -L C:/QtSDK/Desktop/ffmpeg/lib -lavformat -lavutil Thanks Alex! -- ============================ ? Gustav Gonzalez ? xtingray at gmail.com ============================ From craigmurray100 at gmail.com Tue Apr 10 19:56:51 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Tue, 10 Apr 2012 13:56:51 -0400 Subject: [Libav-user] jpg quality using image2 Message-ID: >From the command line are there are flags to set the jpeg quality when doing an -image2 conversion? I couldn't find anything in the documentation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Tue Apr 10 23:15:19 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 10 Apr 2012 21:15:19 +0000 (UTC) Subject: [Libav-user] jpg quality using image2 References: Message-ID: Craig Murray writes: > From the command line are there are flags to set the jpeg quality -qscale (Note that this is in no way image2-related, you can use the mjpeg-encoder in other containers, and there are many codecs usable in image2 that do not support qscale.) Carl Eugen From cehoyos at ag.or.at Tue Apr 10 23:16:50 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 10 Apr 2012 21:16:50 +0000 (UTC) Subject: [Libav-user] -itoffset issue References: Message-ID: Craig Murray writes: > given two one-second sounds I'm trying to concatenate them > using several approaches. You have to use the concat-protocol to concatenate files, it does not work without. Carl Eugen From craigmurray100 at gmail.com Wed Apr 11 03:07:49 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Tue, 10 Apr 2012 21:07:49 -0400 Subject: [Libav-user] -itoffset issue In-Reply-To: References: Message-ID: Ok this works to concatenate the files, but doesnt seem to allow me anyway to set an arbitrary offset. What I'm looking to do is create an .avi file that has some arbitrary mp3's playing at specific times. I'm creating the avi from an image sequence, but I'm not sure how to get the audio to show up at specific offsets. Is there a way to use -itsoffset in conjunction with concat: ? On Tue, Apr 10, 2012 at 5:16 PM, Carl Eugen Hoyos wrote: > Craig Murray writes: > > > given two one-second sounds I'm trying to concatenate them > > using several approaches. > > You have to use the concat-protocol to concatenate files, > it does not work without. > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Wed Apr 11 09:42:38 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 11 Apr 2012 10:42:38 +0300 Subject: [Libav-user] -itoffset issue In-Reply-To: References: Message-ID: 2012/4/11 Craig Murray : > Ok this works to concatenate the files, but doesnt seem to allow me anyway > to set an arbitrary offset. > > What I'm looking to do is create an .avi file that has some arbitrary mp3's > playing at specific times.? I'm creating the avi from an image sequence, but > I'm not sure how to get the audio to show up at specific offsets. > > Is there a way to use -itsoffset in conjunction with concat:? ? For such mission, i'd recommend to go programming using ffmpeg libraries API, if you can. Or split your mission into elementary easy steps of conversion, don't mind that it'll take many ffmpeg launches for now. I mean: 1. Cut off needed places of source media files to separate files. 2. Concatenate them as needed (possibly inserting silence where needed). 3. Create video (without audio) from images sequence. 4. Merge audio with video. -- Andrey Utkin From yangzx at acejet.com.cn Wed Apr 11 10:14:29 2012 From: yangzx at acejet.com.cn (=?gb2312?B?0e7Wvs/p?=) Date: Wed, 11 Apr 2012 16:14:29 +0800 Subject: [Libav-user] how to set pixfmt YUV420P10 by CODEC_ID_H264 Message-ID: <41FC1A94FE13684D8249B089C38119700F6929@mailserver-nj1.njacejet.com> hi: i use last version ffmpeg at my application,now,when i set c->pix_fmt PIX_FMT_YUV420P,it work sucess.but ,i use c->pix_fmt PIX_FMT_YUV420P10,then call avcodec_open2(c, pcode, NULL) fail,why? i use code id is codec_id_h264. code: fmt=av_guess_format("flv",NULL,NULL); pCodeH264=avcodec_find_encoder(CODEC_ID_H264); ...... codec = avcodec_find_encoder(codec_id); .... c = st->codec; c->codec_id=codec->id; ...... c->pix_fmt =/* STREAM_PIX_FMT*/PIX_FMT_YUV420P; c->profile=FF_PROFILE_H264_HIGH_10/*FF_PROFILE_H264_HIGH_10_INTRA*/; ...... avcodec_open2(c, pcode, NULL); thanks! From fzanelli at tecnosens.it Wed Apr 11 10:39:27 2012 From: fzanelli at tecnosens.it (Zanelli Franco) Date: Wed, 11 Apr 2012 10:39:27 +0200 Subject: [Libav-user] synchronize initialization Message-ID: I play streams simultaneously in different threads calling this group of methods for each thread: { av_register_all(); avformat_network_init(); AVFormatContext *fc = avformat_alloc_context(); AVDictionary *opts = 0; // set the options .... int res; res = avformat_open_input(&fc, url, 0, &opts); res = avformat_find_stream_info(fc, NULL); while(true){ av_read_frame(fc, &packet); ... } avformat_close_input(&fc); } which method should I synchronize in order to avoid conflicts between threads? what about the docoding part following? { av_register_all(); AVCodec *avCodec = avcodec_find_decoder_by_name(c_string); AVCodecContext *codecCtx = avcodec_alloc_context3(avCodec); AVFrame *avFrame = avcodec_alloc_frame(); AVPacket *avPacket = new AVPacket(); SwsContext *sc; while (true){ int len = avcodec_decode_video2(codecCtx, avFrame, &got_picture, avPacket); if (sc != null) sc = sws_getContext(...); sws_scale(..) } avcodec_close(codecCtx); av_free(codecCtx); av_free(avFrame); sws_freeContext(sc); } thank you in advance Franco From Robert.Reither at Honeywell.com Wed Apr 11 12:14:09 2012 From: Robert.Reither at Honeywell.com (Reither, Robert) Date: Wed, 11 Apr 2012 10:14:09 +0000 Subject: [Libav-user] How to get layer info at opening mpeg audio file via av_open_input_file() Message-ID: Hi, maybe it's a rather stupid question (im pretty new to ffmpeg), but I have problem correctly detected mp2 files (need to distinguish between m2 and mp3 format) av_open_input_file() just returns me ID CODEC_ID_MP3 (15001) if I open an mp2 file and not 15000 as for layer2 (would be better 4 me) So how can I further parse the header in file, having the AVFormatContext handle to get the layer info ? Thanks Robert Reither Research & Development Honeywell Life Safety Austria GmbH Lemb?ckgasse 49 1230 Wien/Vienna, Austria Commercial Register No.: FN 58784y Commercial Court: Handelsgericht Wien Managing Director: Robert Humpolec VAT-No.: ATU 14859900 Phone: +43(1)6006030-174 Fax: +43(1)6006030-900 robert.reither at honeywell.com www.hls-austria.com www.av-digital.at http://www.hls-austria.at/kontakt/anfahrtsplan/ THIS E-MAIL AND ANY ATTACHED FILES ARE CONFIDENTIAL, PROTECTED BY COPYRIGHT AND MAY BE LEGALLY PRIVILEGED. If you are not the intended addressee or have received the e-mail in error, any use of this e-mail or any copying, distribution or other dissemination of it is strictly prohibited. If you have received this transmission in error, please notify the sender immediately and then delete the e-mail. E-mail cannot be guaranteed to be secure, error free or free from viruses. Neither the sending company nor its group of companies accepts any liability whatsoever for any loss or damage which may be caused as a result of the transmission of this message by e-mail. If verification is required, please request a hard copy version. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Wed Apr 11 17:03:41 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 11 Apr 2012 18:03:41 +0300 Subject: [Libav-user] H.264 nal decode In-Reply-To: References: <94207DC3-AC5D-4FE1-AF84-44775521B65A@universalx.net> <3B5D84DB-5791-43B7-9138-162C4EE41846@universalx.net> Message-ID: I found an interesting thread: http://libav-users.943685.n4.nabble.com/Decode-H264-streams-how-to-fill-AVCodecContext-from-SPS-PPS-td2484472.html tl;nr: you cannot decode the SPS and PPS Nal units not as separate packets, but together with an IDR packet. Also, I seem to have been worng: I you should send the 00000001 annex-b headers to avcodec_decode_video2(). BR, Alex From andrey.krieger.utkin at gmail.com Wed Apr 11 17:35:24 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 11 Apr 2012 18:35:24 +0300 Subject: [Libav-user] compile for iOS with assembler Message-ID: Hi. I can successfully build ffmpeg libs for iOS with --disable-asm, but i'd like to enable it and compilation fails. Below see my (simplified) original configure&make script, and my attempts to edit it. Below log taken with ffmpeg.org git master 6bfb304, the most recent 44239bd behaves the same. The same happens with libav.org git master ebbede2, although libav.org takes slightly different configure options set (see at bottom) 18:07andrey.utkin at kharchevin-macbook ~/ffmpeg $ cat ../video_capture_experimental_app/scripts/build_ffmpeg.sh #!/bin/bash set -e make clean || true SCRIPTS_DIR=`dirname $0` export PATH=$SCRIPTS_DIR:$PATH # for gas-preprocessor.pl invocation ./configure \ --disable-vaapi \ --disable-vdpau \ --disable-hwaccels \ --disable-avx \ --disable-vis \ --disable-mmi \ --disable-doc \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver \ --disable-rdft \ --disable-dxva2 \ \ --disable-asm \ --disable-yasm \ --disable-optimizations \ --disable-debug \ \ --disable-avdevice \ --disable-devices \ --disable-indevs \ --disable-outdevs \ --disable-swscale \ --disable-swresample \ \ --disable-protocols \ \ --disable-demuxers \ --disable-muxers \ --disable-decoders \ --disable-encoders \ \ --disable-filters \ \ --disable-bsfs \ --disable-parsers \ \ --enable-cross-compile --arch=arm --target-os=darwin \ --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \ --cpu=cortex-a8 \ --extra-cflags='-arch armv7' \ --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' \ --enable-pic make echo Succeed [OK] 18:07andrey.utkin at kharchevin-macbook ~/ffmpeg $ ../video_capture_experimental_app/scripts/build_ffmpeg.sh install prefix /usr/local source path . C compiler /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ARCH c (cortex-a8) big-endian no runtime cpu detection no debug symbols no strip symbols yes optimize for size no optimizations no static yes shared no postprocessing support no new filter support yes network support yes threading support pthreads safe bitstream reader yes SDL support no libdxva2 enabled no libva enabled no libvdpau enabled no AVISynth enabled no frei0r enabled no gnutls enabled no libaacplus enabled no libass enabled no libcdio support no libcelt enabled no libdc1394 support no libdirac enabled no libfaac enabled no libgsm enabled no libmodplug enabled no libmp3lame enabled no libnut enabled no libopencore-amrnb support no libopencore-amrwb support no libopencv support no libopenjpeg enabled no libpulse enabled no librtmp enabled no libschroedinger enabled no libspeex enabled no libstagefright-h264 enabled no libtheora enabled no libutvideo enabled no libv4l2 enabled no libvo-aacenc support no libvo-amrwbenc support no libvorbis enabled no libvpx enabled no libx264 enabled no libxavs enabled no libxvid enabled no openal enabled no openssl enabled no zlib enabled no bzlib enabled no Enabled decoders: Enabled encoders: Enabled hwaccels: Enabled parsers: Enabled demuxers: Enabled muxers: Enabled protocols: Enabled filters: Enabled bsfs: Enabled indevs: Enabled outdevs: License: LGPL version 2.1 or later Creating config.mak and config.h... libavutil/avconfig.h is unchanged WARNING: Compiler does not indicate floating-point ABI, guessing soft. CC libavfilter/allfilters.o CC libavfilter/avcodec.o CC libavfilter/avfilter.o CC libavfilter/avfiltergraph.o CC libavfilter/defaults.o CC libavfilter/drawutils.o CC libavfilter/formats.o CC libavfilter/graphdump.o CC libavfilter/graphparser.o CC libavfilter/lavfutils.o libavfilter/lavfutils.c: In function ?ff_load_image?: libavfilter/lavfutils.c:83: warning: passing argument 3 of ?av_image_copy? from incompatible pointer type CC libavfilter/transform.o CC libavfilter/vsrc_buffer.o AR libavfilter/libavfilter.a CC libavformat/allformats.o CC libavformat/avio.o libavformat/avio.c: In function ?ffurl_write?: libavformat/avio.c:305: warning: passing argument 2 of ?retry_transfer_wrapper? discards qualifiers from pointer target type CC libavformat/aviobuf.o libavformat/aviobuf.c: In function ?writeout?: libavformat/aviobuf.c:124: warning: passing argument 2 of ?s->write_packet? discards qualifiers from pointer target type libavformat/aviobuf.c: In function ?ffio_fdopen?: libavformat/aviobuf.c:692: warning: assignment discards qualifiers from pointer target type CC libavformat/cutils.o CC libavformat/id3v1.o CC libavformat/id3v2.o libavformat/id3v2.c: In function ?read_ttag?: libavformat/id3v2.c:293: warning: assignment discards qualifiers from pointer target type libavformat/id3v2.c: In function ?ff_id3v2_parse?: libavformat/id3v2.c:555: warning: unused variable ?compressed_buffer_size? CC libavformat/metadata.o CC libavformat/network.o CC libavformat/options.o CC libavformat/os_support.o CC libavformat/riff.o CC libavformat/sdp.o CC libavformat/seek.o CC libavformat/utils.o AR libavformat/libavformat.a CC libavcodec/allcodecs.o CC libavcodec/audioconvert.o CC libavcodec/avpacket.o libavcodec/avpacket.c: In function ?av_dup_packet?: libavcodec/avpacket.c:130: warning: ?av_destruct_packet_nofree? is deprecated (declared at libavcodec/avpacket.c:28) CC libavcodec/bitstream.o CC libavcodec/bitstream_filter.o libavcodec/bitstream_filter.c: In function ?av_bitstream_filter_filter?: libavcodec/bitstream_filter.c:62: warning: cast discards qualifiers from pointer target type CC libavcodec/dsputil.o libavcodec/dsputil.c: In function ?diff_bytes_c?: libavcodec/dsputil.c:1941: warning: cast discards qualifiers from pointer target type libavcodec/dsputil.c:1942: warning: cast discards qualifiers from pointer target type CC libavcodec/faanidct.o CC libavcodec/fmtconvert.o CC libavcodec/imgconvert.o libavcodec/imgconvert.c: In function ?av_picture_copy?: libavcodec/imgconvert.c:517: warning: passing argument 3 of ?av_image_copy? from incompatible pointer type CC libavcodec/inverse.o CC libavcodec/jrevdct.o CC libavcodec/options.o In file included from libavcodec/options.c:33: libavcodec/options_table.h:78: warning: ?sub_id? is deprecated (declared at libavcodec/avcodec.h:1292) libavcodec/options_table.h:142: warning: ?luma_elim_threshold? is deprecated (declared at libavcodec/avcodec.h:1524) libavcodec/options_table.h:143: warning: ?chroma_elim_threshold? is deprecated (declared at libavcodec/avcodec.h:1531) libavcodec/options_table.h:278: warning: ?color_table_id? is deprecated (declared at libavcodec/avcodec.h:1770) libavcodec/options_table.h:301: warning: ?inter_threshold? is deprecated (declared at libavcodec/avcodec.h:1833) libavcodec/options_table.h:306: warning: ?quantizer_noise_shaping? is deprecated (declared at libavcodec/avcodec.h:1840) libavcodec/options.c: In function ?avcodec_get_context_defaults3?: libavcodec/options.c:99: warning: ?av_opt_set_defaults2? is deprecated (declared at ./libavutil/opt.h:370) CC libavcodec/parser.o libavcodec/parser.c: In function ?av_parser_change?: libavcodec/parser.c:185: warning: cast discards qualifiers from pointer target type CC libavcodec/pthread.o CC libavcodec/raw.o CC libavcodec/rawdec.o libavcodec/rawdec.c: In function ?raw_decode?: libavcodec/rawdec.c:195: warning: passing argument 2 of ?avpicture_fill? discards qualifiers from pointer target type libavcodec/rawdec.c:199: warning: assignment from incompatible pointer type CC libavcodec/resample.o CC libavcodec/resample2.o CC libavcodec/simple_idct.o CC libavcodec/codec_names.h CC libavcodec/utils.o AR libavcodec/libavcodec.a CC libavutil/adler32.o CC libavutil/aes.o CC libavutil/audioconvert.o CC libavutil/avstring.o CC libavutil/base64.o CC libavutil/bprint.o CC libavutil/cpu.o CC libavutil/crc.o CC libavutil/des.o CC libavutil/dict.o CC libavutil/error.o CC libavutil/eval.o CC libavutil/fifo.o CC libavutil/file.o CC libavutil/imgutils.o CC libavutil/intfloat_readwrite.o CC libavutil/inverse.o CC libavutil/lfg.o CC libavutil/lls.o CC libavutil/log.o CC libavutil/lzo.o CC libavutil/mathematics.o CC libavutil/md5.o CC libavutil/mem.o CC libavutil/opt.o libavutil/opt.c: In function ?av_opt_set_defaults?: libavutil/opt.c:601: warning: ?av_opt_set_defaults2? is deprecated (declared at libavutil/opt.h:370) CC libavutil/parseutils.o CC libavutil/pixdesc.o CC libavutil/random_seed.o CC libavutil/rational.o CC libavutil/rc4.o CC libavutil/samplefmt.o CC libavutil/sha.o CC libavutil/timecode.o CC libavutil/tree.o CC libavutil/utils.o AR libavutil/libavutil.a Succeed [OK] 18:08andrey.utkin at kharchevin-macbook ~/ffmpeg $ Now i do --enable-asm --enable-yasm [ERR] 18:09andrey.utkin at kharchevin-macbook ~/ffmpeg $ cat ../video_capture_experimental_app/scripts/build_ffmpeg.sh #!/bin/bash set -e make clean || true SCRIPTS_DIR=`dirname $0` export PATH=$SCRIPTS_DIR:$PATH # for gas-preprocessor.pl invocation ./configure \ --disable-vaapi \ --disable-vdpau \ --disable-hwaccels \ --disable-avx \ --disable-vis \ --disable-mmi \ --disable-doc \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver \ --disable-rdft \ --disable-dxva2 \ \ --enable-asm \ --enable-yasm \ --disable-optimizations \ --disable-debug \ \ --disable-avdevice \ --disable-devices \ --disable-indevs \ --disable-outdevs \ --disable-swscale \ --disable-swresample \ \ --disable-protocols \ \ --disable-demuxers \ --disable-muxers \ --disable-decoders \ --disable-encoders \ \ --disable-filters \ \ --disable-bsfs \ --disable-parsers \ \ --enable-cross-compile --arch=arm --target-os=darwin \ --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \ --cpu=cortex-a8 \ --extra-cflags='-arch armv7' \ --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' \ --enable-pic make echo Succeed [OK] 18:09andrey.utkin at kharchevin-macbook ~/ffmpeg $ ../video_capture_experimental_app/scripts/build_ffmpeg.sh install prefix /usr/local source path . C compiler /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ARCH arm (cortex-a8) big-endian no runtime cpu detection no ARMv5TE enabled yes ARMv6 enabled yes ARMv6T2 enabled yes ARM VFP enabled yes NEON enabled yes debug symbols no strip symbols yes optimize for size no optimizations no static yes shared no postprocessing support no new filter support yes network support yes threading support pthreads safe bitstream reader yes SDL support no libdxva2 enabled no libva enabled no libvdpau enabled no AVISynth enabled no frei0r enabled no gnutls enabled no libaacplus enabled no libass enabled no libcdio support no libcelt enabled no libdc1394 support no libdirac enabled no libfaac enabled no libgsm enabled no libmodplug enabled no libmp3lame enabled no libnut enabled no libopencore-amrnb support no libopencore-amrwb support no libopencv support no libopenjpeg enabled no libpulse enabled no librtmp enabled no libschroedinger enabled no libspeex enabled no libstagefright-h264 enabled no libtheora enabled no libutvideo enabled no libv4l2 enabled no libvo-aacenc support no libvo-amrwbenc support no libvorbis enabled no libvpx enabled no libx264 enabled no libxavs enabled no libxvid enabled no openal enabled no openssl enabled no zlib enabled no bzlib enabled no Enabled decoders: Enabled encoders: Enabled hwaccels: Enabled parsers: Enabled demuxers: Enabled muxers: Enabled protocols: Enabled filters: Enabled bsfs: Enabled indevs: Enabled outdevs: License: LGPL version 2.1 or later Creating config.mak and config.h... config.asm is unchanged libavutil/avconfig.h is unchanged WARNING: Compiler does not indicate floating-point ABI, guessing soft. CC libavfilter/allfilters.o cc1: error in backend: Invalid operand for inline asm constraint 'i'! make: *** [libavfilter/allfilters.o] Error 1 [ERR] 18:10andrey.utkin at kharchevin-macbook ~/ffmpeg $ Now --enable-asm --disable-yasm [ERR] 18:11andrey.utkin at kharchevin-macbook ~/ffmpeg $ cat ../video_capture_experimental_app/scripts/build_ffmpeg.sh #!/bin/bash set -e make clean || true SCRIPTS_DIR=`dirname $0` export PATH=$SCRIPTS_DIR:$PATH # for gas-preprocessor.pl invocation ./configure \ --disable-vaapi \ --disable-vdpau \ --disable-hwaccels \ --disable-avx \ --disable-vis \ --disable-mmi \ --disable-doc \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffprobe \ --disable-ffserver \ --disable-rdft \ --disable-dxva2 \ \ --enable-asm \ --disable-yasm \ --disable-optimizations \ --disable-debug \ \ --disable-avdevice \ --disable-devices \ --disable-indevs \ --disable-outdevs \ --disable-swscale \ --disable-swresample \ \ --disable-protocols \ \ --disable-demuxers \ --disable-muxers \ --disable-decoders \ --disable-encoders \ \ --disable-filters \ \ --disable-bsfs \ --disable-parsers \ \ --enable-cross-compile --arch=arm --target-os=darwin \ --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \ --cpu=cortex-a8 \ --extra-cflags='-arch armv7' \ --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' \ --enable-pic make echo Succeed [OK] 18:11andrey.utkin at kharchevin-macbook ~/ffmpeg $ ../video_capture_experimental_app/scripts/build_ffmpeg.sh install prefix /usr/local source path . C compiler /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ARCH arm (cortex-a8) big-endian no runtime cpu detection no ARMv5TE enabled yes ARMv6 enabled yes ARMv6T2 enabled yes ARM VFP enabled yes NEON enabled yes debug symbols no strip symbols yes optimize for size no optimizations no static yes shared no postprocessing support no new filter support yes network support yes threading support pthreads safe bitstream reader yes SDL support no libdxva2 enabled no libva enabled no libvdpau enabled no AVISynth enabled no frei0r enabled no gnutls enabled no libaacplus enabled no libass enabled no libcdio support no libcelt enabled no libdc1394 support no libdirac enabled no libfaac enabled no libgsm enabled no libmodplug enabled no libmp3lame enabled no libnut enabled no libopencore-amrnb support no libopencore-amrwb support no libopencv support no libopenjpeg enabled no libpulse enabled no librtmp enabled no libschroedinger enabled no libspeex enabled no libstagefright-h264 enabled no libtheora enabled no libutvideo enabled no libv4l2 enabled no libvo-aacenc support no libvo-amrwbenc support no libvorbis enabled no libvpx enabled no libx264 enabled no libxavs enabled no libxvid enabled no openal enabled no openssl enabled no zlib enabled no bzlib enabled no Enabled decoders: Enabled encoders: Enabled hwaccels: Enabled parsers: Enabled demuxers: Enabled muxers: Enabled protocols: Enabled filters: Enabled bsfs: Enabled indevs: Enabled outdevs: License: LGPL version 2.1 or later Creating config.mak and config.h... libavutil/avconfig.h is unchanged WARNING: Compiler does not indicate floating-point ABI, guessing soft. CC libavfilter/allfilters.o cc1: error in backend: Invalid operand for inline asm constraint 'i'! make: *** [libavfilter/allfilters.o] Error 1 [ERR] 18:12andrey.utkin at kharchevin-macbook ~/ffmpeg $ ================================================= Same with libav.org ================================================= $ cat ../video_capture_experimental_app/scripts/build_libav.sh #!/bin/bash set -e make clean || true SCRIPTS_DIR=`dirname $0` export PATH=$SCRIPTS_DIR:$PATH # for gas-preprocessor.pl invocation ./configure \ --disable-vaapi \ --disable-vdpau \ --disable-hwaccels \ --disable-avx \ --disable-vis \ --disable-mmi \ --disable-doc \ --disable-avconv \ --disable-avplay \ --disable-avprobe \ --disable-avserver \ --disable-rdft \ --disable-dxva2 \ \ --disable-asm \ --disable-yasm \ --disable-optimizations \ --disable-debug \ \ --disable-avdevice \ --disable-devices \ --disable-indevs \ --disable-outdevs \ --disable-swscale \ \ --disable-protocols \ \ --disable-demuxers \ --disable-muxers \ --disable-decoders \ --disable-encoders \ \ --disable-filters \ \ --disable-bsfs \ --disable-parsers \ \ --enable-cross-compile --arch=arm --target-os=darwin \ --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \ --cpu=cortex-a8 \ --extra-cflags='-arch armv7' \ --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' \ --enable-pic make echo Succeed [OK] 18:30andrey.utkin at kharchevin-macbook ~/libav_ios $ ../video_capture_experimental_app/scripts/build_libav.sh install prefix /usr/local source path . C compiler /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ARCH c (cortex-a8) big-endian no runtime cpu detection no debug symbols no optimize for size no optimizations no static yes shared no new filter support yes network support yes threading support pthreads safe bitstream reader yes SDL support no libdxva2 enabled no libva enabled no libvdpau enabled no AVISynth enabled no frei0r enabled no gnutls enabled no libcdio support no libdc1394 support no libdirac enabled no libfaac enabled no libgsm enabled no libmp3lame enabled no libnut enabled no libopencore-amrnb support no libopencore-amrwb support no libopencv support no libopenjpeg enabled no libpulse enabled no librtmp enabled no libschroedinger enabled no libspeex enabled no libtheora enabled no libvo-aacenc support no libvo-amrwbenc support no libvorbis enabled no libvpx enabled no libx264 enabled no libxavs enabled no libxvid enabled no openssl enabled no zlib enabled no bzlib enabled no Enabled decoders: Enabled encoders: Enabled hwaccels: Enabled parsers: Enabled demuxers: Enabled muxers: Enabled protocols: Enabled filters: Enabled bsfs: Enabled indevs: Enabled outdevs: License: LGPL version 2.1 or later Creating config.mak and config.h... config.h is unchanged libavutil/avconfig.h is unchanged WARNING: Compiler does not indicate floating-point ABI, guessing soft. CC libavfilter/allfilters.o CC libavfilter/avfilter.o CC libavfilter/avfiltergraph.o CC libavfilter/defaults.o CC libavfilter/drawutils.o CC libavfilter/formats.o CC libavfilter/graphparser.o CC libavfilter/vsrc_buffer.o libavfilter/vsrc_buffer.c: In function ?av_vsrc_buffer_add_frame?: libavfilter/vsrc_buffer.c:63: warning: passing argument 3 of ?av_image_copy? from incompatible pointer type AR libavfilter/libavfilter.a CC libavformat/allformats.o CC libavformat/avio.o libavformat/avio.c: In function ?avio_enum_protocols?: libavformat/avio.c:89: warning: initialization from incompatible pointer type libavformat/avio.c: In function ?ffurl_write?: libavformat/avio.c:274: warning: passing argument 2 of ?retry_transfer_wrapper? discards qualifiers from pointer target type libavformat/avio.c:274: warning: passing argument 5 of ?retry_transfer_wrapper? from incompatible pointer type CC libavformat/aviobuf.o libavformat/aviobuf.c: In function ?ffio_fdopen?: libavformat/aviobuf.c:652: warning: passing argument 5 of ?avio_alloc_context? from incompatible pointer type libavformat/aviobuf.c:652: warning: passing argument 6 of ?avio_alloc_context? from incompatible pointer type libavformat/aviobuf.c:652: warning: passing argument 7 of ?avio_alloc_context? from incompatible pointer type libavformat/aviobuf.c:663: warning: assignment discards qualifiers from pointer target type CC libavformat/cutils.o CC libavformat/id3v1.o CC libavformat/id3v2.o libavformat/id3v2.c: In function ?read_ttag?: libavformat/id3v2.c:280: warning: assignment discards qualifiers from pointer target type CC libavformat/metadata.o CC libavformat/network.o CC libavformat/options.o CC libavformat/os_support.o CC libavformat/riff.o CC libavformat/sdp.o CC libavformat/seek.o CC libavformat/utils.o AR libavformat/libavformat.a CC libavcodec/allcodecs.o CC libavcodec/audioconvert.o CC libavcodec/avpacket.o libavcodec/avpacket.c: In function ?av_dup_packet?: libavcodec/avpacket.c:125: warning: ?av_destruct_packet_nofree? is deprecated (declared at libavcodec/avpacket.c:27) CC libavcodec/bitstream.o CC libavcodec/bitstream_filter.o libavcodec/bitstream_filter.c: In function ?av_bitstream_filter_filter?: libavcodec/bitstream_filter.c:62: warning: cast discards qualifiers from pointer target type CC libavcodec/dsputil.o CC libavcodec/faanidct.o CC libavcodec/fmtconvert.o CC libavcodec/imgconvert.o libavcodec/imgconvert.c: In function ?av_picture_copy?: libavcodec/imgconvert.c:654: warning: passing argument 3 of ?av_image_copy? from incompatible pointer type CC libavcodec/inverse.o CC libavcodec/jrevdct.o CC libavcodec/options.o In file included from libavcodec/options.c:33: libavcodec/options_table.h:73: warning: ?sub_id? is deprecated (declared at libavcodec/avcodec.h:1268) libavcodec/options_table.h:137: warning: ?luma_elim_threshold? is deprecated (declared at libavcodec/avcodec.h:1497) libavcodec/options_table.h:138: warning: ?chroma_elim_threshold? is deprecated (declared at libavcodec/avcodec.h:1504) libavcodec/options_table.h:270: warning: ?color_table_id? is deprecated (declared at libavcodec/avcodec.h:1743) libavcodec/options_table.h:293: warning: ?inter_threshold? is deprecated (declared at libavcodec/avcodec.h:1806) libavcodec/options_table.h:298: warning: ?quantizer_noise_shaping? is deprecated (declared at libavcodec/avcodec.h:1813) CC libavcodec/parser.o libavcodec/parser.c: In function ?av_parser_change?: libavcodec/parser.c:187: warning: cast discards qualifiers from pointer target type CC libavcodec/pthread.o CC libavcodec/raw.o CC libavcodec/resample.o CC libavcodec/resample2.o CC libavcodec/simple_idct.o CC libavcodec/utils.o libavcodec/utils.c: In function ?avcodec_fill_audio_frame?: libavcodec/utils.c:274: warning: passing argument 3 of ?av_samples_fill_arrays? discards qualifiers from pointer target type libavcodec/utils.c: In function ?avcodec_open2?: libavcodec/utils.c:680: warning: assignment discards qualifiers from pointer target type libavcodec/utils.c: In function ?avcodec_encode_audio?: libavcodec/utils.c:1036: warning: passing argument 4 of ?avcodec_fill_audio_frame? from incompatible pointer type libavcodec/utils.c: In function ?avcodec_encode_subtitle?: libavcodec/utils.c:1161: warning: passing argument 4 of ?avctx->codec->encode? discards qualifiers from pointer target type AR libavcodec/libavcodec.a CC libavutil/adler32.o CC libavutil/aes.o CC libavutil/audioconvert.o CC libavutil/avstring.o libavutil/avstring.c: In function ?av_stristr?: libavutil/avstring.c:54: warning: return discards qualifiers from pointer target type libavutil/avstring.c:58: warning: return discards qualifiers from pointer target type CC libavutil/base64.o CC libavutil/cpu.o CC libavutil/crc.o CC libavutil/des.o CC libavutil/dict.o libavutil/dict.c: In function ?av_dict_set?: libavutil/dict.c:77: warning: assignment discards qualifiers from pointer target type libavutil/dict.c:81: warning: assignment discards qualifiers from pointer target type CC libavutil/error.o CC libavutil/eval.o CC libavutil/fifo.o CC libavutil/file.o CC libavutil/imgutils.o CC libavutil/intfloat_readwrite.o CC libavutil/inverse.o CC libavutil/lfg.o CC libavutil/lls.o CC libavutil/log.o CC libavutil/lzo.o CC libavutil/mathematics.o CC libavutil/md5.o CC libavutil/mem.o CC libavutil/opt.o libavutil/opt.c: In function ?av_opt_set_defaults?: libavutil/opt.c:599: warning: ?av_opt_set_defaults2? is deprecated (declared at libavutil/opt.h:370) CC libavutil/parseutils.o libavutil/parseutils.c: In function ?av_parse_video_size?: libavutil/parseutils.c:110: warning: assignment discards qualifiers from pointer target type libavutil/parseutils.c: In function ?av_parse_time?: libavutil/parseutils.c:561: warning: cast discards qualifiers from pointer target type CC libavutil/pixdesc.o CC libavutil/random_seed.o CC libavutil/rational.o CC libavutil/rc4.o CC libavutil/samplefmt.o CC libavutil/sha.o CC libavutil/tree.o CC libavutil/utils.o AR libavutil/libavutil.a Succeed [OK] 18:30andrey.utkin at kharchevin-macbook ~/libav_ios $ vim ../video_capture_experimental_app/scripts/build_libav.sh [OK] 18:31andrey.utkin at kharchevin-macbook ~/libav_ios $ cat ../video_capture_experimental_app/scripts/build_libav.sh #!/bin/bash set -e make clean || true SCRIPTS_DIR=`dirname $0` export PATH=$SCRIPTS_DIR:$PATH # for gas-preprocessor.pl invocation ./configure \ --disable-vaapi \ --disable-vdpau \ --disable-hwaccels \ --disable-avx \ --disable-vis \ --disable-mmi \ --disable-doc \ --disable-avconv \ --disable-avplay \ --disable-avprobe \ --disable-avserver \ --disable-rdft \ --disable-dxva2 \ \ --enable-asm \ --enable-yasm \ --disable-optimizations \ --disable-debug \ \ --disable-avdevice \ --disable-devices \ --disable-indevs \ --disable-outdevs \ --disable-swscale \ \ --disable-protocols \ \ --disable-demuxers \ --disable-muxers \ --disable-decoders \ --disable-encoders \ \ --disable-filters \ \ --disable-bsfs \ --disable-parsers \ \ --enable-cross-compile --arch=arm --target-os=darwin \ --cc='/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk \ --cpu=cortex-a8 \ --extra-cflags='-arch armv7' \ --extra-ldflags='-arch armv7 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk' \ --enable-pic make echo Succeed [OK] 18:31andrey.utkin at kharchevin-macbook ~/libav_ios $ ../video_capture_experimental_app/scripts/build_libav.sh install prefix /usr/local source path . C compiler /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ARCH arm (cortex-a8) big-endian no runtime cpu detection no ARMv5TE enabled yes ARMv6 enabled yes ARMv6T2 enabled yes ARM VFP enabled yes NEON enabled yes debug symbols no optimize for size no optimizations no static yes shared no new filter support yes network support yes threading support pthreads safe bitstream reader yes SDL support no libdxva2 enabled no libva enabled no libvdpau enabled no AVISynth enabled no frei0r enabled no gnutls enabled no libcdio support no libdc1394 support no libdirac enabled no libfaac enabled no libgsm enabled no libmp3lame enabled no libnut enabled no libopencore-amrnb support no libopencore-amrwb support no libopencv support no libopenjpeg enabled no libpulse enabled no librtmp enabled no libschroedinger enabled no libspeex enabled no libtheora enabled no libvo-aacenc support no libvo-amrwbenc support no libvorbis enabled no libvpx enabled no libx264 enabled no libxavs enabled no libxvid enabled no openssl enabled no zlib enabled no bzlib enabled no Enabled decoders: Enabled encoders: Enabled hwaccels: Enabled parsers: Enabled demuxers: Enabled muxers: Enabled protocols: Enabled filters: Enabled bsfs: Enabled indevs: Enabled outdevs: License: LGPL version 2.1 or later Creating config.mak and config.h... libavutil/avconfig.h is unchanged WARNING: Compiler does not indicate floating-point ABI, guessing soft. CC libavfilter/allfilters.o cc1: error in backend: Invalid operand for inline asm constraint 'i'! make: *** [libavfilter/allfilters.o] Error 1 -- Andrey Utkin From wagner.patriota at gmail.com Wed Apr 11 20:37:02 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Wed, 11 Apr 2012 15:37:02 -0300 Subject: [Libav-user] h264_mp4toannexb_filter In-Reply-To: References: Message-ID: ExtraData: * 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 * So what is wrong? 1. If I don't use the filter, I get this message: "H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)"" Because "AV_RB32(pkt->data) != 0x0000001" (in fact, AV_RB32(pkt->data) = 0x1B13) 2. Otherwise if I use the filter, the condition below makes my filter fail, because of what is in red: [in h264_mp4toannexb_bsf.c] if (total_size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE || *extradata+2+unit_size > avctx->extradata+avctx->extradata_size*) { av_free(out); return AVERROR(EINVAL); } does anybody have any ideia? :-( On Tue, Apr 10, 2012 at 1:41 AM, Alex Cohn wrote: > On Apr 10, 2012 12:08 AM, "Wagner Patriota" > wrote: > > > > What's wrong with my MP4? > > > > I am trying to demux a MP4 file with this extra_data: > > > 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 > > > > This data was generated by Expression Encoder. > > This is annex B already. > > BR,. > Alex > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Wed Apr 11 21:19:40 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 11 Apr 2012 22:19:40 +0300 Subject: [Libav-user] h264_mp4toannexb_filter In-Reply-To: References: Message-ID: On Apr 11, 2012 9:37 PM, "Wagner Patriota" wrote: > > ExtraData: 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 > So what is wrong? > > 1. If I don't use the filter, I get this message: > "H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)"" > Because "AV_RB32(pkt->data) != 0x0000001" (in fact, AV_RB32(pkt->data) = 0x1B13) Could it be that while your extradata is in annex b format, the frames still need conversion? 0x1B13 looks like a start of a regular packet. BR, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From wagner.patriota at gmail.com Wed Apr 11 21:36:29 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Wed, 11 Apr 2012 16:36:29 -0300 Subject: [Libav-user] h264_mp4toannexb_filter In-Reply-To: References: Message-ID: YES, I got the same conclusion! but how do I convert the frames? that's what I still don't understand. I was expecting the filter do it for me... any idea? :-( On Wed, Apr 11, 2012 at 4:19 PM, Alex Cohn wrote: > On Apr 11, 2012 9:37 PM, "Wagner Patriota" > wrote: > > > > ExtraData: > 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 > > So what is wrong? > > > > 1. If I don't use the filter, I get this message: > > "H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb > bitstream filter (-bsf h264_mp4toannexb)"" > > Because "AV_RB32(pkt->data) != 0x0000001" (in fact, AV_RB32(pkt->data) = > 0x1B13) > > Could it be that while your extradata is in annex b format, the frames > still need conversion? 0x1B13 looks like a start of a regular packet. > > BR, > Alex > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at denisgottardello.it Wed Apr 11 23:16:29 2012 From: info at denisgottardello.it (Denis) Date: Wed, 11 Apr 2012 23:16:29 +0200 Subject: [Libav-user] FFmpeg and avio_alloc_context (callback) Message-ID: <201204112316.29829.info@denisgottardello.it> After a lot of time on studying FFmpeg I think there is something that does not works correctly. In order to produce a file you can use avio_open or avio_open_dyn_buf functions. But these functions are used for obtain a file. There is another approach, a callback using avio_alloc_context function. For me this approach is a lot important but does not works correctly! How you can try by using the attached source code you can obtain an avi file correctly but if you try mp4 or webm the produced files can not be played with vlc or other. With ogg the program goes to crash. Is my code wrong or is a problem of FFmpeg? I hope you can help me. -- www.denisgottardello.it Skype: mrdebug Videosurveillance and home automation! http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php -------------- next part -------------- A non-text attachment was scrubbed... Name: main.c Type: text/x-csrc Size: 8014 bytes Desc: not available URL: From alexcohn at netvision.net.il Wed Apr 11 23:55:09 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Thu, 12 Apr 2012 00:55:09 +0300 Subject: [Libav-user] h264_mp4toannexb_filter In-Reply-To: References: Message-ID: On Apr 11, 2012 10:37 PM, "Wagner Patriota" wrote: > > YES, I got the same conclusion! but how do I convert the frames? > that's what I still don't understand. I was expecting the filter do it for me... any idea? :-( > > On Wed, Apr 11, 2012 at 4:19 PM, Alex Cohn wrote: >> >> On Apr 11, 2012 9:37 PM, "Wagner Patriota" wrote: >> > >> > ExtraData: 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 >> > So what is wrong? >> > >> > 1. If I don't use the filter, I get this message: >> > "H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)"" >> > Because "AV_RB32(pkt->data) != 0x0000001" (in fact, AV_RB32(pkt->data) = 0x1B13) >> >> Could it be that while your extradata is in annex b format, the frames still need conversion? 0x1B13 looks like a start of a regular packet. You can try to convert extradata (SPS/PPS) to Nal format, attach it to the first frame (before the frame data), and pass the resulting stream through the annex b filter. Or you could prepend each frame with 0x00000001 without the filter. Note that you should not give SPS/PPS data to the decode function separately, but only with the IDR frame data. BR, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From xhpohanka at gmail.com Thu Apr 12 07:40:19 2012 From: xhpohanka at gmail.com (Jan Pohanka) Date: Thu, 12 Apr 2012 07:40:19 +0200 Subject: [Libav-user] h264 frame rate detection Message-ID: Hello, I want to use ffmpeg to format a raw h264 stream to some container (mkv, mp4, flv, ...). Unfortunately it seems that ffmpeg has problems with analyzing the frame rate of the stream. I have found a description of this issue in the mailing list or somewhere on the internet, but no solution have been provided there... My raw stream was encoded on TI dm365 multimedia processor with the time_scale = 5000 and num_units_in_tick = 1000. As far as I know this should imply fps = 5 (5000/1000). Ffmpeg gives a message that codec frame rate differs from the container frame rate ffmpeg -i test.264 ffmpeg version 0.9, Copyright (c) 2000-2011 the FFmpeg developers built on Mar 12 2012 14:02:26 with gcc 4.6.1 configuration: --enable-gpl --enable-nonfree --enable-version3 --enable-bzlib --enable-frei0r --enable-gnutls --enable-libass --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libv4l2 --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-zlib --extra-cflags=-I../x264 libavutil 51. 32. 0 / 51. 32. 0 libavcodec 53. 42. 0 / 53. 42. 0 libavformat 53. 24. 0 / 53. 24. 0 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 53. 0 / 2. 53. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 51. 2. 0 / 51. 2. 0 [h264 @ 0x1d36f20] max_analyze_duration 5000000 reached at 5200000 [h264 @ 0x1d36f20] Estimating duration from bitrate, this may be inaccurate Seems stream 0 codec frame rate differs from container frame rate: 5.00 (5/1) -> 2.50 (5/2) Input #0, h264, from 'test.264': Duration: N/A, bitrate: N/A Stream #0:0: Video: h264 (High), yuvj420p, 1600x1200, 2.50 fps, 2.50 tbr, 1200k tbn, 5 tbc When I try to play this file with ffplay it is surprisingly played correctly on 5 fps (seconds on the watch on the video are really seconds) but the command line still informs about 2.50 fps. However after formating the stream to a container ffmpeg -i test.264 -c:v copy -y test.mkv the resulting file is played on the 2.5 fps in all players, which I have. Forcing frame rate with -r parameter as described in documentation has no effect. Could please someone give me some advice how to solve this issue? The test file could be downloaded on this link http://dl.dropbox.com/u/72776563/test.264 best regards Jan -- Tato zpr?va byla vytvo?ena p?evratn?m po?tovn?m klientem Opery: http://www.opera.com/mail/ From umanga.forums at gmail.com Thu Apr 12 07:44:09 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Thu, 12 Apr 2012 14:44:09 +0900 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? Message-ID: Greetings all, I am writing a wrapper class for video/audio encoding by following the "muxing.c". http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html I see in the example that before writing frames to the file ,is checks whether the PTS value of audiostream is lesser than that of videostream. code snippet: if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { write_audio_frame(oc, audio_st); } else { write_video_frame(oc, video_st); picture->pts++; } Can someone explain why this test is done? Whats the connection between PTS values ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From gagandeep.bawa at ironroad.com Thu Apr 12 07:51:50 2012 From: gagandeep.bawa at ironroad.com (Gagandeep Bawa) Date: Thu, 12 Apr 2012 11:21:50 +0530 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: Hi, These PTS and DTS used for sync between audio and video data while encoding and presentation. Check below link for more details. *http://dranger.com/ffmpeg/tutorial05.html* Thanks, Gagan On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga wrote: > Greetings all, > > I am writing a wrapper class for video/audio encoding by following the > "muxing.c". > http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html > > I see in the example that before writing frames to the file ,is checks > whether the PTS value of audiostream is > lesser than that of videostream. > > code snippet: > > if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { > write_audio_frame(oc, audio_st); > } else { > write_video_frame(oc, video_st); > picture->pts++; > } > > Can someone explain why this test is done? Whats the connection between > PTS values ? > > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From umanga.forums at gmail.com Thu Apr 12 08:28:14 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Thu, 12 Apr 2012 15:28:14 +0900 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: When I encode an OGG file with Theora+Speex , my video length is longer than the audio playback. Anytips on this ? On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa wrote: > Hi, > > These PTS and DTS used for sync between audio and video data while > encoding and presentation. Check below link for more details. > > *http://dranger.com/ffmpeg/tutorial05.html* > > Thanks, > Gagan > > On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga wrote: > >> Greetings all, >> >> I am writing a wrapper class for video/audio encoding by following the >> "muxing.c". >> http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html >> >> I see in the example that before writing frames to the file ,is checks >> whether the PTS value of audiostream is >> lesser than that of videostream. >> >> code snippet: >> >> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { >> write_audio_frame(oc, audio_st); >> } else { >> write_video_frame(oc, video_st); >> picture->pts++; >> } >> >> Can someone explain why this test is done? Whats the connection between >> PTS values ? >> >> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gagandeep.bawa at ironroad.com Thu Apr 12 08:31:37 2012 From: gagandeep.bawa at ironroad.com (Gagandeep Bawa) Date: Thu, 12 Apr 2012 12:01:37 +0530 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: You have to check your video frame rate. I worked on IPhone recorded videos files and it varies between 15 to 30. On Thu, Apr 12, 2012 at 11:58 AM, ashika umanga wrote: > When I encode an OGG file with Theora+Speex , my video length is longer > than the audio playback. > Anytips on this ? > > On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa < > gagandeep.bawa at ironroad.com> wrote: > >> Hi, >> >> These PTS and DTS used for sync between audio and video data while >> encoding and presentation. Check below link for more details. >> >> *http://dranger.com/ffmpeg/tutorial05.html* >> >> Thanks, >> Gagan >> >> On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga wrote: >> >>> Greetings all, >>> >>> I am writing a wrapper class for video/audio encoding by following the >>> "muxing.c". >>> http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html >>> >>> I see in the example that before writing frames to the file ,is checks >>> whether the PTS value of audiostream is >>> lesser than that of videostream. >>> >>> code snippet: >>> >>> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { >>> write_audio_frame(oc, audio_st); >>> } else { >>> write_video_frame(oc, video_st); >>> picture->pts++; >>> } >>> >>> Can someone explain why this test is done? Whats the connection between >>> PTS values ? >>> >>> >>> >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >>> >> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -- Thanks & Regards, Gagandeep, Tech Lead Mobility +91- 7307470044 ------------------------------------------------------------------------------- Ironroad IT India Pvt. Ltd. IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India -------------- next part -------------- An HTML attachment was scrubbed... URL: From umanga.forums at gmail.com Thu Apr 12 08:58:41 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Thu, 12 Apr 2012 15:58:41 +0900 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: I mean, I used "muxing.c" to generate the OGG file.That means both audio and video stream should have the same length,isnt it ? On Thu, Apr 12, 2012 at 3:31 PM, Gagandeep Bawa wrote: > You have to check your video frame rate. I worked on IPhone recorded > videos files and it varies between 15 to 30. > > > On Thu, Apr 12, 2012 at 11:58 AM, ashika umanga wrote: > >> When I encode an OGG file with Theora+Speex , my video length is longer >> than the audio playback. >> Anytips on this ? >> >> On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa < >> gagandeep.bawa at ironroad.com> wrote: >> >>> Hi, >>> >>> These PTS and DTS used for sync between audio and video data while >>> encoding and presentation. Check below link for more details. >>> >>> *http://dranger.com/ffmpeg/tutorial05.html* >>> >>> Thanks, >>> Gagan >>> >>> On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga >> > wrote: >>> >>>> Greetings all, >>>> >>>> I am writing a wrapper class for video/audio encoding by following the >>>> "muxing.c". >>>> http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html >>>> >>>> I see in the example that before writing frames to the file ,is checks >>>> whether the PTS value of audiostream is >>>> lesser than that of videostream. >>>> >>>> code snippet: >>>> >>>> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { >>>> write_audio_frame(oc, audio_st); >>>> } else { >>>> write_video_frame(oc, video_st); >>>> picture->pts++; >>>> } >>>> >>>> Can someone explain why this test is done? Whats the connection between >>>> PTS values ? >>>> >>>> >>>> >>>> _______________________________________________ >>>> Libav-user mailing list >>>> Libav-user at ffmpeg.org >>>> http://ffmpeg.org/mailman/listinfo/libav-user >>>> >>>> >>> >>> >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >>> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > > > -- > > Thanks & Regards, > Gagandeep, Tech Lead Mobility > > +91- 7307470044 > > > ------------------------------------------------------------------------------- > > Ironroad IT India Pvt. Ltd. > > IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Thu Apr 12 09:06:19 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Thu, 12 Apr 2012 12:36:19 +0530 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: I think it is always not necessary have to both audio and video with same size. I have seen the videos which are greater in length that audio and there was silence at the end of the video. If there is no silence in the end of your video then you need to track the PTS values of the audio and check where it got shortened. On Thu, Apr 12, 2012 at 12:28 PM, ashika umanga wrote: > I mean, I used "muxing.c" to generate the OGG file.That means both audio > and video stream should have the same length,isnt it ? > > > > On Thu, Apr 12, 2012 at 3:31 PM, Gagandeep Bawa < > gagandeep.bawa at ironroad.com> wrote: > >> You have to check your video frame rate. I worked on IPhone recorded >> videos files and it varies between 15 to 30. >> >> >> On Thu, Apr 12, 2012 at 11:58 AM, ashika umanga wrote: >> >>> When I encode an OGG file with Theora+Speex , my video length is longer >>> than the audio playback. >>> Anytips on this ? >>> >>> On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa < >>> gagandeep.bawa at ironroad.com> wrote: >>> >>>> Hi, >>>> >>>> These PTS and DTS used for sync between audio and video data while >>>> encoding and presentation. Check below link for more details. >>>> >>>> *http://dranger.com/ffmpeg/tutorial05.html* >>>> >>>> Thanks, >>>> Gagan >>>> >>>> On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga < >>>> umanga.forums at gmail.com> wrote: >>>> >>>>> Greetings all, >>>>> >>>>> I am writing a wrapper class for video/audio encoding by following the >>>>> "muxing.c". >>>>> http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html >>>>> >>>>> I see in the example that before writing frames to the file ,is checks >>>>> whether the PTS value of audiostream is >>>>> lesser than that of videostream. >>>>> >>>>> code snippet: >>>>> >>>>> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { >>>>> write_audio_frame(oc, audio_st); >>>>> } else { >>>>> write_video_frame(oc, video_st); >>>>> picture->pts++; >>>>> } >>>>> >>>>> Can someone explain why this test is done? Whats the connection >>>>> between PTS values ? >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Libav-user mailing list >>>>> Libav-user at ffmpeg.org >>>>> http://ffmpeg.org/mailman/listinfo/libav-user >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Libav-user mailing list >>>> Libav-user at ffmpeg.org >>>> http://ffmpeg.org/mailman/listinfo/libav-user >>>> >>>> >>> >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >>> >> >> >> -- >> >> Thanks & Regards, >> Gagandeep, Tech Lead Mobility >> >> +91- 7307470044 >> >> >> ------------------------------------------------------------------------------- >> >> Ironroad IT India Pvt. Ltd. >> >> IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India >> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gkinsey at ad-holdings.co.uk Thu Apr 12 09:34:18 2012 From: gkinsey at ad-holdings.co.uk (Gavin Kinsey) Date: Thu, 12 Apr 2012 08:34:18 +0100 Subject: [Libav-user] compile for iOS with assembler In-Reply-To: References: Message-ID: <201204120834.18429.gkinsey@ad-holdings.co.uk> On Wednesday 11 April 2012 16:35:24 Andrey Utkin wrote: > Hi. I can successfully build ffmpeg libs for iOS with --disable-asm, > but i'd like to enable it and compilation fails. The ancient version of gcc shipped by Apple doesn't handle some of the embedded assembly properly. The attached patch disables the bits that don't compile in the least invasive way I know of. -- Gavin Kinsey AD Holdings Plc This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to whom they are addressed. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system; you may not copy this message or disclose its contents to anyone. The recipient should check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Company. Contact Customer Services for details customerservices at dmicros.com -------------- next part -------------- A non-text attachment was scrubbed... Name: ios.patch Type: text/x-patch Size: 2045 bytes Desc: not available URL: From nicoz.b at gmail.com Thu Apr 12 11:45:16 2012 From: nicoz.b at gmail.com (Nicolas Braini) Date: Thu, 12 Apr 2012 11:45:16 +0200 Subject: [Libav-user] Open https stream with avformat_open_input() ? Message-ID: Hi ! Currently, I'm developping an application for reading H.264 video stream over http. For doing this, I use avformat_open_input(...) with http url. But, I also want to read H.264 video stream over https ! When I give the https url to avformat_open_input, it returns me an "error -2" ! Can someone explain me how to open a https stream ? Thanks in advance ! Br, BRAINI Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: From bstewart at ais-sim.com Thu Apr 12 17:20:35 2012 From: bstewart at ais-sim.com (Bryan Stewart) Date: Thu, 12 Apr 2012 08:20:35 -0700 Subject: [Libav-user] AVFilter abuffer Buffering limit reached In-Reply-To: References: <4F7DADF0.5000808@ais-sim.com> Message-ID: <4F86F2C3.20107@ais-sim.com> Thanks Andrey. I did try it with ffmpeg, and I received the same results. The [I1] (ashowinfo @...A80) input data is periodically left in the source buffer. [See n=20 below). >> ./ffmpeg.exe -f lavfi -i "amovie=../../Sessions/scenarios.mpg, aresample=44100, ashowinfo, aconvert=s16:stereo [med]; amovie=../../Sessions/training.avi, ashowinfo, aconvert=s16:stereo [cap]; [med] [cap] amerge, aconvert=s16:stereo" -y "../../NetworkExport/output.avi" ffmpeg version N-38622-g1eabd71 Copyright (c) 2000-2012 the FFmpeg developers built on Mar 7 2012 00:19:36 with gcc 4.6.2 configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 51. 42.100 / 51. 42.100 libavcodec 54. 10.100 / 54. 10.100 libavformat 54. 2.100 / 54. 2.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 63.100 / 2. 63.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 7.100 / 0. 7.100 libpostproc 52. 0.100 / 52. 0.100 [amovie @ 013D7F00] seek_point:0 format_name:(null) file_name:../../Sessions/scenarios.mpg stream_index:1 [amovie @ 01D01280] seek_point:0 format_name:(null) file_name:../../Sessions/training.avi stream_index:1 [amerge @ 01A80940] Inputs overlap: output layout will be meaningless [aresample @ 013D7DE0] r:48000Hz -> r:44100Hz [aconvert @ 013E0DA0] fmt:s16 cl:stereo planar:0 -> fmt:s16 cl:stereo planar:0 [aconvert @ 013E32C0] fmt:s16 cl:stereo planar:0 -> fmt:s16 cl:stereo planar:0 [amerge @ 01A80940] in1:stereo + in2:stereo -> out:4.0 [aconvert @ 01D01200] fmt:s16 cl:4.0 planar:0 -> fmt:s16 cl:stereo planar:0 [ashowinfo @ 013E0A80] n:0 pts:17643 pts_time:0.400068 pos:4110 fmt:s16 chlayout:stereo nb_samples:1049 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:0 pts:0 pts_time:0 pos:1362952 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:72FFE706 plane_checksum[72FFE706] [lavfi @ 013D7220] Estimating duration from bitrate, this may be inaccurate Input #0, lavfi, from 'amovie=../../Sessions/scenarios.mpg, aresample=44100, ashowinfo, aconvert=s16:stereo [med]; amovie=../../Sessions/training.avi, ashowinfo, aconvert=s16:stereo [cap]; [med] [cap] amerge, aconvert=s16:stereo': Duration: N/A, start: 0.400068, bitrate: 1411 kb/s Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s Output #0, avi, to '../../NetworkExport/output.avi': Metadata: ISFT : Lavf54.2.100 Stream #0:0: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16 Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le -> libmp3lame) Press [q] to stop, [?] for help [ashowinfo @ 01401F60] n:1 pts:1024 pts_time:0.02322 pos:1367048 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:CB67FD2A plane_checksum[CB67FD2A] [ashowinfo @ 013E0A80] n:1 pts:19627 pts_time:0.445057 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:2 pts:2048 pts_time:0.0464399 pos:1371144 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:93DAEE5A plane_checksum[93DAEE5A] [ashowinfo @ 013E0A80] n:2 pts:21612 pts_time:0.490068 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:3 pts:3072 pts_time:0.0696599 pos:1375240 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:9BDEF3E2 plane_checksum[9BDEF3E2] [ashowinfo @ 013E0A80] n:3 pts:23596 pts_time:0.535057 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:4 pts:4096 pts_time:0.0928798 pos:1379336 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:20030CC6 plane_checksum[20030CC6] [ashowinfo @ 013E0A80] n:4 pts:25581 pts_time:0.580068 pos:251918 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:5 pts:5120 pts_time:0.1161 pos:1383432 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:2042BA79 plane_checksum[2042BA79] [ashowinfo @ 013E0A80] n:5 pts:27565 pts_time:0.625057 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:6 pts:6144 pts_time:0.13932 pos:1387528 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:280F9C2E plane_checksum[280F9C2E] [ashowinfo @ 013E0A80] n:6 pts:29550 pts_time:0.670068 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:7 pts:7168 pts_time:0.16254 pos:1391624 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:BD63982C plane_checksum[BD63982C] [ashowinfo @ 013E0A80] n:7 pts:31534 pts_time:0.715057 pos:260110 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:8 pts:8192 pts_time:0.18576 pos:1395720 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:D3FAB985 plane_checksum[D3FAB985] [ashowinfo @ 013E0A80] n:8 pts:33519 pts_time:0.760068 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:9 pts:9216 pts_time:0.20898 pos:1399816 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:EAECE1FC plane_checksum[EAECE1FC] [ashowinfo @ 013E0A80] n:9 pts:35503 pts_time:0.805057 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:10 pts:10240 pts_time:0.2322 pos:1403912 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:1B80E183 plane_checksum[1B80E183] [ashowinfo @ 013E0A80] n:10 pts:37488 pts_time:0.850068 pos:331790 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:11 pts:11264 pts_time:0.25542 pos:1408008 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:D178E6F8 plane_checksum[D178E6F8] [ashowinfo @ 013E0A80] n:11 pts:39472 pts_time:0.895057 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:12 pts:12288 pts_time:0.278639 pos:1412104 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:57C4CE5A plane_checksum[57C4CE5A] [ashowinfo @ 013E0A80] n:12 pts:41457 pts_time:0.940068 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:13 pts:13312 pts_time:0.301859 pos:1416200 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:B87EC992 plane_checksum[B87EC992] [ashowinfo @ 013E0A80] n:13 pts:43441 pts_time:0.985057 pos:403470 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:14 pts:14336 pts_time:0.325079 pos:1420296 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:70FCD358 plane_checksum[70FCD358] [ashowinfo @ 013E0A80] n:14 pts:45426 pts_time:1.03007 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:15 pts:15360 pts_time:0.348299 pos:1424392 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:D5A92B09 plane_checksum[D5A92B09] [ashowinfo @ 013E0A80] n:15 pts:47410 pts_time:1.07506 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:16 pts:16384 pts_time:0.371519 pos:1428488 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:8A1AA587 plane_checksum[8A1AA587] [ashowinfo @ 013E0A80] n:16 pts:49395 pts_time:1.12007 pos:479246 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:17 pts:17408 pts_time:0.394739 pos:1432584 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:4E684C76 plane_checksum[4E684C76] [ashowinfo @ 013E0A80] n:17 pts:51379 pts_time:1.16506 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:18 pts:18432 pts_time:0.417959 pos:1436680 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:FF14DA89 plane_checksum[FF14DA89] [ashowinfo @ 013E0A80] n:18 pts:53364 pts_time:1.21007 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:19 pts:19456 pts_time:0.441179 pos:1440776 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:CFB99FDB plane_checksum[CFB99FDB] [ashowinfo @ 013E0A80] n:19 pts:55348 pts_time:1.25506 pos:546830 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:20 pts:20480 pts_time:0.464399 pos:1444872 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:AB467A3B plane_checksum[AB467A3B] [ashowinfo @ 013E0A80] n:20 pts:57333 pts_time:1.30007 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:21 pts:21504 pts_time:0.487619 pos:1448968 fmt:s16 chlayout:stereo nb_samples:546 rate:44100 planar:0 checksum:E22FBFC2 plane_checksum[E22FBFC2] [ashowinfo @ 01401F60] n:22 pts:22050 pts_time:0.5 pos:3763208 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:1277853A plane_checksum[1277853A] [ashowinfo @ 013E0A80] n:21 pts:59317 pts_time:1.34506 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:23 pts:23074 pts_time:0.52322 pos:3767304 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:9564318C plane_checksum[9564318C] [ashowinfo @ 013E0A80] n:22 pts:61302 pts_time:1.39007 pos:614414 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:24 pts:24098 pts_time:0.54644 pos:3771400 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:6CE0F731 plane_checksum[6CE0F731] [ashowinfo @ 013E0A80] n:23 pts:63286 pts_time:1.43506 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:25 pts:25122 pts_time:0.56966 pos:3775496 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:4FBB7809 plane_checksum[4FBB7809] [ashowinfo @ 013E0A80] n:24 pts:65271 pts_time:1.48007 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:26 pts:26146 pts_time:0.59288 pos:3779592 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:28EA635E plane_checksum[28EA635E] [ashowinfo @ 013E0A80] n:25 pts:67255 pts_time:1.52506 pos:681998 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:27 pts:27170 pts_time:0.6161 pos:3783688 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:DCF2DB9A plane_checksum[DCF2DB9A] [ashowinfo @ 013E0A80] n:26 pts:69240 pts_time:1.57007 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:28 pts:28194 pts_time:0.63932 pos:3787784 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:DD3FD822 plane_checksum[DD3FD822] [ashowinfo @ 013E0A80] n:27 pts:71224 pts_time:1.61506 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:29 pts:29218 pts_time:0.66254 pos:3791880 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:CAACC73A plane_checksum[CAACC73A] [ashowinfo @ 013E0A80] n:28 pts:73209 pts_time:1.66007 pos:753678 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] [ashowinfo @ 01401F60] n:30 pts:30242 pts_time:0.68576 pos:3795976 fmt:s16 chlayout:stereo nb_samples:1024 rate:44100 planar:0 checksum:643EB023 plane_checksum[643EB023] [ashowinfo @ 013E0A80] n:29 pts:75193 pts_time:1.70506 pos:-1 fmt:s16 chlayout:stereo nb_samples:1058 rate:44100 planar:0 checksum:00000000 plane_checksum[00000000] On 4/6/2012 1:39 AM, Andrey Utkin wrote: > 2012/4/5 Bryan Stewart: >> I am trying to merge two audio streams with different sample rates in to a >> single s16 stereo stream: >> >> -lavfi "[I1] aresample=44100, ashowinfo, aconvert=s16:stereo [L1]; >> [I2] aresample=44100, ashowinfo, aconvert=s16:stereo [L2]; >> [L1] [l2] amerge, aconvert=s16:stereo [out]" > > Did you try it with ffmpeg utility? Just to check that it's not ffmpeg > internal problem. > -- #-----------------------------------------------------------------# # Bryan C. Stewart Email: bstewart at ais-sim.com # # Web: www.ais-sim.com # # Advanced Interactive Systems, Inc. Phone: (831)655-0440 # # 8 Harris Ct, Suite B5, Fax: (831)655-0885 # # Monterey, CA 93940 # #-----------------------------------------------------------------# * * CONFIDENTIALITY NOTICE ---------------------- This message, together with any attachments, may be legally privileged and is confidential information intended only for the use of the individual or entity to which it is addressed. It is exempt from disclosure under applicable law including court orders. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution or copy of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender and delete this message, along with any attachments, from your computer. In addition, Data contained in this email may be subject to the International Traffic in Arms Regulation (ITAR) or the Export Administration Regulation (EAR) of 1979. Regulated data may not be exported, released, or disclosed to foreign nationals inside or outside the United States without obtaining the prior written approval of Advanced Interactive Systems, Inc. and licenses as required by the U.S. Department of State. From andrey.krieger.utkin at gmail.com Thu Apr 12 17:59:08 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 12 Apr 2012 18:59:08 +0300 Subject: [Libav-user] compile for iOS with assembler In-Reply-To: <201204120834.18429.gkinsey@ad-holdings.co.uk> References: <201204120834.18429.gkinsey@ad-holdings.co.uk> Message-ID: 2012/4/12 Gavin Kinsey : > On Wednesday 11 April 2012 16:35:24 Andrey Utkin wrote: >> Hi. I can successfully build ffmpeg libs for iOS with --disable-asm, >> but i'd like to enable it and compilation fails. > > The ancient version of gcc shipped by Apple doesn't handle some of the > embedded assembly properly. ?The attached patch disables the bits that don't > compile in the least invasive way I know of. Thanks, it really made ffmpeg compile for me. Although i encountered some unadequate behaviour with optimized builds, so for now i've reverted to no-asm builds. -- Andrey Utkin From umanga.forums at gmail.com Fri Apr 13 03:16:29 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Fri, 13 Apr 2012 10:16:29 +0900 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: thanks all for the tips, I noticed that in the "muxing.c" example the "pts" value is only set to the AVFrame of video stream.Is it possible to do the same for Audio stream? I am sorry but I dont have clear idea on how to use "pts" .I know for single stream(video) is it used to arrange the decoded frames in correct order. (?) . but whats the connection when we consider both audio and video stream ? On Thu, Apr 12, 2012 at 4:06 PM, NITIN GOYAL wrote: > I think it is always not necessary have to both audio and video with same > size. I have seen the videos which are greater in length that audio and > there was silence at the end of the video. If there is no silence in the > end of your video then you need to track the PTS values of the audio > and check where it got shortened. > > > On Thu, Apr 12, 2012 at 12:28 PM, ashika umanga wrote: > >> I mean, I used "muxing.c" to generate the OGG file.That means both audio >> and video stream should have the same length,isnt it ? >> >> >> >> On Thu, Apr 12, 2012 at 3:31 PM, Gagandeep Bawa < >> gagandeep.bawa at ironroad.com> wrote: >> >>> You have to check your video frame rate. I worked on IPhone recorded >>> videos files and it varies between 15 to 30. >>> >>> >>> On Thu, Apr 12, 2012 at 11:58 AM, ashika umanga >> > wrote: >>> >>>> When I encode an OGG file with Theora+Speex , my video length is longer >>>> than the audio playback. >>>> Anytips on this ? >>>> >>>> On Thu, Apr 12, 2012 at 2:51 PM, Gagandeep Bawa < >>>> gagandeep.bawa at ironroad.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> These PTS and DTS used for sync between audio and video data while >>>>> encoding and presentation. Check below link for more details. >>>>> >>>>> *http://dranger.com/ffmpeg/tutorial05.html* >>>>> >>>>> Thanks, >>>>> Gagan >>>>> >>>>> On Thu, Apr 12, 2012 at 11:14 AM, ashika umanga < >>>>> umanga.forums at gmail.com> wrote: >>>>> >>>>>> Greetings all, >>>>>> >>>>>> I am writing a wrapper class for video/audio encoding by following >>>>>> the "muxing.c". >>>>>> http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html >>>>>> >>>>>> I see in the example that before writing frames to the file ,is >>>>>> checks whether the PTS value of audiostream is >>>>>> lesser than that of videostream. >>>>>> >>>>>> code snippet: >>>>>> >>>>>> if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { >>>>>> write_audio_frame(oc, audio_st); >>>>>> } else { >>>>>> write_video_frame(oc, video_st); >>>>>> picture->pts++; >>>>>> } >>>>>> >>>>>> Can someone explain why this test is done? Whats the connection >>>>>> between PTS values ? >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Libav-user mailing list >>>>>> Libav-user at ffmpeg.org >>>>>> http://ffmpeg.org/mailman/listinfo/libav-user >>>>>> >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Libav-user mailing list >>>>> Libav-user at ffmpeg.org >>>>> http://ffmpeg.org/mailman/listinfo/libav-user >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Libav-user mailing list >>>> Libav-user at ffmpeg.org >>>> http://ffmpeg.org/mailman/listinfo/libav-user >>>> >>>> >>> >>> >>> -- >>> >>> Thanks & Regards, >>> Gagandeep, Tech Lead Mobility >>> >>> +91- 7307470044 >>> >>> >>> ------------------------------------------------------------------------------- >>> >>> Ironroad IT India Pvt. Ltd. >>> >>> IT-6, C-6,SEBIZ SQUARE, Sector-67, Mohali, Punjab, India >>> >>> >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >>> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Fri Apr 13 05:41:03 2012 From: kalileo at universalx.net (Kalileo) Date: Fri, 13 Apr 2012 10:41:03 +0700 Subject: [Libav-user] PTS values and writing encoded audio and video frames ? In-Reply-To: References: Message-ID: <8D8685D4-4C7D-4048-B4D6-1E44D0814337@universalx.net> On Apr 13, 2012, at 08:16 , ashika umanga wrote: > thanks all for the tips, > I noticed that in the "muxing.c" example the "pts" value is only set to the AVFrame of video stream.Is it possible to do the same for Audio stream? > I am sorry but I dont have clear idea on how to use "pts" .I know for single stream(video) is it used to arrange the decoded frames in correct order. (?) . but whats the connection when we consider both audio and video stream ? Have you already red the classic dranger tutorial, as it was proposed to you earlier? http://dranger.com/ffmpeg/tutorial05.html From vinoth.amu at gmail.com Fri Apr 13 14:17:59 2012 From: vinoth.amu at gmail.com (Vinoth raj) Date: Fri, 13 Apr 2012 17:47:59 +0530 Subject: [Libav-user] Convert video from avi to mp4 In-Reply-To: References: Message-ID: Dear All, How to use the libavcodec C library to convert video format from avi to mp4? I do not want to use ffmpeg from command line but rather want to create a C/C++ application with the ability to convert AVI to MP4 video format. I could not find any samples on video format conversion. Can anyone suggest what sequence of steps should I follow to handle conversion of videos? Or Which methods in the source code should I use for video conversion? Kindly help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoz.b at gmail.com Fri Apr 13 15:52:01 2012 From: nicoz.b at gmail.com (Nicolas Braini) Date: Fri, 13 Apr 2012 15:52:01 +0200 Subject: [Libav-user] Convert video from avi to mp4 In-Reply-To: References: Message-ID: Hi, What you want to do is video transcoding right ? So, what I suggest is simply do that : Configure the decoder with the input format. Configure the encoder with the output format. For specifying the format, have a look at av_guess_format(...) and avformat_alloc_context(). AVOutputFormat *outForm= av_guess_format(...) ; AVFormatContext *formCtxt = avformat_alloc_context(); And after : AVI file ----> decode video ( avcodec_decode_video2(...) ) -----> frame finish ----> store frame ---> encode video with frame (avcodec_encode_video(...) ) ----> MP4 file. Hope it helps ! Br, Nicolas Braini. 2012/4/13 Vinoth raj > > Dear All, > > How to use the libavcodec C library to convert video format from avi to > mp4? > I do not want to use ffmpeg from command line but rather want to create a > C/C++ application with the ability to convert AVI to MP4 video format. > > I could not find any samples on video format conversion. Can anyone > suggest what sequence of steps should I follow to handle conversion of > videos? > Or Which methods in the source code should I use for video conversion? > > Kindly help! > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From soltic.lucas at gmail.com Sat Apr 14 18:40:09 2012 From: soltic.lucas at gmail.com (Lucas Soltic) Date: Sat, 14 Apr 2012 18:40:09 +0200 Subject: [Libav-user] Why is av_seek_frame() inaccurate in some cases ? Message-ID: <3686DEF4-3241-4751-8ECD-B7CA7D62CE1C@gmail.com> Hello, I'm working on a movie playback library but I'm getting issues with seeking. I'm using av_seek_frame() and FFmpeg 0.10. The problem is that the audio stream is correctly sought but not the video stream, except for H.264 video stream (not working for DivX, MPEG4v2 or Theora video streams). Here is what I get: When seeking I print these debug messages: REQUESTED SEEK to 276.794s video seek pos = 276793952 video seek target = 6643 video seek as seconds = 276.794 audio seek pos = 276793952 audio seek target = 11533 audio seek as seconds = 276.794 Where 'video seek target' and 'audio seek target' are the values given to av_seek_frame() for both streams. But right after this, after calling av_decode_* for the first time, here is what I get for the packet that has just been decoded: audio pts = 276792ms video pts = 271583ms As you can see, the gathered audio PTS is fine : 276.792s. Whereas the video one isn't : 271.583s. I do not know why this is happening, especially as it's working fine with H.264 streams. Note that the time gap isn't fixed, I sometimes get a 2 or 8 seconds difference for example. So that you can understand how I got these results, here is what I did: When seeking: flush the queued video AVPackets AVRational timeBase = m_avFormatCtx->streams[videoStreamID]->time_base; int flags = (targetPosition is before currentPosition) ? AVSEEK_FLAG_BACKWARD : 0; int64_t seek_pos = (int64_t)(targetPosition.asSeconds() * AV_TIME_BASE); // ::asSeconds() returns a float value int64_t seek_target = av_rescale_q(seek_pos, AV_TIME_BASE_Q, timeBase); av_seek_frame(m_avFormatCtx, videoStreamID, seek_target, flags) avcodec_flush_buffers(m_videoCodecCtx); When decoding: check if there are available video packets (but since we flushed everything there are none) read the movie file until we get video packets avcodec_decode_video2(m_codecCtx, m_rawFrame, &didDecodeFrame, videoPacket); int64_t seek_target = av_rescale_q(videoPacket->pts, videoTimeBase, AV_TIME_BASE_Q) / 1000; std::cout << "video pts = " << seek_target << "ms" << std::endl; So I don't think I did anything fancy, but I still can't find out why the video seeking is inaccurate. I would be really grateful if someone had ideas about this issue. Regards, Lucas SOLTIC -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbradshaw at sorensonmedia.com Sat Apr 14 18:49:40 2012 From: mbradshaw at sorensonmedia.com (Michael Bradshaw) Date: Sat, 14 Apr 2012 10:49:40 -0600 Subject: [Libav-user] Why is av_seek_frame() inaccurate in some cases ? In-Reply-To: <3686DEF4-3241-4751-8ECD-B7CA7D62CE1C@gmail.com> References: <3686DEF4-3241-4751-8ECD-B7CA7D62CE1C@gmail.com> Message-ID: On Sat, Apr 14, 2012 at 10:40 AM, Lucas Soltic wrote: > > So I don't think I did anything fancy, but I still can't find out why the > video seeking is inaccurate. I would be really grateful if someone had > ideas about this issue. > There's two reasons I can see why you would be getting this result: 1) It could be seeking to the closest keyframe in the video, and 2) some demuxers seek by DTS and not PTS. You say it works fine for H.264 videos though, so I'm not entirely sure what could be causing it. --Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From soltic.lucas at gmail.com Sat Apr 14 19:24:01 2012 From: soltic.lucas at gmail.com (Lucas Soltic) Date: Sat, 14 Apr 2012 19:24:01 +0200 Subject: [Libav-user] Why is av_seek_frame() inaccurate in some cases ? In-Reply-To: References: <3686DEF4-3241-4751-8ECD-B7CA7D62CE1C@gmail.com> Message-ID: <7DA6B693-2B84-4090-A599-D1FCB0BFD8FD@gmail.com> Le 14 avr. 2012 ? 18:49, Michael Bradshaw a ?crit : > On Sat, Apr 14, 2012 at 10:40 AM, Lucas Soltic wrote: > So I don't think I did anything fancy, but I still can't find out why the video seeking is inaccurate. I would be really grateful if someone had ideas about this issue. > > There's two reasons I can see why you would be getting this result: 1) It could be seeking to the closest keyframe in the video, and 2) some demuxers seek by DTS and not PTS. > > You say it works fine for H.264 videos though, so I'm not entirely sure what could be causing it. Hello! I tried to use AVSEEK_FLAG_ANY for the av_seek_frame() parameter, so that it does not only seek to keyframes, but it still gives important gaps. As for the DTS, in the movie I read, they are equal to the PTS (for any of the ~10 seeking I did). These results concern the MPEG4v2 video. I'm going to investigate further with other codecs but I wanted to tell these points. Lucas SOLTIC -------------- next part -------------- An HTML attachment was scrubbed... URL: From Adi.Molkho at toganetworks.com Sun Apr 15 15:04:29 2012 From: Adi.Molkho at toganetworks.com (Adi Molkho) Date: Sun, 15 Apr 2012 16:04:29 +0300 Subject: [Libav-user] Reseting decoder according to discontinuity bit is TS files Message-ID: <009901cd1b08$4e47d070$ead77150$@toganetworks.com> Hi I want to reset my decoder every time I identify the discontinuity bit of the adaptation header of a TS packet. I identify this bit in the handle_packet function in mpegts.c file and the call avcodec_flush_buffers for the video stream but the code crashes Any ideas? Thanks Adi -------------- next part -------------- An HTML attachment was scrubbed... URL: From caesar_06elektro at yahoo.co.id Sun Apr 15 16:14:09 2012 From: caesar_06elektro at yahoo.co.id (Yulius Candra) Date: Sun, 15 Apr 2012 22:14:09 +0800 (SGT) Subject: [Libav-user] PTS And DTS get Message-ID: <1334499249.44884.YahooMailClassic@web190005.mail.sg3.yahoo.com> Dear All, Hello,, When i try build a player video for mpeg 1,2,4..there something that make me wonder, when i try sync a frame with timing then i get pts and dts but first frame in mpeg 1,2 i get value pts and pts too large then if i multiply with timebase i will get big delay. but that case not happen in mpeg 4 . is there any explanation? or any calculaction for timing in mpeg 1,2? Detail Information in fist Frame mpeg 2 : timebase = 0.0417083333333333 pts = 45000 dts = 41246 pts *? timebase = 1876.875 Mpeg 4 timebase = 0.0416666666666667 pts = 0 dts = 0 pts *? timebase? = 0 Thanks in Advance.. Best Regard... Yulius -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.george at normalesup.org Sun Apr 15 16:26:04 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Sun, 15 Apr 2012 16:26:04 +0200 Subject: [Libav-user] PTS And DTS get In-Reply-To: <1334499249.44884.YahooMailClassic@web190005.mail.sg3.yahoo.com> References: <1334499249.44884.YahooMailClassic@web190005.mail.sg3.yahoo.com> Message-ID: <20120415142604.GA8219@phare.normalesup.org> Le septidi 27 germinal, an CCXX, Yulius Candra a ?crit?: > Hello,, When i try build a player video for mpeg 1,2,4..there something > that make me wonder, when i try sync a frame with timing then i get pts > and dts but first frame in mpeg 1,2 i get value pts and pts too large then > if i multiply with timebase i will get big delay. but that case not happen > in mpeg 4 . is there any explanation? or any calculaction for timing in > mpeg 1,2? Can you tell where the file comes from exactly? Also can you show the output of ffmpeg, the command-line tool, when it tries to read that file? You may also want to try ffprobe -show_packets. Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From caesar_06elektro at yahoo.co.id Sun Apr 15 17:02:33 2012 From: caesar_06elektro at yahoo.co.id (Yulius Candra) Date: Sun, 15 Apr 2012 23:02:33 +0800 (SGT) Subject: [Libav-user] PTS And DTS get In-Reply-To: <20120415142604.GA8219@phare.normalesup.org> Message-ID: <1334502153.46373.YahooMailClassic@web190003.mail.sg3.yahoo.com> Well, here the result of first frame form ffprobe Mpeg 2 [PACKET] codec_type=audio stream_index=1 pts=45000 pts_time=0.500000 dts=45000 dts_time=0.500000 duration=2351 duration_time=0.026122 size=417 pos=2048 flags=K [/PACKET] And first frame of mpeg 4 [PACKET] codec_type=video stream_index=0 pts=0 pts_time=0.000000 dts=0 dts_time=0.000000 duration=1 duration_time=0.041667 size=3321 pos=44 flags=K [/PACKET] Best Regards, Yulius. --- Pada Ming, 15/4/12, Nicolas George menulis: Dari: Nicolas George Judul: Re: [Libav-user] PTS And DTS get Kepada: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." Tanggal: Minggu, 15 April, 2012, 9:26 PM Le septidi 27 germinal, an CCXX, Yulius Candra a ?crit?: > Hello,, When i try build a player video for mpeg 1,2,4..there something > that make me wonder, when i try sync a frame with timing then i get pts > and dts but first frame in mpeg 1,2 i get value pts and pts too large then > if i multiply with timebase i will get big delay. but that case not happen > in mpeg 4 . is there any explanation? or any calculaction for timing in > mpeg 1,2? Can you tell where the file comes from exactly? Also can you show the output of ffmpeg, the command-line tool, when it tries to read that file? You may also want to try ffprobe -show_packets. Regards, -- ? Nicolas George -----Berikut adalah Lampiran dalam Pesan----- _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From caesar_06elektro at yahoo.co.id Sun Apr 15 17:04:44 2012 From: caesar_06elektro at yahoo.co.id (Yulius Candra) Date: Sun, 15 Apr 2012 23:04:44 +0800 (SGT) Subject: [Libav-user] PTS And DTS get In-Reply-To: <1334502153.46373.YahooMailClassic@web190003.mail.sg3.yahoo.com> Message-ID: <1334502284.81773.YahooMailClassic@web190005.mail.sg3.yahoo.com> Ops Sorry first packet frame form mpeg2 is wrong here the correct one :) [PACKET] codec_type=video stream_index=0 pts=45000 pts_time=0.500000 dts=41246 dts_time=0.458289 duration=3753 duration_time=0.041700 size=14838 pos=30 flags=K [/PACKET] --- Pada Ming, 15/4/12, Yulius Candra menulis: Dari: Yulius Candra Judul: Re: [Libav-user] PTS And DTS get Kepada: " libavformat libavutil libavdevice and libavfilter.This list is about using libavcodec" Tanggal: Minggu, 15 April, 2012, 10:02 PM Well, here the result of first frame form ffprobe Mpeg 2 [PACKET] codec_type=audio stream_index=1 pts=45000 pts_time=0.500000 dts=45000 dts_time=0.500000 duration=2351 duration_time=0.026122 size=417 pos=2048 flags=K [/PACKET] And first frame of mpeg 4 [PACKET] codec_type=video stream_index=0 pts=0 pts_time=0.000000 dts=0 dts_time=0.000000 duration=1 duration_time=0.041667 size=3321 pos=44 flags=K [/PACKET] Best Regards, Yulius. --- Pada Ming, 15/4/12, Nicolas George menulis: Dari: Nicolas George Judul: Re: [Libav-user] PTS And DTS get Kepada: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." Tanggal: Minggu, 15 April, 2012, 9:26 PM Le septidi 27 germinal, an CCXX, Yulius Candra a ?crit?: > Hello,, When i try build a player video for mpeg 1,2,4..there something > that make me wonder, when i try sync a frame with timing then i get pts > and dts but first frame in mpeg 1,2 i get value pts and pts too large then > if i multiply with timebase i will get big delay. but that case not happen > in mpeg 4 . is there any explanation? or any calculaction for timing in > mpeg 1,2? Can you tell where the file comes from exactly? Also can you show the output of ffmpeg, the command-line tool, when it tries to read that file? You may also want to try ffprobe -show_packets. Regards, -- ? Nicolas George -----Berikut adalah Lampiran dalam Pesan----- _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user -----Berikut adalah Lampiran dalam Pesan----- _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Sun Apr 15 17:19:30 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Sun, 15 Apr 2012 20:49:30 +0530 Subject: [Libav-user] How to depacketize the Mp4a-latm content frm the RTP packets? Message-ID: Hi How can we extract the raw AAC frames from an mp4a-latm content packetized in RTP packets? I have gone through the RFCs 3016 but nothing is concrete and much clearer. I have also seen the code of ffmpeg as how they do it. I have understood that they are using the config data and parsing it but how they are using it and what processing they are doing on raw data is not clear. Can anybody help out with any algo or code snippet to depacketize the LATM stuff out of RTP which can be played in mplayer? Regards Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From umanga.forums at gmail.com Mon Apr 16 05:00:15 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Mon, 16 Apr 2012 12:00:15 +0900 Subject: [Libav-user] Encoding Video/Audio and synchronizing using PTS values ? Message-ID: Greetings all, By refering "muxing.c" and "api-example.c" I managed to encode audio+video streams and create OGG files. Now i want to encode video stream captured from webcam and audio coming from the microphone. Assuming I managed to get these two streams using some API calls ,is there a special way to synchronize these two while encoding? In the "muxing.c" example, it just encode the streams without any syncrhonization. I assume PTS/DTS values has something to do with this. I see AVStream,AVFrame and AVPacket has a attribute called "pts".If I have to set this manually,which one I should set? Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From soltic.lucas at gmail.com Mon Apr 16 12:07:55 2012 From: soltic.lucas at gmail.com (Lucas Soltic) Date: Mon, 16 Apr 2012 12:07:55 +0200 Subject: [Libav-user] Fwd: Why is av_seek_frame() inaccurate in some cases ? References: <7DA6B693-2B84-4090-A599-D1FCB0BFD8FD@gmail.com> Message-ID: <95E20666-4D6C-4A5B-8727-B9638FC3F1EF@gmail.com> D?but du message r?exp?di? : > De : Lucas Soltic > Objet : R?p : [Libav-user] Why is av_seek_frame() inaccurate in some cases ? > Date : 14 avril 2012 19:24:01 HAEC > ? : "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." > > > Le 14 avr. 2012 ? 18:49, Michael Bradshaw a ?crit : > >> On Sat, Apr 14, 2012 at 10:40 AM, Lucas Soltic wrote: >> So I don't think I did anything fancy, but I still can't find out why the video seeking is inaccurate. I would be really grateful if someone had ideas about this issue. >> >> There's two reasons I can see why you would be getting this result: 1) It could be seeking to the closest keyframe in the video, and 2) some demuxers seek by DTS and not PTS. >> >> You say it works fine for H.264 videos though, so I'm not entirely sure what could be causing it. > > Hello! > > I tried to use AVSEEK_FLAG_ANY for the av_seek_frame() parameter, so that it does not only seek to keyframes, but it still gives important gaps. > As for the DTS, in the movie I read, they are equal to the PTS (for any of the ~10 seeking I did). These results concern the MPEG4v2 video. > I'm going to investigate further with other codecs but I wanted to tell these points. > > Lucas SOLTIC Actually I noticed than when seeking (even with AVSEEK_FLAG_ANY), the real sought position is 0 to 10s before the position I wanted. Then, if the video PTS is 9.90s before the position I wanted, and I seek a little bit further (say 0.1s), the video PTS becomes the exact position I wanted. So it looks like it's just seeking to keyframes, whatever seek flag I use. Considering this, are there more accurate ways to directly reach the expected position or should I just do avcodec_decode_video2() until the PTS becomes the one I wanted ? Decoding 10s of video could take some time on high resolution movies... Regards, Lucas SOLTIC -------------- next part -------------- An HTML attachment was scrubbed... URL: From trn200190 at gmail.com Mon Apr 16 12:20:43 2012 From: trn200190 at gmail.com (i m what i m ~~~~) Date: Mon, 16 Apr 2012 15:50:43 +0530 Subject: [Libav-user] Help capturing streaming Message-ID: Hello i want to receive h264 streaming from RTSP server(live media) and want to store it in a file??? IS there any source code available or can u guide how to do that? -------------- next part -------------- An HTML attachment was scrubbed... URL: From soltic.lucas at gmail.com Mon Apr 16 12:39:59 2012 From: soltic.lucas at gmail.com (Lucas Soltic) Date: Mon, 16 Apr 2012 12:39:59 +0200 Subject: [Libav-user] Fwd: Why is av_seek_frame() inaccurate in some cases ? References: <95E20666-4D6C-4A5B-8727-B9638FC3F1EF@gmail.com> Message-ID: <23DF9A2A-E5A4-43A7-ADF7-77B2E3655361@gmail.com> D?but du message r?exp?di? : > De : Lucas Soltic > Objet : R?exp : [Libav-user] Why is av_seek_frame() inaccurate in some cases ? > Date : 16 avril 2012 12:07:55 HAEC > ? : "libavdevice and libavfilter. This list is about using libavcodec libavformat libavutil" > > > D?but du message r?exp?di? : > >> De : Lucas Soltic >> Objet : R?p : [Libav-user] Why is av_seek_frame() inaccurate in some cases ? >> Date : 14 avril 2012 19:24:01 HAEC >> ? : "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." >> >> >> Le 14 avr. 2012 ? 18:49, Michael Bradshaw a ?crit : >> >>> On Sat, Apr 14, 2012 at 10:40 AM, Lucas Soltic wrote: >>> So I don't think I did anything fancy, but I still can't find out why the video seeking is inaccurate. I would be really grateful if someone had ideas about this issue. >>> >>> There's two reasons I can see why you would be getting this result: 1) It could be seeking to the closest keyframe in the video, and 2) some demuxers seek by DTS and not PTS. >>> >>> You say it works fine for H.264 videos though, so I'm not entirely sure what could be causing it. >> >> Hello! >> >> I tried to use AVSEEK_FLAG_ANY for the av_seek_frame() parameter, so that it does not only seek to keyframes, but it still gives important gaps. >> As for the DTS, in the movie I read, they are equal to the PTS (for any of the ~10 seeking I did). These results concern the MPEG4v2 video. >> I'm going to investigate further with other codecs but I wanted to tell these points. >> >> Lucas SOLTIC > > > Actually I noticed than when seeking (even with AVSEEK_FLAG_ANY), the real sought position is 0 to 10s before the position I wanted. Then, if the video PTS is 9.90s before the position I wanted, and I seek a little bit further (say 0.1s), the video PTS becomes the exact position I wanted. So it looks like it's just seeking to keyframes, whatever seek flag I use. > > Considering this, are there more accurate ways to directly reach the expected position or should I just do avcodec_decode_video2() until the PTS becomes the one I wanted ? Decoding 10s of video could take some time on high resolution movies... > > Regards, > Lucas SOLTIC Sorry for the spam, I found another interesting point. Actually if I disable the audio stream seeking (ie. do not call av_seek_frame() for the audio stream), the AVSEEK_FLAG_* are correctly handled. And if I use AVSEEK_FLAG_ANY for the video stream, I exactly get the PTS I wanted (with artifacts in the image, but it's normal as I didn't seek to a keyframe), AND the audio PTS is also correct, although I didn't do any seeking for the audio stream. THUS I'm wondering why both streams are bound that way? Aren't they supposed to be independent ? Now, considering that I don't want to get artifacts, I suppose I still HAVE to *don't* use AVSEEK_FLAG_ANY and do avcodec_decode_video2() for up to 10 seconds of video in order to get full images, wherever I seek to. Am I right ? One more question: what is the advantage of avformat_seek_file() over av_seek_frame()? In the documentation it's written that the function isn't "stable" yet and should therefore not be used right now. But in when I've searched for solutions about my av_seek_frame() issue, I saw a lot of people using this "unstable" function. Why ? Regards, Lucas SOLTIC -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Mon Apr 16 16:51:17 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 16 Apr 2012 17:51:17 +0300 Subject: [Libav-user] Fwd: Why is av_seek_frame() inaccurate in some cases ? In-Reply-To: <23DF9A2A-E5A4-43A7-ADF7-77B2E3655361@gmail.com> References: <95E20666-4D6C-4A5B-8727-B9638FC3F1EF@gmail.com> <23DF9A2A-E5A4-43A7-ADF7-77B2E3655361@gmail.com> Message-ID: On Mon, Apr 16, 2012 at 13:39, Lucas Soltic wrote: > > Actually if I disable the audio stream seeking (ie. do not call > av_seek_frame() for the audio stream), the AVSEEK_FLAG_* are correctly > handled. And if I use AVSEEK_FLAG_ANY for the video stream, I exactly get > the PTS I wanted (with artifacts in the image, but it's normal as I didn't > seek to a keyframe), AND the audio PTS is also correct, although I didn't do > any seeking for the audio stream. THUS I'm wondering why both streams are > bound that way? Aren't they supposed to be independent ? Your code sample did not mention seeking the audio stream, did it? What audio codec is used? How were audio and video muxed together? > Now, considering that I don't want to get artifacts, I suppose I still HAVE > to *don't* use AVSEEK_FLAG_ANY and do?avcodec_decode_video2() for up to 10 > seconds of video in order to get full images, wherever I seek to. Am I right? If the purpose of your seek() is to start displaying video from that point, then yes, you can only start decoding from a key frame. > Regards, > Lucas SOLTIC BR, Alex From simondaniels23 at gmail.com Mon Apr 16 18:05:40 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Mon, 16 Apr 2012 09:05:40 -0700 Subject: [Libav-user] Empty .MTS output videos when using -ss command line argument In-Reply-To: References: Message-ID: Hi guys, I have a set of .MTS files that I'm trying to splice. If I start at 0:00:00, the output video works fine. But if I start splicing any time after 0:00:00, the output video is empty. I've used the exact same command line with other .MTS files and had no problem. It seems like something specific to this Panasonic Lumix camera. MP4 and MOV files work fine too. This repros in FFmpeg HEAD-8dfb13e, 0.10.2, and 0.8.3. Any ideas? Thanks! Users-MacBook-Pro:ffmpeg-0.10.2 user$ *./ffmpeg -ss 00:00:01 -t 00:00:25 -i 00004.MTS -threads 3 -acodec copy -vcodec copy "output.MTS"* ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 15 2012 23:02:27 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) configuration: --enable-static --disable-shared --disable-outdev=sdl --enable-runtime-cpudetect --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --arch=x86_64 --sysroot=/Developer/SDKs/MacOSX10.7.sdk --extra-cflags='-isysroot /Developer/SDKs/MacOSX10.7.sdk' libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 Input #0, mpegts, from '00004.MTS': Duration: 00:01:24.57, start: 0.632622, bitrate: 15063 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 119.88 tbc Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 192 kb/s Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090) [mpegts @ 0x7f990c054000] muxrate VBR, pcr every 5 pkts, sdt every 200, pat/pmt every 40 pkts Output #0, mpegts, to 'output.MTS': Metadata: encoder : Lavf53.32.100 Stream #0:0: Video: h264 (HDMV / 0x564D4448), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 59.94 tbc Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 0 fps= 0 q=-1.0 size= 0kB time=00:00:00.00 bitrate= 0.0kbits/s frame= 0 fps= 0 q=-1.0 Lsize= 657kB time=00:00:00.00 bitrate= 0.0kbits/s video:0kB audio:586kB global headers:0kB muxing overhead 11.940537% If I use -ss 0:00:00, it works fine: Users-MacBook-Pro:ffmpeg-0.10.2 user$ *./ffmpeg -ss 00:00:00 -t 00:00:25 -i 00004.MTS -threads 3 -acodec copy -vcodec copy "output.MTS"* ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 15 2012 23:02:27 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) configuration: --enable-static --disable-shared --disable-outdev=sdl --enable-runtime-cpudetect --disable-bzlib --disable-libfreetype --disable-libopenjpeg --enable-zlib --arch=x86_64 --sysroot=/Developer/SDKs/MacOSX10.7.sdk --extra-cflags='-isysroot /Developer/SDKs/MacOSX10.7.sdk' libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 Input #0, mpegts, from '00004.MTS': Duration: 00:01:24.57, start: 0.632622, bitrate: 15063 kb/s Program 1 Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 119.88 tbc Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, s16, 192 kb/s Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090) File 'output.MTS' already exists. Overwrite ? [y/N] y muxrate VBR, pcr every 5 pkts, sdt every 200, pat/pmt every 40 pkts Output #0, mpegts, to 'output.MTS': Metadata: encoder : Lavf53.32.100 Stream #0:0: Video: h264 (HDMV / 0x564D4448), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 90k tbn, 59.94 tbc Stream #0:1: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 640 fps= 0 q=-1.0 size= 40390kB time=00:00:21.33 bitrate=15506.5kbits/sframe= 750 fps= 0 q=-1.0 Lsize= 46332kB time=00:00:25.00 bitrate=15177.2kbits/s video:42293kB audio:586kB global headers:0kB muxing overhead 8.053502% The input video can be downloaded here: http://dl.dropbox.com/u/28441949/00004.MTS Here's what MediaInfo says about the input video: General ID : 0 (0x0) Complete name : K:\PRIVATE\AVCHD\BDMV\STREAM\00004.MTS Format : BDAV Format/Info : Blu-ray Video File size : 152 MiB Duration : 1mn 24s Overall bit rate : 15.1 Mbps Maximum Overall bit rate : 18.0 Mbps Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : High at L4.0 Format settings, CABAC : No Format settings, ReFrames : 1 frame Frame mode : Frame doubling Codec ID : 27 Duration : 1mn 24s Bit rate mode : Variable Bit rate : 14.3 Mbps Maximum bit rate : 16.6 Mbps Width : 1 280 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.516 Stream size : 144 MiB (95%) Audio ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Codec ID : 129 Duration : 1mn 24s Bit rate mode : Constant Bit rate : 192 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Stream size : 1.94 MiB (1%) Text ID : 4608 (0x1200) Menu ID : 1 (0x1) Format : PGS Codec ID : 144 Duration : 1mn 24s -------------- next part -------------- An HTML attachment was scrubbed... URL: From soltic.lucas at gmail.com Mon Apr 16 20:22:30 2012 From: soltic.lucas at gmail.com (Lucas Soltic) Date: Mon, 16 Apr 2012 20:22:30 +0200 Subject: [Libav-user] Why is av_seek_frame() inaccurate in some cases ? In-Reply-To: References: <95E20666-4D6C-4A5B-8727-B9638FC3F1EF@gmail.com> <23DF9A2A-E5A4-43A7-ADF7-77B2E3655361@gmail.com> Message-ID: Le 16 avr. 2012 ? 16:51, Alex Cohn a ?crit : > Your code sample did not mention seeking the audio stream, did it? > What audio codec is used? How were audio and video muxed together? You're right. I didn't mention it because I thought it wasn't related to this seeking "issue". I thought that seeking the audio stream wouldn't seek the video stream too. Here the audio is MP3. And I don't know how audio and video were muxed together, this is a testing video file I took from my hard disk. But this is not important, because I want my library to be able to read a wide variety of formats, thus the muxing of this specific video file shouldn't be a criteria. > If the purpose of your seek() is to start displaying video from that > point, then yes, you can only start decoding from a key frame. Yes, that's it. Thank you very much! Regards, Lucas SOLTIC From wagner.patriota at gmail.com Mon Apr 16 21:09:18 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Mon, 16 Apr 2012 16:09:18 -0300 Subject: [Libav-user] h264_mp4toannexb_filter In-Reply-To: References: Message-ID: I am a newbee on this... I dont know how to do it... :-( is there any content I can read more about this anywhere else? On Wed, Apr 11, 2012 at 6:55 PM, Alex Cohn wrote: > On Apr 11, 2012 10:37 PM, "Wagner Patriota" > wrote: > > > > YES, I got the same conclusion! but how do I convert the frames? > > that's what I still don't understand. I was expecting the filter do it > for me... any idea? :-( > > > > On Wed, Apr 11, 2012 at 4:19 PM, Alex Cohn > wrote: > >> > >> On Apr 11, 2012 9:37 PM, "Wagner Patriota" > wrote: > >> > > >> > ExtraData: > 00000001674D400D96528322FF2FFE080007F0A100000303E90000BB80604000825C000412FFF18E302000412E0002097FF8C70ED09128B00000000168E9093520 > >> > So what is wrong? > >> > > >> > 1. If I don't use the filter, I get this message: > >> > "H.264 bitstream malformed, no startcode found, use the > h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)"" > >> > Because "AV_RB32(pkt->data) != 0x0000001" (in > fact, AV_RB32(pkt->data) = 0x1B13) > >> > >> Could it be that while your extradata is in annex b format, the frames > still need conversion? 0x1B13 looks like a start of a regular packet. > > You can try to convert extradata (SPS/PPS) to Nal format, attach it to the > first frame (before the frame data), and pass the resulting stream through > the annex b filter. > > Or you could prepend each frame with 0x00000001 without the filter. > > Note that you should not give SPS/PPS data to the decode function > separately, but only with the IDR frame data. > > BR, > Alex > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yag at aber.ac.uk Mon Apr 16 16:57:44 2012 From: yag at aber.ac.uk (yag at aber.ac.uk) Date: Mon, 16 Apr 2012 15:57:44 +0100 Subject: [Libav-user] FFMpeg codec not found Message-ID: (I am french, sorry if there are mistakes in my sentences) Hello, I met troubles and I need help. I develop a program in C++ using some libraries like OpenGL and ODE, and I want to export a video from an animation created with OpenGL. To do that I tried to use ffmpeg. After several problems of link of libraries (I have to work with Fedora 16 and I used to develop programs with Visual Studio before, so I am quite a noob with location of libraries etc.), I can compile and execute some code using ffmpeg. To test this library, I used this example (http://drv.nu/ffmpeg/doxygen/api-example_8c-source.html), maybe a newer version but it's almost the same. I get this error when launching with any codec : Video encoding codec not found I did research to solve this problem but I am stuck now. I tried to install, remove and install again the x264 library, to use the codec CODEC_ID_H264, then configure ffmpeg with --enable-libx264 and make+make install it. It just added linking troubles to my program, and when it executed again it displayed the same error "codec not found". I tried to install libraries with gpk-application interface, yum and compile them myself. I followed steps described here : http://maczulu.blogspot.co.uk/2011/11/ffmpeg-install-with-libx264-h264-on.html I think that my program use libraries located in /usr/local/, such as ffmpeg, avcodec and x264. I installed common codecs and I can read a .mp4 video using h264 codec with VLC. If you have any idea how I can find the solution please help me. Thanks Yannis Here is the CMakeLists file I use to link libraries : cmake_minimum_required(VERSION 2.8) SET ( EXECUTABLE pippo ) #This is for heterogenous groups #add_definitions(-D_HETERO_) # UNCOMMENT FOR GRAPHICS add_definitions(-D_GRAPHICS_) FIND_PACKAGE( Qt4 REQUIRED ) SET( QT_USE_QTOPENGL TRUE ) SET( QT_USE_QTXML TRUE ) INCLUDE( ${QT_USE_FILE} ) FILE ( GLOB SOURCES ./*.cpp ./MISC/*.cpp ./CONTROLLERS/*.cpp ./EVOL_ALGORITHM/*.cpp ./TASK_ALLOC/*.cpp ./TASK_ALLOC/RENDERING/*.cpp) FILE ( GLOB HEADERS ./*.h ./MISC/*.h ./CONTROLLERS/*.h ./EVOL_ALGORITHM/*.h ./TASK_ALLOC/*.h ./TASK_ALLOC/RENDERING/*.h ) FILE ( GLOB UIS ./*.ui ./TASK_ALLOC/RENDERING/*.ui) QT4_WRAP_CPP( SOURCES ${HEADERS} ) QT4_WRAP_UI( SOURCES ${UIS} ) FIND_PACKAGE ( GLUT ) FIND_PACKAGE ( OpenGL ) INCLUDE_DIRECTORIES( ${OPENGL_INCLUDE_DIR} ${GLUT_INCLUDE_DIR} /usr/include/ode/ /usr/include/ /usr/local/qwt-6.0.2-svn/include/ ${CMAKE_CURRENT_BINARY_DIR} ./TASK_ALLOC/RENDERING ) # UNCOMMENT FOR GRAPHICS # UNCOMMENT FOR NO GRAPHICS #FILE ( GLOB SOURCES ./*.cpp ./MISC/*.cpp ./CONTROLLERS/*.cpp ./EVOL_ALGORITHM/*.cpp ./TASK_ALLOC/*.cpp ) #FILE ( GLOB HEADERS ./*.h ./MISC/*.h ./CONTROLLERS/*.h ./EVOL_ALGORITHM/*.h ./TASK_ALLOC/*.h ) #INCLUDE_DIRECTORIES( /usr/include/ode/ /usr/include/ ${CMAKE_CURRENT_BINARY_DIR} ) # UNCOMMENT FOR NO GRAPHICS ADD_EXECUTABLE( ${EXECUTABLE} ${SOURCES}) # UNCOMMENT FOR GRAPHICS TARGET_LINK_LIBRARIES( ${EXECUTABLE} QGLViewer ${OPENGL_glu_LIBRARY} ${GLUT_LIBRARIES} -lGL ode avcodec avutil avformat -lz ${QT_LIBRARIES} ) TARGET_LINK_LIBRARIES( ${EXECUTABLE} "-L/sw/lib -lgsl -lgslcblas -lm -L/usr/local/qwt-6.0.2-svn/lib -lqwt" ) # UNCOMMENT FOR GRAPHICS # UNCOMMENT FOR NO GRAPHICS #TARGET_LINK_LIBRARIES( ${EXECUTABLE} ode ) #TARGET_LINK_LIBRARIES( ${EXECUTABLE} "-L/sw/lib -lgsl -lgslcblas -lm" ) # UNCOMMENT FOR NO GRAPHICS From info at denisgottardello.it Tue Apr 17 12:43:16 2012 From: info at denisgottardello.it (Denis) Date: Tue, 17 Apr 2012 12:43:16 +0200 Subject: [Libav-user] General question about stream with ogg container. Message-ID: <201204171243.16137.info@denisgottardello.it> I'm implementing a webcam stream in ogg format with ffmpeg libs on my program. My first question is: According to you, a stream of 320x240 on a static color image, 12 - 15 Kbytes/s is too? Wich is, according to you the correct Kbytes/s? Question number two: I can see the live ogg stream with firefox and other. I see that firefox uses the fps value in order to show the stream but the fps, in some cases is not perfect calculated (my fault). Is there a way to inform firefox that must not use the fps value but show the frames immediatly? -- www.denisgottardello.it Skype: mrdebug Videosurveillance and home automation! http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php From chbrain at btinternet.com Tue Apr 17 14:27:29 2012 From: chbrain at btinternet.com (Charles Brain) Date: Tue, 17 Apr 2012 13:27:29 +0100 Subject: [Libav-user] CODEC_ID_DVAUDIO Message-ID: <4F8D61B1.9030609@btinternet.com> Hello All, I am trying to use FFMPEG to decode the DIF stream from a firewire connected camera. I can decode the video using CODEC_ID_DVVIDEO within my application (a DVB-S transmitter) but When I try to use CODEC_ID_DVAUDIO it says the codec does not exist. I know the Audio blocks in the DV-DIF stream are fairly simple but can someone tell me how to decode the audio. If all else fails I will have to parse the 144000 byte received frame but I was hoping FFMPEG could do it for me. Thanks - Charles From nitinkumgoyal at gmail.com Tue Apr 17 14:45:15 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 17 Apr 2012 18:15:15 +0530 Subject: [Libav-user] How to depacketize the Mp4a-latm content frm the RTP packets? In-Reply-To: References: Message-ID: Any sort of help on this will be highly appreciated. Regards Nitin On Sun, Apr 15, 2012 at 8:49 PM, NITIN GOYAL wrote: > Hi > > How can we extract the raw AAC frames from an mp4a-latm content packetized > in RTP packets? > > I have gone through the RFCs 3016 but nothing is concrete and much clearer. > > I have also seen the code of ffmpeg as how they do it. I have understood > that they are using the config data and parsing it but how they are using > it and what processing they are doing on raw data is not clear. > > Can anybody help out with any algo or code snippet to depacketize the LATM > stuff out of RTP which can be played in mplayer? > > Regards > > Nitin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abulfoni at h-art.it Tue Apr 17 16:19:39 2012 From: abulfoni at h-art.it (Adolfo Bulfoni) Date: Tue, 17 Apr 2012 16:19:39 +0200 Subject: [Libav-user] API usage of the overlay avfilter Message-ID: <4A1812F7-1969-4D73-B728-C171B07BBCEF@h-art.it> Hi, I've started using FFMPEG library for an Android project. I've successfully compiled it for armv7 architecture, also including the avfilter library. My target is to develop a JNI function that uses the overlay filter to overlay two .mp4 videos together. this is the filter: Do you know any API examples of usage of overlay filter or similar filters? In the official samples I've found only two examples, encoding-example.c and muxing-example.c but they don't use filters. Thanks everybody in advance Adolfo From andrey.krieger.utkin at gmail.com Tue Apr 17 16:49:03 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 17 Apr 2012 17:49:03 +0300 Subject: [Libav-user] API usage of the overlay avfilter In-Reply-To: <4A1812F7-1969-4D73-B728-C171B07BBCEF@h-art.it> References: <4A1812F7-1969-4D73-B728-C171B07BBCEF@h-art.it> Message-ID: 2012/4/17 Adolfo Bulfoni : > Do you know any API examples of usage of overlay filter or similar filters? In the official samples I've found only two examples, encoding-example.c and muxing-example.c but they don't use filters. http://git.videolan.org/?p=ffmpeg.git;a=blob;f=doc/examples/filtering_video.c;hb=HEAD Always consult with git upstream. -- Andrey Utkin From alexcohn at netvision.net.il Tue Apr 17 16:58:33 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 17 Apr 2012 17:58:33 +0300 Subject: [Libav-user] API usage of the overlay avfilter In-Reply-To: <4A1812F7-1969-4D73-B728-C171B07BBCEF@h-art.it> References: <4A1812F7-1969-4D73-B728-C171B07BBCEF@h-art.it> Message-ID: On Tue, Apr 17, 2012 at 17:19, Adolfo Bulfoni wrote: > Hi, > > I've started using FFMPEG library for an Android project. > I've successfully compiled it for armv7 architecture, also including the avfilter library. > My target is to develop ?a JNI function that uses the overlay filter to overlay two .mp4 videos together. > this is the filter: > > Do you know any API examples of usage of overlay filter or similar filters? In the official samples I've found only two examples, encoding-example.c and muxing-example.c but they don't use filters. > > Thanks everybody in advance > > Adolfo I would consider using OpenGL for overlaying the videos, using semi-transparent textures. I believe that OpenGL gives you a lot of effects without using too much CPU. Also, Android has built-in stagefright library to decode mp4 videos which may use hardware codec if available (typically, for h264). This also saves CPU consumption and extends battery life. BR, Alex Cohn From nrson at win4net.com Wed Apr 18 04:12:41 2012 From: nrson at win4net.com (=?ks_c_5601-1987?B?vNWzsrfK?=) Date: Wed, 18 Apr 2012 11:12:41 +0900 Subject: [Libav-user] avcodec_decode_video2() return vaue is 1, not -1 or 0 Message-ID: <000d01cd1d08$bd08b220$371a1660$@win4net.com> Hi All! I am new ffmpeg user and english. Recently I decodes H.264 stream from IP camera using FFMpeg which the latest ver 54(libavcodec) and binary file(dll) on Window. Whenever I decoded sample file which is avcodec_sample.cpp using avcodec_decode_video2( ), I always received the return value -1. I referenced your comment(http://www.mail-archive.com/libav- user at mplayerhq.hu/msg04939.html), but my return value is 1 and gop_picture is 0. I don?t know How do I solve the problem? Are you help me? Best regards, Nam PS: I can decode previous version(52) using avcodec_decode_video( ), but can?t decode H.264 stream using avcodec_decode_video2( ). I thought that av_packet_init() is necessary to initialize to decode as follows: int64_t tmp = 0x8000000000000000; //AV_NOPTS_VALUE avpkt.pts = tmp; avpkt.dts = tmp; avpkt.pos = -1; avpkt.duration = 0; avpkt.stream_index = 0; avpkt.destruct = NULL; avpkt.priv = NULL; avpkt.side_data = NULL; avpkt.side_data_elems = 0; avpkt.convergence_duration = 0; avpkt.flags = AV_PKT_FLAG_KEY; avpkt.data = NULL; avpkt.size = 0; After seeing the h264.c source, there is not use the avpkt structure except avpkt.data and avpkt.size. Another problem is happen to me?.Help Help?!!!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nrson at win4net.com Wed Apr 18 03:49:59 2012 From: nrson at win4net.com (=?ks_c_5601-1987?B?vNWzsrfK?=) Date: Wed, 18 Apr 2012 10:49:59 +0900 Subject: [Libav-user] ERROR: avcodec_decode_video2() return 1 Message-ID: <000001cd1d05$911e3390$b35a9ab0$@win4net.com> Hi All! I am new ffmpeg user and english. Recently I decodes H.264 stream from IP camera using FFMpeg which the latest ver 54(libavcodec) and binary file(dll) on Window. Whenever I decoded sample file which is avcodec_sample.cpp using avcodec_decode_video2( ), I always received the return value -1. I referenced your comment(http://www.mail-archive.com/libav- user at mplayerhq.hu/msg04939.html), but my return value is 1 and gop_picture is 0. I don?t know How do I solve the problem? Are you help me? Best regards, Nam PS: I can decode previous version(52) using avcodec_decode_video( ), but can?t decode H.264 stream using avcodec_decode_video2( ). I thought that av_packet_init() is necessary to initialize to decode as follows: int64_t tmp = 0x8000000000000000; //AV_NOPTS_VALUE avpkt.pts = tmp; avpkt.dts = tmp; avpkt.pos = -1; avpkt.duration = 0; avpkt.stream_index = 0; avpkt.destruct = NULL; avpkt.priv = NULL; avpkt.side_data = NULL; avpkt.side_data_elems = 0; avpkt.convergence_duration = 0; avpkt.flags = AV_PKT_FLAG_KEY; avpkt.data = NULL; avpkt.size = 0; After seeing the h264.c source, there is not use the avpkt structure except avpkt.data and avpkt.size. Another problem is happen to me?.Help Help?!!!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggarra13 at gmail.com Wed Apr 18 16:10:58 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Wed, 18 Apr 2012 11:10:58 -0300 Subject: [Libav-user] DVD playback (VOBs) Message-ID: <4F8ECB72.4070108@gmail.com> I am using ffmpeg in an application and some DVDs refuse to play back their VOBs. This happens only with some DVDs and those that happen play perfectly in Windows with Media Player. I also tried with VLC and Dragon Player and both also fail in the playback. Is there anything I can try or do to play these files on linux? From andrey.krieger.utkin at gmail.com Wed Apr 18 16:38:43 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 18 Apr 2012 17:38:43 +0300 Subject: [Libav-user] DVD playback (VOBs) In-Reply-To: <4F8ECB72.4070108@gmail.com> References: <4F8ECB72.4070108@gmail.com> Message-ID: 2012/4/18 Gonzalo Garramuno : > I am using ffmpeg in an application and some DVDs refuse to play back their > VOBs. ?This happens only with some DVDs and those that happen play perfectly > in Windows with Media Player. > I also tried with VLC and Dragon Player and both also fail in the playback. > Is there anything I can try or do to play these files on linux? Post your command line, with option "-loglevel debug" for verbosity, and full console output. -- Andrey Utkin From genesys at gmx.ch Thu Apr 19 14:25:23 2012 From: genesys at gmx.ch (=?iso-8859-1?Q?=22Matthias_B=FChlmann=22?=) Date: Thu, 19 Apr 2012 14:25:23 +0200 Subject: [Libav-user] global headers problem when encoding/decoding h264 Message-ID: <20120419122523.176660@gmx.net> I'm developing an application with ffmpeg that should do the following: -encode h264 video with 0-frame delay (i.e. output packet already after first frame was encoded) -write video to an MP4 file -simultaneously decode every frame after it was encoded and display it on screen setting up the encoder for 0-frame delay encoding works. What I do then is: after each avcodec_encode_video2() I create a copy of the packet. one packet I feed into av_interleaved_write_frame(m_fctx, &pkt); to write the MP4 file. The copy of the packet i feed into avcodec_decode_video2(m_cctx, m_frame, &got_picture, &pkt); which uses a separate codecContext. Now the problem is that, if i set CODEC_FLAG_GLOBAL_HEADER in the encoder flags, then the resulting MP4 file will be perfectly readable (I can open it in quicktime) but calling avcodec_decode_video2() with the packet fails already on the first packet with the error: [h264 @ 000000000270F760] non-existing PPS 0 referenced [h264 @ 000000000270F760] decode_slice_header error [h264 @ 000000000270F760] no frame! if I however disable the CODEC_FLAG_GLOBAL_HEADER flag in the encoder, then avcodec_encode_video2() will decode the packet fine, but the resulting MP4 file will not be valid (quicktime opens it, but shows only black). The issue seems to be in X264_init() in libx264.h where the function sets if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) x4->params.b_repeat_headers = 0; and I found no way to set b_repeat_headers=1 directly (is there any?). I'm developing in MSVC++ and use precompiled libraries and thus would like to avoid having to alter the FFMPEG code. Is there any other way how I can either get the global headers into my decoder, so that it can decode the packets on the fly without the need of headers in every packet, or to tell the encoder to add the headers to each frame AND to use global headers? Thanks! -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a From andrey.krieger.utkin at gmail.com Thu Apr 19 15:15:00 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 19 Apr 2012 16:15:00 +0300 Subject: [Libav-user] global headers problem when encoding/decoding h264 In-Reply-To: <20120419122523.176660@gmx.net> References: <20120419122523.176660@gmx.net> Message-ID: 2012/4/19 "Matthias B?hlmann" : > I'm developing in MSVC++ and use precompiled libraries and thus would like to avoid having to alter the FFMPEG code. Is there any other way how I can either get the global headers into my decoder, so that it can decode the packets on the fly without the need of headers in every packet, or to tell the encoder to add the headers to each frame AND to use global headers? Hard to say without your code. How do you init the decoding contexts? BTW, consider publishing here simplified working source code of your app, especially good if it compiles with gcc and run on linux, coz majority of developers here use it. If i had to do such a thing, i'd go with somewhat overheady, but surely working way: Initiate _two_ output stream contexts, one for desired output destination, and second for testing. Also open one input stream context, for reading the test output. Let test stream be bound to localhost tcp socket, for example. When you have the AVPacket, go muxing it into both outputs. Then, read the test stream, and display the resulting picture after decode. -- Andrey Utkin From ggarra13 at gmail.com Thu Apr 19 15:57:18 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Thu, 19 Apr 2012 10:57:18 -0300 Subject: [Libav-user] DVD playback (VOBs) In-Reply-To: References: <4F8ECB72.4070108@gmail.com> Message-ID: <4F9019BE.1030101@gmail.com> On 18/04/12 11:38, Andrey Utkin wrote: > 2012/4/18 Gonzalo Garramuno: >> I am using ffmpeg in an application and some DVDs refuse to play back their >> VOBs. This happens only with some DVDs and those that happen play perfectly >> in Windows with Media Player. >> I also tried with VLC and Dragon Player and both also fail in the playback. >> Is there anything I can try or do to play these files on linux? > Post your command line, with option "-loglevel debug" for verbosity, > and full console output. > > Here it is: # gga at gga-laptop1 ~ # jue abr 19 10:52 [13] $ ffmpeg -loglevel debug -i /media/CLASH_OF_THE_TITANS_2010/VIDEO_TS/VTS_01_3.VOB /tmp/crap.avi ffmpeg version 0.9.1, Copyright (c) 2000-2012 the FFmpeg developers built on Jan 10 2012 19:32:09 with gcc 4.6.1 configuration: --enable-shared libavutil 51. 32. 0 / 51. 32. 0 libavcodec 53. 42. 4 / 53. 42. 4 libavformat 53. 24. 2 / 53. 24. 2 libavdevice 53. 4. 0 / 53. 4. 0 libavfilter 2. 53. 0 / 2. 53. 0 libswscale 2. 1. 0 / 2. 1. 0 [mpeg @ 0x14e37a0] Format mpeg probed with size=8192 and score=52 [mpeg @ 0x14e37a0] probing stream 0 pp:2500 [mpeg @ 0x14e37a0] Probe with size=2025, packets=1 detected mp3 with score=1 [mpeg @ 0x14e37a0] probing stream 0 pp:2499 [mpeg @ 0x14e37a0] probing stream 0 pp:2498 [mpeg @ 0x14e37a0] probing stream 0 pp:2497 [mpeg @ 0x14e37a0] probing stream 0 pp:2496 [mpeg @ 0x14e37a0] probing stream 0 pp:2495 [mpeg @ 0x14e37a0] probing stream 0 pp:2494 [mpeg @ 0x14e37a0] probing stream 0 pp:2493 [mpeg @ 0x14e37a0] probing stream 0 pp:2492 [mpeg @ 0x14e37a0] probing stream 0 pp:2491 [mpeg @ 0x14e37a0] probing stream 0 pp:2490 [mpeg @ 0x14e37a0] probing stream 0 pp:2489 [mpeg @ 0x14e37a0] probing stream 0 pp:2488 [mpeg @ 0x14e37a0] probing stream 0 pp:2487 [mpeg @ 0x14e37a0] probing stream 0 pp:2486 [mpeg @ 0x14e37a0] probing stream 0 pp:2485 [mpeg @ 0x14e37a0] probing stream 0 pp:2484 [mpeg @ 0x14e37a0] probing stream 0 pp:2483 [mpeg @ 0x14e37a0] probing stream 0 pp:2482 [mpeg @ 0x14e37a0] probing stream 0 pp:2481 [mpeg @ 0x14e37a0] probing stream 0 pp:2480 [mpeg @ 0x14e37a0] probing stream 0 pp:2479 [mpeg @ 0x14e37a0] probing stream 0 pp:2478 [mpeg @ 0x14e37a0] probing stream 0 pp:2477 [mpeg @ 0x14e37a0] probing stream 0 pp:2476 [mpeg @ 0x14e37a0] probing stream 0 pp:2475 [mpeg @ 0x14e37a0] probing stream 0 pp:2474 [mpeg @ 0x14e37a0] probing stream 0 pp:2473 [mp1 @ 0x14e9ce0] err{or,}_recognition separate: 1; 1 [mp1 @ 0x14e9ce0] err{or,}_recognition combined: 1; 65537 [mp1 @ 0x14e9ce0] Header missing Last message repeated 4 times [ac3 @ 0x14f49e0] err{or,}_recognition separate: 1; 1 [ac3 @ 0x14f49e0] err{or,}_recognition combined: 1; 65537 [ac3 @ 0x14f49e0] Unsupported bit depth: 0 [ac3 @ 0x1502f80] err{or,}_recognition separate: 1; 1 [ac3 @ 0x1502f80] err{or,}_recognition combined: 1; 65537 [ac3 @ 0x1502f80] Unsupported bit depth: 0 [ac3 @ 0x15099c0] err{or,}_recognition separate: 1; 1 [ac3 @ 0x15099c0] err{or,}_recognition combined: 1; 65537 [ac3 @ 0x15099c0] Unsupported bit depth: 0 [mp1 @ 0x14e9ce0] Header missing Last message repeated 23 times [mpeg @ 0x14e37a0] Could not find codec parameters (Audio: mp1, 0 channels, s16) [NULL @ 0x14e9ce0] start time is not set in estimate_timings_from_pts Input #0, mpeg, from '/media/CLASH_OF_THE_TITANS_2010/VIDEO_TS/VTS_01_3.VOB': Duration: 00:06:19.52, start: 2738.283878, bitrate: 6389 kb/s Stream #0:0[0x1e0], 29, 1/90000: Audio: mp1, 0 channels, s16 Stream #0:1[0x82], 3, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s Stream #0:2[0x81], 3, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s Stream #0:3[0x80], 3, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s File '/tmp/crap.avi' already exists. Overwrite ? [y/N] y Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt' [ac3 @ 0x14ea1e0] err{or,}_recognition separate: 1; 1 [ac3 @ 0x14ea1e0] err{or,}_recognition combined: 1; 65537 [ac3 @ 0x14ea1e0] Unsupported bit depth: 0 [ac3 @ 0x14f49e0] err{or,}_recognition separate: 1; 65537 [ac3 @ 0x14f49e0] err{or,}_recognition combined: 1; 65537 [ac3 @ 0x14f49e0] Unsupported bit depth: 0 Output #0, avi, to '/tmp/crap.avi': Metadata: ISFT : Lavf53.24.2 Stream #0:0, 0, 4/125: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), flt, 128 kb/s Stream mapping: Stream #0:1 -> #0:0 (ac3 -> ac3) Press [q] to stop, [?] for help [ac3 @ 0x14f49e0] frame sync error Error while decoding stream #0:1 [ac3 @ 0x14f49e0] incomplete frame size= 7kB time=00:00:00.06 bitrate= 844.0kbits/s video:0kB audio:1kB global headers:0kB muxing overhead 559.375000% From cehoyos at ag.or.at Thu Apr 19 16:01:46 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 19 Apr 2012 14:01:46 +0000 (UTC) Subject: [Libav-user] DVD playback (VOBs) References: <4F8ECB72.4070108@gmail.com> <4F9019BE.1030101@gmail.com> Message-ID: Gonzalo Garramuno writes: > Input #0, mpeg, from > '/media/CLASH_OF_THE_TITANS_2010/VIDEO_TS/VTS_01_3.VOB': > Duration: 00:06:19.52, start: 2738.283878, bitrate: 6389 kb/s > Stream #0:0[0x1e0], 29, 1/90000: Audio: mp1, 0 channels, s16 If this is an unencrypted file, please provide a sample. Carl Eugen From ggarra13 at gmail.com Thu Apr 19 16:25:43 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Thu, 19 Apr 2012 11:25:43 -0300 Subject: [Libav-user] DVD playback (VOBs) In-Reply-To: References: <4F8ECB72.4070108@gmail.com> <4F9019BE.1030101@gmail.com> Message-ID: <4F902067.1080405@gmail.com> On 19/04/12 11:01, Carl Eugen Hoyos wrote: > If this is an unencrypted file, please provide a sample. > > Carl Eugen How can I tell if it is unencrypted and unencrypt it? My guess is that the DVD copy protection is causing the trouble. From cehoyos at ag.or.at Thu Apr 19 16:54:15 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 19 Apr 2012 14:54:15 +0000 (UTC) Subject: [Libav-user] DVD playback (VOBs) References: <4F8ECB72.4070108@gmail.com> <4F9019BE.1030101@gmail.com> <4F902067.1080405@gmail.com> Message-ID: Gonzalo Garramuno writes: > On 19/04/12 11:01, Carl Eugen Hoyos wrote: > > If this is an unencrypted file, please provide a sample. > > > > Carl Eugen > > How can I tell if it is unencrypted and unencrypt it? Is audio decoding possible? If the DVD is encrypted, FFmpeg is not the right tool (currently, a patch is being reviewed), mplayer -dumpstream outputs the unencrypted DVD. Carl Eugen From krishnaks at iwavesystems.com Fri Apr 20 04:03:20 2012 From: krishnaks at iwavesystems.com (Krishna) Date: Thu, 19 Apr 2012 19:03:20 -0700 Subject: [Libav-user] Getting "No frame: error Message-ID: <00c801cd1e99$c28e7d00$2a02a8c0@iwdtp219> Hello! I have linked ffmpeg & live555 library to my IOS application. I am receiving the h264 encoded frame and sending the frame to dcoder. But Decoder throws the error: [h264 @ 0x8a4ac00] no frame! What may be the issue? Regards, KP -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Thu Apr 19 21:05:47 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 19 Apr 2012 22:05:47 +0300 Subject: [Libav-user] Getting "No frame: error In-Reply-To: <00c801cd1e99$c28e7d00$2a02a8c0@iwdtp219> References: <00c801cd1e99$c28e7d00$2a02a8c0@iwdtp219> Message-ID: 2012/4/20 Krishna : > Hello! > > ?I have linked ffmpeg & live555 library to my IOS application. > ?I am receiving the h264 encoded frame and sending the frame to dcoder. > ?But Decoder throws the error: > > ?[h264 @ 0x8a4ac00] no frame! Check your input video with ffmpeg util on PC, and also with other players. -- Andrey Utkin From manya1180 at ymail.com Thu Apr 19 22:10:33 2012 From: manya1180 at ymail.com (Manya Chauhan) Date: Fri, 20 Apr 2012 04:10:33 +0800 (SGT) Subject: [Libav-user] avcodec_encode_video returns 0 or -ve value Message-ID: <1334866233.29666.YahooMailNeo@web193001.mail.sg3.yahoo.com> Hello Everyone,? I ?want to encode series of uiimages which are being captured live by the camera. While encoding the images avcodec_encode_video is returning 0 or -ve value. I am not getting what is the problem. I might be missing setting some parameters of avcodec context or avframe. I want to know which parameters should we set before using avcodec_encode_video. Please help me..Any help is appreciated.........? -------------- next part -------------- An HTML attachment was scrubbed... URL: From krishnaks at iwavesystems.com Fri Apr 20 19:07:21 2012 From: krishnaks at iwavesystems.com (Krishna) Date: Fri, 20 Apr 2012 10:07:21 -0700 Subject: [Libav-user] Getting "No frame: error References: <00c801cd1e99$c28e7d00$2a02a8c0@iwdtp219> Message-ID: <00af01cd1f18$0cce1140$2a02a8c0@iwdtp219> Hi VLC player able to play the input video. I will check with ffmpeg util on PC. ----- Original Message ----- From: "Andrey Utkin" To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter." Sent: Thursday, April 19, 2012 12:05 PM Subject: Re: [Libav-user] Getting "No frame: error 2012/4/20 Krishna : > Hello! > > I have linked ffmpeg & live555 library to my IOS application. > I am receiving the h264 encoded frame and sending the frame to dcoder. > But Decoder throws the error: > > [h264 @ 0x8a4ac00] no frame! Check your input video with ffmpeg util on PC, and also with other players. -- Andrey Utkin _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user From hungtrodt5 at gmail.com Fri Apr 20 12:49:05 2012 From: hungtrodt5 at gmail.com (=?UTF-8?B?Vmnhu4d0IEjDuW5nIE5ndXnhu4Vu?=) Date: Fri, 20 Apr 2012 17:49:05 +0700 Subject: [Libav-user] avcodec_encode_video returns 0 or -ve value In-Reply-To: <1334866233.29666.YahooMailNeo@web193001.mail.sg3.yahoo.com> References: <1334866233.29666.YahooMailNeo@web193001.mail.sg3.yahoo.com> Message-ID: Post your code of setting encoder and encoding loop, so every one can know how it is missing On Apr 20, 2012 3:10 AM, "Manya Chauhan" wrote: > Hello Everyone, > > I want to encode series of uiimages which are being captured live by the > camera. > While encoding the images avcodec_encode_video is returning 0 or -ve > value. I am not getting what is the problem. I might be missing setting > some parameters of avcodec context or avframe. > > I want to know which parameters should we set before using > avcodec_encode_video. > > Please help me..Any help is appreciated......... > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludwig at lyth.de Fri Apr 20 13:27:07 2012 From: ludwig at lyth.de (Sebastian Ludwig) Date: Fri, 20 Apr 2012 13:27:07 +0200 Subject: [Libav-user] How to add/edit id3 tags and atach images to it Message-ID: <4F91480B.5070205@lyth.de> Hi, how can I edit the id3 tag of a mp3 file when I am using libav*. I have to atach a small image file to the id3 tag that can be displayed in some media applications. I couln't find any help in the documentation and the only interesting header file I've found was id3v_2.h but I don't know how to use it. From manya1180 at ymail.com Fri Apr 20 22:02:16 2012 From: manya1180 at ymail.com (Manya Chauhan) Date: Sat, 21 Apr 2012 04:02:16 +0800 (SGT) Subject: [Libav-user] getting very bad image after encoding Message-ID: <1334952136.35349.YahooMailNeo@web193003.mail.sg3.yahoo.com> I am encoding images using avcodec_encode_video method and displaying them on subscriber demo of the Red5 media server. The problem i am facing is that all the images which are being displayed are totally distorted and nothing is clearly visible. I think something might be wrong with the pix_fmt set in avcodec context. Moreover image size is also quite large as 64000 bytes after encoding which I think is little weird Please give me solution of this problem. Any help is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From manya1180 at ymail.com Fri Apr 20 22:02:16 2012 From: manya1180 at ymail.com (Manya Chauhan) Date: Sat, 21 Apr 2012 04:02:16 +0800 (SGT) Subject: [Libav-user] getting very bad image after encoding Message-ID: <1334952136.35349.YahooMailNeo@web193003.mail.sg3.yahoo.com> I am encoding images using avcodec_encode_video method and displaying them on subscriber demo of the Red5 media server. The problem i am facing is that all the images which are being displayed are totally distorted and nothing is clearly visible. I think something might be wrong with the pix_fmt set in avcodec context. Moreover image size is also quite large as 64000 bytes after encoding which I think is little weird Please give me solution of this problem. Any help is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric at telexis.com Fri Apr 20 22:17:38 2012 From: eric at telexis.com (eric at telexis.com) Date: Fri, 20 Apr 2012 13:17:38 -0700 Subject: [Libav-user] Create AVFrame from memory bitmap (ID:4A3787A70092F6C4) Message-ID: <201204202355.QAA18938@psemail.com> I'm new here. I have a 256-color Windows Bitmap in memory from a screen capture and I need to create an AVFrame from it so I can pass it to avcodec_encode_video. How should I go about doing this? Since I'm brand new to this library, even just a list of functions I'll need would be great. I have some sample code working that does almost what I want, but it only works with JPG files and uses avformat_open_input which takes a file name (or URL as I understand). From ggarra13 at gmail.com Sat Apr 21 16:04:47 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Sat, 21 Apr 2012 11:04:47 -0300 Subject: [Libav-user] DVD playback (VOBs) In-Reply-To: References: <4F8ECB72.4070108@gmail.com> <4F9019BE.1030101@gmail.com> <4F902067.1080405@gmail.com> Message-ID: <4F92BE7F.9030202@gmail.com> On 19/04/12 11:54, Carl Eugen Hoyos wrote: > Is audio decoding possible? If the DVD is encrypted, FFmpeg is not the > right tool (currently, a patch is being reviewed), mplayer -dumpstream > outputs the unencrypted DVD. Audio decoding is not possible. mplayer -dumpstream dumps a video file that is gray only. From genesys at gmx.ch Sat Apr 21 22:01:22 2012 From: genesys at gmx.ch (=?iso-8859-1?Q?=22Matthias_B=FChlmann=22?=) Date: Sat, 21 Apr 2012 22:01:22 +0200 Subject: [Libav-user] lossless encoding with FFMPEG Message-ID: <20120421200122.5030@gmx.net> I heard that h264 has a lossless encoding mode. Is this true? if so, how can I set this using FFMPEG? if that's not possible, what's my best option to get lossless video encoding with FFMPEG? (performance is not an issue, just compression ratio) -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a From cehoyos at ag.or.at Sat Apr 21 22:37:49 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sat, 21 Apr 2012 20:37:49 +0000 (UTC) Subject: [Libav-user] lossless encoding with FFMPEG References: <20120421200122.5030@gmx.net> Message-ID: Matthias B?hlmann writes: > I heard that h264 has a lossless encoding mode. Is this true? Yes. [...] > what's my best option to get lossless video encoding with FFMPEG? ffv1 should perform best compared with other internal encoders. Carl Eugen From alexcohn at netvision.net.il Sun Apr 22 11:36:22 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Sun, 22 Apr 2012 12:36:22 +0300 Subject: [Libav-user] global headers problem when encoding/decoding h264 In-Reply-To: <20120419122523.176660@gmx.net> References: <20120419122523.176660@gmx.net> Message-ID: On Thu, Apr 19, 2012 at 15:25, "Matthias B?hlmann" wrote: > I'm developing an application with ffmpeg that should do the following: > > -encode h264 video with 0-frame delay (i.e. output packet already after first frame was encoded) > -write video to an MP4 file > -simultaneously decode every frame after it was encoded and display it on screen > > setting up the encoder for 0-frame delay encoding works. What I do then is: > > after each avcodec_encode_video2() I create a copy of the packet. one packet I feed into > av_interleaved_write_frame(m_fctx, &pkt); > to write the MP4 file. > > The copy of the packet i feed into > avcodec_decode_video2(m_cctx, m_frame, &got_picture, &pkt); > which uses a separate codecContext. > > Now the problem is that, if i set CODEC_FLAG_GLOBAL_HEADER in the encoder flags, then the resulting MP4 file will be perfectly readable (I can open it in quicktime) but calling avcodec_decode_video2() with the packet fails already on the first packet with the error: > > [h264 @ 000000000270F760] non-existing PPS 0 referenced > [h264 @ 000000000270F760] decode_slice_header error > [h264 @ 000000000270F760] no frame! h264 decoder needs SPS/PPS data to start the process. You can find these "NAL units" in the encoder context extradata, and send them along with the first video packet to avcodec_decode_video2(). > if I however disable the CODEC_FLAG_GLOBAL_HEADER flag in the encoder, then avcodec_encode_video2() will decode the packet fine, but the resulting MP4 file will not be valid (quicktime opens it, but shows only black). I suggest you to use this case as a yardstick to prepare the SPS/PPS data exactly in format that avcodec_decode_video2() expects. > The issue seems to be in X264_init() in libx264.h where the function sets > > if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) > ? ?x4->params.b_repeat_headers = 0; > > and I found no way to set b_repeat_headers=1 directly (is there any?). As you noticed, you can make the packets compatible with mp4 container or with "streaming" context, but not both. > I'm developing in MSVC++ and use precompiled libraries and thus would like to avoid having to alter the FFMPEG code. Is there any other way how I can either get the global headers into my decoder, so that it can decode the packets on the fly without the need of headers in every packet, or to tell the encoder to add the headers to each frame AND to use global headers? The decoder needs SPS/PPS "headers" only for the first packet. > Thanks! > -- > NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! > Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a Good luck, Alex Cohn From pehache.7 at gmail.com Sun Apr 22 13:00:35 2012 From: pehache.7 at gmail.com (pehache) Date: Sun, 22 Apr 2012 13:00:35 +0200 Subject: [Libav-user] How to encode several audio tracks into one file ? Message-ID: Hi, I'm trying to convert a .mp4 file which contains 2 audio tracks to a .mkv file, keeping the 2 tracks. I thought that using -map would be enough, but clearly it isn't : ================================================================= *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -vcodec copy -acodec copy -map 0.0 -map 0.1 -map 0.2 toto.mkv ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers built on Mar 17 2012 12:11:52 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3) configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102052000] max_analyze_duration 5000000 reached at 5013333 Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isomavc1 creation_time : 2012-04-07 09:59:01 encoder : HandBrake 0.9.6 2012022800 Duration: 01:52:41.32, start: 0.000000, bitrate: 1274 kb/s ... Stream #0.0(und): Video: h264 (High), yuv420p, 704x384, 999 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.2(deu): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.3(fra): Subtitle: dvdsub, 4 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.4(und): Subtitle: text / 0x74786574 Metadata: creation_time : 2012-04-07 09:59:01 File 'toto.mkv' already exists. Overwrite ? [y/N] y Output #0, matroska, to 'toto.mkv': Stream #0.0: Video: [0][0][0][0] / 0x0000, q=2-31, 64 kb/s, 90k tbn Stream #0.1: Audio: [0][0][0][0] / 0x0000, 0 channels, 64 kb/s Stream #0.2: Subtitle: [0][0][0][0] / 0x0000, 64 kb/s Codec type mismatch for mapping #0.2 -> #0.2 ================================================================= It seems it expects a subtitle track for the #0.2 output stream. I didn't see how to change that. I tried to use the "-newaudio" parameter but without any success. My problem is also that my version of ffmpeg seems a bit outdated compared to the online doc. Thanks for any help. From pehache.7 at gmail.com Sun Apr 22 14:16:45 2012 From: pehache.7 at gmail.com (pehache) Date: Sun, 22 Apr 2012 14:16:45 +0200 Subject: [Libav-user] How to encode several audio tracks into one file ? In-Reply-To: References: Message-ID: Le 22/04/12 13:00, pehache a ?crit : > Hi, > > I'm trying to convert a .mp4 file which contains 2 audio tracks to a > .mkv file, keeping the 2 tracks. I thought that using -map would be > enough, but clearly it isn't : > > ================================================================= > *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -vcodec copy -acodec > copy -map 0.0 -map 0.1 -map 0.2 toto.mkv > ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers > built on Mar 17 2012 12:11:52 with gcc 4.2.1 (Apple Inc. build 5666) > (dot 3) > configuration: --prefix=/opt/local --enable-gpl --enable-postproc > --enable-swscale --enable-avfilter --enable-libmp3lame > --enable-libvorbis --enable-libtheora --enable-libdirac > --enable-libschroedinger --enable-libopenjpeg --enable-libxvid > --enable-libx264 --enable-libvpx --enable-libspeex > --mandir=/opt/local/share/man --enable-shared --enable-pthreads > --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm > libavutil 50. 43. 0 / 50. 43. 0 > libavcodec 52.123. 0 / 52.123. 0 > libavformat 52.111. 0 / 52.111. 0 > libavdevice 52. 5. 0 / 52. 5. 0 > libavfilter 1. 80. 0 / 1. 80. 0 > libswscale 0. 14. 1 / 0. 14. 1 > libpostproc 51. 2. 0 / 51. 2. 0 > [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102052000] max_analyze_duration 5000000 > reached at 5013333 > > Seems stream 0 codec frame rate differs from container frame rate: > 180000.00 (180000/1) -> 25.00 (25/1) > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from > 'Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4': > Metadata: > major_brand : mp42 > minor_version : 0 > compatible_brands: mp42isomavc1 > creation_time : 2012-04-07 09:59:01 > encoder : HandBrake 0.9.6 2012022800 > Duration: 01:52:41.32, start: 0.000000, bitrate: 1274 kb/s > ... > Stream #0.0(und): Video: h264 (High), yuv420p, 704x384, 999 kb/s, 25 > fps, 25 tbr, 90k tbn, 180k tbc > Metadata: > creation_time : 2012-04-07 09:59:01 > Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s > Metadata: > creation_time : 2012-04-07 09:59:01 > Stream #0.2(deu): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s > Metadata: > creation_time : 2012-04-07 09:59:01 > Stream #0.3(fra): Subtitle: dvdsub, 4 kb/s > Metadata: > creation_time : 2012-04-07 09:59:01 > Stream #0.4(und): Subtitle: text / 0x74786574 > Metadata: > creation_time : 2012-04-07 09:59:01 > File 'toto.mkv' already exists. Overwrite ? [y/N] y > Output #0, matroska, to 'toto.mkv': > Stream #0.0: Video: [0][0][0][0] / 0x0000, q=2-31, 64 kb/s, 90k tbn > Stream #0.1: Audio: [0][0][0][0] / 0x0000, 0 channels, 64 kb/s > Stream #0.2: Subtitle: [0][0][0][0] / 0x0000, 64 kb/s > Codec type mismatch for mapping #0.2 -> #0.2 > ================================================================= > > It seems it expects a subtitle track for the #0.2 output stream. I > didn't see how to change that. I tried to use the "-newaudio" parameter > but without any success. > > My problem is also that my version of ffmpeg seems a bit outdated > compared to the online doc. > > Thanks for any help. Oops, I got it... I had to disable the subtitle track with -sn , else ffmpeg expects a subtitle track for the #0.2 output stream, regardless what the -map says I had also to put -newaudio at the end the command line (why ?). Hence the right command is : *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -vcodec copy -acodec > copy -sn -map 0.0 -map 0.1 -map 0.2 toto.mkv -newaudio From pehache.7 at gmail.com Sun Apr 22 16:22:03 2012 From: pehache.7 at gmail.com (pehache) Date: Sun, 22 Apr 2012 16:22:03 +0200 Subject: [Libav-user] Muxing a .srt file into a .mp4 file ? Message-ID: Hi, Now that my multiple audio tracks issue is fixed, I face another one : I have one the one hand a video in a mp4 file, and on the other hand subtitles in a .srt file, and I want to mux them into a single file (either .mp4 or .mkv) The MPEG-4 standard says that the subtitle format retained for .mp4 files is the "mpeg-4 timed text" : it looks very similar to the SRT format, but is it really the same ? http://en.wikipedia.org/wiki/MPEG-4_Part_17 Here is what happens if I try to mux into a mp4 file, simply copying the subtitles (seems that it can not interpret the .srt file ?) =================================================================== *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -scodec copy -map 0.0 -map 0.1 -map 1.0 -y toto.mp4 ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers built on Mar 17 2012 12:11:52 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3) configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102052000] max_analyze_duration 5000000 reached at 5013333 Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isomavc1 creation_time : 2012-04-07 09:59:01 encoder : HandBrake 0.9.6 2012022800 Duration: 01:52:41.32, start: 0.000000, bitrate: 1274 kb/s ... Stream #0.0(und): Video: h264 (High), yuv420p, 704x384, 999 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.2(deu): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.3(fra): Subtitle: dvdsub, 4 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.4(und): Subtitle: text / 0x74786574 Metadata: creation_time : 2012-04-07 09:59:01 [srt @ 0x102053200] Estimating duration from bitrate, this may be inaccurate Input #1, srt, from 'Good_Bye_Lenin.de.srt': Duration: N/A, start: 39.783000, bitrate: N/A Stream #1.0: Subtitle: srt [mp4 @ 0x102056e00] track 2: could not find tag, codec not currently supported in container Output #0, mp4, to 'toto.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isomavc1 creation_time : 2012-04-07 09:59:01 encoder : Lavf52.111.0 ... Stream #0.0(und): Video: libx264, yuv420p, 704x384, q=2-31, 999 kb/s, 90k tbn, 90k tbc Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.2: Subtitle: srt Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Stream #1.0 -> #0.2 Could not write header for output file #0 (incorrect codec parameters ?) =================================================================== Now without telling anything about the subtitle codec (don't understand the error): =================================================================== *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -map 0.0 -map 0.1 -map 1.0 -y toto.mp4 [SNIP] [srt @ 0x102053200] Estimating duration from bitrate, this may be inaccurate Input #1, srt, from 'Good_Bye_Lenin.de.srt': Duration: N/A, start: 39.783000, bitrate: N/A Stream #1.0: Subtitle: srt Number of stream maps must match number of output streams =================================================================== Note that with a .mkv output file, this latter command fails as well with a different error message : =================================================================== *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -map 0.0 -map 0.1 -map 1.0 -y toto.mkv [SNIP] Output #0, matroska, to 'toto.mkv': Stream #0.0(und): Video: libx264, yuv420p, 704x384, q=2-31, 999 kb/s, 90k tbn, 90k tbc Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.2: Subtitle: [0][0][0][0] / 0x0000, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Stream #1.0 -> #0.2 Encoder (codec id 94210) not found for output stream #0.2 =================================================================== And finally, the only command which succeeds is with the output .mkv file, and specifying -scodec copy: =================================================================== *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -map 0.0 -map 0.1 -map 1.0 -y toto.mkv =================================================================== So.... is there a way to include SRT subtitles into MP4 files ? Or is the MKV format the only way to go ? Thanks, From cehoyos at ag.or.at Sun Apr 22 18:24:36 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 22 Apr 2012 16:24:36 +0000 (UTC) Subject: [Libav-user] How to encode several audio tracks into one file ? References: Message-ID: pehache writes: > ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers This is too old, especially if you are not using the libraries, but the transcoding application. Carl Eugen From pehache.7 at gmail.com Sun Apr 22 19:40:40 2012 From: pehache.7 at gmail.com (pehache) Date: Sun, 22 Apr 2012 19:40:40 +0200 Subject: [Libav-user] How to encode several audio tracks into one file ? In-Reply-To: References: Message-ID: Le 22/04/12 18:24, Carl Eugen Hoyos a ?crit : > pehache writes: > >> ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers > > This is too old, especially if you are not using the libraries, > but the transcoding application. Probably, but I'm using the one available through MacPorts, and would like to avoid compiling my own... From pehache.7 at gmail.com Sun Apr 22 19:41:55 2012 From: pehache.7 at gmail.com (pehache) Date: Sun, 22 Apr 2012 19:41:55 +0200 Subject: [Libav-user] Muxing a .srt file into a .mp4 file ? In-Reply-To: References: Message-ID: Le 22/04/12 16:22, pehache a ?crit : > > > And finally, the only command which succeeds is with the output .mkv > file, and specifying -scodec copy: > > =================================================================== > *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i > Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -map 0.0 -map 0.1 -map > 1.0 -y toto.mkv > =================================================================== I meant : *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -scodec copy -map 0.0 -map 0.1 -map 1.0 -y toto.mkv From pehache.7 at gmail.com Sun Apr 22 20:03:30 2012 From: pehache.7 at gmail.com (pehache) Date: Sun, 22 Apr 2012 20:03:30 +0200 Subject: [Libav-user] Muxing a .srt file into a .mp4 file ? In-Reply-To: References: Message-ID: Le 22/04/12 19:41, pehache a ?crit : > Le 22/04/12 16:22, pehache a ?crit : >> >> >> And finally, the only command which succeeds is with the output .mkv >> file, and specifying -scodec copy: >> >> =================================================================== >> *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i >> Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -map 0.0 -map 0.1 -map >> 1.0 -y toto.mkv >> =================================================================== > > I meant : > > *****$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i > Good_Bye_Lenin.de.srt -vcodec copy -acodec copy -scodec copy -map 0.0 > -map 0.1 -map 1.0 -y toto.mkv Hum... The above is OK, but if I try to include another subtitle stream it fails: =================================================================== toto2:COMEDIE_DRAMATIQUE pierre$ ffmpeg -i Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4 -i Good_Bye_Lenin.de.1.srt -vcodec copy -acodec copy -scodec copy -map 0.0 -map 0.1 -map 1.0 -map 0.3 -y toto.mkv -newsubtitle ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers built on Mar 17 2012 12:11:52 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3) configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm libavutil 50. 43. 0 / 50. 43. 0 libavcodec 52.123. 0 / 52.123. 0 libavformat 52.111. 0 / 52.111. 0 libavdevice 52. 5. 0 / 52. 5. 0 libavfilter 1. 80. 0 / 1. 80. 0 libswscale 0. 14. 1 / 0. 14. 1 libpostproc 51. 2. 0 / 51. 2. 0 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x102052000] max_analyze_duration 5000000 reached at 5013333 Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 25.00 (25/1) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Good_Bye_Lenin.DVDRIP.HQ.deFR.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: mp42isomavc1 creation_time : 2012-04-07 09:59:01 encoder : HandBrake 0.9.6 2012022800 Duration: 01:52:41.32, start: 0.000000, bitrate: 1274 kb/s ... Stream #0.0(und): Video: h264 (High), yuv420p, 704x384, 999 kb/s, 25 fps, 25 tbr, 90k tbn, 180k tbc Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.2(deu): Audio: aac, 48000 Hz, stereo, s16, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.3(fra): Subtitle: dvdsub, 4 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.4(und): Subtitle: text / 0x74786574 Metadata: creation_time : 2012-04-07 09:59:01 [srt @ 0x102053200] Estimating duration from bitrate, this may be inaccurate Input #1, srt, from 'Good_Bye_Lenin.de.1.srt': Duration: N/A, start: 0.000000, bitrate: N/A Stream #1.0: Subtitle: srt Output #0, matroska, to 'toto.mkv': Stream #0.0(und): Video: libx264, yuv420p, 704x384, q=2-31, 999 kb/s, 90k tbn, 90k tbc Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.1(fra): Audio: aac, 48000 Hz, stereo, 131 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream #0.2: Subtitle: srt Stream #0.3(fra): Subtitle: [0][0][0][0] / 0x0000, 64 kb/s Metadata: creation_time : 2012-04-07 09:59:01 Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Stream #1.0 -> #0.2 Stream #0.3 -> #0.3 Encoder (codec id 94210) not found for output stream #0.3 =================================================================== Note that I have exactly the same error if I map #1.0 to #0.3 From genesys at gmx.ch Mon Apr 23 02:26:12 2012 From: genesys at gmx.ch (=?iso-8859-1?Q?=22Matthias_B=FChlmann=22?=) Date: Mon, 23 Apr 2012 02:26:12 +0200 Subject: [Libav-user] lossless encoding with FFMPEG In-Reply-To: References: <20120421200122.5030@gmx.net> Message-ID: <20120423002612.171540@gmx.net> Thank you Carl for your answer, i'll check about ffv1. an additional question: is there any way with h264 (or any other codec) to compress keyframes losslessly and p frames lossy? (b frames i don't need). What I'd like to have is every few frames a perfect lossless frame. How could I achieve this? Thanks! -------- Original-Nachricht -------- > Datum: Sat, 21 Apr 2012 20:37:49 +0000 (UTC) > Von: Carl Eugen Hoyos > An: libav-user at ffmpeg.org > Betreff: Re: [Libav-user] lossless encoding with FFMPEG > Matthias B?hlmann writes: > > > I heard that h264 has a lossless encoding mode. Is this true? > > Yes. > > [...] > > > what's my best option to get lossless video encoding with FFMPEG? > > ffv1 should perform best compared with other internal encoders. > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a From umanga.forums at gmail.com Mon Apr 23 03:35:45 2012 From: umanga.forums at gmail.com (ashika umanga) Date: Mon, 23 Apr 2012 10:35:45 +0900 Subject: [Libav-user] Encoding Audio+Video : Assigning PTS value for Audio Frame ? Message-ID: Greetings all, In the AVFrame->pts it says : /** * presentation timestamp in time_base units (time when frame should be shown to user) * If AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed. * - encoding: MUST be set by user. * - decoding: Set by libavcodec. */ But according to the"muxing.c" example ( http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html ) , a PTS value is only assigned to the video-frames but not for audio frames. Any tips on this? Best regards, umanga -------------- next part -------------- An HTML attachment was scrubbed... URL: From krishnaks at iwavesystems.com Mon Apr 23 08:23:25 2012 From: krishnaks at iwavesystems.com (krishnaks at iwavesystems.com) Date: Mon, 23 Apr 2012 11:53:25 +0530 Subject: [Libav-user] Fw: Getting "No frame: error In-Reply-To: <000a01cd2181$97572160$2a02a8c0@iwdtp219> References: <000a01cd2181$97572160$2a02a8c0@iwdtp219> Message-ID: <69ebeb646c5b253c95141d307b1ec99b.squirrel@124.124.219.233> Hi, I have prefixed each frame with 0x00000001 & I am getting Following error [h264 @ 0x906e400] non-existing PPS 0 referenced [h264 @ 0x906e400] decode_slice_header error [h264 @ 0x906e400] non-existing PPS 0 referenced [h264 @ 0x906e400] decode_slice_header error [h264 @ 0x906e400] no frame! >> ----- Original Message ----- >> From: "Krishna" >> To: "This list is about using libavcodec, libavformat, >> libavutil,libavdevice and libavfilter." >> Sent: Friday, April 20, 2012 10:07 AM >> Subject: Re: [Libav-user] Getting "No frame: error >> >> >>> Hi >>> >>> VLC player able to play the input video. I will check with ffmpeg util >>> on >>> PC. >>> >>> ----- Original Message ----- >>> From: "Andrey Utkin" >>> To: "This list is about using libavcodec, libavformat, >>> libavutil,libavdevice and libavfilter." >>> Sent: Thursday, April 19, 2012 12:05 PM >>> Subject: Re: [Libav-user] Getting "No frame: error >>> >>> >>> 2012/4/20 Krishna : >>>> Hello! >>>> >>>> I have linked ffmpeg & live555 library to my IOS application. >>>> I am receiving the h264 encoded frame and sending the frame to dcoder. >>>> But Decoder throws the error: >>>> >>>> [h264 @ 0x8a4ac00] no frame! >>> >>> Check your input video with ffmpeg util on PC, and also with other >>> players. >>> >>> -- >>> Andrey Utkin >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >> > > From andrey.krieger.utkin at gmail.com Mon Apr 23 10:17:49 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 23 Apr 2012 11:17:49 +0300 Subject: [Libav-user] Encoding Audio+Video : Assigning PTS value for Audio Frame ? In-Reply-To: References: Message-ID: 2012/4/23 ashika umanga : > But according to the"muxing.c" example ( > http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html?)? , a PTS value is > only assigned to the video-frames but not for audio frames. > Any tips on this? BTW you look at docs from svn, svn of ffmpeg.org is not updated for long time, look at git repos of libav.org, ffmpeg.org. -- Andrey Utkin From andrey.krieger.utkin at gmail.com Mon Apr 23 10:33:43 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 23 Apr 2012 11:33:43 +0300 Subject: [Libav-user] getting very bad image after encoding In-Reply-To: <1334952136.35349.YahooMailNeo@web193003.mail.sg3.yahoo.com> References: <1334952136.35349.YahooMailNeo@web193003.mail.sg3.yahoo.com> Message-ID: 2012/4/20 Manya Chauhan : > I am encoding images using avcodec_encode_video method and displaying them > on subscriber demo of the Red5 media server. > The problem i am facing is that all the images which are being displayed are > totally distorted and nothing is clearly visible. I think something might be > wrong with the pix_fmt set in avcodec context. Moreover image size is also > quite large as 64000 bytes after encoding which I think is little weird > Please give me solution of this problem. Any help is appreciated. Check your quality and bitrate settings on encoding AVCodecContext. -- Andrey Utkin From alexcohn at netvision.net.il Mon Apr 23 12:03:32 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 23 Apr 2012 13:03:32 +0300 Subject: [Libav-user] Fw: Getting "No frame: error In-Reply-To: <69ebeb646c5b253c95141d307b1ec99b.squirrel@124.124.219.233> References: <000a01cd2181$97572160$2a02a8c0@iwdtp219> <69ebeb646c5b253c95141d307b1ec99b.squirrel@124.124.219.233> Message-ID: On Mon, Apr 23, 2012 at 09:23, wrote: > Hi, > > I have prefixed each frame with 0x00000001 & Why? > I am getting Following error > > [h264 @ 0x906e400] non-existing PPS 0 referenced > >>>> VLC player able to play the input video. I will check with ffmpeg util are you decoding a stream or a file? What is the file/stream format (mpeg4, mkv, mp4)? >>>>> I have linked ffmpeg & live555 library to my IOS application. >>>>> I am receiving the h264 encoded frame and sending the frame to dcoder. >>>>> But Decoder throws the error: >>>>> >>>>> [h264 @ 0x8a4ac00] no frame! how do you initialize your decoder? BR, Alex From alexcohn at netvision.net.il Mon Apr 23 12:05:02 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 23 Apr 2012 13:05:02 +0300 Subject: [Libav-user] getting very bad image after encoding In-Reply-To: <1334952136.35349.YahooMailNeo@web193003.mail.sg3.yahoo.com> References: <1334952136.35349.YahooMailNeo@web193003.mail.sg3.yahoo.com> Message-ID: On Fri, Apr 20, 2012 at 23:02, Manya Chauhan wrote: > I am encoding images using avcodec_encode_video method and displaying them > on subscriber demo of the Red5 media server. > The problem i am facing is that all the images which are being displayed are > totally distorted and nothing is clearly visible. I think something might be > wrong with the pix_fmt set in avcodec context. Moreover image size is also > quite large as 64000 bytes after encoding which I think is little weird > Please give me solution of this problem. Any help is appreciated. What kind of images do you encode? How do you set up your encoder? BR, Alex From krishnaks at iwavesystems.com Mon Apr 23 12:16:32 2012 From: krishnaks at iwavesystems.com (krishnaks at iwavesystems.com) Date: Mon, 23 Apr 2012 15:46:32 +0530 Subject: [Libav-user] Fw: Fw: Getting "No frame: error In-Reply-To: <002601cd21a2$3ba43c10$2a02a8c0@iwdtp219> References: <002601cd21a2$3ba43c10$2a02a8c0@iwdtp219> Message-ID: Hi Alex. I thought I may need to add NAL units That why I added 0x00000001. Please see the code: Let me know If I am missing.. av_register_all(); codec = avcodec_find_decoder(CODEC_ID_H264); codecCtx = avcodec_alloc_context3(codec); codecCtx->width = width; codecCtx->height = height; codecCtx->extradata = (uint8_t*)av_malloc([frameData length]); codecCtx->extradata_size = [frameData length]; [privateData getBytes:codecCtx->extradata length:codecCtx->extradata_size]; codecCtx->pix_fmt = PIX_FMT_YUV420P; srcFrame = avcodec_alloc_frame(); dstFrame = avcodec_alloc_frame(); if(codec->capabilities&CODEC_CAP_TRUNCATED) codecCtx->flags|= CODEC_FLAG_TRUNCATED; int res = avcodec_open2(codecCtx, codec,NULL); if (res < 0) { NSLog(@"Failed to initialize decoder"); } packet.data = (uint8_t*)[frameData bytes]; packet.size = [frameData length]; int frameFinished = 0; int res = avcodec_decode_video2(codecCtx, srcFrame, &frameFinished, &packet); Regards, KP > ----- Original Message ----- > From: "Alex Cohn" > To: "This list is about using libavcodec, libavformat, > libavutil,libavdevice > and libavfilter." > Sent: Monday, April 23, 2012 3:03 AM > Subject: Re: [Libav-user] Fw: Getting "No frame: error > > >> On Mon, Apr 23, 2012 at 09:23, wrote: >>> Hi, >>> >>> I have prefixed each frame with 0x00000001 & >> >> Why? >> >>> I am getting Following error >>> >>> [h264 @ 0x906e400] non-existing PPS 0 referenced >>> >>>>>> VLC player able to play the input video. I will check with ffmpeg >>>>>> util >> >> are you decoding a stream or a file? What is the file/stream format >> (mpeg4, mkv, mp4)? >> >>>>>>> I have linked ffmpeg & live555 library to my IOS application. >>>>>>> I am receiving the h264 encoded frame and sending the frame to >>>>>>> dcoder. >>>>>>> But Decoder throws the error: >>>>>>> >>>>>>> [h264 @ 0x8a4ac00] no frame! >> >> how do you initialize your decoder? >> >> BR, >> Alex >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user > > From krishnaks at iwavesystems.com Mon Apr 23 12:44:55 2012 From: krishnaks at iwavesystems.com (krishnaks at iwavesystems.com) Date: Mon, 23 Apr 2012 16:14:55 +0530 Subject: [Libav-user] Fw: Fw: Getting "No frame: error In-Reply-To: References: <002601cd21a2$3ba43c10$2a02a8c0@iwdtp219> Message-ID: Hi, I just tried with the code in doc/Examples/decoding_encoding.c for video decoding & I am getting following errors Invalid level prefix [h264 @ 0xb86b800] error while decoding MB 5 6 [h264 @ 0xb86b800] concealing 77 DC, 77 AC, 77 MV errors saving frame 0 Regards, KP > Hi Alex. > > I thought I may need to add NAL units That why I added 0x00000001. > > Please see the code: Let me know If I am missing.. > > av_register_all(); > codec = avcodec_find_decoder(CODEC_ID_H264); > codecCtx = avcodec_alloc_context3(codec); > > codecCtx->width = width; > codecCtx->height = height; > > codecCtx->extradata = (uint8_t*)av_malloc([frameData length]); > codecCtx->extradata_size = [frameData length]; > [privateData getBytes:codecCtx->extradata > length:codecCtx->extradata_size]; > codecCtx->pix_fmt = PIX_FMT_YUV420P; > > srcFrame = avcodec_alloc_frame(); > dstFrame = avcodec_alloc_frame(); > > if(codec->capabilities&CODEC_CAP_TRUNCATED) > codecCtx->flags|= CODEC_FLAG_TRUNCATED; > > int res = avcodec_open2(codecCtx, codec,NULL); > if (res < 0) > { > NSLog(@"Failed to initialize decoder"); > } > > packet.data = (uint8_t*)[frameData bytes]; > packet.size = [frameData length]; > > int frameFinished = 0; > > int res = avcodec_decode_video2(codecCtx, srcFrame, &frameFinished, > &packet); > > > Regards, > KP >> ----- Original Message ----- >> From: "Alex Cohn" >> To: "This list is about using libavcodec, libavformat, >> libavutil,libavdevice >> and libavfilter." >> Sent: Monday, April 23, 2012 3:03 AM >> Subject: Re: [Libav-user] Fw: Getting "No frame: error >> >> >>> On Mon, Apr 23, 2012 at 09:23, wrote: >>>> Hi, >>>> >>>> I have prefixed each frame with 0x00000001 & >>> >>> Why? >>> >>>> I am getting Following error >>>> >>>> [h264 @ 0x906e400] non-existing PPS 0 referenced >>>> >>>>>>> VLC player able to play the input video. I will check with ffmpeg >>>>>>> util >>> >>> are you decoding a stream or a file? What is the file/stream format >>> (mpeg4, mkv, mp4)? >>> >>>>>>>> I have linked ffmpeg & live555 library to my IOS application. >>>>>>>> I am receiving the h264 encoded frame and sending the frame to >>>>>>>> dcoder. >>>>>>>> But Decoder throws the error: >>>>>>>> >>>>>>>> [h264 @ 0x8a4ac00] no frame! >>> >>> how do you initialize your decoder? >>> >>> BR, >>> Alex >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From lizhang at utelisys.com Tue Apr 24 10:41:41 2012 From: lizhang at utelisys.com (Li Zhang) Date: Tue, 24 Apr 2012 10:41:41 +0200 Subject: [Libav-user] HOW to control TS streaming speed? Message-ID: Hi all, I used the ffmpeg lib to transcode mpeg2 to H264 in TS container. After that, I send them to a UDP address which was open using avio_open(). Now I used a thread to decode and another thread to encode. At the same time I used the third thread to send data packet using av_interleaved_write_frame(). However, I am not clear how I should control the sending. 1. Now, the sending stream can be played normally using VLC in windows system only lose several audio packets at the beginning. But if I play it in Linux system (ubuntu), it will lose lots of audio data in buffer and finally sounds not very nice. This information was found in VLC tools->statistics. I do not know why? Is it possible that VLC in windows can adjust its buffer size adaptively? 2. I knew that the packet loss is caused by bad sending controlling tricks. So does anyone can give me some suggestions about the sending controlling? 3. I also knew that ffmpeg and VLC have solved this problem in their source code. But I can not find out where these code locates in. Does anyone can give me any indication? Thanks in advance. Best regards, Li From goocreations at gmail.com Tue Apr 24 14:34:55 2012 From: goocreations at gmail.com (Goo Creations) Date: Tue, 24 Apr 2012 14:34:55 +0200 Subject: [Libav-user] Can't retrieve Sample Format Message-ID: Hi all, I've been stuck with this problem for a while now. When opening a file and doing the following: AVCodecContext *codecContext = NULL; AVFormatContext *formatContext = NULL; AVCodec *codec; avformat_open_input(&formatContext, "a.flac", NULL, NULL); int streamId = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0); codecContext = formatContext->streams[streamId]->codec; cout<sample_fmt< From krishnaks at iwavesystems.com Tue Apr 24 14:51:27 2012 From: krishnaks at iwavesystems.com (krishnaks at iwavesystems.com) Date: Tue, 24 Apr 2012 18:21:27 +0530 Subject: [Libav-user] decoding example program not working Message-ID: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> HI, I used example program in ffmpeg/doc/examples/decoding_encoding.c for decoding raw H264 file. But I am getting following errors. Where I am going wrong. Video decoding [h264 @ 0x102d9600] Invalid level prefix [h264 @ 0x102d9600] error while decoding MB 5 6 [h264 @ 0x102d9600] concealing 77 DC, 77 AC, 77 MV errors saving frame 0 2012-04-24 18:22:18.519 iPadRecv[6627:14303] Current directory is / [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors saving frame 1 2012-04-24 18:22:18.524 iPadRecv[6627:14303] Current directory is / [h264 @ 0x102d9600] concealing 73 DC, 73 AC, 73 MV errors saving frame 2 2012-04-24 18:22:18.527 iPadRecv[6627:14303] Current directory is / [h264 @ 0x102d9600] concealing 93 DC, 93 AC, 93 MV errors saving frame 3 2012-04-24 18:22:18.531 iPadRecv[6627:14303] Current directory is / [h264 @ 0x102d9600] concealing 90 DC, 90 AC, 90 MV errors saving frame 4 2012-04-24 18:22:18.535 iPadRecv[6627:14303] Current directory is / [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors saving frame 5 2012-04-24 18:22:18.537 iPadRecv[6627:14303] Current directory is / [h264 @ 0x102d9600] no frame! Error while decoding frame 6 Regards, KP From alexcohn at netvision.net.il Tue Apr 24 17:00:24 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 24 Apr 2012 18:00:24 +0300 Subject: [Libav-user] decoding example program not working In-Reply-To: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> Message-ID: On Tue, Apr 24, 2012 at 15:51, wrote: > HI, > ?I used example program in ffmpeg/doc/examples/decoding_encoding.c for > decoding raw H264 file. But I am getting following errors. Where I am > going wrong. > > Video decoding > [h264 @ 0x102d9600] Invalid level prefix > [h264 @ 0x102d9600] error while decoding MB 5 6 > [h264 @ 0x102d9600] concealing 77 DC, 77 AC, 77 MV errors > saving frame ? 0 > 2012-04-24 18:22:18.519 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors > saving frame ? 1 > 2012-04-24 18:22:18.524 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 73 DC, 73 AC, 73 MV errors > saving frame ? 2 > 2012-04-24 18:22:18.527 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 93 DC, 93 AC, 93 MV errors > saving frame ? 3 > 2012-04-24 18:22:18.531 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 90 DC, 90 AC, 90 MV errors > saving frame ? 4 > 2012-04-24 18:22:18.535 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors > saving frame ? 5 > 2012-04-24 18:22:18.537 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] no frame! > Error while decoding frame 6 > > Regards, > KP Does this file decode with no errors with ffmpeg executable? Alex From Ajita-Pandey at hcl.com Tue Apr 24 17:04:43 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Tue, 24 Apr 2012 20:34:43 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, I am using the ffmpeg open source code for the transcoding of av stream. And want to play with VLC player .As I got to know that VLC player and mplayer uses the ffmpeg libavcodec library. But problem is that both libavcodec library have difference in their source code. So vlc player is not uses mine modified libavcodec. Can anybody please tell me why both having different source code. if both uses libavcodec. And how can I modified player to use mine avcodec library. Regards, Ajita ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- From nitinkumgoyal at gmail.com Tue Apr 24 17:13:48 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 24 Apr 2012 20:43:48 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: There are different branches of thr libavcodec and anyone using libavcodec can use any of these branches rather than the mian branch as per the requiremnt. Some different devopers have created some feautre which is not part of main branch and may be VLC is using that and thus the code difference is there. There are actually 7-8 repositories i think.. chk out here http://ffmpeg.org/download.html Regards Nitin On Tue, Apr 24, 2012 at 8:34 PM, Ajita Pandey wrote: > Hi, > > I am using the ffmpeg open source code for the transcoding of av stream. > And want to play with VLC player .As I got to know that VLC player and > mplayer uses the ffmpeg libavcodec library. > But problem is that both libavcodec library have difference in their > source code. So vlc player is not uses mine modified libavcodec. > > Can anybody please tell me why both having different source code. if both > uses libavcodec. And how can I modified player to use mine avcodec library. > > > Regards, > Ajita > > > > > > > > > ::DISCLAIMER:: > > ----------------------------------------------------------------------------------------------------------------------- > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, > lost, destroyed, arrive late or incomplete, or contain viruses.The e mail > and its contents (with or without referred > errors) shall therefore not attach any liability on the originator or HCL > or its affiliates. Any views or opinions > presented in this email are solely those of the author and may not > necessarily reflect the opinions of HCL or its > affiliates. Any form of reproduction, dissemination, copying, disclosure, > Modification, distribution and/or publication > of this message without the prior written consent of the author of this > e-mail is strictly prohibited. If you have > received this email in error please delete it and notify the sender > immediately. Before opening any mail and attachments > please check them for viruses and defect. > > > ----------------------------------------------------------------------------------------------------------------------- > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ajita-Pandey at hcl.com Tue Apr 24 17:28:29 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Tue, 24 Apr 2012 20:58:29 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, Thanxx for reply , Acttually both ffmpeg version are same but there are diffrerences like some function name ,macro or variable name are different, So using mine code in VLC player I have to merge manually. Its Just an question is there player which uses the same libavcodec library which one is in ffmpeg. Regards, Ajita From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of NITIN GOYAL Sent: Tuesday, April 24, 2012 8:44 PM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: Re: [Libav-user] ffmpeg code differes There are different branches of thr libavcodec and anyone using libavcodec can use any of these branches rather than the mian branch as per the requiremnt. Some different devopers have created some feautre which is not part of main branch and may be VLC is using that and thus the code difference is there. There are actually 7-8 repositories i think.. chk out here http://ffmpeg.org/download.html Regards Nitin On Tue, Apr 24, 2012 at 8:34 PM, Ajita Pandey > wrote: Hi, I am using the ffmpeg open source code for the transcoding of av stream. And want to play with VLC player .As I got to know that VLC player and mplayer uses the ffmpeg libavcodec library. But problem is that both libavcodec library have difference in their source code. So vlc player is not uses mine modified libavcodec. Can anybody please tell me why both having different source code. if both uses libavcodec. And how can I modified player to use mine avcodec library. Regards, Ajita ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Tue Apr 24 17:53:47 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 24 Apr 2012 21:23:47 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: Yeah i think mplayer is using the same code as in the main branch. On Tue, Apr 24, 2012 at 8:58 PM, Ajita Pandey wrote: > Hi,**** > > ** ** > > Thanxx for reply ,**** > > Acttually both ffmpeg version are same but there are diffrerences like > some function name ,macro or variable name are different,**** > > ** ** > > So using mine code in VLC player I have to merge manually. **** > > Its Just an question is there player which uses the same libavcodec > library which one is in ffmpeg.**** > > ** ** > > ** ** > > Regards,**** > > Ajita**** > > ** ** > > *From:* libav-user-bounces at ffmpeg.org [mailto: > libav-user-bounces at ffmpeg.org] *On Behalf Of *NITIN GOYAL > *Sent:* Tuesday, April 24, 2012 8:44 PM > *To:* This list is about using libavcodec, libavformat, libavutil, > libavdevice and libavfilter. > *Subject:* Re: [Libav-user] ffmpeg code differes**** > > ** ** > > There are different branches of thr libavcodec and anyone using libavcodec > can use any of these branches rather than the mian branch as per the > requiremnt.**** > > ** ** > > Some different devopers have created some feautre which is not part of > main branch and may be VLC is using that and thus the code difference is > there.**** > > ** ** > > There are actually 7-8 repositories i think.. chk out here > http://ffmpeg.org/download.html **** > > Regards**** > > Nitin**** > > On Tue, Apr 24, 2012 at 8:34 PM, Ajita Pandey > wrote:**** > > Hi, > > I am using the ffmpeg open source code for the transcoding of av stream. > And want to play with VLC player .As I got to know that VLC player and > mplayer uses the ffmpeg libavcodec library. > But problem is that both libavcodec library have difference in their > source code. So vlc player is not uses mine modified libavcodec. > > Can anybody please tell me why both having different source code. if both > uses libavcodec. And how can I modified player to use mine avcodec library. > > > Regards, > Ajita > > > > > > > > > ::DISCLAIMER:: > > ----------------------------------------------------------------------------------------------------------------------- > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, > lost, destroyed, arrive late or incomplete, or contain viruses.The e mail > and its contents (with or without referred > errors) shall therefore not attach any liability on the originator or HCL > or its affiliates. Any views or opinions > presented in this email are solely those of the author and may not > necessarily reflect the opinions of HCL or its > affiliates. Any form of reproduction, dissemination, copying, disclosure, > Modification, distribution and/or publication > of this message without the prior written consent of the author of this > e-mail is strictly prohibited. If you have > received this email in error please delete it and notify the sender > immediately. Before opening any mail and attachments > please check them for viruses and defect. > > > ----------------------------------------------------------------------------------------------------------------------- > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user**** > > ** ** > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hoelscher at codergrid.de Tue Apr 24 18:09:14 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Tue, 24 Apr 2012 18:09:14 +0200 Subject: [Libav-user] Can't retrieve Sample Format In-Reply-To: References: Message-ID: 2012/4/24 Goo Creations > Hi all, > > I've been stuck with this problem for a while now. When opening a file and > doing the following: > > AVCodecContext *codecContext = NULL; > AVFormatContext *formatContext = NULL; > AVCodec *codec; > > avformat_open_input(&formatContext, "a.flac", NULL, NULL); > int streamId = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, > -1, &codec, 0); > codecContext = formatContext->streams[streamId]->codec; > > cout<sample_fmt< > It returns -1 (AV_SAMPLE_FMT_NONE). If I use the terminal tool (ffmpeg -i > a.flac) it says s32 under the stream info. So what am I doing wrong that my > code does not return the sample format? I can retrieve other info such as > the sample rate. > > Thanks > > Chris > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > try "avformat_find_stream_info" http://www.ffmpeg.org/doxygen/trunk/group__lavf__decoding.html#gd42172e27cddafb81096939783b157bb before using "av_find_best_stream" -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From craigmurray100 at gmail.com Wed Apr 25 04:10:44 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Tue, 24 Apr 2012 22:10:44 -0400 Subject: [Libav-user] problem with ffmpeg on mac vs win Message-ID: I'm having some problems getting ffmpeg to behave the same on windows as opposed to mac. Mac seems to have some codec problems, where the windows version is fine. Here is my output: Any help understanding why my mac version is failing would be appreciated. Thanks! *Mac*: ./ffmpeg -i test.AVI -y test.MOV ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers built on Mar 17 2012 18:13:24 with gcc 4.0.1 (Apple Inc. build 5493) configuration: --prefix=/Volumes/Ramdisk/sw --enable-gpl --enable-pthreads --enable-version3 --enable-libspeex --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --arch=x86 --enable-runtime-cpudetect libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, avi, from 'test.AVI': Duration: 00:00:19.99, start: 0.000000, bitrate: 5094 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 320x240, 60 tbr, 60 tbn, 60 tbc Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, u8, 64 kb/s Incompatible pixel format 'yuvj422p' for codec 'libx264', auto-selecting format 'yuvj420p' [buffer @ 0x1300d20] w:320 h:240 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param: [buffersink @ 0x13010a0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 0x1301270] w:320 h:240 fmt:yuvj422p -> w:320 h:240 fmt:yuvj420p flags:0x4 Incompatible sample format 'u8' for codec 'aac', auto-selecting format 'flt' [libx264 @ 0x180a200] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 [libx264 @ 0x180a200] profile High, level 2.1 [libx264 @ 0x180a200] 264 - core 120 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [NULL @ 0x180c400] Codec is experimental but experimental codecs are not enabled, see -strict -2 Output #0, mov, to 'test.MOV': Stream #0:0: Video: h264, yuvj420p, 320x240, q=-1--1, 90k tbn, 60 tbc Stream #0:1: Audio: none, 8000 Hz, 1 channels, flt, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mjpeg -> libx264) Stream #0:1 -> #0:1 (pcm_u8 -> aac) Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height *Win* ffmpeg -i test.AVI -y test.MOV ffmpeg version N-38292-ga4c22e3 Copyright (c) 2000-2012 the FFmpeg developers built on Feb 27 2012 14:50:39 with gcc 4.6.2 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger - -enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib libavutil 51. 41.100 / 51. 41.100 libavcodec 54. 4.100 / 54. 4.100 libavformat 54. 1.100 / 54. 1.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 62.101 / 2. 62.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 7.100 / 0. 7.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, avi, from 'test.AVI': Duration: 00:00:19.99, start: 0.000000, bitrate: 5094 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 320x240, 60 tbr, 60 tbn, 60 tbc Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, u8, 64 kb/s Incompatible pixel format 'yuvj422p' for codec 'libx264', auto-selecting format 'yuvj420p' [buffer @ 03CB6560] w:320 h:240 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param: [buffersink @ 03CB78C0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 03CB7CA0] w:320 h:240 fmt:yuvj422p -> w:320 h:240 fmt:yuvj420p flags:0x4 Incompatible sample format 'u8' for codec 'libvo_aacenc', auto-selecting format 's16' [libx264 @ 03CD0AA0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX [libx264 @ 03CD0AA0] profile High, level 2.1 [libx264 @ 03CD0AA0] 264 - core 120 r2146 bcd41db - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chro ma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 [mov @ 003AF820] WARNING codec timebase is very high. If duration is too long, file may not be playable by quicktime. Specify a shorter timebase or choose different container. Output #0, mov, to 'test.MOV': Metadata: encoder : Lavf54.1.100 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p, 320x240, q=-1--1, 500k tbn, 60 tbc Stream #0:1: Audio: aac (mp4a / 0x6134706D), 8000 Hz, 1 channels, s16, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mjpeg -> libx264) Stream #0:1 -> #0:1 (pcm_u8 -> libvo_aacenc) Press [q] to stop, [?] for help frame= 1200 fps=234 q=-1.0 Lsize= 1583kB time=00:00:19.96 bitrate= 649.3kbits/s video:1538kB audio:26kB global headers:0kB muxing overhead 1.130127% [libx264 @ 03CD0AA0] frame I:6 Avg QP:26.56 size: 5459 [libx264 @ 03CD0AA0] frame P:654 Avg QP:28.93 size: 1987 [libx264 @ 03CD0AA0] frame B:540 Avg QP:32.24 size: 449 [libx264 @ 03CD0AA0] consecutive B-frames: 10.2% 89.3% 0.5% 0.0% [libx264 @ 03CD0AA0] mb I I16..4: 11.4% 81.4% 7.2% [libx264 @ 03CD0AA0] mb P I16..4: 3.3% 4.4% 0.4% P16..4: 55.4% 16.7% 8.5% 0.0% 0.0% skip:11.2% [libx264 @ 03CD0AA0] mb B I16..4: 0.2% 0.1% 0.0% B16..8: 33.8% 3.5% 0.6% direct: 3.2% skip:58.6% L0:40.3% L1:49.3% BI:10.5% [libx264 @ 03CD0AA0] 8x8 transform intra:56.3% inter:75.8% [libx264 @ 03CD0AA0] coded y,uvDC,uvAC intra: 44.9% 83.3% 53.4% inter: 20.1% 41.6% 8.9% [libx264 @ 03CD0AA0] i16 v,h,dc,p: 33% 21% 10% 36% [libx264 @ 03CD0AA0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 18% 33% 3% 4% 5% 4% 4% 5% [libx264 @ 03CD0AA0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 23% 19% 2% 3% 4% 4% 3% 3% [libx264 @ 03CD0AA0] i8c dc,h,v,p: 64% 15% 17% 3% [libx264 @ 03CD0AA0] Weighted P-Frames: Y:6.6% UV:3.7% [libx264 @ 03CD0AA0] ref P L0: 55.5% 19.4% 16.8% 7.9% 0.3% [libx264 @ 03CD0AA0] ref B L0: 74.7% 25.2% 0.0% [libx264 @ 03CD0AA0] ref B L1: 99.9% 0.1% [libx264 @ 03CD0AA0] kb/s:629.92 -------------- next part -------------- An HTML attachment was scrubbed... URL: From krishnaks at iwavesystems.com Wed Apr 25 18:41:16 2012 From: krishnaks at iwavesystems.com (Krishna) Date: Wed, 25 Apr 2012 09:41:16 -0700 Subject: [Libav-user] decoding example program not working References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> Message-ID: <005b01cd2302$3c006ce0$2a02a8c0@iwdtp219> Yes. With ffmpeg command line tool, same file getting decoded without any problem. ----- Original Message ----- From: "Alex Cohn" To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter." Sent: Tuesday, April 24, 2012 8:00 AM Subject: Re: [Libav-user] decoding example program not working On Tue, Apr 24, 2012 at 15:51, wrote: > HI, > I used example program in ffmpeg/doc/examples/decoding_encoding.c for > decoding raw H264 file. But I am getting following errors. Where I am > going wrong. > > Video decoding > [h264 @ 0x102d9600] Invalid level prefix > [h264 @ 0x102d9600] error while decoding MB 5 6 > [h264 @ 0x102d9600] concealing 77 DC, 77 AC, 77 MV errors > saving frame 0 > 2012-04-24 18:22:18.519 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors > saving frame 1 > 2012-04-24 18:22:18.524 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 73 DC, 73 AC, 73 MV errors > saving frame 2 > 2012-04-24 18:22:18.527 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 93 DC, 93 AC, 93 MV errors > saving frame 3 > 2012-04-24 18:22:18.531 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 90 DC, 90 AC, 90 MV errors > saving frame 4 > 2012-04-24 18:22:18.535 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors > saving frame 5 > 2012-04-24 18:22:18.537 iPadRecv[6627:14303] Current directory is / > [h264 @ 0x102d9600] no frame! > Error while decoding frame 6 > > Regards, > KP Does this file decode with no errors with ffmpeg executable? Alex _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user From wagner.patriota at gmail.com Wed Apr 25 07:20:09 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Wed, 25 Apr 2012 02:20:09 -0300 Subject: [Libav-user] What are the possible reasons for unsyncing of a video in a transmux to TS? Message-ID: I am transmuxing a MP4 to TS. the original MP4 plays perfect! After my transmux: - the audio is perfect. - the video is playing a little faster than the audio, finishing first... what could be a possible reason for this? I am doing via code, but the equivalent to this: ffmpeg -i perfect.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb -y output.ts -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ajita-Pandey at hcl.com Wed Apr 25 07:41:31 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Wed, 25 Apr 2012 11:11:31 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, I have seen both player code ie mplayer as well as VLC both have different code than main branch libavcodec code. From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of NITIN GOYAL Sent: Tuesday, April 24, 2012 9:24 PM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: Re: [Libav-user] ffmpeg code differes Yeah i think mplayer is using the same code as in the main branch. On Tue, Apr 24, 2012 at 8:58 PM, Ajita Pandey > wrote: Hi, Thanxx for reply , Acttually both ffmpeg version are same but there are diffrerences like some function name ,macro or variable name are different, So using mine code in VLC player I have to merge manually. Its Just an question is there player which uses the same libavcodec library which one is in ffmpeg. Regards, Ajita From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of NITIN GOYAL Sent: Tuesday, April 24, 2012 8:44 PM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: Re: [Libav-user] ffmpeg code differes There are different branches of thr libavcodec and anyone using libavcodec can use any of these branches rather than the mian branch as per the requiremnt. Some different devopers have created some feautre which is not part of main branch and may be VLC is using that and thus the code difference is there. There are actually 7-8 repositories i think.. chk out here http://ffmpeg.org/download.html Regards Nitin On Tue, Apr 24, 2012 at 8:34 PM, Ajita Pandey > wrote: Hi, I am using the ffmpeg open source code for the transcoding of av stream. And want to play with VLC player .As I got to know that VLC player and mplayer uses the ffmpeg libavcodec library. But problem is that both libavcodec library have difference in their source code. So vlc player is not uses mine modified libavcodec. Can anybody please tell me why both having different source code. if both uses libavcodec. And how can I modified player to use mine avcodec library. Regards, Ajita ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ajita-Pandey at hcl.com Wed Apr 25 07:45:18 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Wed, 25 Apr 2012 11:15:18 +0530 Subject: [Libav-user] What are the possible reasons for unsyncing of a video in a transmux to TS? In-Reply-To: References: Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D09@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, Even I am facing same problem whenever I am try to transcode a file from mp4 to mpeg even just for verify with mp4 to mp4. The audio is working fine but mine case there is no vodeo rather freeze first frame of video. Just to know some thing about audio pts I mean at the time muxing how audio pts effects it. Acttually whenever there is elementary stream transcoding ie only video or only audio its working fine. Regards, Ajita From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Wagner Patriota Sent: Wednesday, April 25, 2012 10:50 AM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: [Libav-user] What are the possible reasons for unsyncing of a video in a transmux to TS? I am transmuxing a MP4 to TS. the original MP4 plays perfect! After my transmux: - the audio is perfect. - the video is playing a little faster than the audio, finishing first... what could be a possible reason for this? I am doing via code, but the equivalent to this: ffmpeg -i perfect.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb -y output.ts ________________________________ ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Wed Apr 25 07:53:35 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 25 Apr 2012 05:53:35 +0000 (UTC) Subject: [Libav-user] problem with ffmpeg on mac vs win References: Message-ID: Craig Murray writes: > [NULL 0x180c400] Codec is experimental > but experimental codecs are not enabled, see -strict -2 If you believe this error message can be made clearer, please make suggestions. Please use plain text instead of html on this mailing list. Carl Eugen From cehoyos at ag.or.at Wed Apr 25 07:56:23 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 25 Apr 2012 05:56:23 +0000 (UTC) Subject: [Libav-user] What are the possible reasons for unsyncing of a video in a transmux to TS? References: Message-ID: Wagner Patriota writes: > ffmpeg?-i perfect.mp4 -vcodec copy -acodec copy > -vbsf h264_mp4toannexb -y?output.ts (Assuming you get the same problem with above command) Complete, uncut console output missing. Carl Eugen From h.leppkes at gmail.com Wed Apr 25 08:04:56 2012 From: h.leppkes at gmail.com (Hendrik Leppkes) Date: Wed, 25 Apr 2012 08:04:56 +0200 Subject: [Libav-user] problem with ffmpeg on mac vs win In-Reply-To: References: Message-ID: On Wed, Apr 25, 2012 at 4:10 AM, Craig Murray wrote: > I'm having some problems getting ffmpeg to behave the same on windows as > opposed to mac. Mac seems to have some codec problems, where the windows > version is fine. Here is my output: > > Your Windows version is compiled with libvo_aacenc as the AAC Encoder, which works just fine. However, your Mac version does not have the libvo_aacenc support compiled in, and it trys to use avcodecs native AAC encoder, which is still experimental, resulting in the error quoted above. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Wed Apr 25 07:55:11 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 25 Apr 2012 05:55:11 +0000 (UTC) Subject: [Libav-user] ffmpeg code differes References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: Ajita Pandey writes: > I have seen both player code ie mplayer as well as VLC both have > different code than main branch libavcodec ?code. This cannot be correct given that MPlayer does not contain libavcodec source code at all, but downloads latest libavcodec (etc.) from the FFmpeg repository. Carl Eugen From Ajita-Pandey at hcl.com Wed Apr 25 08:16:43 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Wed, 25 Apr 2012 11:46:43 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D5E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, I have same ffmpeg libavcodec version as in mplayer but still some function nameetc are different. So that I can not directly use mine libavcodec library there in mplayer. -----Original Message----- From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos Sent: Wednesday, April 25, 2012 11:25 AM To: libav-user at ffmpeg.org Subject: Re: [Libav-user] ffmpeg code differes Ajita Pandey writes: > I have seen both player code ie mplayer as well as VLC both have > different code than main branch libavcodec code. This cannot be correct given that MPlayer does not contain libavcodec source code at all, but downloads latest libavcodec (etc.) from the FFmpeg repository. Carl Eugen _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- From craigmurray100 at gmail.com Wed Apr 25 10:21:48 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Wed, 25 Apr 2012 04:21:48 -0400 Subject: [Libav-user] problem with ffmpeg on mac vs win In-Reply-To: References: Message-ID: So is there a way to get ffmpeg.dmg to use the correct codec without rebuilding it from source? On Wed, Apr 25, 2012 at 2:04 AM, Hendrik Leppkes wrote: > > > > On Wed, Apr 25, 2012 at 4:10 AM, Craig Murray > wrote: >> >> I'm having some problems getting ffmpeg to behave the same on windows as >> opposed to mac.? Mac seems to have some codec problems, where the windows >> version is fine.? Here is my output: >> > > Your Windows version is compiled with libvo_aacenc as the AAC Encoder, > which works just fine. > However, your Mac version does not have the libvo_aacenc support compiled > in, and it trys to use avcodecs native AAC encoder, which is still > experimental, resulting in the error quoted above. > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From goocreations at gmail.com Wed Apr 25 10:46:24 2012 From: goocreations at gmail.com (Goo Creations) Date: Wed, 25 Apr 2012 10:46:24 +0200 Subject: [Libav-user] Can't retrieve Sample Format In-Reply-To: References: Message-ID: Thanks, I'll try that. On Tue, Apr 24, 2012 at 6:09 PM, jan h?lscher wrote: > > > 2012/4/24 Goo Creations > >> Hi all, >> >> I've been stuck with this problem for a while now. When opening a file >> and doing the following: >> >> AVCodecContext *codecContext = NULL; >> AVFormatContext *formatContext = NULL; >> AVCodec *codec; >> >> avformat_open_input(&formatContext, "a.flac", NULL, NULL); >> int streamId = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, >> -1, &codec, 0); >> codecContext = formatContext->streams[streamId]->codec; >> >> cout<sample_fmt<> >> It returns -1 (AV_SAMPLE_FMT_NONE). If I use the terminal tool (ffmpeg -i >> a.flac) it says s32 under the stream info. So what am I doing wrong that my >> code does not return the sample format? I can retrieve other info such as >> the sample rate. >> >> Thanks >> >> Chris >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> >> > try "avformat_find_stream_info" > http://www.ffmpeg.org/doxygen/trunk/group__lavf__decoding.html#gd42172e27cddafb81096939783b157bb > > before using "av_find_best_stream" > > > -- > *Media Encoding Cluster , * > *the first Open Source Cluster Encoding Solution * > *for distributed Media Encoding.* > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From craigmurray100 at gmail.com Wed Apr 25 12:08:22 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Wed, 25 Apr 2012 03:08:22 -0700 Subject: [Libav-user] problem with ffmpeg on mac vs win In-Reply-To: References: Message-ID: I've done my best to get ffmpeg building on mac with --enable-libaacplus --enable-nonfree.... the build seemed to work as far as I can tell. But now when I run the same command I'm getting a different problem. /ffmpeg -i test.avi -y test.mov ffmpeg version N-40106-g8f89954 Copyright (c) 2000-2012 the FFmpeg developers built on Apr 25 2012 11:27:12 with gcc 4.0.1 (Apple Inc. build 5493) configuration: --enable-libaacplus --enable-nonfree libavutil 51. 47.100 / 51. 47.100 libavcodec 54. 15.100 / 54. 15.100 libavformat 54. 3.100 / 54. 3.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 72.100 / 2. 72.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 11.100 / 0. 11.100 Input #0, avi, from 'test.avi': Duration: 00:00:19.99, start: 0.000000, bitrate: 5094 kb/s Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj422p, 320x240, 60 tbr, 60 tbn, 60 tbc Stream #0:1: Audio: pcm_u8 ([1][0][0][0] / 0x0001), 8000 Hz, 1 channels, u8, 64 kb/s [buffer @ 0xe01290] w:320 h:240 pixfmt:yuvj422p tb:1/1000000 sar:0/1 sws_param:flags=2 [buffersink @ 0xe01490] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 0xe01690] w:320 h:240 fmt:yuvj422p sar:0/1 -> w:320 h:240 fmt:yuv420p sar:0/1 flags:0x4 Incompatible sample format 'u8' for codec 'libaacplus', auto-selecting format 's16' [mpeg4 @ 0x100c400] timebase 8333/500000 not supported by MPEG 4 standard, the maximum admitted value for the timebase denominator is 65535 Output #0, mov, to 'test.mov': Stream #0:0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 60 tbc Stream #0:1: Audio: none, 8000 Hz, 1 channels, s16, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (mjpeg -> mpeg4) Stream #0:1 -> #0:1 (pcm_u8 -> libaacplus) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height On Wed, Apr 25, 2012 at 1:21 AM, Craig Murray wrote: > So is there a way to get ffmpeg.dmg to use the correct codec without > rebuilding it from source? > > On Wed, Apr 25, 2012 at 2:04 AM, Hendrik Leppkes wrote: >> >> >> >> On Wed, Apr 25, 2012 at 4:10 AM, Craig Murray >> wrote: >>> >>> I'm having some problems getting ffmpeg to behave the same on windows as >>> opposed to mac.? Mac seems to have some codec problems, where the windows >>> version is fine.? Here is my output: >>> >> >> Your Windows version is compiled with libvo_aacenc as the AAC Encoder, >> which works just fine. >> However, your Mac version does not have the libvo_aacenc support compiled >> in, and it trys to use avcodecs native AAC encoder, which is still >> experimental, resulting in the error quoted above. >> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> From cehoyos at ag.or.at Wed Apr 25 12:53:21 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 25 Apr 2012 10:53:21 +0000 (UTC) Subject: [Libav-user] ffmpeg code differes References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D5E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: Ajita Pandey writes: > I have same ffmpeg libavcodec version as in mplayer > but still some function nameetc are different. As said, when you configure MPlayer, the latest version of FFmpeg is downloaded from the official FFmpeg repository, it is therefore not possible that there is a difference between FFmpeg (from the FFmpeg repository) and FFmpeg in MPlayer (which also comes from the FFmpeg repository). > So that I can not directly use mine libavcodec library > there in mplayer. You do not have to use any other libavcodec library in MPlayer then the one that configure downloads (although it is possible). Please do not top-post, it is considered rude here, Carl Eugen From Ajita-Pandey at hcl.com Wed Apr 25 13:18:23 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Wed, 25 Apr 2012 16:48:23 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D5E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7AA038@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, As configuration file of mplayer shows that it takes ffmpeg form git repos. if ! test -e ffmpeg ; then echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort" read tmp if ! git clone --depth 1 git://git.videolan.org/ffmpeg.git ffmpeg ; then rm -rf ffmpeg echo "Failed to get a FFmpeg checkout" exit 1 fi touch ffmpeg/mp_auto_pull fi while I am taking ffmpeg code directly as tar. And both have source code difference. -----Original Message----- From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Carl Eugen Hoyos Sent: Wednesday, April 25, 2012 4:23 PM To: libav-user at ffmpeg.org Subject: Re: [Libav-user] ffmpeg code differes Ajita Pandey writes: > I have same ffmpeg libavcodec version as in mplayer > but still some function nameetc are different. As said, when you configure MPlayer, the latest version of FFmpeg is downloaded from the official FFmpeg repository, it is therefore not possible that there is a difference between FFmpeg (from the FFmpeg repository) and FFmpeg in MPlayer (which also comes from the FFmpeg repository). > So that I can not directly use mine libavcodec library > there in mplayer. You do not have to use any other libavcodec library in MPlayer then the one that configure downloads (although it is possible). Please do not top-post, it is considered rude here, Carl Eugen _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- From grishka93 at gmail.com Wed Apr 25 14:52:36 2012 From: grishka93 at gmail.com (=?iso-8859-5?B?s+DY097g2Nk=?=) Date: Wed, 25 Apr 2012 16:52:36 +0400 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP Message-ID: Hi all. I've built libffmpeg for Android and am trying to decode H.264 stream using it. I'm receiving that stream via RTMP connection and passing all video packets (excluding first byte that contains flags related to RTMP) to the avcodec_decode_video2 function. With H.263 it works perfectly, but when I try to use the same code (only with codec ID changed) for H.264, every call to avcodec_decode_video2 returns -1 and nothing gets decoded. Here is the output: err{or,}_recognition separate: 1211292404; 815C2A60 err{or,}_recognition combined: 1211292404; 815C2A60 non-existing PPS 1211291692 referenced decode_slice_header error no frame! non-existing PPS 1211291732 referenced decode_slice_header error no frame! ...and it says "no frame!" for each frame I try to decode. What am I doing wrong? I can also provide dump of the raw stream if needed. From andrey.krieger.utkin at gmail.com Wed Apr 25 15:29:09 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 25 Apr 2012 16:29:09 +0300 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: 25 ?????? 2012??. 15:52 ???????????? ???????? ???????: > Hi all. > I've built libffmpeg for Android and am trying to decode H.264 stream using > it. I'm receiving that stream via RTMP connection and passing all video > packets (excluding first byte that contains flags related to RTMP) to the > avcodec_decode_video2 function. With H.263 it works perfectly, but when I > try to use the same code (only with codec ID changed) for H.264, every call > to avcodec_decode_video2 returns -1 and nothing gets decoded. > Here is the output: Do you know libavformat can read and demux RTMP stream by itself? Seems like problem in your demuxer, because decoding the frames it produces fail. -- Andrey Utkin From grishka93 at gmail.com Wed Apr 25 15:45:23 2012 From: grishka93 at gmail.com (=?iso-8859-5?B?s+DY097g2Nk=?=) Date: Wed, 25 Apr 2012 17:45:23 +0400 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: Andrey Utkin ?????(?) ? ????? ?????? Wed, 25 Apr 2012 17:29:09 +0400: > 25 ?????? 2012 ?. 15:52 ???????????? ???????? > ???????: >> Hi all. >> I've built libffmpeg for Android and am trying to decode H.264 stream >> using >> it. I'm receiving that stream via RTMP connection and passing all video >> packets (excluding first byte that contains flags related to RTMP) to >> the >> avcodec_decode_video2 function. With H.263 it works perfectly, but when >> I >> try to use the same code (only with codec ID changed) for H.264, every >> call >> to avcodec_decode_video2 returns -1 and nothing gets decoded. >> Here is the output: > > Do you know libavformat can read and demux RTMP stream by itself? > Seems like problem in your demuxer, because decoding the frames it > produces fail. > Yes I know, but I need more than simply receiving and playing, this will be a kind of VoIP service. My demuxer seems to work fine - I am able to successfully decode audio using Speex and video using libavcodec when it is encoded into H.263. Only problem is with H.264. From alexcohn at netvision.net.il Wed Apr 25 15:54:44 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 25 Apr 2012 16:54:44 +0300 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: On Wed, Apr 25, 2012 at 16:45, ???????? wrote: > Andrey Utkin ?????(?) ? ????? ?????? Wed, > 25 Apr 2012 17:29:09 +0400: > > >> 25 ?????? 2012 ?. 15:52 ???????????? ???????? >> ???????: >>> >>> Hi all. >>> I've built libffmpeg for Android and am trying to decode H.264 stream >>> using >>> it. I'm receiving that stream via RTMP connection and passing all video >>> packets (excluding first byte that contains flags related to RTMP) to the >>> avcodec_decode_video2 function. With H.263 it works perfectly, but when I >>> try to use the same code (only with codec ID changed) for H.264, every >>> call >>> to avcodec_decode_video2 returns -1 and nothing gets decoded. >>> Here is the output: >> >> >> Do you know libavformat can read and demux RTMP stream by itself? >> Seems like problem in your demuxer, because decoding the frames it >> produces fail. >> > > Yes I know, but I need more than simply receiving and playing, this will be > a kind of VoIP service. My demuxer seems to work fine - I am able to > successfully decode audio using Speex and video using libavcodec when it is > encoded into H.263. Only problem is with H.264. Packing of h264 into a stream is not trivial. You may find some curious information at http://livertmpjavapublisher.blogspot.com/2011/06/h264-avcvideopacket.html Alex From alexcohn at netvision.net.il Wed Apr 25 16:27:40 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 25 Apr 2012 17:27:40 +0300 Subject: [Libav-user] decoding example program not working In-Reply-To: <005b01cd2302$3c006ce0$2a02a8c0@iwdtp219> References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <005b01cd2302$3c006ce0$2a02a8c0@iwdtp219> Message-ID: On Wed, Apr 25, 2012 at 19:41, Krishna wrote: > Yes. With ffmpeg command line tool, same file getting decoded without any > problem. Note that the simple example does not use format context, only codec context. In real life, you should use rawvideo h264 demuxer. Alex > ----- Original Message ----- From: "Alex Cohn" > To: "This list is about using libavcodec, libavformat, libavutil,libavdevice > and libavfilter." > Sent: Tuesday, April 24, 2012 8:00 AM > Subject: Re: [Libav-user] decoding example program not working > > > On Tue, Apr 24, 2012 at 15:51, ? wrote: >> >> HI, >> I used example program in ffmpeg/doc/examples/decoding_encoding.c for >> decoding raw H264 file. But I am getting following errors. Where I am >> going wrong. >> >> Video decoding >> [h264 @ 0x102d9600] Invalid level prefix >> [h264 @ 0x102d9600] error while decoding MB 5 6 >> [h264 @ 0x102d9600] concealing 77 DC, 77 AC, 77 MV errors >> saving frame 0 >> 2012-04-24 18:22:18.519 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors >> saving frame 1 >> 2012-04-24 18:22:18.524 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 73 DC, 73 AC, 73 MV errors >> saving frame 2 >> 2012-04-24 18:22:18.527 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 93 DC, 93 AC, 93 MV errors >> saving frame 3 >> 2012-04-24 18:22:18.531 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 90 DC, 90 AC, 90 MV errors >> saving frame 4 >> 2012-04-24 18:22:18.535 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors >> saving frame 5 >> 2012-04-24 18:22:18.537 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] no frame! >> Error while decoding frame 6 >> >> Regards, >> KP > > > Does this file decode with no errors with ffmpeg executable? > > Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From cehoyos at ag.or.at Wed Apr 25 18:14:31 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 25 Apr 2012 16:14:31 +0000 (UTC) Subject: [Libav-user] ffmpeg code differes References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D5E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7AA038@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: Ajita Pandey writes: > As configuration file of mplayer shows that it takes ffmpeg form git repos. > while I am taking ffmpeg code directly as tar. > And both have source code difference. Which difference? If your tar file is new, it is the same as the git repository. (If you have an old tar file, it is of course different from git.) Please do not top-post, it is rude, Carl Eugen From grishka93 at gmail.com Wed Apr 25 19:27:31 2012 From: grishka93 at gmail.com (=?iso-8859-5?B?s+DY097g2Nk=?=) Date: Wed, 25 Apr 2012 21:27:31 +0400 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: Alex Cohn ?????(?) ? ????? ?????? Wed, 25 Apr 2012 17:54:44 +0400: > On Wed, Apr 25, 2012 at 16:45, ???????? wrote: >> Andrey Utkin ?????(?) ? ????? ?????? >> Wed, >> 25 Apr 2012 17:29:09 +0400: >> >> >>> 25 ?????? 2012 ?. 15:52 ???????????? ???????? >>> ???????: >>>> >>>> Hi all. >>>> I've built libffmpeg for Android and am trying to decode H.264 stream >>>> using >>>> it. I'm receiving that stream via RTMP connection and passing all >>>> video >>>> packets (excluding first byte that contains flags related to RTMP) to >>>> the >>>> avcodec_decode_video2 function. With H.263 it works perfectly, but >>>> when I >>>> try to use the same code (only with codec ID changed) for H.264, every >>>> call >>>> to avcodec_decode_video2 returns -1 and nothing gets decoded. >>>> Here is the output: >>> >>> >>> Do you know libavformat can read and demux RTMP stream by itself? >>> Seems like problem in your demuxer, because decoding the frames it >>> produces fail. >>> >> >> Yes I know, but I need more than simply receiving and playing, this >> will be >> a kind of VoIP service. My demuxer seems to work fine - I am able to >> successfully decode audio using Speex and video using libavcodec when >> it is >> encoded into H.263. Only problem is with H.264. > > Packing of h264 into a stream is not trivial. You may find some > curious information at > http://livertmpjavapublisher.blogspot.com/2011/06/h264-avcvideopacket.html > > Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user Thank you for this link. I've made it to parse the decoder configuration record, extract SPS, PPS and some other things. I've tried to pass PPS and SPS to avcodec_decode_video2 but it still returns -1, prints "no frame!" and does not decode anything else. Prepending 0x00000001 before them or making AVCDCR as described here http://stackoverflow.com/questions/3493742/problem-to-decode-h264-video-over-rtp-with-ffmpeg-libavcodec give the same result. From alexcohn at netvision.net.il Wed Apr 25 19:59:34 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 25 Apr 2012 20:59:34 +0300 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: On Apr 25, 2012 8:27 PM, "????????" wrote: > > Alex Cohn ?????(?) ? ????? ?????? Wed, 25 Apr 2012 17:54:44 +0400: > >> On Wed, Apr 25, 2012 at 16:45, ???????? wrote: >>> >>> Andrey Utkin ?????(?) ? ????? ?????? Wed, >>> 25 Apr 2012 17:29:09 +0400: >>> >>> >>>> 25 ?????? 2012 ?. 15:52 ???????????? ???????? >>>> ???????: >>>>> >>>>> >>>>> Hi all. >>>>> I've built libffmpeg for Android and am trying to decode H.264 stream >>>>> using >>>>> it. I'm receiving that stream via RTMP connection and passing all video >>>>> packets (excluding first byte that contains flags related to RTMP) to the >>>>> avcodec_decode_video2 function. With H.263 it works perfectly, but when I >>>>> try to use the same code (only with codec ID changed) for H.264, every >>>>> call >>>>> to avcodec_decode_video2 returns -1 and nothing gets decoded. >>>>> Here is the output: >>>> >>>> >>>> >>>> Do you know libavformat can read and demux RTMP stream by itself? >>>> Seems like problem in your demuxer, because decoding the frames it >>>> produces fail. >>>> >>> >>> Yes I know, but I need more than simply receiving and playing, this will be >>> a kind of VoIP service. My demuxer seems to work fine - I am able to >>> successfully decode audio using Speex and video using libavcodec when it is >>> encoded into H.263. Only problem is with H.264. >> >> >> Packing of h264 into a stream is not trivial. You may find some >> curious information at >> http://livertmpjavapublisher.blogspot.com/2011/06/h264-avcvideopacket.html >> >> Alex >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user > > > Thank you for this link. I've made it to parse the decoder configuration record, extract SPS, PPS and some other things. I've tried to pass PPS and SPS to avcodec_decode_video2 but it still returns -1, prints "no frame!" and does not decode anything else. Prepending 0x00000001 before them or making AVCDCR as described here http://stackoverflow.com/questions/3493742/problem-to-decode-h264-video-over-rtp-with-ffmpeg-libavcodecgive the same result. H264 decoder expects SPS and PPS to arrive together with the first (IDR) frame. ?????, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From genesys at gmx.ch Wed Apr 25 21:23:44 2012 From: genesys at gmx.ch (=?iso-8859-1?Q?=22Matthias_B=FChlmann=22?=) Date: Wed, 25 Apr 2012 21:23:44 +0200 Subject: [Libav-user] use sws_scale to flip frame? Message-ID: <20120425192344.39760@gmx.net> I want to encode OpenGL realtime content. Now, OpenGL has the y axis flipped compared to ffmpegs coordinate system. Now, as I need to run the frame anyway through sws_scale() to convert it from RGB24 to YUV420P it'd be great if I could also flip it here, so I'd save the overhead of additionally flipping it prior to encoding. Is this possible? -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a From grishka93 at gmail.com Thu Apr 26 00:53:27 2012 From: grishka93 at gmail.com (=?utf-8?B?0JPRgNC40LPQvtGA0LjQuQ==?=) Date: Thu, 26 Apr 2012 02:53:27 +0400 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: Alex Cohn ?????(?) ? ????? ?????? Wed, 25 Apr 2012 21:59:34 +0400: > On Apr 25, 2012 8:27 PM, "????????" wrote: >> >> Alex Cohn ?????(?) ? ????? ?????? Wed, 25 >> Apr > 2012 17:54:44 +0400: >> >>> On Wed, Apr 25, 2012 at 16:45, ???????? wrote: >>>> >>>> Andrey Utkin ?????(?) ? ????? ?????? > Wed, >>>> 25 Apr 2012 17:29:09 +0400: >>>> >>>> >>>>> 25 ?????? 2012 ?. 15:52 ???????????? ???????? >>>>> ???????: >>>>>> >>>>>> >>>>>> Hi all. >>>>>> I've built libffmpeg for Android and am trying to decode H.264 >>>>>> stream >>>>>> using >>>>>> it. I'm receiving that stream via RTMP connection and passing all > video >>>>>> packets (excluding first byte that contains flags related to RTMP) >>>>>> to > the >>>>>> avcodec_decode_video2 function. With H.263 it works perfectly, but > when I >>>>>> try to use the same code (only with codec ID changed) for H.264, >>>>>> every >>>>>> call >>>>>> to avcodec_decode_video2 returns -1 and nothing gets decoded. >>>>>> Here is the output: >>>>> >>>>> >>>>> >>>>> Do you know libavformat can read and demux RTMP stream by itself? >>>>> Seems like problem in your demuxer, because decoding the frames it >>>>> produces fail. >>>>> >>>> >>>> Yes I know, but I need more than simply receiving and playing, this > will be >>>> a kind of VoIP service. My demuxer seems to work fine - I am able to >>>> successfully decode audio using Speex and video using libavcodec when > it is >>>> encoded into H.263. Only problem is with H.264. >>> >>> >>> Packing of h264 into a stream is not trivial. You may find some >>> curious information at >>> > http://livertmpjavapublisher.blogspot.com/2011/06/h264-avcvideopacket.html >>> >>> Alex >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >> >> >> Thank you for this link. I've made it to parse the decoder configuration > record, extract SPS, PPS and some other things. I've tried to pass PPS > and > SPS to avcodec_decode_video2 but it still returns -1, prints "no frame!" > and does not decode anything else. Prepending 0x00000001 before them or > making AVCDCR as described here > http://stackoverflow.com/questions/3493742/problem-to-decode-h264-video-over-rtp-with-ffmpeg-libavcodecgive > the same result. > > H264 decoder expects SPS and PPS to arrive together with the first (IDR) > frame. > > ?????, > Alex So I'm doing the following: - Create a buffer - Get a video RTMP packet from the queue - Read 3 fields at the beginning of it - FLV flags (1 byte), AVC packet type (1 byte), and CompositionTime (24-bit integer) - If AVC packet type is 0, parse the rest of the packet as a decoder configuration record. Build AVCDCR with PPS, SPS, AVCProfileIndication, profile_compatibility and AVCLevelIndication and append it to the buffer. - If AVC packet type is 1 and there is something in the buffer, append packet (usually starts with 0x00000002) to the buffer, pass the buffer contents to avcodec_decode_video2 and clear the buffer. - If the buffer is empty, simply pass the packet to avcodec_decode_video2. At the moment when I call avcodec_decode_video2 with buffer contents (that consist of 2 AVCDCRs and one encoded frame), before lots of "no frame!" it prints "Current profile doesn't provide more RBSP data in PPS, skipping". I think I've made some progress but am still doing something wrong. From Ajita-Pandey at hcl.com Thu Apr 26 06:39:21 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Thu, 26 Apr 2012 10:09:21 +0530 Subject: [Libav-user] ffmpeg code differes In-Reply-To: References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BD4@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9BE3@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D02@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7A9D5E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> <45F3FDEC759D21468F1F910D2B1CC43BC5BE7AA038@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BC5BE7AA2B9@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Ajita Pandey writes: > As configuration file of mplayer shows that it takes ffmpeg form git repos. > while I am taking ffmpeg code directly as tar. > And both have source code difference. Which difference? If your tar file is new, it is the same as the git repository. (If you have an old tar file, it is of course different from git.) Please do not top-post, it is rude, Carl Eugen Both tar balls have same ffmpeg version but still have a difference like function name , marco name because of these differences I can not put my library directly there. Regards, Ajita _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, Modification, distribution and/or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- From xiaobo_yc at 163.com Thu Apr 26 09:41:43 2012 From: xiaobo_yc at 163.com (=?GBK?B?0KSyqA==?=) Date: Thu, 26 Apr 2012 15:41:43 +0800 (CST) Subject: [Libav-user] Problems with some MXF file decoding Message-ID: <4d6e56bc.26ed2.136ed99399f.Coremail.xiaobo_yc@163.com> Hi All, I found that the current git code have problems with decoding of some of my MXF files, but the libav-0.8.1 is OK. Like the show_packets() in "avproble.exe",I called the av_read_frame() function, and read the pts and dts of the file.It's all OK until the pts and dts value up to 14998(timestamp about 600 second);and then the video packet's dts and pts is always valued 14998, 14999, 15000 or 0x8000000000000000, but the audio packet's dts and pts value is all OK. First I think maybe the way I called ffmpeg api is wrong, then I used the avprobe.exe like this:"avprobe.exe -show_packets myfile.mxf", and it have the same result,so I think there must be some bugs in the code source. And I have interests in study the ffmpeg source code,anybody can tell me where maybe the problem is? Or help to fix the bug. As showing in MediaInfo,the file format information is as follows: General Complete name : D:\myfile.mxf Format : MXF Format profile : OP-1a Format settings : Open / Incomplete File size : 4.63 GiB Duration : 54mn 56s Overall bit rate mode : Constant Overall bit rate : 12.1 Mbps Encoded date : 2011-12-14 09:46:46.708 Writing application : Omneon Inc. Omneon Media Subsystem 6.1.0.0.1 Writing library : Omneon Inc. Omneon Media Subsystem 6.1.0.0.1 Video ID : 2 Format : MPEG Video Format version : Version 2 Format profile : 4:2:2 at Main Format settings, BVOP : Yes Format settings, Matrix : Custom Format_Settings_Wrapping : Frame Duration : 54mn 56s Bit rate mode : Constant Bit rate : 10 000 Kbps Width : 720 pixels Height : 576 pixels Display aspect ratio : 4:3 Frame rate : 25.000 fps Standard : PAL Color space : YUV Chroma subsampling : 4:2:2 Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Compression mode : Lossy Bits/(Pixel*Frame) : 0.965 Stream size : 3.84 GiB (83%) Audio ID : 3 Format : PCM Format settings, Endianness : Little Format_Settings_Wrapping : Frame (BWF) Duration : 54mn 56s Bit rate mode : Constant Bit rate : 1 536 Kbps Channel(s) : 2 channels Sampling rate : 48.0 KHz Bit depth : 16 bits Stream size : 604 MiB (13%) -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Thu Apr 26 11:06:47 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 26 Apr 2012 12:06:47 +0300 Subject: [Libav-user] use sws_scale to flip frame? In-Reply-To: <20120425192344.39760@gmx.net> References: <20120425192344.39760@gmx.net> Message-ID: 2012/4/25 "Matthias B?hlmann" : > Now, as I need to run the frame anyway through sws_scale() to convert it from RGB24 to YUV420P it'd be great if I could also flip it here, so I'd save the overhead of additionally flipping it prior to encoding. > > Is this possible? I'd advice to use libavfilter for that, you can create pipeline of pixfmt conversion, flipping, and bunch of other effects and transformations, adding them as easy as extending the filtergraph's configuration string. http://ffmpeg.org/libavfilter.html#hflip http://ffmpeg.org/libavfilter.html#vflip http://ffmpeg.org/libavfilter.html#format - for pixfmt conversion See doc/examples/filtering_video.c -- Andrey Utkin From cehoyos at ag.or.at Thu Apr 26 11:50:38 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 26 Apr 2012 09:50:38 +0000 (UTC) Subject: [Libav-user] Problems with some MXF file decoding References: <4d6e56bc.26ed2.136ed99399f.Coremail.xiaobo_yc@163.com> Message-ID: ?? writes: > I found that the current git code have problems with decoding > of some of my MXF files, but the libav-0.8.1 is OK. Could you test with current FFmpeg, see http://ffmpeg.org/download.html ? If one of your files does not work with current FFmpeg, please post complete, uncut console output here and provide a sample. Carl Eugen From goocreations at gmail.com Thu Apr 26 12:54:50 2012 From: goocreations at gmail.com (Goo Creations) Date: Thu, 26 Apr 2012 12:54:50 +0200 Subject: [Libav-user] Writing Audio headers during encoding Message-ID: Hi, This probably might seem as a stupid question to most of you, but I'm new to ffmpeg and I'm kind of lost. When encoding a some raw samples and writing it to file (as the decoding_encoding example shows), how are the codec headers added to the file? I don't see any function call which explicitly writes and kind of header data to file. I've created some raw samples and tried to encode them to WAV (PCM 16 SE): *while(sampleSize > 0) { frame->data[0] = (uint8_t*)samples; frame->nb_samples = sampleSize / (2 * codecContext->channels); av_init_packet(&packet); packet.data = NULL; packet.size = 0; got_packet = 0; ret = avcodec_encode_audio2(codecContext, &packet, frame, &got_packet); if (ret < 0) { cout<<"Audio encoding failed"< From xiaobo_yc at 163.com Thu Apr 26 13:04:37 2012 From: xiaobo_yc at 163.com (=?GBK?B?0KSyqA==?=) Date: Thu, 26 Apr 2012 19:04:37 +0800 (CST) Subject: [Libav-user] Problems with some MXF file decoding In-Reply-To: References: <4d6e56bc.26ed2.136ed99399f.Coremail.xiaobo_yc@163.com> Message-ID: <796880e4.2b142.136ee52fc05.Coremail.xiaobo_yc@163.com> ? 2012-04-26 17:50:38?"Carl Eugen Hoyos" ??? >?? writes: > >> I found that the current git code have problems with decoding >> of some of my MXF files, but the libav-0.8.1 is OK. > >Could you test with current FFmpeg, >see http://ffmpeg.org/download.html ? My test operation is Windows 7,and I downloaded the from both http://ffmpeg.zeranoe.com and http://www.libav.org. The result is the same. And myself compiled libav.git(20120425) without external libraries(Sorry I don't know how to let the external library found for configure step of the compile). > >If one of your files does not work with current FFmpeg, please post >complete, uncut console output here and provide a sample. My sample file is about 4.8GB,it's too large,It's difficult to upload it for me. > >Carl Eugen > >_______________________________________________ >Libav-user mailing list >Libav-user at ffmpeg.org >http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From krishnaks at iwavesystems.com Fri Apr 27 18:44:20 2012 From: krishnaks at iwavesystems.com (Krishna) Date: Fri, 27 Apr 2012 09:44:20 -0700 Subject: [Libav-user] decoding example program not working References: <4291e3a1a108072f7bb5d2b3e453b129.squirrel@124.124.219.233><005b01cd2302$3c006ce0$2a02a8c0@iwdtp219> Message-ID: <00b901cd2494$feb95150$2a02a8c0@iwdtp219> Hi Alex, For using format context ,I need to av_open_input_file API? I am new to this.Can you give suggestions? Thanks and Regards, KP ----- Original Message ----- From: "Alex Cohn" To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter." Sent: Wednesday, April 25, 2012 7:27 AM Subject: Re: [Libav-user] decoding example program not working On Wed, Apr 25, 2012 at 19:41, Krishna wrote: > Yes. With ffmpeg command line tool, same file getting decoded without any > problem. Note that the simple example does not use format context, only codec context. In real life, you should use rawvideo h264 demuxer. Alex > ----- Original Message ----- From: "Alex Cohn" > To: "This list is about using libavcodec, libavformat, > libavutil,libavdevice > and libavfilter." > Sent: Tuesday, April 24, 2012 8:00 AM > Subject: Re: [Libav-user] decoding example program not working > > > On Tue, Apr 24, 2012 at 15:51, wrote: >> >> HI, >> I used example program in ffmpeg/doc/examples/decoding_encoding.c for >> decoding raw H264 file. But I am getting following errors. Where I am >> going wrong. >> >> Video decoding >> [h264 @ 0x102d9600] Invalid level prefix >> [h264 @ 0x102d9600] error while decoding MB 5 6 >> [h264 @ 0x102d9600] concealing 77 DC, 77 AC, 77 MV errors >> saving frame 0 >> 2012-04-24 18:22:18.519 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors >> saving frame 1 >> 2012-04-24 18:22:18.524 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 73 DC, 73 AC, 73 MV errors >> saving frame 2 >> 2012-04-24 18:22:18.527 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 93 DC, 93 AC, 93 MV errors >> saving frame 3 >> 2012-04-24 18:22:18.531 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 90 DC, 90 AC, 90 MV errors >> saving frame 4 >> 2012-04-24 18:22:18.535 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] concealing 99 DC, 99 AC, 99 MV errors >> saving frame 5 >> 2012-04-24 18:22:18.537 iPadRecv[6627:14303] Current directory is / >> [h264 @ 0x102d9600] no frame! >> Error while decoding frame 6 >> >> Regards, >> KP > > > Does this file decode with no errors with ffmpeg executable? > > Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user From cehoyos at ag.or.at Fri Apr 27 14:41:31 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 27 Apr 2012 12:41:31 +0000 (UTC) Subject: [Libav-user] Problems with some MXF file decoding References: <4d6e56bc.26ed2.136ed99399f.Coremail.xiaobo_yc@163.com> <796880e4.2b142.136ee52fc05.Coremail.xiaobo_yc@163.com> Message-ID: ?? writes: > >>?I?found?that?the?current?git?code?have?problems?with?decoding? > >>?of?some?of?my?MXF?files,?but?the?libav-0.8.1?is?OK. > > > >Could?you?test?with?current?FFmpeg,? > >see?http://ffmpeg.org/download.html?? > > My test operation is Windows 7,and I downloaded the from both > http://ffmpeg.zeranoe.com Please provide the complete, uncut console output. > >If?one?of?your?files?does?not?work?with?current?FFmpeg,?please?post? > >complete,?uncut?console?output?here?and?provide?a?sample. > > My sample file is about 4.8GB,it's too large, It's difficult to > upload it for me. Try to cut the sample and test if it still plays with your older download. If it does work, please provide the sample. Carl Eugen From alexcohn at netvision.net.il Fri Apr 27 22:05:15 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Fri, 27 Apr 2012 23:05:15 +0300 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: On Thu, Apr 26, 2012 at 01:53, ???????? wrote: > Alex Cohn ?????(?) ? ????? ?????? Wed, 25 Apr > 2012 21:59:34 +0400: > > >> On Apr 25, 2012 8:27 PM, "????????" wrote: >>> >>> >>> Alex Cohn ?????(?) ? ????? ?????? Wed, 25 Apr >> >> 2012?17:54:44 +0400: >>> >>> >>>> On Wed, Apr 25, 2012 at 16:45, ???????? wrote: >>>>> >>>>> >>>>> Andrey Utkin ?????(?) ? ????? ?????? >> >> Wed, >>>>> >>>>> 25 Apr 2012 17:29:09 +0400: >>>>> >>>>> >>>>>> 25 ?????? 2012 ?. 15:52 ???????????? ???????? >>>>>> ???????: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hi all. >>>>>>> I've built libffmpeg for Android and am trying to decode H.264 stream >>>>>>> using >>>>>>> it. I'm receiving that stream via RTMP connection and passing all >> >> video >>>>>>> >>>>>>> packets (excluding first byte that contains flags related to RTMP) to >> >> the >>>>>>> >>>>>>> avcodec_decode_video2 function. With H.263 it works perfectly, but >> >> when I >>>>>>> >>>>>>> try to use the same code (only with codec ID changed) for H.264, >>>>>>> every >>>>>>> call >>>>>>> to avcodec_decode_video2 returns -1 and nothing gets decoded. >>>>>>> Here is the output: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Do you know libavformat can read and demux RTMP stream by itself? >>>>>> Seems like problem in your demuxer, because decoding the frames it >>>>>> produces fail. >>>>>> >>>>> >>>>> Yes I know, but I need more than simply receiving and playing, this >> >> will be >>>>> >>>>> a kind of VoIP service. My demuxer seems to work fine - I am able to >>>>> successfully decode audio using Speex and video using libavcodec when >> >> it is >>>>> >>>>> encoded into H.263. Only problem is with H.264. >>>> >>>> >>>> >>>> Packing of h264 into a stream is not trivial. You may find some >>>> curious information at >>>> >> http://livertmpjavapublisher.blogspot.com/2011/06/h264-avcvideopacket.html >>>> >>>> >>>> Alex >>>> _______________________________________________ >>>> Libav-user mailing list >>>> Libav-user at ffmpeg.org >>>> http://ffmpeg.org/mailman/listinfo/libav-user >>> >>> >>> >>> Thank you for this link. I've made it to parse the decoder configuration >> >> record, extract SPS, PPS and some other things. I've tried to pass PPS and >> SPS to avcodec_decode_video2 but it still returns -1, prints "no frame!" >> and does not decode anything else. Prepending 0x00000001 before them or >> making AVCDCR as described here >> >> http://stackoverflow.com/questions/3493742/problem-to-decode-h264-video-over-rtp-with-ffmpeg-libavcodecgive >> the same result. >> >> H264 decoder expects SPS and PPS to arrive together with the first (IDR) >> frame. >> >> ?????, >> Alex > > > So I'm doing the following: > - Create a buffer > - Get a video RTMP packet from the queue > - Read 3 fields at the beginning of it - FLV flags (1 byte), AVC packet type > (1 byte), and CompositionTime (24-bit integer) > - If AVC packet type is 0, parse the rest of the packet as a decoder > configuration record. Build AVCDCR with PPS, SPS, AVCProfileIndication, > profile_compatibility and AVCLevelIndication and append it to the buffer. > - If AVC packet type is 1 and there is something in the buffer, append > packet (usually starts with 0x00000002) to the buffer, pass the buffer > contents to avcodec_decode_video2 and clear the buffer. > - If the buffer is empty, simply pass the packet to avcodec_decode_video2. > At the moment when I call avcodec_decode_video2 with buffer contents (that > consist of 2 AVCDCRs and one encoded frame), before lots of "no frame!" it > prints "Current profile doesn't provide more RBSP data in PPS, skipping". I > think I've made some progress but am still doing something wrong. I will not have time to look deeper into this until next week, but maybe you could try to use the native RMTP support in libavformat? Alex From kalileo at universalx.net Sat Apr 28 10:00:40 2012 From: kalileo at universalx.net (Kalileo) Date: Sat, 28 Apr 2012 15:00:40 +0700 Subject: [Libav-user] Unable to decode H.264 stream received via RTMP In-Reply-To: References: Message-ID: <838269DD-4A8B-4E1B-A592-7E577F5B223D@universalx.net> On Apr 26, 2012, at 05:53 , ???????? wrote: > > So I'm doing the following: > - Create a buffer > - Get a video RTMP packet from the queue > - Read 3 fields at the beginning of it - FLV flags (1 byte), AVC packet type (1 byte), and CompositionTime (24-bit integer) > - If AVC packet type is 0, parse the rest of the packet as a decoder configuration record. Build AVCDCR with PPS, SPS, AVCProfileIndication, profile_compatibility and AVCLevelIndication and append it to the buffer. > - If AVC packet type is 1 and there is something in the buffer, append packet (usually starts with 0x00000002) to the buffer, pass the buffer contents to avcodec_decode_video2 and clear the buffer. > - If the buffer is empty, simply pass the packet to avcodec_decode_video2. > At the moment when I call avcodec_decode_video2 with buffer contents (that consist of 2 AVCDCRs and one encoded frame), before lots of "no frame!" it prints "Current profile doesn't provide more RBSP data in PPS, skipping". I think I've made some progress but am still doing something wrong. Are you taking into consideration that with h264 it can take a lot of frames passed to decoding before you get back the first decoded frame ? How long / how many frames are you decoding before you give up? From genesys at gmx.ch Sat Apr 28 22:16:04 2012 From: genesys at gmx.ch (=?iso-8859-1?Q?=22Matthias_B=FChlmann=22?=) Date: Sat, 28 Apr 2012 22:16:04 +0200 Subject: [Libav-user] change stream encoding options while encoding Message-ID: <20120428201604.14270@gmx.net> Do changes to the fields of AVCodecContext after avcodec_open2() have any effect? If not, how can I make changes to a stream while encoding? Like for example changing the bitrate or the gop_size? -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a From jettoblack at gmail.com Mon Apr 30 02:34:46 2012 From: jettoblack at gmail.com (jettoblack) Date: Sun, 29 Apr 2012 17:34:46 -0700 (PDT) Subject: [Libav-user] Frame order from TS demux - mpeg2video vs h264 Message-ID: <1335746086040-4597204.post@n4.nabble.com> Hello, I have a question about determining the display order of picture frames when demuxing a MPEG-2 transport stream that contains either MPEG-2 video or H.264 video. I'm using ffmpeg git head latest as of the past couple days. My code uses libavformat to demux the stream, add some metadata which must be in picture display order, then remux the stream. I have a loop to get packets from the source, modify them if it's a video packet, and write packets back out to the output muxer. This is working fine for MPEG-2 video streams but I'm having some issues getting the proper frame order when demuxing TS with H.264 video. I tried decoding the codec to a picture and reading picture.coded_picture_number but this doesn't always give the right display order either. Is there a better way? Both test files were created with ffmpeg latest and from the same source, only difference is one is MPEG-2 video/audio and the other is H.264/AAC. Here is the basic loop, edited to be concise (full compilable source code included in link below): while (1) { av_init_packet(&pkt); r = av_read_frame(in, &pkt); if (pkt.stream_index == videoStream) { avcodec_decode_video2(in->streams[videoStream]->codec, &picture, &got_picture, &pkt); if (got_picture) { printf("picture_packet %d, coded_picture_number %d, pts %"PRId64"\n", picture_packets, picture.coded_picture_number, pkt.pts); // very simple test to insert a byte that should increase in displayed frame order // note: I know this is not a proper way to insert extra data, this is for simple testing only av_grow_packet(&pkt, 1); pkt.data[pkt.size - 1] = (uint8_t)(picture.coded_picture_number & 0xff); picture_packets++; } } // write frame r = av_interleaved_write_frame(out, &pkt); av_free_packet(&pkt); } When the source file has MPEG-2 video, the frames come out of the demuxer in frame display order: picture_packet 0, coded_picture_number 0, pts 129003 picture_packet 1, coded_picture_number 1, pts 132006 picture_packet 2, coded_picture_number 2, pts 135009 picture_packet 3, coded_picture_number 3, pts 138012 So my code is working fine for MPEG-2 video streams. I can read the output stream and when demuxed back into picture display order, all of my metadata is in the proper order. However when the source file contains H.264 video, the packets are not demuxing in picture display order, nor is the pattern consistent: picture_packet 0, coded_picture_number 0, pts 156000 picture_packet 1, coded_picture_number 2, pts 153150 picture_packet 2, coded_picture_number 1, pts 162150 picture_packet 3, coded_picture_number 4, pts 159150 ... picture_packet 146, coded_picture_number 145, pts 595200 picture_packet 147, coded_picture_number 147, pts 592350 picture_packet 148, coded_picture_number 148, pts 601350 picture_packet 149, coded_picture_number 150, pts 598350 picture_packet 150, coded_picture_number 149, pts 607350 If I make my algorithm depend on the coded_picture_number, the results are right most of the time, but every 150 frames or so, I end up getting 2 frames swapped in order, as if the coded_picture_number is getting swapped once in a while. E.g. when decoding the resulting output stream, my metadata ends up with the order "144 145 146 148 147 149 150..." instead of being in order. Notice above that the pts for coded_picture_number 150 is less than the pts for coded_picture_number 148 or 149. Any ideas? What is the best way to reliably tell get the frames' picture display order when demuxing a MPEG-2 TS w/ H.264 video? Is there a way to convert PTS back into a display-order frame number? Source code: http://dl.dropbox.com/u/7730988/main.c.zip Two sample videos (3MB): http://dl.dropbox.com/u/7730988/sotu11.zip Thanks! -- View this message in context: http://libav-users.943685.n4.nabble.com/Frame-order-from-TS-demux-mpeg2video-vs-h264-tp4597204p4597204.html Sent from the libav-users mailing list archive at Nabble.com. From nitinkumgoyal at gmail.com Mon Apr 30 08:48:54 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Mon, 30 Apr 2012 12:18:54 +0530 Subject: [Libav-user] Support of EVRC speech codec in ffmpeg Message-ID: Hi I want to decode *Enhanced Variable Rate CODEC* (*EVRC*) and its other flavors like EVRC0/EVRC1/EVRCB etc. But it seems like EVRC is not being supported by ffmpeg main trunk. Is there any way i can decode this content using ffmpeg library of or any of its other branches if they have its support? Or if ffmpeg don't support, then can someone suggests me some other library which is able to decode EVRC speech codec or if anyone can tell me the algorithm to decode the EVRC content, it will be highly appreciated. Thanks Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Mon Apr 30 08:50:06 2012 From: kalileo at universalx.net (Kalileo) Date: Mon, 30 Apr 2012 13:50:06 +0700 Subject: [Libav-user] Frame order from TS demux - mpeg2video vs h264 In-Reply-To: <1335746086040-4597204.post@n4.nabble.com> References: <1335746086040-4597204.post@n4.nabble.com> Message-ID: <3D89D15A-CA26-4DC9-92A5-2D962B5E0218@universalx.net> The decoder gives you the (decoded) pictures in the correct order. The PTS value _should_ reflect that order. I would try to attach the metadata in the order as you get it from the demuxer with the pictures as you get them out of the decoder. Basically, it is exactly the same syncing you have to do with audio and video. With h264 the order is in the pts value (or as the decoded frames come out of the decoder.) From vadimkantorov at gmail.com Mon Apr 30 15:52:55 2012 From: vadimkantorov at gmail.com (Vadim Kantorov) Date: Mon, 30 Apr 2012 15:52:55 +0200 Subject: [Libav-user] Motion vector extraction Message-ID: Hi all, I'm using libavformat / libavcodec to extract motion vectors from files encoded by different codecs (MPEG-2, H.264,...). Do I understand correctly that if motion vectors exist for macro-block or can be predicted, they are available in the motion_val field? What happens when a macro-block contains several links to other blocks (the case of a B-frame; ability for weighted mixtures in H.264)? Is any kind of motion vector (say, to past reference frames for B-type blocks) inserted in the motion_val at all for such blocks? If I'm misunderstanding something, please correct me. I've just started to dig in the topic. Thanks, -- Vadim Kantorov +33 (603) 292-769 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jettoblack at gmail.com Mon Apr 30 18:53:24 2012 From: jettoblack at gmail.com (jettoblack) Date: Mon, 30 Apr 2012 09:53:24 -0700 (PDT) Subject: [Libav-user] Frame order from TS demux - mpeg2video vs h264 In-Reply-To: <3D89D15A-CA26-4DC9-92A5-2D962B5E0218@universalx.net> References: <1335746086040-4597204.post@n4.nabble.com> <3D89D15A-CA26-4DC9-92A5-2D962B5E0218@universalx.net> Message-ID: On Mon, Apr 30, 2012 at 2:51 AM, Kalileo [via libav-users] < ml-node+s943685n4597541h88 at n4.nabble.com> wrote: > > The decoder gives you the (decoded) pictures in the correct order. > > That's what I expected, and it does for MPEG-2 codec video, but not for H.264 codec within a MPEG-2 transport stream. > I would try to attach the metadata in the order as you get it from the > demuxer with the pictures as you get them out of the decoder. > I tried that and for H.264 it's definitely wrong if I use the frames in-order from the demuxer. It does work fine for MPEG-2 video. Should I file a bug report? Thanks, Jason -- View this message in context: http://libav-users.943685.n4.nabble.com/Frame-order-from-TS-demux-mpeg2video-vs-h264-tp4597204p4598722.html Sent from the libav-users mailing list archive at Nabble.com.