From marc at waesche.org Sat Sep 1 00:56:14 2012 From: marc at waesche.org (Marc Waesche) Date: Sat, 01 Sep 2012 00:56:14 +0200 Subject: [Libav-user] Performance Optimization: 200 different Watermarks in 200 different Frames Message-ID: <5041410E.6060604@waesche.org> Hello! I want to let build and deliver individual encoded video clips on the fly from my server. There is a source video clip in which an actor is moving a piece of paper from the left to the right in front of the cam. On this piece of paper there is an image visible. And this image is individual. That means: A user can upload an image file to my server per POST and on the next website he can watch the source video clip in which his uploaded image is inserted in a perfect visual manner so that it looks like that this image is indeed printed on that white piece of paper. Yeah, I know, this sounds to be something for Adobe After Effects or kind of that but there is no chance to handle such a video editing tool on server side and let it produce and deliver the result FAST. :-) So I decided to do it in kind of a primitive way. I plan to build 200 different images on the fly and overlay 200 frames of the source video file. (sounds terrible I know but I found no other solution). My question is: Is there a way to let ffmpeg set watermarks to the video file with dynamical changing watermark source file names depending on the single frames? Or is it better to build a second video clip out of the 200 images and merge this 2 video clips together? Also every other new idea (for me) how my challenge could be come to a happy end is very welcome! :-) Best regards from Germany Marc From ggarra13 at gmail.com Sat Sep 1 16:00:22 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Sat, 1 Sep 2012 11:00:22 -0300 Subject: [Libav-user] Encoding a movie file in rgba Message-ID: I am trying to encode a movie file (avi or quicktime) as rgba. But I lack source code with examples, except ffmpeg which is too complex. Can anyone help me? Thanks in advance. -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefasab at gmail.com Sat Sep 1 16:18:07 2012 From: stefasab at gmail.com (Stefano Sabatini) Date: Sat, 1 Sep 2012 16:18:07 +0200 Subject: [Libav-user] Simple example of recording a video file in rgba space In-Reply-To: References: Message-ID: <20120901141806.GA24223@arborea> On date Thursday 2012-08-30 15:07:44 -0300, Gonzalo Garramuno encoded: > TItle says it all. I'm looking for a tutorial or for code that shows how > to encode a movie or avi file with rgba as the color space. Check doc/examples/muxing.c and other examples file in the same dir. From andresteves at gmail.com Sat Sep 1 18:10:43 2012 From: andresteves at gmail.com (Andre Esteves) Date: Sat, 1 Sep 2012 17:10:43 +0100 Subject: [Libav-user] Avio_open error opening rtsp server connection Message-ID: Hi everyone, I built ffmpeg for android to use with JNI and i tried to make use of methods that are in the muxing example ( http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html#l00414). I source code im using is: *char server[] = "rtsp://192.168.1.34/rtplive/streamTeste";* * av_register_all();* * avcodec_register_all();* * avformat_network_init();* * * * /* auto detect the output format from the name. */* * avformat_alloc_output_context2(&oc, 0, "mp4", server);* * if(!oc)* * LOGI(5,"Could not guess format...");* * * * //oc = avformat_alloc_context();* * * * LOGI(5,"1...");* * * * oformat = oc->oformat;* * strcpy(oc->filename,server);* * * * /* find the video encoder */* * video_codec = avcodec_find_encoder(CODEC_ID_MPEG4); //cannot build h264 says not found :(* * * * if(video_codec == 0)* * LOGI(5,"Could not find video encoder...");* * * * LOGI(5,"2...");* * * * /* add a video output stream */* * video_st = avformat_new_stream(oc, video_codec);* * * * video_c = avcodec_alloc_context3(video_codec);* * * * video_c = video_st->codec;* * video_c->codec_id = video_codec->id;* * video_c->codec_type = AVMEDIA_TYPE_VIDEO;* * * * /* put sample parameters */* * video_c->bit_rate = 400000;* * * * /* resolution must be a multiple of two, but round up to 16 as often required */* * video_c->width = 352;* * video_c->height = 288;* * * * /* time base: this is the fundamental unit of time (in seconds) in terms* * of which frame timestamps are represented. for fixed-fps content,* * timebase should be 1/framerate and timestamp increments should be* * identically 1. */* * video_c->time_base= (AVRational){1,25};* * video_c->gop_size = 10; /* emit one intra frame every twelve frames at most */* * video_c->max_b_frames=1;* * video_c->pix_fmt = PIX_FMT_YUV420P;* * * * if(video_c->codec_id == CODEC_ID_H264)* * av_opt_set(video_c->priv_data, "preset", "slow", 0);* * * * LOGI(5,"3...");* * if (avcodec_open2(video_c, video_codec, NULL) < 0) {* * LOGI(5,"Could not open video codec");* * }* * LOGI(5,"4...");* * * * /* allocate the encoded raw picture */* * picture = avcodec_alloc_frame();* * picture->pts = 0;* * * * int size = avpicture_get_size(video_c->pix_fmt, video_c->width, video_c->height);* * * * tmp_picture = avcodec_alloc_frame();* * * * av_dump_format(oc, 0, server, 1);* * * * int ret = 0;* * if ((ret = avio_check(server, AVIO_FLAG_WRITE)) < 0)* * {* * LOGI(5,"Could not open server'%d'...'%s'",ret,server);* * }* * else{* * * * /* open the output file, if needed */* * if (!(oformat->flags & AVFMT_NOFILE)) {* * if (avio_open(&oc->pb, server, AVIO_FLAG_WRITE) < 0) {* * LOGI(5,"Could not open server...'%s'",server);* * }* * }* * }* * * * /* write the stream header, if any */* * avformat_write_header(oc, 0);* It gives me an error on the avio_open function... The server is a Wowza Media Server and the IP address is correct and the server is waiting for new connections. I also have the Internet permission on Android Manifest. Best Regards and thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Sun Sep 2 14:50:12 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Sun, 2 Sep 2012 15:50:12 +0300 Subject: [Libav-user] how to use own buffers for input data with av_read_frame() In-Reply-To: References: Message-ID: On Thu, Aug 30, 2012 at 9:34 AM, Jan Pohanka wrote: > Hello, > > I'm implementing support for hardware video decoder on DM365 and I have some > problems with buffers. I have simple testing application with following code > (simplified) > > ... > avformat_open_input(&fctx, filename, NULL, NULL); > ... > av_find_stream_info(fctx); > ... > codec = avcodec_find_decoder_by_name("libdm365_h264"); > ... > ret = avcodec_open(avctx, codec) > ... > picture = avcodec_alloc_frame(); > ... > for (i = 0; i < 500; i++) { > int nb; > char fname[32]; > > if (av_read_frame(fctx, &pkt) < 0) > break; > > nb = avcodec_decode_video2(avctx, picture, &got_pic, &pkt); > if (nb < 0) { > av_log(avctx, AV_LOG_ERROR, "error in decoding\n"); > goto decode_cleanup; > } > printf("Decoded frame: %d\n", i); > sprintf(fname, "frame%02d.jpg", i); > save_image(picture, avctx->pix_fmt, avctx->width, avctx->height, fname); > } > > The problem is that the decoder needs to have both input and output data in > a buffer which is continuous in physical memory. I can fulfill this > constraint for the output data (AVFrame *picture) because the buffer is > allocated by codec itself so I can use my own allocator there. > Unfortunately I do not know how to handle data of AVPacktet pkt, which are > filled in by av_read_frame() - these are allocated by av_malloc which > fallbacks to malloc and the buffers probably won't be continuous. > > I see two solutions here, but I'm not happy with neither of them: > - copy the whole packet to the continuous buffer (but this will > significantly slower the application) > - provide own av_malloc wrapper that will use my own allocator (many things > from libav* internals will be also allocated there and this is not exactly > what I want) > > > Do please someone know some more elegant solution? > > with best regards > Jan > > -- > Tato zpr?va byla vytvo?ena p?evratn?m po?tovn?m klientem Opery: > http://www.opera.com/mail/ If I understand your question correctly, you are worried that some an AVPacket could be using more than one chunk of memory for the (encoded) bytes read from the h264 stream. To the best of my knowledge, all packet data that is relevant for decoder is contiguous (pkt.data); the extra pieces that could be present (pkt.side_data) do not belong to hardware decoder anyway. BR, Alex Cohn From ffmpeg at gmail.com Sun Sep 2 15:45:42 2012 From: ffmpeg at gmail.com (Geek.Song) Date: Sun, 2 Sep 2012 21:45:42 +0800 Subject: [Libav-user] Avio_open error opening rtsp server connection In-Reply-To: References: Message-ID: On Sun, Sep 2, 2012 at 12:10 AM, Andre Esteves wrote: > Hi everyone, > > I built ffmpeg for android to use with JNI and i tried to make use of > methods that are in the muxing example > (http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html#l00414). > I source code im using is: > char server[] = "rtsp://192.168.1.34/rtplive/streamTeste"; > av_register_all(); > avcodec_register_all(); > avformat_network_init(); > > /* auto detect the output format from the name. */ > avformat_alloc_output_context2(&oc, 0, "mp4", server); "mp4" should be replaced by "rtsp" -- ----------------------------------------------------------------------------------------- My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2 From andresteves at gmail.com Sun Sep 2 19:48:10 2012 From: andresteves at gmail.com (Andre Esteves) Date: Sun, 2 Sep 2012 18:48:10 +0100 Subject: [Libav-user] Avio_open error opening rtsp server connection In-Reply-To: References: Message-ID: Still giving error after changing from mp4 to rtsp. No dia 2 de Set de 2012 13:45, "Geek.Song" escreveu: > On Sun, Sep 2, 2012 at 12:10 AM, Andre Esteves > wrote: > > Hi everyone, > > > > I built ffmpeg for android to use with JNI and i tried to make use of > > methods that are in the muxing example > > (http://ffmpeg.org/doxygen/trunk/muxing_8c-source.html#l00414). > > I source code im using is: > > char server[] = "rtsp://192.168.1.34/rtplive/streamTeste"; > > av_register_all(); > > avcodec_register_all(); > > avformat_network_init(); > > > > /* auto detect the output format from the name. */ > > avformat_alloc_output_context2(&oc, 0, "mp4", server); > > "mp4" should be replaced by "rtsp" > > > -- > > ----------------------------------------------------------------------------------------- > My key fingerprint: d1:03:f5:32:26:ff:d7:3c:e4:42:e3:51:ec:92:78:b2 > _______________________________________________ > 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 xhpohanka at gmail.com Mon Sep 3 09:54:29 2012 From: xhpohanka at gmail.com (Jan Pohanka) Date: Mon, 03 Sep 2012 09:54:29 +0200 Subject: [Libav-user] swscale speed In-Reply-To: References: Message-ID: Hi, > Maybe on your cpu RAM speed is the bottleneck (i.e. cpu is very fast) > so it's able to keep up. > Now compare it with lanczos... I have tried to write my own simple downscaler (really simple with no antialasing filtering etc.) and it's speed is fine, so I think that won't be a memory bottleneck regards Jan From mferrer at brainstorm.es Mon Sep 3 13:11:58 2012 From: mferrer at brainstorm.es (Moises Ferrer Serra) Date: Mon, 03 Sep 2012 13:11:58 +0200 Subject: [Libav-user] =?utf-8?q?avcodec=5Fflush=5Fbuffers_on_looping?= Message-ID: <47c2d003c86149d0460aefb3df4b86b3@brainstorm.es> Hello, I have a working implementation of clip playback with ffmpeg, but I am finding some problems with looping. The documentation states that avcodec_flush_buffers should be called when seeking, but I was wondering if that was strictly necessary for loops. Not flushig on loops leads the program to output all the images, provided that I add a dumy packet at the end of the last loop for some clips. However, the reported DTS and PTS are not what I would expect (ie. decoding the firts packet after looping brings me the last image of the previous iteration, but PTS and DTS of the new packet). My question is if the way to go would be to flush always, at the end of the loop, adding any dummy packets if needed. Note that loop does not need to be full clip lenth, it is arbitrary (in case that makes a difference). Thanks! From bruce at spearmorgan.com Tue Sep 4 19:28:57 2012 From: bruce at spearmorgan.com (Bruce Wheaton) Date: Tue, 4 Sep 2012 10:28:57 -0700 Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) Message-ID: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> I know most FFMPEG codecs only work up to 4096 x 4096, for various good reasons. Is anyone aware of codecs that support greater, such as 6K or 8K? Bruce From cehoyos at ag.or.at Tue Sep 4 19:41:36 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 4 Sep 2012 17:41:36 +0000 (UTC) Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) References: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> Message-ID: Bruce Wheaton writes: > I know most FFMPEG codecs only work up to 4096 x 4096 Could you elaborate? (I had to search to find a codec that did not support 8k.) Carl Eugen From bruce at spearmorgan.com Tue Sep 4 21:39:41 2012 From: bruce at spearmorgan.com (Bruce Wheaton) Date: Tue, 4 Sep 2012 12:39:41 -0700 Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) In-Reply-To: References: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> Message-ID: On Sep 4, 2012, at 10:41 AM, Carl Eugen Hoyos wrote: > Bruce Wheaton writes: > >> I know most FFMPEG codecs only work up to 4096 x 4096 > > Could you elaborate? > (I had to search to find a codec that did not support 8k.) Maybe my information was out of date! That would be good news. I seem to remember finding hard coded 4096 limits in various places. Where are you seeing that 8k is supported? I couldn't find a way to list those capabilities. Bruce From cehoyos at ag.or.at Tue Sep 4 23:42:21 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 4 Sep 2012 21:42:21 +0000 (UTC) Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) References: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> Message-ID: Bruce Wheaton writes: > >> I know most FFMPEG codecs only work up to 4096 x 4096 > > > > Could you elaborate? > > (I had to search to find a codec that did not support 8k.) > > Maybe my information was out of date! That would be good news. > I seem to remember finding hard coded 4096 limits They were removed some time ago. (Those limits where never codec-related.) > in various places. > Where are you seeing that 8k is supported? I tested it. Carl Eugen From michaelni at gmx.at Tue Sep 4 23:44:55 2012 From: michaelni at gmx.at (Michael Niedermayer) Date: Tue, 4 Sep 2012 23:44:55 +0200 Subject: [Libav-user] avcodec_flush_buffers on looping In-Reply-To: <47c2d003c86149d0460aefb3df4b86b3@brainstorm.es> References: <47c2d003c86149d0460aefb3df4b86b3@brainstorm.es> Message-ID: <20120904214455.GB12342@kiste2> On Mon, Sep 03, 2012 at 01:11:58PM +0200, Moises Ferrer Serra wrote: > Hello, > > I have a working implementation of clip playback with ffmpeg, but I > am finding some problems with looping. The documentation states that > avcodec_flush_buffers should be called when seeking, but I was > wondering if that was strictly necessary for loops. Not flushig on > loops leads the program to output all the images, provided that I > add a dumy packet at the end of the last loop for some clips. > However, the reported DTS and PTS are not what I would expect (ie. > decoding the firts packet after looping brings me the last image of > the previous iteration, but PTS and DTS of the new packet). possibly you are missing: avcodec_decode_video2 doxy * @note Codecs which have the CODEC_CAP_DELAY capability set have a delay * between input and output, these need to be fed with avpkt->data=NULL, * avpkt->size=0 at the end to return the remaining frames. > > My question is if the way to go would be to flush always, at the end > of the loop, adding any dummy packets if needed. Note that loop does > not need to be full clip lenth, it is arbitrary (in case that makes > a difference). flush is recommanded [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From bruce at spearmorgan.com Tue Sep 4 23:57:46 2012 From: bruce at spearmorgan.com (Bruce Wheaton) Date: Tue, 4 Sep 2012 14:57:46 -0700 Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) In-Reply-To: References: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> Message-ID: On Sep 4, 2012, at 2:42 PM, Carl Eugen Hoyos wrote: > They were removed some time ago. > (Those limits where never codec-related.) > >> in various places. >> Where are you seeing that 8k is supported? > > I tested it. Great, thank you for doing that. I'll start doing some post-HD codec testing then. Bruce From rogerdpack2 at gmail.com Wed Sep 5 00:57:54 2012 From: rogerdpack2 at gmail.com (Roger Pack) Date: Tue, 4 Sep 2012 16:57:54 -0600 Subject: [Libav-user] swscale speed In-Reply-To: References: Message-ID: > I have tried to write my own simple downscaler (really simple with no > antialasing filtering etc.) and it's speed is fine, so I think that won't be > a memory bottleneck gprof perhaps? Or maybe libswscale just needs a "naive" filter added? -r From donmoir at comcast.net Wed Sep 5 00:59:20 2012 From: donmoir at comcast.net (Don Moir) Date: Tue, 4 Sep 2012 18:59:20 -0400 Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) References: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> Message-ID: <19675839A83745B2A1DE38F20274DB5C@MANLAP> ----- Original Message ----- From: "Carl Eugen Hoyos" To: Sent: Tuesday, September 04, 2012 5:42 PM Subject: Re: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) > Bruce Wheaton writes: > >> >> I know most FFMPEG codecs only work up to 4096 x 4096 >> > >> > Could you elaborate? >> > (I had to search to find a codec that did not support 8k.) >> >> Maybe my information was out of date! That would be good news. > >> I seem to remember finding hard coded 4096 limits > > They were removed some time ago. > (Those limits where never codec-related.) > >> in various places. >> Where are you seeing that 8k is supported? > > I tested it. > Can you point me to a such a file to test with ? From cehoyos at ag.or.at Wed Sep 5 02:31:50 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 5 Sep 2012 00:31:50 +0000 (UTC) Subject: [Libav-user] Ultra-HD capable Codecs? (greater than 4K) References: <59E908A6-5582-4D29-AD3F-03322ECED543@spearmorgan.com> <19675839A83745B2A1DE38F20274DB5C@MANLAP> Message-ID: Don Moir writes: > >> Where are you seeing that 8k is supported? > > > > I tested it. > > Can you point me to a such a file to test with ? tests/lena.pnm (FFmpeg by default is able to scale videos.) Carl Eugen From hskim095 at naver.com Wed Sep 5 04:28:52 2012 From: hskim095 at naver.com (=?UTF-8?B?6rmA7Z2s7IiZ?=) Date: Wed, 5 Sep 2012 11:28:52 +0900 (KST) Subject: [Libav-user] =?utf-8?q?Is_ffmpeg_possibe_to_decode_H=2E263_Mode_B?= =?utf-8?q?=3F?= Message-ID: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> Hi guys, I wonder ffmpeg is possible to decode H.263 Mode B. Please give some your experience or advice. Regards and thanks HSK -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Wed Sep 5 06:09:28 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 5 Sep 2012 04:09:28 +0000 (UTC) Subject: [Libav-user] Is ffmpeg possibe to decode H.263 Mode B? References: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> Message-ID: ??? writes: > I wonder ffmpeg is possible to decode H.263 Mode B. Please provide a sample. Carl Eugen From tomas.hardin at codemill.se Wed Sep 5 11:23:27 2012 From: tomas.hardin at codemill.se (Tomas =?ISO-8859-1?Q?H=E4rdin?=) Date: Wed, 05 Sep 2012 11:23:27 +0200 Subject: [Libav-user] MOOV Atom Not Found In-Reply-To: <-1442068983148223900@unknownmsgid> References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> Message-ID: <1346837007.2570.2.camel@Aspire-5820TG> On Thu, 2012-08-30 at 08:41 +0100, Mark Kenna wrote: > On 30 Aug 2012, at 01:10, Jan Ehrhardt wrote: > > > Mark Kenna in gmane.comp.video.ffmpeg.libav.user (Wed, 29 Aug 2012 > > 21:31:24 +0100): > >> But for that you would have to have encoded the entire file before > >> streaming right? I need to stream as I'm encoding so there will never > >> be a physical file. > > > > qt-faststart, mp4box -inter nnn and mp4creator -optimize all do more or > > less the same on transcoded files. You might take a look at > > > > http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg/9734251#9734251 > > > Surely all these tools require a pre-encoded file as input? I would > need to do it on the fly so the moon atom would have to exist just > after the write header stage. You need to mux fragmented mp4, which ffmpeg does not support. Try using a container actually made for streaming, like mpegts. You could also try avi. If I were you I'd try all muxers available. /Tomas From krueger at lesspain.de Wed Sep 5 13:19:48 2012 From: krueger at lesspain.de (=?UTF-8?Q?Robert_Kr=C3=BCger?=) Date: Wed, 5 Sep 2012 13:19:48 +0200 Subject: [Libav-user] MOOV Atom Not Found In-Reply-To: <1346837007.2570.2.camel@Aspire-5820TG> References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> <1346837007.2570.2.camel@Aspire-5820TG> Message-ID: On Wed, Sep 5, 2012 at 11:23 AM, Tomas H?rdin wrote: > On Thu, 2012-08-30 at 08:41 +0100, Mark Kenna wrote: >> On 30 Aug 2012, at 01:10, Jan Ehrhardt wrote: >> >> > Mark Kenna in gmane.comp.video.ffmpeg.libav.user (Wed, 29 Aug 2012 >> > 21:31:24 +0100): >> >> But for that you would have to have encoded the entire file before >> >> streaming right? I need to stream as I'm encoding so there will never >> >> be a physical file. >> > >> > qt-faststart, mp4box -inter nnn and mp4creator -optimize all do more or >> > less the same on transcoded files. You might take a look at >> > >> > http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg/9734251#9734251 >> > >> Surely all these tools require a pre-encoded file as input? I would >> need to do it on the fly so the moon atom would have to exist just >> after the write header stage. > > You need to mux fragmented mp4, which ffmpeg does not support. Try using It doesn't? Could you elaborate? From chengang5 at staff.sina.com.cn Wed Sep 5 15:22:05 2012 From: chengang5 at staff.sina.com.cn (=?GB2312?B?s8IguNY=?=) Date: Wed, 05 Sep 2012 21:22:05 +0800 Subject: [Libav-user] how can i let avio_open2() output to memory instead of file? Message-ID: <80F3F37C-3D67-4B83-802F-1AF141646595@staff.sina.com.cn> I found this, int avio_open2(AVIOContext **s, const char *url, int flags,const AVIOInterruptCB *int_cb, AVDictionary **options); how can i use a memory opinter instead of const char *url? I want to do this because i am writing a nginx flv2ts module, it read flv file from harddisk and output mpegts to HTTP client. And I don`t want to leave a file on hard disk. who can help? thanks From wagner.patriota at gmail.com Wed Sep 5 16:54:47 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Wed, 5 Sep 2012 11:54:47 -0300 Subject: [Libav-user] how can i let avio_open2() output to memory instead of file? In-Reply-To: <80F3F37C-3D67-4B83-802F-1AF141646595@staff.sina.com.cn> References: <80F3F37C-3D67-4B83-802F-1AF141646595@staff.sina.com.cn> Message-ID: On Wed, Sep 5, 2012 at 10:22 AM, ? ? wrote: > I found this, > > int avio_open2(AVIOContext **s, const char *url, int flags,const > AVIOInterruptCB *int_cb, AVDictionary **options); > > how can i use a memory opinter instead of const char *url? > > look for FFmpeg protocols you can get content from any protocol FFmpeg has... or you can write one and register it with FFmpeg > > I want to do this because i am writing a nginx flv2ts module, it read flv > file from harddisk and output mpegts to HTTP client. And I don`t want to > leave a file on hard disk. > yes, the same thing: protocols.... they are located in libavformat > who can help? thanks > > _______________________________________________ > 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 ctetrick at newtek.com Wed Sep 5 17:13:51 2012 From: ctetrick at newtek.com (Cary Tetrick) Date: Wed, 05 Sep 2012 10:13:51 -0500 Subject: [Libav-user] MOOV Atom Not Found In-Reply-To: References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> <1346837007.2570.2.camel@Aspire-5820TG> Message-ID: <50476C2F.80500@newtek.com> On 9/5/2012 6:19 AM, Robert Kr?ger wrote: > On Wed, Sep 5, 2012 at 11:23 AM, Tomas H?rdin wrote: >> On Thu, 2012-08-30 at 08:41 +0100, Mark Kenna wrote: >>> On 30 Aug 2012, at 01:10, Jan Ehrhardt wrote: >>> >>>> Mark Kenna in gmane.comp.video.ffmpeg.libav.user (Wed, 29 Aug 2012 >>>> 21:31:24 +0100): >>>>> But for that you would have to have encoded the entire file before >>>>> streaming right? I need to stream as I'm encoding so there will never >>>>> be a physical file. >>>> qt-faststart, mp4box -inter nnn and mp4creator -optimize all do more or >>>> less the same on transcoded files. You might take a look at >>>> >>>> http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg/9734251#9734251 >>>> >>> Surely all these tools require a pre-encoded file as input? I would >>> need to do it on the fly so the moon atom would have to exist just >>> after the write header stage. >> You need to mux fragmented mp4, which ffmpeg does not support. Try using > It doesn't? Could you elaborate? Fragmented MP4 writes multiple MOOF atoms rather than a single MOOV atom. (This is the underlying format used in Adobe's .f4v files for example.) I've never seen any support for this in ffmpeg. It simply doesn't support it. From rogerdpack2 at gmail.com Wed Sep 5 21:45:16 2012 From: rogerdpack2 at gmail.com (Roger Pack) Date: Wed, 5 Sep 2012 13:45:16 -0600 Subject: [Libav-user] swscale speed In-Reply-To: References: Message-ID: >> Maybe on your cpu RAM speed is the bottleneck (i.e. cpu is very fast) >> so it's able to keep up. >> Now compare it with lanczos... > > > I have tried to write my own simple downscaler (really simple with no > antialasing filtering etc.) and it's speed is fine, so I think that won't be > a memory bottleneck Is its speed faster than any libswscale option? -r From arash.cordi at gmail.com Thu Sep 6 08:49:51 2012 From: arash.cordi at gmail.com (Arash Cordi) Date: Thu, 6 Sep 2012 11:19:51 +0430 Subject: [Libav-user] Is ffmpeg possibe to decode H.263 Mode B? In-Reply-To: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> References: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> Message-ID: yes, without any problem. what's your problem? On Wed, Sep 5, 2012 at 6:58 AM, ??? wrote: > Hi guys, > > > > I wonder ffmpeg is possible to decode H.263 Mode B. > > Please give some your experience or advice. > > > > Regards and thanks > > HSK > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From arash.cordi at gmail.com Thu Sep 6 09:41:09 2012 From: arash.cordi at gmail.com (Arash Cordi) Date: Thu, 6 Sep 2012 12:11:09 +0430 Subject: [Libav-user] H264 decoding problem In-Reply-To: References: Message-ID: > > 2012-08-19 10:21:55.008 RTPlayer[333:12f03] Unknown NAL code: 28 (2350 > bits) > NAL Unit 28 is a fragment unit (FU-A) you need to defragment NAL units before sending then to ffmpeg PPS and SPS frames are sent in a NAL Unit 24 (STAP-A) at the start of stream. check this link for a complete description for defragmenting NAL Units : http://stackoverflow.com/questions/7665217/how-to-process-raw-udp-packets-so-that-they-can-be-decoded-by-a-decoder-filter-i -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From arash.cordi at gmail.com Thu Sep 6 09:43:42 2012 From: arash.cordi at gmail.com (Arash Cordi) Date: Thu, 6 Sep 2012 12:13:42 +0430 Subject: [Libav-user] h263 frame rate In-Reply-To: References: Message-ID: do you use RTP timestamp in ffmpeg frames? On Mon, Aug 20, 2012 at 11:05 PM, David Longest wrote: > Hello all,**** > > ** ** > > I am demuxing an h263 RTP stream and providing the raw h263 data to libav. > The source of the stream is transmitting at 15fps. It seems no matter what > I do, libavcodec and libavformat give me back a framerate and time stamp > that results in ~30fps. I have tried adding the option ?framerate?, ?1:15? > to the dictionary sent in avformat_open_input(), but it does not change the > result. The incorrect framerate and AVStream time_base cause my playback to > stutter.**** > > ** ** > > What is the proper way to handle overriding the frame rate reported by > libav?**** > > ** ** > > Thanks, > David**** > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From arash.cordi at gmail.com Thu Sep 6 09:46:25 2012 From: arash.cordi at gmail.com (Arash Cordi) Date: Thu, 6 Sep 2012 12:16:25 +0430 Subject: [Libav-user] convert to OGV format In-Reply-To: References: Message-ID: try 'ffmpeg -formats' On Sun, Aug 26, 2012 at 3:18 AM, Rizwan Raza wrote: > I need to convert to OGV format from MP4 format. Does ffmpeg supports > converting to this format? > > Thanks in advance > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From krueger at lesspain.de Thu Sep 6 10:23:08 2012 From: krueger at lesspain.de (=?UTF-8?Q?Robert_Kr=C3=BCger?=) Date: Thu, 6 Sep 2012 10:23:08 +0200 Subject: [Libav-user] MOOV Atom Not Found In-Reply-To: <50476C2F.80500@newtek.com> References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> <1346837007.2570.2.camel@Aspire-5820TG> <50476C2F.80500@newtek.com> Message-ID: On Wed, Sep 5, 2012 at 5:13 PM, Cary Tetrick wrote: > > On 9/5/2012 6:19 AM, Robert Kr?ger wrote: >> >> On Wed, Sep 5, 2012 at 11:23 AM, Tomas H?rdin >> wrote: >>> >>> On Thu, 2012-08-30 at 08:41 +0100, Mark Kenna wrote: >>>> >>>> On 30 Aug 2012, at 01:10, Jan Ehrhardt wrote: >>>> >>>>> Mark Kenna in gmane.comp.video.ffmpeg.libav.user (Wed, 29 Aug 2012 >>>>> 21:31:24 +0100): >>>>>> >>>>>> But for that you would have to have encoded the entire file before >>>>>> streaming right? I need to stream as I'm encoding so there will never >>>>>> be a physical file. >>>>> >>>>> qt-faststart, mp4box -inter nnn and mp4creator -optimize all do more or >>>>> less the same on transcoded files. You might take a look at >>>>> >>>>> >>>>> http://stackoverflow.com/questions/8616855/how-to-output-fragmented-mp4-with-ffmpeg/9734251#9734251 >>>>> >>>> Surely all these tools require a pre-encoded file as input? I would >>>> need to do it on the fly so the moon atom would have to exist just >>>> after the write header stage. >>> >>> You need to mux fragmented mp4, which ffmpeg does not support. Try using >> >> It doesn't? Could you elaborate? > > Fragmented MP4 writes multiple MOOF atoms rather than a single MOOV atom. > (This is the underlying format used in Adobe's .f4v files for example.) > I've never seen any support for this in ffmpeg. It simply doesn't support > it. I know what fragmented MP4 is and I have created it using ffmpeg see http://ffmpeg.org/ffmpeg.html#MOV_002fMP4_002fISMV My question was rather meant like "is there some non-obvious thing that ffmpeg does not support regarding fragmented mp4" From cehoyos at ag.or.at Thu Sep 6 11:23:34 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 6 Sep 2012 09:23:34 +0000 (UTC) Subject: [Libav-user] MOOV Atom Not Found References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> <1346837007.2570.2.camel@Aspire-5820TG> <50476C2F.80500@newtek.com> Message-ID: Cary Tetrick writes: > Fragmented MP4 writes multiple MOOF atoms rather than a single MOOV atom. > (This is the underlying format used in Adobe's .f4v files for example.) > I've never seen any support for this in ffmpeg. Could you provide such a sample? (In case FFmpeg cannot read the file.) Carl Eugen From T.Glover at nottingham.ac.uk Thu Sep 6 12:30:01 2012 From: T.Glover at nottingham.ac.uk (Tony Glover) Date: Thu, 6 Sep 2012 11:30:01 +0100 Subject: [Libav-user] H264 live stream decoding and got_picture_ptr Message-ID: <8824AAED239A0A48AE135277DC2B79B43EF4007FA2@EXCHANGE1.ad.nottingham.ac.uk> Hi all, I'm streaming H264 video from a number of webcams to other users over the internet. For the most part this works fine. However, occasionally I get a number of frames with the got_picture_ptr of avcodec_decode_video2() set to 0. This results in a slight pause in the received stream of a couple of seconds. It happens fairly regularly but not sufficiently to render the experience unusable. I've noted that there have been a few previous posts regarding what the meaning of having the flag set to 0 actually signifies, but I haven't come across a definitive answer. The documentation states that it signifies the frame couldn't be decompressed, but what actually causes this to happen? I'm obviously dropping packets as the data is going over a public network and I'm using RTP to stream the data, so that's to be expected. Is it just a case of not receiving all the frames in a given picture and hence the decoder is struggling to decode the complete picture? All things such as timestamps appear to be OK. I'm using x264 to encode the data and am using intra-refresh to encode, so I don't get reference (IDR) frames as such, but I do get fragmented NAL's. Can anybody shed some light on this or suggest an approach when the situation occurs? Many thanks, Tony. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An HTML attachment was scrubbed... URL: From edward at edwardandalison.com Thu Sep 6 21:27:34 2012 From: edward at edwardandalison.com (Edward Richards) Date: Thu, 6 Sep 2012 12:27:34 -0700 Subject: [Libav-user] Multi threaded encode Message-ID: <1AFCD916-3E4A-426F-BA63-6681482415C9@EDWARDandALISON.com> I want to run a I-frame based codec multi threaded so that I can get it encoding faster on a multi core pc. If I open n streams can I simply change the steam index when I av_write_interleaved_frame or will it buffer because it assumes it has the mix the other streams (that'll never get filled). I don't have the ram for that. If I take responsibility for the interleaving will it work that way? What if I simply change the encoder flag to include the threaded-frame attribute (it already has the threaded slice attribute)? Will that make av_encode2 non-blocking? If so I can encode n frames at a time and block on a av_flush right? Thanks for pointers. _________________ Sent from my iPhone... So sorry for typos! From rnp at 25ghz.net Thu Sep 6 23:31:13 2012 From: rnp at 25ghz.net (Rafael do Nascimento Pereira) Date: Thu, 6 Sep 2012 23:31:13 +0200 Subject: [Libav-user] Decoded frame upside down Message-ID: Hello folks, I am decoding a video with an PIX_FMT_YUV420P pixel format, and then saving it as a BMP file. The decoding is successful and i have a raw YUV frame and then i convert it to PIX_FMT_RGB24: *swsctx = sws_getCachedContext(swsctx, codecctx->width, codecctx->height, codecctx->pix_fmt, codecctx->width, codecctx->height, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL); sws_scale(swsctx, frame->data, frame->linesize, 0, codecctx->height, framergb->data, framergb->linesize);* And finally i save it on disk with the appropriate BMP header and then the RGB24 frame. *for (y = 0; y < codecctx->height; y++) { fwrite(framergb->data[0] + y * framergb->linesize[0], 1, (codecctx->width * BYTESPERPIXEL), pFile); }* The strange thing is that the image, when opened (e.g. viewnior or gimp) is shown upside down. I started to write on disk from the beginning of the buffer til the end. If i do the opposite: *uint8_t *end = framergb->data[0] + (codecctx->height * framergb->linesize[0]); for (y = 0; y < codecctx->height; y++) { fwrite(end - (y * framergb->linesize[0]), 1, (codecctx->width * BYTESPERPIXEL), pFile); } * The BMP image is shown correctly. I really don't know if i made some mistake in this proccess, or this is the way the ffmpeg library actually works. relevant infos: ffmpeg 0.10.4 Linux (Fedora 17) gcc 4.7.0 20120507 Thanks in advance. Regards, Rafael. *"If you can't explain it simply, you don't understand it well enough." --Albert Einstein* -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbradshaw at sorensonmedia.com Thu Sep 6 23:41:34 2012 From: mbradshaw at sorensonmedia.com (Michael Bradshaw) Date: Thu, 6 Sep 2012 15:41:34 -0600 Subject: [Libav-user] Decoded frame upside down In-Reply-To: References: Message-ID: On Thu, Sep 6, 2012 at 3:31 PM, Rafael do Nascimento Pereira wrote: > [...] > The BMP image is shown correctly. I really don't know if i made some > mistake in this proccess, > or this is the way the ffmpeg library actually works. It's the way BMP files work. They're stored upside down, so when you write them you must write it upside down. I suggest you use ffmpeg/libav* to write the BMP file. But if you're going to write it yourself, be sure to read up on the BMP format. --Michael From hskim095 at naver.com Fri Sep 7 02:30:28 2012 From: hskim095 at naver.com (=?UTF-8?B?6rmA7Z2s7IiZ?=) Date: Fri, 7 Sep 2012 09:30:28 +0900 (KST) Subject: [Libav-user] =?utf-8?q?Is_ffmpeg_possibe_to_decode_H=2E263_Mode_B?= =?utf-8?q?=3F?= In-Reply-To: References: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> Message-ID: <6fe89f87bc64178e21da5746c578e57@tweb25.nm.nhnsystem.com> Hi, Thank you for replay I have to add Mode B decoding. Previously I implemented only Mode A. Does it need only Mode B header processing for decoding? I mean H263 mode B header length is different with Mode A. In case Mode A, I push H.263 data to ffmpeg library except Mode A header. Regards, HSK ----Original Message----- From: "Arash Cordi"<arash.cordi at gmail.com> To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter."<libav-user at ffmpeg.org>; Cc: Sent: 2012-09-06 (?) 15:49:51 Subject: Re: [Libav-user] Is ffmpeg possibe to decode H.263 Mode B? yes, without any problem. what's your problem? On Wed, Sep 5, 2012 at 6:58 AM, ??? <hskim095 at naver.com> wrote: Hi guys, I wonder ffmpeg is possible to decode H.263 Mode B. Please give some your experience or advice. Regards and thanks HSK _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From ctetrick at satx.rr.com Fri Sep 7 04:53:11 2012 From: ctetrick at satx.rr.com (Cary Tetrick) Date: Thu, 6 Sep 2012 21:53:11 -0500 Subject: [Libav-user] MOOV Atom Not Found In-Reply-To: References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> <1346837007.2570.2.camel@Aspire-5820TG> <50476C2F.80500@newtek.com> Message-ID: <002701cd8ca3$eb6c17a0$c24446e0$@rr.com> -----Original Message----- From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Robert Kr?ger Sent: Thursday, September 06, 2012 3:23 AM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: Re: [Libav-user] MOOV Atom Not Found On Wed, Sep 5, 2012 at 5:13 PM, Cary Tetrick wrote: > > On 9/5/2012 6:19 AM, Robert Kr?ger wrote: >> >> On Wed, Sep 5, 2012 at 11:23 AM, Tomas H?rdin >> >> wrote: >>> >>> On Thu, 2012-08-30 at 08:41 +0100, Mark Kenna wrote: >>>> >>>> On 30 Aug 2012, at 01:10, Jan Ehrhardt wrote: >>>> >>>>> Mark Kenna in gmane.comp.video.ffmpeg.libav.user (Wed, 29 Aug 2012 >>>>> 21:31:24 +0100): >>>>>> >>>>>> But for that you would have to have encoded the entire file >>>>>> before streaming right? I need to stream as I'm encoding so there >>>>>> will never be a physical file. >>>>> >>>>> qt-faststart, mp4box -inter nnn and mp4creator -optimize all do >>>>> more or less the same on transcoded files. You might take a look >>>>> at >>>>> >>>>> >>>>> http://stackoverflow.com/questions/8616855/how-to-output-fragmente >>>>> d-mp4-with-ffmpeg/9734251#9734251 >>>>> >>>> Surely all these tools require a pre-encoded file as input? I would >>>> need to do it on the fly so the moon atom would have to exist just >>>> after the write header stage. >>> >>> You need to mux fragmented mp4, which ffmpeg does not support. Try >>> using >> >> It doesn't? Could you elaborate? > > Fragmented MP4 writes multiple MOOF atoms rather than a single MOOV atom. > (This is the underlying format used in Adobe's .f4v files for > example.) I've never seen any support for this in ffmpeg. It simply > doesn't support it. I know what fragmented MP4 is and I have created it using ffmpeg see http://ffmpeg.org/ffmpeg.html#MOV_002fMP4_002fISMV My question was rather meant like "is there some non-obvious thing that ffmpeg does not support regarding fragmented mp4" ------------------------- Robert, my apologies, I did in fact misunderstand your questions. Looks like I need to get caught up on the latest code. From arash.cordi at gmail.com Fri Sep 7 09:06:33 2012 From: arash.cordi at gmail.com (Arash Cordi) Date: Fri, 7 Sep 2012 11:36:33 +0430 Subject: [Libav-user] Is ffmpeg possibe to decode H.263 Mode B? In-Reply-To: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> References: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> Message-ID: normally h263 fragments are as follow: start of frame --> [Mode A][Mode B] .... [Mode B] <---- end of frame you only need the first byte of h263 payload header which is the same for all Mode A,B,C; +-+-+-+-+-+-+-+-+ |F|P|SBIT |EBIT | +-+-+-+-+-+-+-+-+ you need timestamp and marker bit (to identify start and end of frame) from rtp payload. you also need to align fragments according to SBIT, EBIT in h263 payload header -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From krueger at lesspain.de Fri Sep 7 12:50:34 2012 From: krueger at lesspain.de (=?UTF-8?Q?Robert_Kr=C3=BCger?=) Date: Fri, 7 Sep 2012 12:50:34 +0200 Subject: [Libav-user] MOOV Atom Not Found In-Reply-To: <002701cd8ca3$eb6c17a0$c24446e0$@rr.com> References: <2943363885602405226@unknownmsgid> <-1442068983148223900@unknownmsgid> <1346837007.2570.2.camel@Aspire-5820TG> <50476C2F.80500@newtek.com> <002701cd8ca3$eb6c17a0$c24446e0$@rr.com> Message-ID: On Fri, Sep 7, 2012 at 4:53 AM, Cary Tetrick wrote: > -----Original Message----- > From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of Robert Kr?ger > Sent: Thursday, September 06, 2012 3:23 AM > To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. > Subject: Re: [Libav-user] MOOV Atom Not Found > > On Wed, Sep 5, 2012 at 5:13 PM, Cary Tetrick wrote: >> >> On 9/5/2012 6:19 AM, Robert Kr?ger wrote: >>> >>> On Wed, Sep 5, 2012 at 11:23 AM, Tomas H?rdin >>> >>> wrote: >>>> >>>> On Thu, 2012-08-30 at 08:41 +0100, Mark Kenna wrote: >>>>> >>>>> On 30 Aug 2012, at 01:10, Jan Ehrhardt wrote: >>>>> >>>>>> Mark Kenna in gmane.comp.video.ffmpeg.libav.user (Wed, 29 Aug 2012 >>>>>> 21:31:24 +0100): >>>>>>> >>>>>>> But for that you would have to have encoded the entire file >>>>>>> before streaming right? I need to stream as I'm encoding so there >>>>>>> will never be a physical file. >>>>>> >>>>>> qt-faststart, mp4box -inter nnn and mp4creator -optimize all do >>>>>> more or less the same on transcoded files. You might take a look >>>>>> at >>>>>> >>>>>> >>>>>> http://stackoverflow.com/questions/8616855/how-to-output-fragmente >>>>>> d-mp4-with-ffmpeg/9734251#9734251 >>>>>> >>>>> Surely all these tools require a pre-encoded file as input? I would >>>>> need to do it on the fly so the moon atom would have to exist just >>>>> after the write header stage. >>>> >>>> You need to mux fragmented mp4, which ffmpeg does not support. Try >>>> using >>> >>> It doesn't? Could you elaborate? >> >> Fragmented MP4 writes multiple MOOF atoms rather than a single MOOV atom. >> (This is the underlying format used in Adobe's .f4v files for >> example.) I've never seen any support for this in ffmpeg. It simply >> doesn't support it. > > I know what fragmented MP4 is and I have created it using ffmpeg > > see http://ffmpeg.org/ffmpeg.html#MOV_002fMP4_002fISMV > > My question was rather meant like "is there some non-obvious thing that ffmpeg does not support regarding fragmented mp4" > > ------------------------- > Robert, my apologies, I did in fact misunderstand your questions. Looks like I need to get caught up on the latest code. > No need to apologize. Have a nice day. Robert From ggarra13 at gmail.com Fri Sep 7 16:22:55 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Fri, 07 Sep 2012 11:22:55 -0300 Subject: [Libav-user] muxing.c with RGBA Message-ID: <504A033F.4000601@gmail.com> I am trying to encode a movie file (avi, mp4 or mov) in the RGBA color space. I tried the muxing.c example from the docs/examples directory. But changing the pixel format returns: [mpeg4 @ 0xb99400] only YUV420 is supported I am wondering how can I encode RGBA pictures in a movie file. Can someone help? From arash.cordi at gmail.com Fri Sep 7 18:46:14 2012 From: arash.cordi at gmail.com (Arash Cordi) Date: Fri, 7 Sep 2012 21:16:14 +0430 Subject: [Libav-user] muxing.c with RGBA In-Reply-To: <504A033F.4000601@gmail.com> References: <504A033F.4000601@gmail.com> Message-ID: most video formats only support yuv. there's nothing you can do about it. why would you want to do that anyway? On Fri, Sep 7, 2012 at 6:52 PM, Gonzalo Garramuno wrote: > I am trying to encode a movie file (avi, mp4 or mov) in the RGBA color > space. I tried the muxing.c example from the docs/examples directory. But > changing the pixel format returns: > > [mpeg4 @ 0xb99400] only YUV4u20 is supported > > I am wondering how can I encode RGBA pictures in a movie file. Can > someone help? > ______________________________**_________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/**listinfo/libav-user > -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkbrinkley at hotmail.com Sat Sep 8 00:50:14 2012 From: jkbrinkley at hotmail.com (Kentb Work) Date: Fri, 7 Sep 2012 16:50:14 -0600 Subject: [Libav-user] Only last frame image being found? Message-ID: I am writing a ffmpeg h264 decoder for a new processor and have run into a problem. The embedded decoder is using video clip that is linked in not read from a stream. (Currently do not have a file system or Ethernet connection) I am able to process the image data using h264 decoder (based on tutorial01.c) but I only get the last frame. I can see the code processing the frames but it finds no images in the initial decode. Below is snapshot of the log message that I am seeing (note additional logging added). The image that I am testing with is only 4 frames long but I have used an image that is 50 frames only. I have verified that I can use ffplay to playback the image successfully, so I believe that data I am using is good. Attached is a copy of the code that I am using along with video clip source file. Any pointers would be helpful in solving this problem, Kent ================================================================= Running H.264 Initialize AV Packet Video decoding Found codec Alloc context and frame... Done alloc context. Log Level = 48 Done alloc frame. Opening codec. Opened codec. Image_buf_read - bin_file_data=2de710 bin_file_data_size=8b1 rbuf = 3fef48, rsize = 1, nrs = 4096 read_index = 2225, nbtyes = 4096, abytes = 2225 Reading frame 0 Read 2225 bytes Entered h264: decode_frame: h264: decode_frame: Calling decode_nal_units Enter ff_h264_decode_nal ff_h264_decode_nal: decoding esc Escaping at 10 Escaping at 15 Next start at 24 [h264 @ 0(500438] NAL 7 at 4/2225 length 22 [h264 @ 0500438] sps:0 profile:100/13 poc:0 ref:4 20x15 FRM 8B8 crop:0/0/0/0 VUI 420 1/50 Enter ff_h264_decode_nal startcode, so we must be past the end no escaped 0 [h264 @ 0?500438] NAL 8 at 33/2225 length 5 pps:0 sps:0 CABAC slice_groups:1 ref:3/1 weighted qp:23/26/-2/-2 LPAR 8x8DCT Enter ff_h264_decode_nal startcode, so we must be past the end no escaped 0 [h264 @ 0?500438] NAL 6 at 42/2225 length 685 [h264 @ 0500438] user data:"x264 - core 125 r2208 d9d2288 - 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 8x" Enter ff_h264_decode_nal startcode, so we must be past the end no escaped 0 [h264 @ 0?500438] NAL 5 at 731/2225 length 1403 Processing NAL_SLICE: decode_slice_header set_dimensions width=320 set_dimensions height=240 Frame number 0 [h264 @ 0?500438] default_get_buffer called on pic 0?5378d8, 1 buffers used [h264 @ 0slice:1 F mb:0 I fix IDR pps:0 frame:0 poc:0/0 ref:3/1 qp:28 loop:1:0:0 weight:0 Set key_frame. Done NAL_SLICE execute_decode_slices Done execute_decode_slices Enter ff_h264_decode_nal ff_h264_decode_nal: decoding esc Escaping at 34 Next start at 46 [h264 @ 0?500438] NAL 1 at 2139/2225 length 45 Processing NAL_SLICE: decode_slice_header Frame number 1 [h264 @ 0500438] default_release_buffer called on pic 05378d8, 0 buffers used [h264 @ 0$500438] default_get_buffer called on pic 0?5378d8, 1 buffers used [h264 @ 0?500438] short term list: [h264 @ 0?500438] long term list: [h264 @ 0?500438] Missing reference picture ERROR NAL_SLICE: decode_slice_header [h264 @ 0decode_slice_header error Enter ff_h264_decode_nal startcode, so we must be past the end no escaped 0 [h264 @ 0NAL 1 at 2190/2225 length 14 Processing NAL_SLICE: decode_slice_header Frame number 2 [h264 @ 0?500438] Frame num gap 2 0 [h264 @ 0?500438] default_release_buffer called on pic 0 default_get_buffer called on pic 0(5378d8, 1 buffers used [h264 @ 0500438] no mmco here [h264 @ 0500438] remove short 1 count 0 [h264 @ 0500438] short term list: [h264 @ 0500438] 0 fn:1 poc:6 05980e8 [h264 @ 0500438] long term list: [h264 @ 0?500438] default_get_buffer called on pic 0(537b90, 2 buffers used [h264 @ 0500438] short term list: [h264 @ 0500438] 0 fn:1 poc:6 05980e8 [h264 @ 0500438] long term list: [h264 @ 0500438] slice:1 F mb:0 B fix pps:0 frame:2 poc:4/4 ref:1/1 qp:28 loop:1:0:0 weight:2 SPAT Set key_frame. Done NAL_SLICE execute_decode_slices Done execute_decode_slices Enter ff_h264_decode_nal no escaped 0 [h264 @ 0?500438] NAL 1 at 2209/2225 length 15 Processing NAL_SLICE: decode_slice_header Frame number 3 [h264 @ 0?500438] Frame num gap 3 1 [h264 @ 0?500438] default_release_buffer called on pic 0 default_get_buffer called on pic 0(537b90, 2 buffers used [h264 @ 0500438] no mmco here [h264 @ 0500438] remove short 2 count 1 [h264 @ 0500438] 0 1 005378d8 [h264 @ 0500438] short term list: [h264 @ 0500438] 0 fn:2 poc:4 0604a08 [h264 @ 0500438] 1 fn:1 poc:6 05980e8 [h264 @ 0500438] long term list: [h264 @ 0?500438] default_get_buffer called on pic 0(537e48, 3 buffers used [h264 @ 0?500438] short term list: [h264 @ 0?500438] 0 fn:2 poc:8 0604a08 [h264 @ 0?500438] 1 fn:1 poc:6 05980e8 [h264 @ 0?500438] long term list: [h264 @ 0500438] slice:1 F mb:0 B fix pps:0 frame:3 poc:2/2 ref:1/2 qp:28 loop:1:0:0 weight:2 SPAT Set key_frame. Done NAL_SLICE execute_decode_slices Done execute_decode_slices !(s->flags2 & CODEC_FLAG2_CHUNKS) || (s->mb_y >= s->mb_height && s->mb_height) Signal interlacing information externally Derive interlacing flag from used decoding process. cur->field_poc[0] == cur->field_poc[1] Most likely progressive [h264 @ 09500438] no picture -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: image-data-color.c URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: image-file.h URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test-h264-color.c URL: From ggarra13 at gmail.com Sat Sep 8 15:39:48 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Sat, 8 Sep 2012 10:39:48 -0300 Subject: [Libav-user] muxing.c with RGBA In-Reply-To: References: <504A033F.4000601@gmail.com> Message-ID: 2012/9/7 Arash Cordi > most video formats only support yuv. there's nothing you can do about it. > why would you want to do that anyway? > > I have my movie data in RGBA and would like to avoid translation to encode faster and to keep the data the same. > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Sun Sep 9 14:58:31 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Sun, 9 Sep 2012 15:58:31 +0300 Subject: [Libav-user] muxing.c with RGBA In-Reply-To: References: <504A033F.4000601@gmail.com> Message-ID: On Sat, Sep 8, 2012 at 4:39 PM, Gonzalo Garramuno wrote: > > 2012/9/7 Arash Cordi >> >> most video formats only support yuv. there's nothing you can do about it. >> why would you want to do that anyway? >> > I have my movie data in RGBA and would like to avoid translation to encode > faster and to keep the data the same. > > Gonzalo Garramu?o > ggarra13 at gmail.com If your main concern is "keep the data the same", you probably need a lossless encoder. There exist a few, see for example the summary: http://www.media-matters.net/docs/resources/Digital%20Files/General/lossless_codecs_test_en.pdf Regarding performance, typically the resources required for RGB to YUV conversion are negligible compared to encoding, so you should be careful to choose the encoder that delivers best speed for your compression requirements, and let ffmpeg take care of color space. The tricky part is if you want to send reliably the transparency information (the A of RGBA). Very few players respect the alpha channel. BR, Alex Cohn From hskim095 at naver.com Mon Sep 10 09:28:13 2012 From: hskim095 at naver.com (=?UTF-8?B?6rmA7Z2s7IiZ?=) Date: Mon, 10 Sep 2012 16:28:13 +0900 (KST) Subject: [Libav-user] =?utf-8?q?Is_ffmpeg_possibe_to_decode_H=2E263_Mode_B?= =?utf-8?q?=3F?= In-Reply-To: References: <38e2ad30b083cb2966a15b41f1952bb1@tweb22.nm.nhnsystem.com> Message-ID: <9a5ab75ddb2449a8f094371932f53922@tweb02.nm.nhnsystem.com> Thank you for your reply. It's very helpful to me. Regards, HSK -----Original Message----- From: "Arash Cordi"<arash.cordi at gmail.com> To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter."<libav-user at ffmpeg.org>; Cc: Sent: 2012-09-07 (?) 16:06:33 Subject: Re: [Libav-user] Is ffmpeg possibe to decode H.263 Mode B? normally h263 fragments are as follow: start of frame --> [Mode A][Mode B] .... [Mode B] <---- end of frame you only need the first byte of h263 payload header which is the same for all Mode A,B,C; +-+-+-+-+-+-+-+-+ |F|P|SBIT |EBIT | +-+-+-+-+-+-+-+-+ you need timestamp and marker bit (to identify start and end of frame) from rtp payload. you also need to align fragments according to SBIT, EBIT in h263 payload header -- ArasH -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Tue Sep 11 02:51:59 2012 From: amir.rouhi at rmit.edu.au (Rouhi Amirhossein2) Date: Tue, 11 Sep 2012 10:51:59 +1000 Subject: [Libav-user] Getting the size of video frames Message-ID: Hi I have a list of videos. how can i run a program, like ffmpeg (or any other program ) in a for loop to just get the size of the video frames ? like: for(i=0;i From chengang5 at staff.sina.com.cn Tue Sep 11 04:09:19 2012 From: chengang5 at staff.sina.com.cn (=?GB2312?B?s8IguNY=?=) Date: Tue, 11 Sep 2012 10:09:19 +0800 Subject: [Libav-user] Getting the size of video frames In-Reply-To: References: Message-ID: Take a look at : http://stackoverflow.com/questions/2017843/fetch-frame-count-with-ffmpeg ? 2012-9-11???8:51? Rouhi Amirhossein2 ??? > Hi > I have a list of videos. how can i run a program, like ffmpeg (or any other program ) in a for loop to just get the size of the video frames ? like: > > for(i=0;i > FrameSize[i] =system(ffmpeg_path); //!!!????? > > } > Cheers > Amir > _______________________________________________ > 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 amir.rouhi at rmit.edu.au Tue Sep 11 04:58:38 2012 From: amir.rouhi at rmit.edu.au (Rouhi Amirhossein2) Date: Tue, 11 Sep 2012 12:58:38 +1000 Subject: [Libav-user] Getting the size of video frames In-Reply-To: References: Message-ID: I cant use that code in windows version. BTW does it save the frame size in a file? On 11 September 2012 12:09, ? ? wrote: > Take a look at : > > http://stackoverflow.com/questions/2017843/fetch-frame-count-with-ffmpeg > > ? 2012-9-11???8:51? Rouhi Amirhossein2 ??? > > Hi > I have a list of videos. how can i run a program, like ffmpeg (or any > other program ) in a for loop to just get the size of the video frames ? > like: > > for(i=0;i > FrameSize[i] =system(ffmpeg_path); //!!!????? > > } > Cheers > Amir > _______________________________________________ > 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 > > -- Amir H. Rouhi PhD Student/ CSIT RMIT University Room: 14-09-04 http://raws.adc.rmit.edu.au/~s3288736/blog2/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Tue Sep 11 06:16:39 2012 From: amir.rouhi at rmit.edu.au (Rouhi Amirhossein2) Date: Tue, 11 Sep 2012 14:16:39 +1000 Subject: [Libav-user] Fixed rate i-frame Message-ID: Hi Do you think the bellow command grantee that i get just one i-frame among 25frames? (focus on -keyint_min 25 -g 25) ffmpeg -i c:\test.mpg -an -vcodec libx264 -threads 0 -f h264 -keyint_min 25 -g 25 C:\test.264 What if i need one i-frame every each seconds? -- Amir -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Tue Sep 11 08:18:42 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 11 Sep 2012 09:18:42 +0300 Subject: [Libav-user] Getting the size of video frames In-Reply-To: References: Message-ID: On Tue, Sep 11, 2012 at 5:09 AM, ? ? wrote: > Take a look at : > > http://stackoverflow.com/questions/2017843/fetch-frame-count-with-ffmpeg I thought the question was about frame size (width and height), not the number of frames. Alex > ? 2012-9-11???8:51? Rouhi Amirhossein2 ??? > > Hi > I have a list of videos. how can i run a program, like ffmpeg (or any other > program ) in a for loop to just get the size of the video frames ? like: > > for(i=0;i > FrameSize[i] =system(ffmpeg_path); //!!!????? > > } > Cheers > Amir From leandrosansilva at gmail.com Tue Sep 11 17:44:25 2012 From: leandrosansilva at gmail.com (Leandro Santiago) Date: Tue, 11 Sep 2012 12:44:25 -0300 Subject: [Libav-user] control line spacing and support for text borders on drawtext filter (patch) Message-ID: Hello to all. I've made some modifications on drawtext filter which I currently use at work. The modifications are the support of controlling the spacing between lines and a very primitive support for borders around text. It's primitive because it works only with one or 2px (I basically copied the shadow code to execute four times...). I know the correct is using the freetype support for text borders (which is very powerful), but for now this patch is working for me. I'd enjoy if you revised it. -- ----- Sent from my Atari -------------- next part -------------- A non-text attachment was scrubbed... Name: border_and_line_spacing.diff Type: application/octet-stream Size: 4564 bytes Desc: not available URL: From leandrosansilva at gmail.com Tue Sep 11 18:39:47 2012 From: leandrosansilva at gmail.com (Leandro Santiago) Date: Tue, 11 Sep 2012 13:39:47 -0300 Subject: [Libav-user] control line spacing and support for text borders on drawtext filter (patch) In-Reply-To: References: Message-ID: ops, wrong mailing list :-( 2012/9/11 Leandro Santiago : > Hello to all. I've made some modifications on drawtext filter which I > currently use at work. > > The modifications are the support of controlling the spacing between > lines and a very primitive support for borders around text. It's > primitive because it works only with one or 2px (I basically copied > the shadow code to execute four times...). I know the correct is using > the freetype support for text borders (which is very powerful), but > for now this patch is working for me. > > I'd enjoy if you revised it. > > -- > ----- > Sent from my Atari -- ----- Sent from my Atari From rogerdpack2 at gmail.com Tue Sep 11 18:50:43 2012 From: rogerdpack2 at gmail.com (Roger Pack) Date: Tue, 11 Sep 2012 10:50:43 -0600 Subject: [Libav-user] "getting started" wiki page Message-ID: Ok in need of some "getting started with libav*" documentation, I recently made this page: http://ffmpeg.org/trac/ffmpeg/wiki/Using%20libav* suggestions welcome (also modifying it to improve it greatly welcome). Thanks! -roger- From 286166657 at qq.com Wed Sep 12 04:58:59 2012 From: 286166657 at qq.com (=?ISO-8859-1?B?TXl0aA==?=) Date: Wed, 12 Sep 2012 10:58:59 +0800 Subject: [Libav-user] How to Use FFmpeg Decode Libraries Message-ID: Hi All, I want to use FFmpeg decode libraries to decode an h.264 video stream. I found the libavcodec/api-example.c is a test example can decode MPEG1VIDEO format video streams. Now I use CODEC_ID_H264 instead of CODEC_ID_MPEG1VIDEO and build it, then add an argument (h.264 encode video stream) when ran the test case, there an error occurs. Below is the error log: #Video decoding #[h264 @ 0x8937020]error while decoding MB 14 7, bytestream (-23) #[h264 @ 0x8937020]concealing 955 DC, 955 AC, 955 MV errors #[h264 @ 0x8937020]no frame! #Error while decoding frame 0 Who can help me to resolve this issue? Any feedback is appreciated. Regards, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefasab at gmail.com Wed Sep 12 10:13:26 2012 From: stefasab at gmail.com (Stefano Sabatini) Date: Wed, 12 Sep 2012 10:13:26 +0200 Subject: [Libav-user] How to Use FFmpeg Decode Libraries In-Reply-To: References: Message-ID: <20120912081326.GC2508@arborea> On date Wednesday 2012-09-12 10:58:59 +0800, Myth encoded: > Hi All, > > I want to use FFmpeg decode libraries to decode an h.264 video > stream. I found the libavcodec/api-example.c is a test example can > decode MPEG1VIDEO format video streams. Now I use CODEC_ID_H264 > instead of CODEC_ID_MPEG1VIDEO and build it, then add an argument > (h.264 encode video stream) when ran the test case, there an error > occurs. Below is the error log: > > #Video decoding > #[h264 @ 0x8937020]error while decoding MB 14 7, bytestream (-23) > #[h264 @ 0x8937020]concealing 955 DC, 955 AC, 955 MV errors > #[h264 @ 0x8937020]no frame! > #Error while decoding frame 0 > > Who can help me to resolve this issue? > Any feedback is appreciated. Check the updated examples in doc/examples, decoding_encoding.c shows how to encode H.264 using libx264. Also check: http://ffmpeg.org/trac/ffmpeg/wiki/Using%20libav* From 286166657 at qq.com Wed Sep 12 11:50:03 2012 From: 286166657 at qq.com (=?gb18030?B?TXl0aA==?=) Date: Wed, 12 Sep 2012 17:50:03 +0800 Subject: [Libav-user] How to Use FFmpeg Decode Libraries Message-ID: Hi stefasab, Thanks for your help. I have downloaded the latest FFmepg source code. I faced a new question, I don't know how to build the test examples located in doc/examples/. I don't find any helper document. Can you help me? Thanks and Regards, Xin ------------------ Original ------------------ From: "Stefano Sabatini"; Date: Wed, Sep 12, 2012 04:13 PM To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries On date Wednesday 2012-09-12 10:58:59 +0800, Myth encoded: > Hi All, > > I want to use FFmpeg decode libraries to decode an h.264 video > stream. I found the libavcodec/api-example.c is a test example can > decode MPEG1VIDEO format video streams. Now I use CODEC_ID_H264 > instead of CODEC_ID_MPEG1VIDEO and build it, then add an argument > (h.264 encode video stream) when ran the test case, there an error > occurs. Below is the error log: > > #Video decoding > #[h264 @ 0x8937020]error while decoding MB 14 7, bytestream (-23) > #[h264 @ 0x8937020]concealing 955 DC, 955 AC, 955 MV errors > #[h264 @ 0x8937020]no frame! > #Error while decoding frame 0 > > Who can help me to resolve this issue? > Any feedback is appreciated. Check the updated examples in doc/examples, decoding_encoding.c shows how to encode H.264 using libx264. Also check: http://ffmpeg.org/trac/ffmpeg/wiki/Using%20libav* _______________________________________________ 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 cehoyos at ag.or.at Wed Sep 12 13:02:25 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 12 Sep 2012 11:02:25 +0000 (UTC) Subject: [Libav-user] How to Use FFmpeg Decode Libraries References: Message-ID: Myth <286166657 at ...> writes: > I have downloaded the latest FFmepg source code. > I faced a new question, I don't know how to build > the test examples located in doc/examples/ $ make ? (It seems to me you have to install FFmpeg first.) Carl Eugen From drrobison at openroadsconsulting.com Wed Sep 12 17:36:36 2012 From: drrobison at openroadsconsulting.com (David R Robison) Date: Wed, 12 Sep 2012 11:36:36 -0400 Subject: [Libav-user] illegal short term buffer state detected Message-ID: <5050AC04.1050700@openroadsconsulting.com> I am trying to decode an h.264 stream and seeing a lot of "illegal short term buffer state detected." errors. The video is not playing smoothly and I am wondering if these errors could cause a problem. Can anyone tell me what causes these errors? It is possible that there is a problem with the stream being created by the h.264 camera but I will need to be able to explain what the problem is (if there is one) to the camera manufacturer. Thanks, David -- David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drrobison at openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, please delete this email immediately. From i.like.privacy.too at gmail.com Wed Sep 12 18:17:58 2012 From: i.like.privacy.too at gmail.com (Camera Man) Date: Wed, 12 Sep 2012 12:17:58 -0400 Subject: [Libav-user] illegal short term buffer state detected In-Reply-To: <5050AC04.1050700@openroadsconsulting.com> References: <5050AC04.1050700@openroadsconsulting.com> Message-ID: <5050B5B6.5040407@gmail.com> An HTML attachment was scrubbed... URL: From drrobison at openroadsconsulting.com Wed Sep 12 19:39:46 2012 From: drrobison at openroadsconsulting.com (David R Robison) Date: Wed, 12 Sep 2012 13:39:46 -0400 Subject: [Libav-user] illegal short term buffer state detected In-Reply-To: <5050B5B6.5040407@gmail.com> References: <5050AC04.1050700@openroadsconsulting.com> <5050B5B6.5040407@gmail.com> Message-ID: <5050C8E2.7060801@openroadsconsulting.com> Is this a hard limit or is there a way to increase it? David David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drrobison at openroadsconsulting.com web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 On 9/12/2012 12:17 PM, Camera Man wrote: > On 09/12/2012 11:36 AM, David R Robison wrote: >> I am trying to decode an h.264 stream and seeing a lot of "illegal short >> term buffer state detected." errors. The video is not playing smoothly >> and I am wondering if these errors could cause a problem. Can anyone >> tell me what causes these errors? It is possible that there is a problem >> with the stream being created by the h.264 camera but I will need to be >> able to explain what the problem is (if there is one) to the camera >> manufacturer. Thanks, David > If this is UDP, it's a buffering problem - ffmpeg has a socket buffer > limit of 64KB; an 1280x720 I-frame is often 200K-300K, so some > packets get lost. > > Try to switch to TCP; if the problem disappears, that's your problem. > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, please delete this email immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From li9335 at 163.com Wed Sep 12 11:02:41 2012 From: li9335 at 163.com (chana) Date: Wed, 12 Sep 2012 02:02:41 -0700 (PDT) Subject: [Libav-user] avcodec_decode_audio4 yields silence (zero data) In-Reply-To: References: Message-ID: <1347440561609-4655678.post@n4.nabble.com> Hello,I have meet the sample problem,can you tell me how to solve it?Thanks tips:avcodec_decode_audio4 yields silence (zero data) -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-avcodec-decode-audio4-yields-silence-zero-data-tp4655204p4655678.html Sent from the libav-users mailing list archive at Nabble.com. From 286166657 at qq.com Thu Sep 13 04:00:09 2012 From: 286166657 at qq.com (=?ISO-8859-1?B?TXl0aA==?=) Date: Thu, 13 Sep 2012 10:00:09 +0800 Subject: [Libav-user] How to Use FFmpeg Decode Libraries Message-ID: Below is my build procedure: #cd ffmpeg #./configure --arch=x86 --target-os=linux #make #make install #cd doc/examples/ #make Then there are some error occurs. Following is the error log: Package libswresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libswresample.pc' to the PKG_CONFIG_PATH environment variable No package 'libswresample' found Package libswresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libswresample.pc' to the PKG_CONFIG_PATH environment variable No package 'libswresample' found cc decoding_encoding.o -lm -o decoding_encoding decoding_encoding.o: In function `video_encode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:342: undefined reference to `avcodec_find_encoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:348: undefined reference to `avcodec_alloc_context3' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:365: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:376: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:387: undefined reference to `av_image_alloc' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:396: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:420: undefined reference to `avcodec_encode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:437: undefined reference to `avcodec_encode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:454: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:455: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:456: undefined reference to `av_freep' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:457: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:429: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:446: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:362: undefined reference to `av_opt_set' decoding_encoding.o: In function `audio_decode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:243: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:248: undefined reference to `avcodec_find_decoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:254: undefined reference to `avcodec_alloc_context3' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:257: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:286: undefined reference to `avcodec_get_frame_defaults' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:288: undefined reference to `avcodec_decode_audio4' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:295: undefined reference to `av_samples_get_buffer_size' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:281: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:321: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:322: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:323: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:269: undefined reference to `av_free' decoding_encoding.o: In function `video_decode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:489: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:497: undefined reference to `avcodec_find_decoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:503: undefined reference to `avcodec_alloc_context3' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:512: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:525: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:554: undefined reference to `avcodec_decode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:580: undefined reference to `avcodec_decode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:595: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:596: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:597: undefined reference to `av_free' decoding_encoding.o: In function `main': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:606: undefined reference to `avcodec_register_all' decoding_encoding.o: In function `audio_encode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:117: undefined reference to `avcodec_find_encoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:123: undefined reference to `avcodec_alloc_context3' decoding_encoding.o: In function `select_channel_layout': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:88: undefined reference to `av_get_channel_layout_nb_channels' decoding_encoding.o: In function `audio_encode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:139: undefined reference to `av_get_channel_layout_nb_channels' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:142: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:154: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:166: undefined reference to `av_samples_get_buffer_size' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:168: undefined reference to `av_malloc' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:175: undefined reference to `avcodec_fill_audio_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:186: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:198: undefined reference to `avcodec_encode_audio2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:211: undefined reference to `avcodec_encode_audio2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:224: undefined reference to `av_freep' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:225: undefined reference to `av_freep' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:226: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:227: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:205: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:219: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:131: undefined reference to `av_get_sample_fmt_name' collect2: ld returned 1 exit status make: *** [decoding_encoding] Error 1 Can you tell me the right build procedure? Thanks and Regards, Stefan ------------------ Original ------------------ From: "Carl Eugen Hoyos"; Date: Wed, Sep 12, 2012 07:02 PM To: "libav-user"; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries Myth <286166657 at ...> writes: > I have downloaded the latest FFmepg source code. > I faced a new question, I don't know how to build > the test examples located in doc/examples/ $ make ? (It seems to me you have to install FFmpeg first.) 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 286166657 at qq.com Thu Sep 13 04:11:34 2012 From: 286166657 at qq.com (=?ISO-8859-1?B?TXl0aA==?=) Date: Thu, 13 Sep 2012 10:11:34 +0800 Subject: [Libav-user] How to Use FFmpeg Decode Libraries Message-ID: I have resolved this issue now. I need add PKG_CONFIG_PATH in environment variable. After do this, I can build the test example successfully. Thanks for your kindly help. ------------------ Original ------------------ From: "Myth"<286166657 at qq.com>; Date: Thu, Sep 13, 2012 10:00 AM To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries Below is my build procedure: #cd ffmpeg #./configure --arch=x86 --target-os=linux #make #make install #cd doc/examples/ #make Then there are some error occurs. Following is the error log: Package libswresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libswresample.pc' to the PKG_CONFIG_PATH environment variable No package 'libswresample' found Package libswresample was not found in the pkg-config search path. Perhaps you should add the directory containing `libswresample.pc' to the PKG_CONFIG_PATH environment variable No package 'libswresample' found cc decoding_encoding.o -lm -o decoding_encoding decoding_encoding.o: In function `video_encode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:342: undefined reference to `avcodec_find_encoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:348: undefined reference to `avcodec_alloc_context3' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:365: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:376: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:387: undefined reference to `av_image_alloc' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:396: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:420: undefined reference to `avcodec_encode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:437: undefined reference to `avcodec_encode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:454: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:455: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:456: undefined reference to `av_freep' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:457: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:429: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:446: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:362: undefined reference to `av_opt_set' decoding_encoding.o: In function `audio_decode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:243: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:248: undefined reference to `avcodec_find_decoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:254: undefined reference to `avcodec_alloc_context3' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:257: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:286: undefined reference to `avcodec_get_frame_defaults' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:288: undefined reference to `avcodec_decode_audio4' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:295: undefined reference to `av_samples_get_buffer_size' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:281: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:321: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:322: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:323: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:269: undefined reference to `av_free' decoding_encoding.o: In function `video_decode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:489: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:497: undefined reference to `avcodec_find_decoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:503: undefined reference to `avcodec_alloc_context3' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:512: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:525: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:554: undefined reference to `avcodec_decode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:580: undefined reference to `avcodec_decode_video2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:595: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:596: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:597: undefined reference to `av_free' decoding_encoding.o: In function `main': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:606: undefined reference to `avcodec_register_all' decoding_encoding.o: In function `audio_encode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:117: undefined reference to `avcodec_find_encoder' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:123: undefined reference to `avcodec_alloc_context3' decoding_encoding.o: In function `select_channel_layout': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:88: undefined reference to `av_get_channel_layout_nb_channels' decoding_encoding.o: In function `audio_encode_example': /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:139: undefined reference to `av_get_channel_layout_nb_channels' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:142: undefined reference to `avcodec_open2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:154: undefined reference to `avcodec_alloc_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:166: undefined reference to `av_samples_get_buffer_size' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:168: undefined reference to `av_malloc' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:175: undefined reference to `avcodec_fill_audio_frame' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:186: undefined reference to `av_init_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:198: undefined reference to `avcodec_encode_audio2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:211: undefined reference to `avcodec_encode_audio2' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:224: undefined reference to `av_freep' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:225: undefined reference to `av_freep' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:226: undefined reference to `avcodec_close' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:227: undefined reference to `av_free' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:205: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:219: undefined reference to `av_free_packet' /work/marvell_project/p-cat/benchmarks/ffmpeg/doc/examples/decoding_encoding.c:131: undefined reference to `av_get_sample_fmt_name' collect2: ld returned 1 exit status make: *** [decoding_encoding] Error 1 Can you tell me the right build procedure? Thanks and Regards, Stefan ------------------ Original ------------------ From: "Carl Eugen Hoyos"; Date: Wed, Sep 12, 2012 07:02 PM To: "libav-user"; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries Myth <286166657 at ...> writes: > I have downloaded the latest FFmepg source code. > I faced a new question, I don't know how to build > the test examples located in doc/examples/ $ make ? (It seems to me you have to install FFmpeg first.) 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 286166657 at qq.com Thu Sep 13 04:51:26 2012 From: 286166657 at qq.com (=?ISO-8859-1?B?TXl0aA==?=) Date: Thu, 13 Sep 2012 10:51:26 +0800 Subject: [Libav-user] How to Use FFmpeg Decode Libraries Message-ID: I have built the test examples successfully, but when I type the below command, an error occurs: #./decoding_encoding h264 Encode video file test.h264 codec not found I also use "./configure --list-encoders" to show all encoders, I don't find h264 codecs. Can you help me? Thanks and Regards, Stefan ------------------ Original ------------------ From: "Stefano Sabatini"; Date: Wed, Sep 12, 2012 04:13 PM To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries On date Wednesday 2012-09-12 10:58:59 +0800, Myth encoded: > Hi All, > > I want to use FFmpeg decode libraries to decode an h.264 video > stream. I found the libavcodec/api-example.c is a test example can > decode MPEG1VIDEO format video streams. Now I use CODEC_ID_H264 > instead of CODEC_ID_MPEG1VIDEO and build it, then add an argument > (h.264 encode video stream) when ran the test case, there an error > occurs. Below is the error log: > > #Video decoding > #[h264 @ 0x8937020]error while decoding MB 14 7, bytestream (-23) > #[h264 @ 0x8937020]concealing 955 DC, 955 AC, 955 MV errors > #[h264 @ 0x8937020]no frame! > #Error while decoding frame 0 > > Who can help me to resolve this issue? > Any feedback is appreciated. Check the updated examples in doc/examples, decoding_encoding.c shows how to encode H.264 using libx264. Also check: http://ffmpeg.org/trac/ffmpeg/wiki/Using%20libav* _______________________________________________ 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 wagner.patriota at gmail.com Thu Sep 13 20:09:45 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Thu, 13 Sep 2012 15:09:45 -0300 Subject: [Libav-user] HLS out of sync... Message-ID: Has anybody seen this phenomenon? I created a HLS with 44100Hz audio. The video gets out of sync during the time... if I seek to any point, it gets synced again... but after some time it gets out of sync again... What are the possible causes for this? Thank you, Wagner -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggarra13 at gmail.com Thu Sep 13 23:33:26 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Thu, 13 Sep 2012 18:33:26 -0300 Subject: [Libav-user] muxing starts at frame 3 Message-ID: I am trying the muxing example from docs/examples in recent git and I get two problems: With audio on, audio responds: [NULL @ 0x1e4eee0] Codec is experimental but experimental codecs are not enabled, try -strict -2 could not open codec The second issue is that when I comment the audio and leave the video only, I obtain a video but that starts at frame 3 instead of 0 or 1. -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From 286166657 at qq.com Fri Sep 14 08:02:54 2012 From: 286166657 at qq.com (=?gb18030?B?TXl0aA==?=) Date: Fri, 14 Sep 2012 14:02:54 +0800 Subject: [Libav-user] How to Use FFmpeg Decode Libraries Message-ID: Who can help me to resolve this issue? How can I use the libavcodec libraries to decode an h264 video stream. Regards and Thanks, Stefan ------------------ Original ------------------ From: "Myth"<286166657 at qq.com>; Date: Thu, Sep 13, 2012 10:51 AM To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries I have built the test examples successfully, but when I type the below command, an error occurs: #./decoding_encoding h264 Encode video file test.h264 codec not found I also use "./configure --list-encoders" to show all encoders, I don't find h264 codecs. Can you help me? Thanks and Regards, Stefan ------------------ Original ------------------ From: "Stefano Sabatini"; Date: Wed, Sep 12, 2012 04:13 PM To: "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."; Subject: Re: [Libav-user] How to Use FFmpeg Decode Libraries On date Wednesday 2012-09-12 10:58:59 +0800, Myth encoded: > Hi All, > > I want to use FFmpeg decode libraries to decode an h.264 video > stream. I found the libavcodec/api-example.c is a test example can > decode MPEG1VIDEO format video streams. Now I use CODEC_ID_H264 > instead of CODEC_ID_MPEG1VIDEO and build it, then add an argument > (h.264 encode video stream) when ran the test case, there an error > occurs. Below is the error log: > > #Video decoding > #[h264 @ 0x8937020]error while decoding MB 14 7, bytestream (-23) > #[h264 @ 0x8937020]concealing 955 DC, 955 AC, 955 MV errors > #[h264 @ 0x8937020]no frame! > #Error while decoding frame 0 > > Who can help me to resolve this issue? > Any feedback is appreciated. Check the updated examples in doc/examples, decoding_encoding.c shows how to encode H.264 using libx264. Also check: http://ffmpeg.org/trac/ffmpeg/wiki/Using%20libav* _______________________________________________ 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 mika_rajala_2 at hotmail.com Fri Sep 14 09:20:40 2012 From: mika_rajala_2 at hotmail.com (Mika Rajala) Date: Fri, 14 Sep 2012 07:20:40 +0000 Subject: [Libav-user] ff_iir_filter_init_coeffs Message-ID: Hi I'd like to use the iirfilter in ffmpeg to filter out noise frequencies in my audio. For this, I found the iirfilter.h in libavcodec But i don't know how to use it properly, any tutorials / tips? The first function seems a bit odd even. ff_iir_filter_init_coeffs wants a void * avc which is something mysterious. -mika -------------- next part -------------- An HTML attachment was scrubbed... URL: From guoqiu413 at gmail.com Sat Sep 15 10:49:31 2012 From: guoqiu413 at gmail.com (qiu guo) Date: Sat, 15 Sep 2012 16:49:31 +0800 Subject: [Libav-user] ffmpeg(0.10.2) and x264 encode question Message-ID: c->codec_id = CODEC_ID_H264; //c->codec_id = codec_id; c->codec_type = AVMEDIA_TYPE_VIDEO; c->bit_rate = 400000; c->width = 320; c->height = 240; c->time_base = (AVRational){1,25}; c->gop_size = 10; //c->pix_fmt = PIX_FMT_YUYV; c->pix_fmt = PIX_FMT_YUV420P; package: AVPacket pkt; av_init_packet(&pkt); if(c->coded_frame->pts != AV_NOPTS_VALUE) { pkt.pts = av_rescale_q(c->coded_frame->pts,c->time_base,en_info->video_st->time_base); } if(c->coded_frame->key_frame) pkt.flags |= AV_PKT_FLAG_KEY; pkt.stream_index = en_info->video_st->index; pkt.data = en_info->video_outbuf; pkt.size = en_info->out_size; printf("4\n"); ret = av_interleaved_write_frame( en_info->oc , &pkt ); I set all as you can see above .but i always get some error at av_interleaved_write_frame error: [mpeg @ 0x94142c0] buffer underflow i=0 bufi=22 size=2065 [mpeg @ 0x94142c0] buffer underflow i=0 bufi=2051 size=2065 how can i solve the problem ?any advice will be great appreciate!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From ggarra13 at gmail.com Mon Sep 17 01:40:56 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Sun, 16 Sep 2012 20:40:56 -0300 Subject: [Libav-user] ffmpeg encoding example Message-ID: I have tried muxing.c with some modifications and I get a movie file but that starts at a timestamp other than 0, frame 3 or 5 to be precise of 24fps, depending codec, and lacks the last 3-5 frames fed into it. #define STREAM_PIX_FMT PIX_FMT_YUV420P /* default pix_fmt */ static AVFrame *picture, *tmp_picture; static uint8_t *video_outbuf; static int frame_count = 0, video_outbuf_size; static AVFrame *alloc_picture(enum PixelFormat pix_fmt, int width, int height) { AVFrame *picture; uint8_t *picture_buf; int size; picture = avcodec_alloc_frame(); if (!picture) return NULL; size = avpicture_get_size(pix_fmt, width, height); picture_buf = (uint8_t*)av_malloc(size); if (!picture_buf) { av_free(picture); return NULL; } avpicture_fill((AVPicture *)picture, picture_buf, pix_fmt, width, height); return picture; } static bool open_video(AVFormatContext *oc, AVStream *st, const CMedia* img ) { AVCodecContext* c = st->codec; /* find the video encoder */ AVCodec* codec = avcodec_find_encoder(c->codec_id); if (!codec) { LOG_ERROR( _("Video codec not found") ); return false; } /* open the codec */ if (avcodec_open2(c, codec, NULL) < 0) { LOG_ERROR( _("Could not open video codec") ); return false; } video_outbuf = NULL; if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) { /* Allocate output buffer. */ /* XXX: API change will be done. */ /* Buffers passed into lav* can be allocated any way you prefer, * as long as they're aligned enough for the architecture, and * they're freed appropriately (such as using av_free for buffers * allocated with av_malloc). */ video_outbuf_size = 2048*2048*3; video_outbuf = (uint8_t*)av_malloc(video_outbuf_size); } /* Allocate the encoded raw picture. */ picture = alloc_picture(c->pix_fmt, img->width(), img->height()); if (!picture) { LOG_ERROR( _("Could not allocate picture") ); return false; } return true; } static void close_video(AVFormatContext *oc, AVStream *st) { avcodec_close(st->codec); av_free(picture->data[0]); av_free(picture); av_free(video_outbuf); } /* prepare a dummy image */ static void fill_yuv_image(AVFrame *pict, const CMedia* img ) { CMedia* m = (CMedia*) img; image_type_ptr hires = img->hires(); unsigned w = img->width(); unsigned h = img->height(); for ( unsigned y = 0; y < h; ++y ) { for ( unsigned x = 0; x < w; ++x ) { ImagePixel p = hires->pixel( x, y ); if ( img->gamma() != 1.0f ) { float gamma = 1.0f/img->gamma(); p.r = powf( p.r, gamma ); p.g = powf( p.g, gamma ); p.b = powf( p.b, gamma ); if (p.r < 0.0f) p.r = 0.0f; if (p.g < 0.0f) p.g = 0.0f; if (p.b < 0.0f) p.b = 0.0f; if (p.r > 1.0f) p.r = 1.0f; if (p.g > 1.0f) p.g = 1.0f; if (p.b > 1.0f) p.b = 1.0f; } ImagePixel yuv = color::rgb::to_ITU601( p ); pict->data[0][y * pict->linesize[0] + x ] = yuv.r; unsigned x2 = x / 2; unsigned y2 = y / 2; pict->data[1][y2 * pict->linesize[1] + x2 ] = yuv.g; pict->data[2][y2 * pict->linesize[2] + x2 ] = yuv.b; } } } static bool write_video_frame(AVFormatContext* oc, AVStream* st, const CMedia* img ) { int out_size, ret; AVCodecContext *c = NULL; c = st->codec; if (frame_count >= img->last_frame() - img->first_frame() + 1) { /* No more frames to compress. The codec has a latency of a few * frames if using B-frames, so we get the last frames by * passing the same picture again. */ } else { fill_yuv_image( picture, img ); } AVPacket pkt; av_init_packet(&pkt); pkt.data = video_outbuf; pkt.size = video_outbuf_size; int got_pic = 0; /* encode the image */ ret = avcodec_encode_video2(c, &pkt, picture, &got_pic); if (!ret && got_pic && c->coded_frame) { c->coded_frame->pts = pkt.pts; c->coded_frame->key_frame = !!(pkt.flags & AV_PKT_FLAG_KEY); } /* free any side data since we cannot return it */ if (pkt.side_data_elems > 0) { int i; for (i = 0; i < pkt.side_data_elems; i++) av_free(pkt.side_data[i].data); av_freep(&pkt.side_data); pkt.side_data_elems = 0; } /* If size is zero, it means the image was buffered. */ ret = ret ? ret : pkt.size; if (c->coded_frame->pts != AV_NOPTS_VALUE) pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); if (c->coded_frame->key_frame) pkt.flags |= AV_PKT_FLAG_KEY; pkt.stream_index = st->index; /* Write the compressed frame to the media file. */ ret = av_interleaved_write_frame(oc, &pkt); if (ret != 0) { LOG_ERROR( _("Error while writing video frame") ); return false; } if ( frame_count >= img->last_frame() - img->first_frame() + 1 ) { cerr << "got pic" << endl; for (got_pic = 1; got_pic; ++frame_count) { ret = avcodec_encode_video2(c, &pkt, NULL, &got_pic); if (ret < 0) { LOG_ERROR( "error encoding video frame"); break; } if (got_pic) { av_free_packet(&pkt); } } } frame_count++; return true; } static AVStream *add_video_stream(AVFormatContext *oc, AVCodec** codec, enum CodecID codec_id, const CMedia* img ) { /* find the video encoder */ *codec = avcodec_find_encoder(codec_id); if (!(*codec)) { LOG_ERROR( _( "Video codec not found") ); return NULL; } AVStream* st = avformat_new_stream(oc, NULL); if (!st) { LOG_ERROR( _("Could not alloc stream") ); return NULL; } AVCodecContext* c = st->codec; avcodec_get_context_defaults3(c, *codec); c->codec_id = codec_id; /* resolution must be a multiple of two */ c->width = (img->width() / 2) * 2; c->height = (img->height() / 2) * 2; /* put sample parameters */ c->bit_rate = c->width * c->height * 3; c->bit_rate_tolerance = 5000000; c->global_quality = 1; c->compression_level = FF_COMPRESSION_DEFAULT; /* time base: this is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented. for fixed-fps content, timebase should be 1/framerate and timestamp increments should be identically 1. */ c->time_base.den = img->fps(); c->time_base.num = 1; c->ticks_per_frame = 2; c->gop_size = 12; /* emit one intra frame every twelve frames at most */ c->pix_fmt = STREAM_PIX_FMT; c->max_b_frames = 1; c->me_method = 5; if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { /* just for testing, we also add B frames */ c->max_b_frames = 2; } // c->b_quant_factor = 1; // c->b_quant_offset = 0.0f; // c->mpeg_quant = 0; // c->i_quant_factor = 1.0f; // c->i_quant_offset = 0.0f; // c->p_masking = 0.0f; // c->dark_masking = 0.0f; // c->me_cmp = 7; // c->me_sub_cmp = 7; // c->ildct_cmp = FF_CMP_SSE; // c->last_predictor_count = 2; // c->pre_me = 7; // c->me_pre_cmp = 7; // c->pre_dia_size = 8; // c->me_subpel_quality = 2; // c->me_range = 0; // c->intra_quant_bias = FF_DEFAULT_QUANT_BIAS; // c->inter_quant_bias = FF_DEFAULT_QUANT_BIAS; // c->mb_decision = FF_MB_DECISION_RD; // c->me_threshold = 8; // c->mb_threshold = 8; // c->intra_dc_precision = 1; // c->keyint_min = 4; // some formats want stream headers to be separate if (oc->oformat->flags & AVFMT_GLOBALHEADER) c->flags |= CODEC_FLAG_GLOBAL_HEADER; return st; } static AVFormatContext *oc = NULL; static AVOutputFormat* fmt = NULL; static AVStream* audio_st = NULL, *video_st = NULL; bool aviImage::open_movie( const char* filename, const CMedia* img ) { int ret = 0; int i; frame_count = 0; av_register_all(); if ( oc == NULL ) { avformat_alloc_output_context2(&oc, NULL, NULL, filename); if (!oc) { LOG_INFO( _("Could not deduce output format from file extension: using MPEG.") ); avformat_alloc_output_context2(&oc, NULL, "mpeg", filename); } fmt = oc->oformat; video_st = NULL; audio_st = NULL; if (fmt->video_codec != CODEC_ID_NONE) { video_st = add_video_stream(oc, &video_codec, fmt->video_codec, img); } if (img->has_audio() && fmt->audio_codec != CODEC_ID_NONE) { audio_st = add_audio_stream(oc, &audio_cdc, fmt->audio_codec); } /* Now that all the parameters are set, we can open the audio and * video codecs and allocate the necessary encode buffers. */ if (video_st) if ( ! open_video(oc, video_st, img) ) return false; if (audio_st) if ( ! open_audio_static(oc, audio_cdc, audio_st) ) { audio_st = NULL; if ( !video_st ) return false; } if (!(fmt->flags & AVFMT_NOFILE)) { if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) { LOG_ERROR( _("Could not open '") << filename << "'" ); return false; } } picture->pts = 0; /* Write the stream header, if any. */ avformat_write_header(oc, NULL); } return true; } bool aviImage::save_movie_frame( const CMedia* img ) { double audio_pts, video_pts; if (audio_st) audio_pts = ((double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den); else audio_pts = 0.0; if (video_st) video_pts = ((double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den); /* write interleaved audio and video frames */ if (!video_st || (video_st && audio_st && audio_pts < video_pts)) { write_audio_frame(oc, audio_st, img); } else { write_video_frame(oc, video_st, img); picture->pts++; } } bool aviImage::close_movie() { /* Write the trailer, if any. The trailer must be written before you * close the CodecContexts open when you wrote the header; otherwise * av_write_trailer() may try to use memory that was freed on * av_codec_close(). */ av_write_trailer(oc); /* Close each codec. */ if (video_st) close_video(oc, video_st); if (audio_st) close_audio_static(oc, audio_st); /* Free the streams. */ for (int i = 0; i < oc->nb_streams; i++) { av_freep(&oc->streams[i]->codec); av_freep(&oc->streams[i]); } if (!(fmt->flags & AVFMT_NOFILE)) /* Close the output file. */ avio_close(oc->pb); /* free the stream */ av_free(oc); oc = NULL; return true; } void save_sequence_file( CMedia* img, const mrv::ViewerUI* uiMain, const char* startdir) { if (!img) return; const char* file = flu_save_chooser("Save Sequence", kIMAGE_PATTERN.c_str(), startdir); if ( !file ) return; std::string tmp = file; std::transform( tmp.begin(), tmp.end(), tmp.begin(), (int(*)(int)) tolower); std::string ext = tmp.c_str() + tmp.size() - 4; bool movie = false; if ( ext == ".avi" || ext == ".mov" || ext == ".mp4" || ext == ".wmv" ) { movie = true; } std::string root, fileseq = file; bool ok = mrv::fileroot( root, fileseq ); if ( !ok && !movie ) return; if ( movie ) { root = root.substr( 0, root.size() - 4 ); } fltk::ProgressBar* progress = NULL; fltk::Window* main = (fltk::Window*)uiMain->uiMain; fltk::Window* w = new fltk::Window( main->x(), main->y() + main->h()/2, main->w(), 80 ); w->child_of(main); w->begin(); mrv::Timeline* timeline = uiMain->uiTimeline; int64_t first = timeline->minimum(); int64_t last = timeline->maximum(); progress = new fltk::ProgressBar( 0, 20, w->w(), w->h()-20 ); progress->range( 0, last - first + 1 ); progress->align( fltk::ALIGN_TOP ); char title[1024]; sprintf( title, "Saving Sequence %" PRId64 " - %" PRId64, first, last ); progress->label( title ); progress->showtext(true); w->end(); w->show(); fltk::check(); int64_t dts = first; int64_t frame = first; int64_t failed_frame = frame-1; const char* fileroot = root.c_str(); mrv::media old; bool open_movie = false; int movie_count = 1; bool edl = uiMain->uiTimeline->edl(); for ( ; frame <= last; ++frame ) { int step = 1; uiMain->uiReelWindow->uiBrowser->seek( frame ); mrv::media fg = uiMain->uiView->foreground(); if (!fg) break; CMedia* img = fg->image(); if ( old != fg ) { old = fg; if ( open_movie ) { aviImage::close_movie(); open_movie = false; } if ( movie ) { char buf[256]; if ( edl ) { sprintf( buf, "%s%d%s", root.c_str(), movie_count, ext.c_str() ); } else { sprintf( buf, "%s%s", root.c_str(), ext.c_str() ); } if ( fs::exists( buf ) ) { int ok = fltk::ask( "Do you want to replace '%s'", buf ); if (!ok) { break; } } if ( aviImage::open_movie( buf, img ) ) { open_movie = true; ++movie_count; } } } { if (movie) { aviImage::save_movie_frame( img ); } else { char buf[1024]; sprintf( buf, fileroot, frame ); img->save( buf ); } } progress->step(1); fltk::check(); if ( !w->visible() ) { break; } } if ( open_movie ) { aviImage::close_movie(); open_movie = false; } if ( w ) { w->hide(); w->destroy(); } } -- Gonzalo Garramu?o ggarra13 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmxubuntu at yahoo.de Tue Sep 18 02:09:03 2012 From: gmxubuntu at yahoo.de (Sartre Salam) Date: Tue, 18 Sep 2012 01:09:03 +0100 (BST) Subject: [Libav-user] Encode raw frame to vp8 in C++ Message-ID: <1347926943.47199.YahooMailNeo@web171601.mail.ir2.yahoo.com> Hi , I'm trying to encode raw frames to vp8. I use the example which encode raw frames into a h264 file, I have use this example to encode a short movie into an h264(without sound of course). Then I can see this h264 file with ffplay. I think it should be posible to make the same but encode the file to vp8, and then see this vp8 file with ffplay. Is it posible? Because I encode the file to vp8 but ffplay cant encode it. Here is some of the code that I use to encode the raw frame: AVCodec *output = avcodec_find_encoder((AVCodecID)AV_CODEC_ID_VP8); AVCodecContext *contextOutput = avcodec_alloc_context3(output); contextOutput->bit_rate = 500* 1000; contextOutput->rc_min_rate = coutput->rc_max_rate = coutput->bit_rate; av_opt_set_double(coutput->priv_data, "max-intra-rate", 90, 0); av_opt_set(coutput->priv_data, "quality", "realtime", 0); contextOutput->thread_count = 4; contextOutput->rc_buffer_aggressivity = 0.95; contextOutput->rc_buffer_size = 500*1000*6; contextOutput->profile = 3; contextOutput->qmax = 54; contextOutput->qmin = 4; AVRational myrational = {1,25}; contextOutput->time_base= myrational; contextOutput->gop_size = 99999; contextOutput->pix_fmt = PIX_FMT_YUV420P; contextOutput->width = 800; contextOutput->height = 600; if(avcodec_open2(contextOutput,output,NULL)<0) { printf("no putput codec open\n"); return -1; } then with this AVCodecContext I try to encode the raw frame with the methode avcodec_encode_video2. It works for h264 but not for vp8, any idea about this topic would be very helpfull. thnx -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Tue Sep 18 09:07:50 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 18 Sep 2012 10:07:50 +0300 Subject: [Libav-user] Encode raw frame to vp8 in C++ In-Reply-To: <1347926943.47199.YahooMailNeo@web171601.mail.ir2.yahoo.com> References: <1347926943.47199.YahooMailNeo@web171601.mail.ir2.yahoo.com> Message-ID: On 18 Sep 2012 03:09, "Sartre Salam" wrote: > > Hi , I'm trying to encode raw frames to vp8. I use the example > which encode raw frames into a h264 file, I have use this example to encode a short > movie into an h264(without sound of course). Then I can see this h264 file with ffplay. > I think it should be posible to make the same but encode the file to vp8, and then see > this vp8 file with ffplay. Is it posible? For h264, you used a raw stream. With vp8, you need a container. The most popular is WebM. BR, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmxubuntu at yahoo.de Tue Sep 18 11:15:22 2012 From: gmxubuntu at yahoo.de (Sartre Salam) Date: Tue, 18 Sep 2012 10:15:22 +0100 (BST) Subject: [Libav-user] Encode raw frame to vp8 in C++ In-Reply-To: References: <1347926943.47199.YahooMailNeo@web171601.mail.ir2.yahoo.com> Message-ID: <1347959722.53816.YahooMailNeo@web171602.mail.ir2.yahoo.com> Is there? any example how to use a container for encoding? Luis ________________________________ Von: Alex Cohn An: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." Gesendet: 9:07 Dienstag, 18.September 2012 Betreff: Re: [Libav-user] Encode raw frame to vp8 in C++ On 18 Sep 2012 03:09, "Sartre Salam" wrote: > > Hi , I'm trying to encode raw frames to vp8. I use the example > which encode raw frames into a h264 file, I have use this example to encode a short > movie into an h264(without sound of course). Then I can see this h264 file with ffplay. > I think it should be posible to make the same but encode the file to vp8, and then see > this vp8 file with ffplay. Is it posible? For h264, you used a raw stream. With vp8, you need a container. The most popular is WebM. 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 gmxubuntu at yahoo.de Tue Sep 18 13:44:46 2012 From: gmxubuntu at yahoo.de (Sartre Salam) Date: Tue, 18 Sep 2012 12:44:46 +0100 (BST) Subject: [Libav-user] Encode raw frame to vp8 in C++ In-Reply-To: <1347959722.53816.YahooMailNeo@web171602.mail.ir2.yahoo.com> References: <1347926943.47199.YahooMailNeo@web171601.mail.ir2.yahoo.com> <1347959722.53816.YahooMailNeo@web171602.mail.ir2.yahoo.com> Message-ID: <1347968686.3748.YahooMailNeo@web171602.mail.ir2.yahoo.com> srry, I found what I need in the example muxing.c ________________________________ Von: Sartre Salam An: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." Gesendet: 11:15 Dienstag, 18.September 2012 Betreff: Re: [Libav-user] Encode raw frame to vp8 in C++ Is there? any example how to use a container for encoding? Luis ________________________________ Von: Alex Cohn An: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." Gesendet: 9:07 Dienstag, 18.September 2012 Betreff: Re: [Libav-user] Encode raw frame to vp8 in C++ On 18 Sep 2012 03:09, "Sartre Salam" wrote: > > Hi , I'm trying to encode raw frames to vp8. I use the example > which encode raw frames into a h264 file, I have use this example to encode a short > movie into an h264(without sound of course). Then I can see this h264 file with ffplay. > I think it should be posible to make the same but encode the file to vp8, and then see > this vp8 file with ffplay. Is it posible? For h264, you used a raw stream. With vp8, you need a container. The most popular is WebM. 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From niulicheng at gmail.com Tue Sep 18 14:15:32 2012 From: niulicheng at gmail.com (Licheng Niu) Date: Tue, 18 Sep 2012 20:15:32 +0800 Subject: [Libav-user] how to get extradata of MPEGTS using ffmpeg? Message-ID: hi everyone, I am trying to decode TS file on android with hardware decoder. And I use ffmpeg MPEGTS demuxer. To init hardware decoder, extradata (SPS, PPS or sth.) is needed to be set for both audio and video decoders. But I can not get extradata of TS file by ffmpeg demuxer. Does anyone know how to get extradata of TS file using ffmpeg? Any help is appreciate -------------- next part -------------- An HTML attachment was scrubbed... URL: From al at dneg.com Tue Sep 18 14:18:11 2012 From: al at dneg.com (Al Crate) Date: Tue, 18 Sep 2012 13:18:11 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? Message-ID: <50586683.40007@dneg.com> Hi, I'm getting some odd behaviour when writing out prores movies (in quicktime container). It looks like the last frame in the movie has an invalid duration ("1" should be "25"). This also throws out the avg_frame_rate, making it 25/1 instead of 24/1. This also upsets quicktime and final cut pro, they both get confused and do not show the last frame. Is this a known issue ? Obviously this maybe intended and all the other decoders are wrong :) When creating under OSX (using the apple encoder), the output of ffprobe looks like :- [PACKET] codec_type=video stream_index=0 pts=550 pts_time=0.916667 dts=550 dts_time=0.916667 duration=25 duration_time=0.041667 size=713520.000000 pos=15603504 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=575 pts_time=0.958333 dts=575 dts_time=0.958333 duration=25 duration_time=0.041667 size=711104.000000 pos=16317024 flags=K [/PACKET] [STREAM] index=0 codec_name=prores codec_long_name=ProRes codec_type=video codec_time_base=0/1 codec_tag_string=apch codec_tag=0x68637061 width=1920 height=1080 has_b_frames=0 pix_fmt=yuv422p10le level=-99 progressive r_frame_rate=24/1 avg_frame_rate=24/1 time_base=1/600 start_time=0.000000 duration=1.000000 nb_frames=24 TAG:language=eng TAG:codec_name=Apple ProRes 422 (HQ) [/STREAM] [FORMAT] filename=test.mov nb_streams=1 format_name=mov,mp4,m4a,3gp,3g2,mj2 format_long_name=QuickTime/MPEG-4/Motion JPEG 2000 format start_time=0.000000 duration=1.000000 size=17029910.000000 bit_rate=136239280.000000 TAG:major_brand=qt TAG:minor_version=537199360 TAG:compatible_brands=qt TAG:creation_time=2012-09-17 11:26:43 [/FORMAT] Where as the one I generate looks like.. [PACKET] codec_type=video stream_index=0 pts=550 pts_time=0.916667 dts=550 dts_time=0.916667 duration=25 duration_time=0.041667 size=131592.000000 pos=2870218 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=575 pts_time=0.958333 dts=575 dts_time=0.958333 duration=1 duration_time=0.001667 size=131401.000000 pos=3001810 flags=K [/PACKET] [STREAM] index=0 codec_name=prores codec_long_name=ProRes codec_type=video codec_time_base=0/1 codec_tag_string=apch codec_tag=0x68637061 width=640 height=480 has_b_frames=0 pix_fmt=yuv422p10le level=-99 progressive r_frame_rate=24/1 avg_frame_rate=25/1 time_base=1/600 start_time=0.000000 duration=0.960000 nb_frames=24 TAG:language=eng TAG:codec_name=prores [/STREAM] [FORMAT] filename=test6.mov nb_streams=1 format_name=mov,mp4,m4a,3gp,3g2,mj2 format_long_name=QuickTime/MPEG-4/Motion JPEG 2000 format start_time=0.000000 duration=0.960000 size=3133211.000000 bit_rate=26110091.000000 TAG:major_brand=qt TAG:minor_version=0 TAG:compatible_brands=qt TAG:creation_time=2012-09-17 12:08:32 TAG:encoder=FFmbc 0.7 [/FORMAT] From cehoyos at ag.or.at Tue Sep 18 14:25:18 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 18 Sep 2012 12:25:18 +0000 (UTC) Subject: [Libav-user] prores variable frame rate last frame bug? References: <50586683.40007@dneg.com> Message-ID: Al Crate writes: > I'm getting some odd behaviour when writing out > prores movies (in quicktime container). > > It looks like the last frame in the movie has an > invalid duration ("1" should be "25"). Please add the command line you are using to encode together with complete, uncut console output. Carl EUgen From cehoyos at ag.or.at Tue Sep 18 14:27:41 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 18 Sep 2012 12:27:41 +0000 (UTC) Subject: [Libav-user] how to get extradata of MPEGTS using ffmpeg? References: Message-ID: Licheng Niu writes: > I am trying to decode TS file on android with > hardware decoder. And I use ffmpeg MPEGTS demuxer. > To init hardware decoder, (Isn't libstagefright supposed to do that? Or do I misunderstand?) > extradata (SPS, PPS or sth.) is needed to be set > for both audio and video decoders. But I can not > get extradata of TS file by ffmpeg demuxer. I suspect only the (software) h264 decoder is able to read the extradata from the video stream. Carl Eugen From al at dneg.com Tue Sep 18 14:35:39 2012 From: al at dneg.com (Al Crate) Date: Tue, 18 Sep 2012 13:35:39 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: References: <50586683.40007@dneg.com> Message-ID: <50586A9B.6080701@dneg.com> It was created using the API, so there is no console output. This is the full output of ffprobe though. ffprobe version 0.7-rc7 Copyright (c) 2007-2012 Baptiste Coudurier and the FFmpeg developers Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test6.mov': Metadata: major_brand: qt minor_version: 0 compatible_brands: qt creation_time: 2012-09-17 12:08:32 encoder: FFmbc 0.7 comment: source frame range:1-24 copyright: Double Negative Duration: 00:00:00.96, start: 0.000000, bitrate: 26110 kb/s Stream #0.0(eng): Video: prores, yuv422p10le, 640x480p, 26101 kb/s, 24.00 fps Metadata: codec_name: prores [PACKET] codec_type=video stream_index=0 pts=0 pts_time=0.000000 dts=0 dts_time=0.000000 duration=25 duration_time=0.041667 size=127567.000000 pos=1021 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=25 pts_time=0.041667 dts=25 dts_time=0.041667 duration=25 duration_time=0.041667 size=129927.000000 pos=128588 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=50 pts_time=0.083333 dts=50 dts_time=0.083333 duration=25 duration_time=0.041667 size=130269.000000 pos=258515 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=75 pts_time=0.125000 dts=75 dts_time=0.125000 duration=25 duration_time=0.041667 size=129853.000000 pos=388784 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=100 pts_time=0.166667 dts=100 dts_time=0.166667 duration=25 duration_time=0.041667 size=130131.000000 pos=518637 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=125 pts_time=0.208333 dts=125 dts_time=0.208333 duration=25 duration_time=0.041667 size=130074.000000 pos=648768 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=150 pts_time=0.250000 dts=150 dts_time=0.250000 duration=25 duration_time=0.041667 size=129748.000000 pos=778842 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=175 pts_time=0.291667 dts=175 dts_time=0.291667 duration=25 duration_time=0.041667 size=130146.000000 pos=908590 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=200 pts_time=0.333333 dts=200 dts_time=0.333333 duration=25 duration_time=0.041667 size=130311.000000 pos=1038736 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=225 pts_time=0.375000 dts=225 dts_time=0.375000 duration=25 duration_time=0.041667 size=130783.000000 pos=1169047 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=250 pts_time=0.416667 dts=250 dts_time=0.416667 duration=25 duration_time=0.041667 size=129874.000000 pos=1299830 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=275 pts_time=0.458333 dts=275 dts_time=0.458333 duration=25 duration_time=0.041667 size=130686.000000 pos=1429704 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=300 pts_time=0.500000 dts=300 dts_time=0.500000 duration=25 duration_time=0.041667 size=131212.000000 pos=1560390 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=325 pts_time=0.541667 dts=325 dts_time=0.541667 duration=25 duration_time=0.041667 size=130641.000000 pos=1691602 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=350 pts_time=0.583333 dts=350 dts_time=0.583333 duration=25 duration_time=0.041667 size=130633.000000 pos=1822243 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=375 pts_time=0.625000 dts=375 dts_time=0.625000 duration=25 duration_time=0.041667 size=130884.000000 pos=1952876 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=400 pts_time=0.666667 dts=400 dts_time=0.666667 duration=25 duration_time=0.041667 size=130722.000000 pos=2083760 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=425 pts_time=0.708333 dts=425 dts_time=0.708333 duration=25 duration_time=0.041667 size=130852.000000 pos=2214482 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=450 pts_time=0.750000 dts=450 dts_time=0.750000 duration=25 duration_time=0.041667 size=130864.000000 pos=2345334 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=475 pts_time=0.791667 dts=475 dts_time=0.791667 duration=25 duration_time=0.041667 size=131561.000000 pos=2476198 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=500 pts_time=0.833333 dts=500 dts_time=0.833333 duration=25 duration_time=0.041667 size=131025.000000 pos=2607759 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=525 pts_time=0.875000 dts=525 dts_time=0.875000 duration=25 duration_time=0.041667 size=131434.000000 pos=2738784 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=550 pts_time=0.916667 dts=550 dts_time=0.916667 duration=25 duration_time=0.041667 size=131592.000000 pos=2870218 flags=K [/PACKET] [PACKET] codec_type=video stream_index=0 pts=575 pts_time=0.958333 dts=575 dts_time=0.958333 duration=1 duration_time=0.001667 size=131401.000000 pos=3001810 flags=K [/PACKET] [STREAM] index=0 codec_name=prores codec_long_name=ProRes codec_type=video codec_time_base=0/1 codec_tag_string=apch codec_tag=0x68637061 width=640 height=480 has_b_frames=0 pix_fmt=yuv422p10le level=-99 progressive r_frame_rate=24/1 avg_frame_rate=25/1 time_base=1/600 start_time=0.000000 duration=0.960000 nb_frames=24 TAG:language=eng TAG:codec_name=prores [/STREAM] [FORMAT] filename=test6.mov nb_streams=1 format_name=mov,mp4,m4a,3gp,3g2,mj2 format_long_name=QuickTime/MPEG-4/Motion JPEG 2000 format start_time=0.000000 duration=0.960000 size=3133211.000000 bit_rate=26110091.000000 TAG:major_brand=qt TAG:minor_version=0 TAG:compatible_brands=qt TAG:creation_time=2012-09-17 12:08:32 TAG:encoder=FFmbc 0.7 TAG:comment= source frame range:1-24 TAG:copyright=Double Negative [/FORMAT] On 18/09/12 13:25, Carl Eugen Hoyos wrote: > Al Crate writes: > >> I'm getting some odd behaviour when writing out >> prores movies (in quicktime container). >> >> It looks like the last frame in the movie has an >> invalid duration ("1" should be "25"). > > Please add the command line you are using to encode > together with complete, uncut console output. > > Carl EUgen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From niulicheng at gmail.com Tue Sep 18 14:45:35 2012 From: niulicheng at gmail.com (Licheng Niu) Date: Tue, 18 Sep 2012 20:45:35 +0800 Subject: [Libav-user] how to get extradata of MPEGTS using ffmpeg? In-Reply-To: References: Message-ID: Libstagefright doesn't support mpegts on some Android2.3 system. So I added ffmpeg mpegts demuxer as an extra Extractor in stagefright. For mp4 or flv files, I can read extradata in header(ffmpeg will do such thing). But there is no header in TS file(I suspect). So how to get extradata from TS file? It seems to be included in PESpacket but I am not sure. I am not familiar with TS container. Best Regards Licheng Niu On Tue, Sep 18, 2012 at 8:27 PM, Carl Eugen Hoyos wrote: > Licheng Niu writes: > > > I am trying to decode TS file on android with > > hardware decoder. And I use ffmpeg MPEGTS demuxer. > > To init hardware decoder, > > (Isn't libstagefright supposed to do that? Or do I > misunderstand?) > > > extradata (SPS, PPS or sth.) is needed to be set > > for both audio and video decoders. But I can not > > get extradata of TS file by ffmpeg demuxer. > > I suspect only the (software) h264 decoder is able > to read the extradata from the video stream. > > 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 xhpohanka at gmail.com Tue Sep 18 15:12:16 2012 From: xhpohanka at gmail.com (Jan Pohanka) Date: Tue, 18 Sep 2012 15:12:16 +0200 Subject: [Libav-user] swscale speed In-Reply-To: References: Message-ID: >> I have tried to write my own simple downscaler (really simple with no >> antialasing filtering etc.) and it's speed is fine, so I think that >> won't be >> a memory bottleneck > > Is its speed faster than any libswscale option? > -r Yes, its speed is significantly faster than any settings of libswscale that I have tried. Eg. following scaling should be relatively fast I think... sctx = sws_getContext(avctx_i->width, avctx_i->height, PIX_FMT_NV12, avctx_i->width/2, avctx_i->height/2, PIX_FMT_NV12, SWS_POINT, NULL, NULL, NULL); Jan From cehoyos at ag.or.at Tue Sep 18 15:14:53 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 18 Sep 2012 13:14:53 +0000 (UTC) Subject: [Libav-user] prores variable frame rate last frame bug? References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> Message-ID: Al Crate writes: > ffprobe version 0.7-rc7 > Copyright (c) 2007-2012 Baptiste Coudurier and the FFmpeg developers Wrong mailing list? Carl Eugen From al at dneg.com Tue Sep 18 15:35:48 2012 From: al at dneg.com (Al Crate) Date: Tue, 18 Sep 2012 14:35:48 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> Message-ID: <505878B4.9070803@dneg.com> It's the same code base, with some post production tweaks. Obviously I would try and reproduce it using the ffmpeg command line but I'm not sure it actually supports specifying variable frame rate formats. Basically I need to specify a frame rate of 600/25, instead of 24/1, this triggers variable frame rate handling in the codec. Even though I'm not actually doing this, each frame displays for the same amount of time. On 18/09/12 14:14, Carl Eugen Hoyos wrote: > Al Crate writes: > >> ffprobe version 0.7-rc7 >> Copyright (c) 2007-2012 Baptiste Coudurier and the FFmpeg developers > > Wrong mailing list? > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From edward at edwardandalison.com Tue Sep 18 16:57:14 2012 From: edward at edwardandalison.com (Edward Richards) Date: Tue, 18 Sep 2012 07:57:14 -0700 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: <505878B4.9070803@dneg.com> References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> <505878B4.9070803@dneg.com> Message-ID: <087101cd95ad$e4d493f0$ae7dbbd0$@com> Hi, PTS/DTS values are not affected by the ProRes encoder at all. They are created in the MOV wrapper during the write_interleaved() Debug that bit to work out how it is making the DTS/PTS longer for the last one. E PS: Love your TO name for the mailing list. From al at dneg.com Tue Sep 18 17:23:46 2012 From: al at dneg.com (Al Crate) Date: Tue, 18 Sep 2012 16:23:46 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: <087101cd95ad$e4d493f0$ae7dbbd0$@com> References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> <505878B4.9070803@dneg.com> <087101cd95ad$e4d493f0$ae7dbbd0$@com> Message-ID: <50589202.8010002@dneg.com> Cheers! At least I've a clue as to where to start looking now :) Heh lol, no idea where that to came from, must be thunderbird being "smart" On 18/09/12 15:57, Edward Richards wrote: > Hi, > > PTS/DTS values are not affected by the ProRes encoder at all. They are > created in the MOV wrapper during the write_interleaved() > > Debug that bit to work out how it is making the DTS/PTS longer for the last > one. > > E > > PS: Love your TO name for the mailing list. > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From al at dneg.com Tue Sep 18 17:40:37 2012 From: al at dneg.com (Al Crate) Date: Tue, 18 Sep 2012 16:40:37 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: <50589202.8010002@dneg.com> References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> <505878B4.9070803@dneg.com> <087101cd95ad$e4d493f0$ae7dbbd0$@com> <50589202.8010002@dneg.com> Message-ID: <505895F5.2090602@dneg.com> If I dump out the quicktime information I get this.. total_entries 2 count 23 duration 25 count 1 duration 1 Definitely looks like the avformat movenc is doing something weird. quicktime_dump ftyp major brand: qt minor version: 00000000 compatible brands: qt movie data (mdat) size 3127372 start 1013 movie (moov) movie header (mvhd) version 0 flags 0 creation_time 2012-09-19 10:56:06 (3430806966) modification_time 2012-09-19 10:56:06 (3430806966) time_scale 1000 duration 960 preferred_rate 1.000000 preferred_volume 1.000000 reserved 00 00 00 00 00 00 00 00 00 00 matrix 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 16384.000000 preview_time 0 preview_duration 0 poster_time 0 selection_time 0 selection_duration 0 current_time 0 next_track_id 2 user data (udta) copyright: Double Negative comment: source frame range:1-24 track (trak) track header (tkhd) version 0 flags 15 creation_time 2012-09-19 10:56:06 (3430806966) modification_time 2012-09-19 10:56:06 (3430806966) track_id 1 reserved1 0 duration 960 reserved2 00 00 00 00 00 00 00 00 layer 0 alternate_group 0 volume 0.000000 reserved3 0 matrix 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 16384.000000 track_width 640.000000 track_height 480.000000 edit atom (edts) edit list (elst) version 0 flags 0 total_entries 1 edit list table duration 960 time 0 rate 1.000000 media (mdia) media header (mdhd) version 0 flags 0 creation_time 2012-09-19 10:56:06 (3430806966) modification_time 2012-09-19 10:56:06 (3430806966) time_scale 600 duration 576 language 0 quality 0 handler reference (hdlr) version 0 flags 0 component_type mhlr component_subtype vide component_name VideoHandler media info (minf) is_audio 0 is_audio_vbr 0 is_video 1 is_text 0 is_timecode 0 video media header (vmhd) version 0 flags 1 graphics_mode 0 opcolor 0 0 0 handler reference (hdlr) version 0 flags 0 component_type dhlr component_subtype url component_name DataHandler data information (dinf) data reference (dref) version 0 flags 0 data reference table (dref) type url version 0 flags 1 data sample table sample description (stsd) version 0 flags 0 total_entries 1 format apch reserved 00 00 00 00 00 00 data_reference 1 version 0 revision 0 vendor FFMP temporal_quality 512 spatial_quality 512 width 640 height 480 dpi_horizontal 72.000000 dpi_vertical 72.000000 data_size 0 frames_per_sample 1 compressor_name prores depth 24 ctab_id 65535 color description (colr) colorParamType 1852009571 primaries 6 transferFunction 1 matrix 6 time to sample (stts) version 0 flags 0 total_entries 2 count 23 duration 25 count 1 duration 1 sample to chunk (stsc) version 0 flags 0 total_entries 1 chunk 1 samples 1 id 1 sample size (stsz) version 0 flags 0 sample_size 0 total_entries 24 sample_size 1f24f (127567) sample_size 1e8ad (125101) sample_size 1fcdd (130269) sample_size 1fb3d (129853) sample_size 1fc53 (130131) sample_size 1fc1a (130074) sample_size 1fad4 (129748) sample_size 1fc62 (130146) sample_size 1fd07 (130311) sample_size 1fedf (130783) sample_size 1fb52 (129874) sample_size 1fe7e (130686) sample_size 2008c (131212) sample_size 1fe51 (130641) sample_size 1fe49 (130633) sample_size 1ff44 (130884) sample_size 1fea2 (130722) sample_size 1ff24 (130852) sample_size 1ff30 (130864) sample_size 201e9 (131561) sample_size 1ffd1 (131025) sample_size 2016a (131434) sample_size 20208 (131592) sample_size 20149 (131401) chunk offset (stco) version 0 flags 0 total_entries 24 offset 0 1021 (3fd) offset 1 128588 (1f64c) offset 2 253689 (3def9) offset 3 383958 (5dbd6) offset 4 513811 (7d713) offset 5 643942 (9d366) offset 6 774016 (bcf80) offset 7 903764 (dca54) offset 8 1033910 (fc6b6) offset 9 1164221 (11c3bd) offset 10 1295004 (13c29c) offset 11 1424878 (15bdee) offset 12 1555564 (17bc6c) offset 13 1686776 (19bcf8) offset 14 1817417 (1bbb49) offset 15 1948050 (1db992) offset 16 2078934 (1fb8d6) offset 17 2209656 (21b778) offset 18 2340508 (23b69c) offset 19 2471372 (25b5cc) offset 20 2602933 (27b7b5) offset 21 2733958 (29b786) offset 22 2865392 (2bb8f0) offset 23 2996984 (2dbaf8) On 18/09/12 16:23, Al Crate wrote: > Cheers! > > At least I've a clue as to where to start looking now :) > > Heh lol, no idea where that to came from, must be thunderbird being "smart" > > > On 18/09/12 15:57, Edward Richards wrote: >> Hi, >> >> PTS/DTS values are not affected by the ProRes encoder at all. They are >> created in the MOV wrapper during the write_interleaved() >> >> Debug that bit to work out how it is making the DTS/PTS longer for the >> last >> one. >> >> E >> >> PS: Love your TO name for the mailing list. >> >> >> _______________________________________________ >> 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 david.longest at apx-labs.com Tue Sep 18 18:27:02 2012 From: david.longest at apx-labs.com (David Longest) Date: Tue, 18 Sep 2012 16:27:02 +0000 Subject: [Libav-user] h263 frame rate In-Reply-To: References: Message-ID: After looking further into it, I have been looking at the AVPacket pts and dts in order to determine the frame delay. Instead the proper timestamps are being placed in the AVFrame pts using the AVCodecContext time_base. I am currently attempting to play back video at 15 fps. The AVStream's time_base is 1: 1200000 while the packet "pts" gets updated by 4004 every packet, resulting in ~30fps. However, after decoding the AVFrame using avcodec_decode_video2, we get the time_base of 1001:30000 in AVCodecContext, but the AVFrame's PTS updates by about 2 each frame. This gives a frame rate of ~15fps which is what I'm looking for. In libavcodec 54.23.100, should the AVFrame and AVCodecContext be used for determining presentation times for all codecs or is it specific to h263? From chinos at microrapid.com Tue Sep 18 14:06:11 2012 From: chinos at microrapid.com (chinos) Date: Tue, 18 Sep 2012 20:06:11 +0800 Subject: [Libav-user] how to get extradata of MPEGTS using ffmpeg? Message-ID: hi all, I am trying to decode TS file on android with hardware decoder. And I use ffmpeg MPEGTS demuxer. To init hardware decoder, extradata (SPS, PPS or sth.) is needed to be set for both audio and video decoders. But I can not get extradata of TS file by ffmpeg demuxer. Does anyone know how to get extradata of TS file using ffmpeg? Any help is appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinos at microrapid.com Tue Sep 18 14:37:25 2012 From: chinos at microrapid.com (chinos) Date: Tue, 18 Sep 2012 20:37:25 +0800 Subject: [Libav-user] =?gb2312?b?tPC4tDogIGhvdyB0byBnZXQgZXh0cmFkYXRhIG9m?= =?gb2312?b?IE1QRUdUUyB1c2luZyBmZm1wZWc/?= In-Reply-To: References: Message-ID: Libstagefright doesn't support mpegts on some Android2.3 system. So I added ffmpeg mpegts demuxer as an extra Extractor in stagefright. For mp4 or flv files, I can read extradata in header(ffmpeg will do such thing). But there is no header in TS file(I suspect). So how to get extradata from TS file? It seems to be included in PESpacket but I am not sure. I am not familiar with TS container. Best Regards Licheng Niu -----????----- ???: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] ?? Carl Eugen Hoyos ????: 2012?9?18? 20:28 ???: libav-user at ffmpeg.org ??: Re: [Libav-user] how to get extradata of MPEGTS using ffmpeg? Licheng Niu writes: > I am trying to decode TS file on android with > hardware decoder. And I use ffmpeg MPEGTS demuxer. > To init hardware decoder, (Isn't libstagefright supposed to do that? Or do I misunderstand?) > extradata (SPS, PPS or sth.) is needed to be set > for both audio and video decoders. But I can not > get extradata of TS file by ffmpeg demuxer. I suspect only the (software) h264 decoder is able to read the extradata from the video stream. Carl Eugen _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user From chinos at microrapid.com Tue Sep 18 14:03:21 2012 From: chinos at microrapid.com (chinos) Date: Tue, 18 Sep 2012 20:03:21 +0800 Subject: [Libav-user] how to get extradata of MPEGTS using ffmpeg? Message-ID: <570A73BDC5A6442AB9C77423AB80950A@microrapid.com> hi all, I am trying to decode TS file on android with hardware decoder. And I use ffmpeg MPEGTS demuxer. To init hardware decoder, extradata (SPS, PPS or sth.) is needed to be set for both audio and video decoders. But I can not get extradata of TS file by ffmpeg demuxer. Does anyone know how to get extradata of TS file using ffmpeg? Any help is appreciate. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wagner.patriota at gmail.com Tue Sep 18 21:17:56 2012 From: wagner.patriota at gmail.com (Wagner Patriota) Date: Tue, 18 Sep 2012 16:17:56 -0300 Subject: [Libav-user] how to get extradata of MPEGTS using ffmpeg? In-Reply-To: <570A73BDC5A6442AB9C77423AB80950A@microrapid.com> References: <570A73BDC5A6442AB9C77423AB80950A@microrapid.com> Message-ID: On Tue, Sep 18, 2012 at 9:03 AM, chinos wrote: > hi all,**** > > I am trying to decode TS file on android with hardware decoder. And I use > ffmpeg MPEGTS demuxer.**** > > To init hardware decoder, extradata (SPS, PPS or sth.) is needed to be set > for both audio and video decoders. But I can not get extradata of TS file > by ffmpeg demuxer.**** > > Does anyone know how to get extradata of TS file using ffmpeg? > // open the file... if (avformat_open_input(&pFormatCtx, filename, NULL, NULL) != 0) return -1; // Couldn't open file // Retrieve stream information if (avformat_find_stream_info(pFormatCtx, &codec_opts) < 0) return -1; // Couldn't find stream information // Loop over the streams for(i=0; inb_streams; i++) { int size = pFormatCtx->streams[i]->codec->extradata_size; // HERE IS THE SIZE YOU WANT! // pFormatCtx->streams[i]->codec->extradata // HERE IS WHAT YOU WANT! put this into the decoder... // let's print it for debug... for (int j = 0; j < size; j++ ) { char * p = (char*)(pFormatCtx->streams[i]->codec->extradata + j); printf( "%02X", (unsigned char)*p ); } } > **** > > Any help is appreciate.**** > > _______________________________________________ > 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 34973832 at qq.com Wed Sep 19 02:38:45 2012 From: 34973832 at qq.com (=?gb18030?B?TXIuIFhpYW8=?=) Date: Wed, 19 Sep 2012 08:38:45 +0800 Subject: [Libav-user] h263 frame rate Message-ID: hi?perhaps you should consider the vf_fps for framerate control. ------------------ Original ------------------ From: "David Longest"; Date: Wed, Sep 19, 2012 00:27 AM To: "This list is about using libavcodec, libavformat, libavutil, libavdeviceand libavfilter."; Subject: Re: [Libav-user] h263 frame rate After looking further into it, I have been looking at the AVPacket pts and dts in order to determine the frame delay. Instead the proper timestamps are being placed in the AVFrame pts using the AVCodecContext time_base. I am currently attempting to play back video at 15 fps. The AVStream's time_base is 1: 1200000 while the packet "pts" gets updated by 4004 every packet, resulting in ~30fps. However, after decoding the AVFrame using avcodec_decode_video2, we get the time_base of 1001:30000 in AVCodecContext, but the AVFrame's PTS updates by about 2 each frame. This gives a frame rate of ~15fps which is what I'm looking for. In libavcodec 54.23.100, should the AVFrame and AVCodecContext be used for determining presentation times for all codecs or is it specific to h263? _______________________________________________ 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 Sep 19 12:09:10 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 19 Sep 2012 13:09:10 +0300 Subject: [Libav-user] H264 live stream decoding and got_picture_ptr In-Reply-To: <8824AAED239A0A48AE135277DC2B79B43EF4007FA2@EXCHANGE1.ad.nottingham.ac.uk> References: <8824AAED239A0A48AE135277DC2B79B43EF4007FA2@EXCHANGE1.ad.nottingham.ac.uk> Message-ID: 2012/9/6 Tony Glover : > Can anybody shed some light on this or suggest an approach when the > situation occurs? If (got_picture_ptr) process_decoded_frame(); else no_decoded_frame_to_process__its_ok__maybe_go_read_and_decode_next_packet(); -- Andrey Utkin From T.Glover at nottingham.ac.uk Wed Sep 19 12:14:53 2012 From: T.Glover at nottingham.ac.uk (Tony Glover) Date: Wed, 19 Sep 2012 11:14:53 +0100 Subject: [Libav-user] H264 live stream decoding and got_picture_ptr In-Reply-To: References: <8824AAED239A0A48AE135277DC2B79B43EF4007FA2@EXCHANGE1.ad.nottingham.ac.uk> Message-ID: <8824AAED239A0A48AE135277DC2B79B43EF4985B44@EXCHANGE1.ad.nottingham.ac.uk> Hi, That's what I'm doing, it's just that I'd like to know the conditions are that cause the got_picture_ptr to be zero. If I get a succession of frames with no valid got_picture_ptr then effectively my decoding stream stalls until I get a valid picture again. I'm assuming that it's ultimately loss of data that causes the issues? If this is the case then there's not much I can do about it, which is fine. Thanks, Tony. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From alexcohn at netvision.net.il Wed Sep 19 12:53:46 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 19 Sep 2012 13:53:46 +0300 Subject: [Libav-user] H264 live stream decoding and got_picture_ptr In-Reply-To: <8824AAED239A0A48AE135277DC2B79B43EF4985B44@EXCHANGE1.ad.nottingham.ac.uk> References: <8824AAED239A0A48AE135277DC2B79B43EF4007FA2@EXCHANGE1.ad.nottingham.ac.uk> <8824AAED239A0A48AE135277DC2B79B43EF4985B44@EXCHANGE1.ad.nottingham.ac.uk> Message-ID: On Wed, Sep 19, 2012 at 1:14 PM, Tony Glover wrote: > Hi, > That's what I'm doing, it's just that I'd like to know the conditions are that cause the got_picture_ptr to be zero. If I get a succession of frames with no valid got_picture_ptr then effectively my decoding stream stalls until I get a valid picture again. I'm assuming that it's ultimately loss of data that causes the issues? If this is the case then there's not much I can do about it, which is fine. > > Thanks, > > Tony. One of the causes for got_picture to be FALSE without packet loss could be that the stream has unexpected B-frames. Alex From T.Glover at nottingham.ac.uk Wed Sep 19 13:14:07 2012 From: T.Glover at nottingham.ac.uk (Tony Glover) Date: Wed, 19 Sep 2012 12:14:07 +0100 Subject: [Libav-user] H264 live stream decoding and got_picture_ptr In-Reply-To: References: <8824AAED239A0A48AE135277DC2B79B43EF4007FA2@EXCHANGE1.ad.nottingham.ac.uk> <8824AAED239A0A48AE135277DC2B79B43EF4985B44@EXCHANGE1.ad.nottingham.ac.uk> Message-ID: <8824AAED239A0A48AE135277DC2B79B43EF4985B9B@EXCHANGE1.ad.nottingham.ac.uk> Hi, OK, I'll do some further investigation. Thanks, Tony. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. From dev at rarevision.com Wed Sep 19 13:17:33 2012 From: dev at rarevision.com (Thomas Worth) Date: Wed, 19 Sep 2012 04:17:33 -0700 Subject: [Libav-user] Bug in mpegts reader with H.264 video? Message-ID: I've encountered what seems to be a problem with the mpegts reader. If I read and decode an MTS-wrapped video compressed with H.264, I can get DTS and PTS values just fine. For example: /* within an endless loop */ if(packet.stream_index == video_st_id){ avcodec_decode_video2(vcodecCtx, test_frame, &got, &packet); if(got){ if(packet.dts != AV_NOPTS_VALUE){ fprintf(stderr,"dts is %lld\n",packet.dts); } } } /* end loop */ /* now back up and repeat */ av_seek_frame(formatCtx, video_st_id, 0, AVSEEK_FLAG_BACKWARD); avcodec_flush_buffers(vcodecCtx); This all works as expected. If I use av_seek_frame() to seek to the beginning of the stream and repeat the read/decode process, fetching DTS/PTS values all day, it works just as well. I can repeat this process a million times and it's 100% predictable. Fine. Great. The problem is when I open a video that contains a known corrupted picture. When the corrupted frames are reached, I get this: [h264 @ 0x7faf1b86b400] mmco: unref short failure [h264 @ 0x7faf1b86b400] reference picture missing during reorder [h264 @ 0x7faf1b86b400] Missing reference picture [h264 @ 0x7faf1b86b400] reference picture missing during reorder [h264 @ 0x7faf1b86b400] Missing reference picture [h264 @ 0x7faf1b86b400] mmco: unref short failure [h264 @ 0x7faf1b86b400] mmco: unref short failure Ok, fine. BUT, once these errors occur, if I try to seek to the beginning again the DTS and PTS values are ALWAYS -9223372036854775808. It doesn't matter how many times I flush buffers, or close and reopen the codec, I am stuck with never being able to read the correct DTS and PTS ever again for that file (unless I quit and restart the app)! It's like something internal to avcodec is botched and can't be recovered. If these decode errors are encountered in the middle of a loop, the DTS/PTS are still shown correctly until the end of the loop but once I issue the av_seek_frame() and flush buffers to rewind the stream, the timestamps are always -9223372036854775808 from that point on. Has anyone encountered this? Is there something else I need to do to restore proper DTS/PTS after a decode error? From al at dneg.com Wed Sep 19 16:10:25 2012 From: al at dneg.com (Al Crate) Date: Wed, 19 Sep 2012 15:10:25 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: <505895F5.2090602@dneg.com> References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> <505878B4.9070803@dneg.com> <087101cd95ad$e4d493f0$ae7dbbd0$@com> <50589202.8010002@dneg.com> <505895F5.2090602@dneg.com> Message-ID: <5059D251.5020808@dneg.com> It appears the packet frame duration is being filled in incorrectly. DTS is incrementing by 0.042 every frame, whereas duration is shown to be 0.002. The quicktime plugin in avformat calculates the total duration as last_dts - first_dts + last_duration. This produces my shortened duration on the movie. I'm guessing av_interleaved_write_frame is filling in bad values. stream #0: keyframe=1 duration=0.002 dts=0.917 pts=0.917 size=131592 stream #0: keyframe=1 duration=0.002 dts=0.958 pts=0.958 size=131401 On 18/09/12 16:40, Al Crate wrote: > If I dump out the quicktime information I get this.. > > total_entries 2 > count 23 duration 25 > count 1 duration 1 > > Definitely looks like the avformat movenc is doing something weird. > > quicktime_dump > ftyp > major brand: qt > minor version: 00000000 > compatible brands: qt > movie data (mdat) > size 3127372 > start 1013 > movie (moov) > movie header (mvhd) > version 0 > flags 0 > creation_time 2012-09-19 10:56:06 (3430806966) > modification_time 2012-09-19 10:56:06 (3430806966) > time_scale 1000 > duration 960 > preferred_rate 1.000000 > preferred_volume 1.000000 > reserved 00 00 00 00 00 00 00 00 00 00 > matrix 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 > 0.000000 0.000000 16384.000000 > preview_time 0 > preview_duration 0 > poster_time 0 > selection_time 0 > selection_duration 0 > current_time 0 > next_track_id 2 > user data (udta) > copyright: Double Negative > comment: > source frame range:1-24 > track (trak) > track header (tkhd) > version 0 > flags 15 > creation_time 2012-09-19 10:56:06 (3430806966) > modification_time 2012-09-19 10:56:06 (3430806966) > track_id 1 > reserved1 0 > duration 960 > reserved2 00 00 00 00 00 00 00 00 > layer 0 > alternate_group 0 > volume 0.000000 > reserved3 0 > matrix 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 > 0.000000 0.000000 16384.000000 > track_width 640.000000 > track_height 480.000000 > edit atom (edts) > edit list (elst) > version 0 > flags 0 > total_entries 1 > edit list table > duration 960 > time 0 > rate 1.000000 > media (mdia) > media header (mdhd) > version 0 > flags 0 > creation_time 2012-09-19 10:56:06 (3430806966) > modification_time 2012-09-19 10:56:06 (3430806966) > time_scale 600 > duration 576 > language 0 > quality 0 > handler reference (hdlr) > version 0 > flags 0 > component_type mhlr > component_subtype vide > component_name VideoHandler > media info (minf) > is_audio 0 > is_audio_vbr 0 > is_video 1 > is_text 0 > is_timecode 0 > video media header (vmhd) > version 0 > flags 1 > graphics_mode 0 > opcolor 0 0 0 > handler reference (hdlr) > version 0 > flags 0 > component_type dhlr > component_subtype url > component_name DataHandler > data information (dinf) > data reference (dref) > version 0 > flags 0 > data reference table (dref) > type url > version 0 > flags 1 > data > sample table > sample description (stsd) > version 0 > flags 0 > total_entries 1 > format apch > reserved 00 00 00 00 00 00 > data_reference 1 > version 0 > revision 0 > vendor FFMP > temporal_quality 512 > spatial_quality 512 > width 640 > height 480 > dpi_horizontal 72.000000 > dpi_vertical 72.000000 > data_size 0 > frames_per_sample 1 > compressor_name prores > depth 24 > ctab_id 65535 > color description (colr) > colorParamType 1852009571 > primaries 6 > transferFunction 1 > matrix 6 > time to sample (stts) > version 0 > flags 0 > total_entries 2 > count 23 duration 25 > count 1 duration 1 > sample to chunk (stsc) > version 0 > flags 0 > total_entries 1 > chunk 1 samples 1 id 1 > sample size (stsz) > version 0 > flags 0 > sample_size 0 > total_entries 24 > sample_size 1f24f (127567) > sample_size 1e8ad (125101) > sample_size 1fcdd (130269) > sample_size 1fb3d (129853) > sample_size 1fc53 (130131) > sample_size 1fc1a (130074) > sample_size 1fad4 (129748) > sample_size 1fc62 (130146) > sample_size 1fd07 (130311) > sample_size 1fedf (130783) > sample_size 1fb52 (129874) > sample_size 1fe7e (130686) > sample_size 2008c (131212) > sample_size 1fe51 (130641) > sample_size 1fe49 (130633) > sample_size 1ff44 (130884) > sample_size 1fea2 (130722) > sample_size 1ff24 (130852) > sample_size 1ff30 (130864) > sample_size 201e9 (131561) > sample_size 1ffd1 (131025) > sample_size 2016a (131434) > sample_size 20208 (131592) > sample_size 20149 (131401) > chunk offset (stco) > version 0 > flags 0 > total_entries 24 > offset 0 1021 (3fd) > offset 1 128588 (1f64c) > offset 2 253689 (3def9) > offset 3 383958 (5dbd6) > offset 4 513811 (7d713) > offset 5 643942 (9d366) > offset 6 774016 (bcf80) > offset 7 903764 (dca54) > offset 8 1033910 (fc6b6) > offset 9 1164221 (11c3bd) > offset 10 1295004 (13c29c) > offset 11 1424878 (15bdee) > offset 12 1555564 (17bc6c) > offset 13 1686776 (19bcf8) > offset 14 1817417 (1bbb49) > offset 15 1948050 (1db992) > offset 16 2078934 (1fb8d6) > offset 17 2209656 (21b778) > offset 18 2340508 (23b69c) > offset 19 2471372 (25b5cc) > offset 20 2602933 (27b7b5) > offset 21 2733958 (29b786) > offset 22 2865392 (2bb8f0) > offset 23 2996984 (2dbaf8) > > > On 18/09/12 16:23, Al Crate wrote: >> Cheers! >> >> At least I've a clue as to where to start looking now :) >> >> Heh lol, no idea where that to came from, must be thunderbird being >> "smart" >> >> >> On 18/09/12 15:57, Edward Richards wrote: >>> Hi, >>> >>> PTS/DTS values are not affected by the ProRes encoder at all. They are >>> created in the MOV wrapper during the write_interleaved() >>> >>> Debug that bit to work out how it is making the DTS/PTS longer for the >>> last >>> one. >>> >>> E >>> >>> PS: Love your TO name for the mailing list. >>> >>> >>> _______________________________________________ >>> 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 al at dneg.com Wed Sep 19 17:06:38 2012 From: al at dneg.com (Al Crate) Date: Wed, 19 Sep 2012 16:06:38 +0100 Subject: [Libav-user] prores variable frame rate last frame bug? In-Reply-To: <5059D251.5020808@dneg.com> References: <50586683.40007@dneg.com> <50586A9B.6080701@dneg.com> <505878B4.9070803@dneg.com> <087101cd95ad$e4d493f0$ae7dbbd0$@com> <50589202.8010002@dneg.com> <505895F5.2090602@dneg.com> <5059D251.5020808@dneg.com> Message-ID: <5059DF7E.5060809@dneg.com> here's the output using c->time_base.den = 24; c->time_base.num = 1; as opposed to c->time_base.den = 600; c->time_base.num = 25; stream #0: keyframe=1 duration=0.042 dts=0.917 pts=0.917 size=131592 stream #0: keyframe=1 duration=0.042 dts=0.958 pts=0.958 size=131401 As seen the duration value looks correct. On 19/09/12 15:10, Al Crate wrote: > It appears the packet frame duration is being filled in incorrectly. > > DTS is incrementing by 0.042 every frame, whereas duration is shown to > be 0.002. > > The quicktime plugin in avformat calculates the total duration as > last_dts - first_dts + last_duration. > > This produces my shortened duration on the movie. > > I'm guessing av_interleaved_write_frame is filling in bad values. > > stream #0: > keyframe=1 > duration=0.002 > dts=0.917 pts=0.917 > size=131592 > stream #0: > keyframe=1 > duration=0.002 > dts=0.958 pts=0.958 > size=131401 > > > On 18/09/12 16:40, Al Crate wrote: >> If I dump out the quicktime information I get this.. >> >> total_entries 2 >> count 23 duration 25 >> count 1 duration 1 >> >> Definitely looks like the avformat movenc is doing something weird. >> >> quicktime_dump >> ftyp >> major brand: qt >> minor version: 00000000 >> compatible brands: qt >> movie data (mdat) >> size 3127372 >> start 1013 >> movie (moov) >> movie header (mvhd) >> version 0 >> flags 0 >> creation_time 2012-09-19 10:56:06 (3430806966) >> modification_time 2012-09-19 10:56:06 (3430806966) >> time_scale 1000 >> duration 960 >> preferred_rate 1.000000 >> preferred_volume 1.000000 >> reserved 00 00 00 00 00 00 00 00 00 00 >> matrix 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 >> 0.000000 0.000000 16384.000000 >> preview_time 0 >> preview_duration 0 >> poster_time 0 >> selection_time 0 >> selection_duration 0 >> current_time 0 >> next_track_id 2 >> user data (udta) >> copyright: Double Negative >> comment: >> source frame range:1-24 >> track (trak) >> track header (tkhd) >> version 0 >> flags 15 >> creation_time 2012-09-19 10:56:06 (3430806966) >> modification_time 2012-09-19 10:56:06 (3430806966) >> track_id 1 >> reserved1 0 >> duration 960 >> reserved2 00 00 00 00 00 00 00 00 >> layer 0 >> alternate_group 0 >> volume 0.000000 >> reserved3 0 >> matrix 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 >> 0.000000 0.000000 16384.000000 >> track_width 640.000000 >> track_height 480.000000 >> edit atom (edts) >> edit list (elst) >> version 0 >> flags 0 >> total_entries 1 >> edit list table >> duration 960 >> time 0 >> rate 1.000000 >> media (mdia) >> media header (mdhd) >> version 0 >> flags 0 >> creation_time 2012-09-19 10:56:06 (3430806966) >> modification_time 2012-09-19 10:56:06 (3430806966) >> time_scale 600 >> duration 576 >> language 0 >> quality 0 >> handler reference (hdlr) >> version 0 >> flags 0 >> component_type mhlr >> component_subtype vide >> component_name VideoHandler >> media info (minf) >> is_audio 0 >> is_audio_vbr 0 >> is_video 1 >> is_text 0 >> is_timecode 0 >> video media header (vmhd) >> version 0 >> flags 1 >> graphics_mode 0 >> opcolor 0 0 0 >> handler reference (hdlr) >> version 0 >> flags 0 >> component_type dhlr >> component_subtype url >> component_name DataHandler >> data information (dinf) >> data reference (dref) >> version 0 >> flags 0 >> data reference table (dref) >> type url >> version 0 >> flags 1 >> data >> sample table >> sample description (stsd) >> version 0 >> flags 0 >> total_entries 1 >> format apch >> reserved 00 00 00 00 00 00 >> data_reference 1 >> version 0 >> revision 0 >> vendor FFMP >> temporal_quality 512 >> spatial_quality 512 >> width 640 >> height 480 >> dpi_horizontal 72.000000 >> dpi_vertical 72.000000 >> data_size 0 >> frames_per_sample 1 >> compressor_name prores >> depth 24 >> ctab_id 65535 >> color description (colr) >> colorParamType 1852009571 >> primaries 6 >> transferFunction 1 >> matrix 6 >> time to sample (stts) >> version 0 >> flags 0 >> total_entries 2 >> count 23 duration 25 >> count 1 duration 1 >> sample to chunk (stsc) >> version 0 >> flags 0 >> total_entries 1 >> chunk 1 samples 1 id 1 >> sample size (stsz) >> version 0 >> flags 0 >> sample_size 0 >> total_entries 24 >> sample_size 1f24f (127567) >> sample_size 1e8ad (125101) >> sample_size 1fcdd (130269) >> sample_size 1fb3d (129853) >> sample_size 1fc53 (130131) >> sample_size 1fc1a (130074) >> sample_size 1fad4 (129748) >> sample_size 1fc62 (130146) >> sample_size 1fd07 (130311) >> sample_size 1fedf (130783) >> sample_size 1fb52 (129874) >> sample_size 1fe7e (130686) >> sample_size 2008c (131212) >> sample_size 1fe51 (130641) >> sample_size 1fe49 (130633) >> sample_size 1ff44 (130884) >> sample_size 1fea2 (130722) >> sample_size 1ff24 (130852) >> sample_size 1ff30 (130864) >> sample_size 201e9 (131561) >> sample_size 1ffd1 (131025) >> sample_size 2016a (131434) >> sample_size 20208 (131592) >> sample_size 20149 (131401) >> chunk offset (stco) >> version 0 >> flags 0 >> total_entries 24 >> offset 0 1021 (3fd) >> offset 1 128588 (1f64c) >> offset 2 253689 (3def9) >> offset 3 383958 (5dbd6) >> offset 4 513811 (7d713) >> offset 5 643942 (9d366) >> offset 6 774016 (bcf80) >> offset 7 903764 (dca54) >> offset 8 1033910 (fc6b6) >> offset 9 1164221 (11c3bd) >> offset 10 1295004 (13c29c) >> offset 11 1424878 (15bdee) >> offset 12 1555564 (17bc6c) >> offset 13 1686776 (19bcf8) >> offset 14 1817417 (1bbb49) >> offset 15 1948050 (1db992) >> offset 16 2078934 (1fb8d6) >> offset 17 2209656 (21b778) >> offset 18 2340508 (23b69c) >> offset 19 2471372 (25b5cc) >> offset 20 2602933 (27b7b5) >> offset 21 2733958 (29b786) >> offset 22 2865392 (2bb8f0) >> offset 23 2996984 (2dbaf8) >> >> >> On 18/09/12 16:23, Al Crate wrote: >>> Cheers! >>> >>> At least I've a clue as to where to start looking now :) >>> >>> Heh lol, no idea where that to came from, must be thunderbird being >>> "smart" >>> >>> >>> On 18/09/12 15:57, Edward Richards wrote: >>>> Hi, >>>> >>>> PTS/DTS values are not affected by the ProRes encoder at all. They are >>>> created in the MOV wrapper during the write_interleaved() >>>> >>>> Debug that bit to work out how it is making the DTS/PTS longer for the >>>> last >>>> one. >>>> >>>> E >>>> >>>> PS: Love your TO name for the mailing list. >>>> >>>> >>>> _______________________________________________ >>>> 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 > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From 34973832 at qq.com Thu Sep 20 03:39:17 2012 From: 34973832 at qq.com (=?ISO-8859-1?B?TXIuIFhpYW8=?=) Date: Thu, 20 Sep 2012 09:39:17 +0800 Subject: [Libav-user] can i stream AVMEDIA_TYPE_ATTACHMENT using ffserver? Message-ID: hi, everybody. can i stream AVMEDIA_TYPE_ATTACHMENT using ffserver? could anyone give me some suggestions please. thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xhpohanka at gmail.com Fri Sep 21 10:24:41 2012 From: xhpohanka at gmail.com (Jan Pohanka) Date: Fri, 21 Sep 2012 10:24:41 +0200 Subject: [Libav-user] how to create seekable mkv using libavformat? Message-ID: Hello, I'm muxing a raw h264 stream from hadrdware encoder to mkv using libavformat library. The resulting file is playable, but not properly seekable I'm testing it in ffplay - moving to certains times causes the image to disappear or break and there are these warnings: [h264 @ 0x7f3298008500] Missing reference picture [h264 @ 0x7f3298008500] decode_slice_header error I think that the problem does not lie in the encoded stream, because when I try a following sequence on the file ffmpeg -i vtest.mkv -vcodec copy -f rawvideo vtest.h264 ffmpeg -i vtest.h264 -vcodec copy vtest2.mkv the resulting vtest2.mkv is then seekable without any problems Below there is simplified code that I use to save the frames. Can please someone give me some advice how to alter it to make the resulting file seekable? void *write_thread_f(void *arg) { AVFormatContext *os; AVOutputFormat *fmt; AVStream *video_st; ... os = avformat_alloc_context(); if (os == NULL) return NULL; fmt = av_guess_format(NULL, env->filename, NULL); if (!fmt) { fprintf(stderr, "Nemam vystupni format\n"); goto write_cleanup; } os->oformat = fmt; strncpy(os->filename, env->filename, 128); video_st = av_new_stream(os, 0); if (!video_st) { goto write_cleanup; } video_st->codec->codec_id = CODEC_ID_H264; video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO; video_st->codec->time_base.num = curr_fmt->time_base.num; video_st->codec->time_base.den = curr_fmt->time_base.den; video_st->codec->width = env->width; video_st->codec->height = env->height; video_st->codec->flags |= CODEC_FLAG_GLOBAL_HEADER; if (avio_open(&os->pb, os->filename, URL_WRONLY) < 0) { goto write_cleanup; } avformat_write_header(os, NULL); t = 0; while (...) { struct buf_info *enc_buf; AVPacket pkt; ret = fifo_get(env->write_in_fifo, &enc_buf); if (ret == FIFO_FLUSH) goto write_cleanup2; av_init_packet(&pkt); pkt.data = enc_buf->user_addr; pkt.size = enc_buf->bytes_used; pkt.stream_index = video_st->index; pkt.pts = av_rescale_q(t++, video_st->codec->time_base, video_st->time_base); if (enc_buf->flags & BUF_IFRAME) pkt.flags |= AV_PKT_FLAG_KEY; av_interleaved_write_frame(os, &pkt); fifo_put(env->write_out_fifo, enc_buf); } env->recording = 0; /* end of recording */ pthread_mutex_unlock(&env->rec_lock); write_cleanup2: av_write_trailer(os); avio_close(os->pb); write_cleanup: avformat_free_context(os); regards Jan -- Tato zpr?va byla vytvo?ena p?evratn?m po?tovn?m klientem Opery: http://www.opera.com/mail/ From cehoyos at ag.or.at Fri Sep 21 10:37:23 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 21 Sep 2012 08:37:23 +0000 (UTC) Subject: [Libav-user] how to create seekable mkv using libavformat? References: Message-ID: Jan Pohanka writes: > I'm muxing a raw h264 stream from hadrdware encoder to mkv using > libavformat library. The resulting file is playable, but not properly > seekable I'm testing it in ffplay - moving to certains times causes the > image to disappear or break and there are these warnings: > [h264 @ 0x7f3298008500] Missing reference picture > [h264 @ 0x7f3298008500] decode_slice_header error > > I think that the problem does not lie in the encoded stream, > because when I try a following sequence on the file > ffmpeg -i vtest.mkv -vcodec copy -f rawvideo vtest.h264 > ffmpeg -i vtest.h264 -vcodec copy vtest2.mkv > the resulting vtest2.mkv is then seekable without any problems What happens if you use ffmpeg to mux the hardware-generated h264 file into mkv: $ ffmpeg -i hardware.h264 -vcodec copy test.mkv Is the resulting file seekable? Could you provide a file that does not allow keyframe-seeking? I am curious if the decoding can be fixed. Carl Eugen From xhpohanka at gmail.com Fri Sep 21 10:45:41 2012 From: xhpohanka at gmail.com (Jan Pohanka) Date: Fri, 21 Sep 2012 10:45:41 +0200 Subject: [Libav-user] how to create seekable mkv using libavformat? In-Reply-To: References: Message-ID: Hi, > Could you provide a file that does not allow keyframe-seeking? > I am curious if the decoding can be fixed. I have checked it once more and found the mistake. My fault. if (enc_buf->flags & BUF_IFRAME) pkt.flags |= AV_PKT_FLAG_KEY; I was setting BUF_IFRAME flag sometimes also for P frames. After fixing it just to IDR frames everything is ok. I expect that AV_PKT_FLAG_KEY should be set only for IDR frames and not for I frames in h264, is that true? regards Jan > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user -- Tato zpr?va byla vytvo?ena p?evratn?m po?tovn?m klientem Opery: http://www.opera.com/mail/ From cehoyos at ag.or.at Fri Sep 21 10:56:48 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 21 Sep 2012 08:56:48 +0000 (UTC) Subject: [Libav-user] how to create seekable mkv using libavformat? References: Message-ID: Jan Pohanka writes: > if (enc_buf->flags & BUF_IFRAME) > pkt.flags |= AV_PKT_FLAG_KEY; > > I was setting BUF_IFRAME flag sometimes also for P frames. After fixing it > just to IDR frames everything is ok. I expect that AV_PKT_FLAG_KEY should > be set only for IDR frames and not for I frames in h264, is that true? If your stream contains non-I-frames that use reference frames before the last I-frame and you set the flag as explained above, you should see artefacts on decoding after seeking. Carl Eugen From info at denisgottardello.it Fri Sep 21 20:19:47 2012 From: info at denisgottardello.it (Denis) Date: Fri, 21 Sep 2012 20:19:47 +0200 Subject: [Libav-user] DV Condec Message-ID: <201209212019.47781.info@denisgottardello.it> Does ffmpeg supports dv codec? Where can I find the source? -- www.denisgottardello.it Skype: mrdebug Videosurveillance and home automation! http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php From cehoyos at ag.or.at Sat Sep 22 00:08:12 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 21 Sep 2012 22:08:12 +0000 (UTC) Subject: [Libav-user] DV Condec References: <201209212019.47781.info@denisgottardello.it> Message-ID: Denis writes: > Does ffmpeg supports dv codec? Yes > Where can I find the source? http://ffmpeg.org/download.html Carl Eugen From steve.hart at rtsw.co.uk Sat Sep 22 13:30:20 2012 From: steve.hart at rtsw.co.uk (Steve Hart) Date: Sat, 22 Sep 2012 12:30:20 +0100 Subject: [Libav-user] DV Condec In-Reply-To: References: <201209212019.47781.info@denisgottardello.it> Message-ID: FYI, As far as I know only dv25 and dv50 are supported on encode. At least that was the case last time I checked. Decode is fine. On Sep 21, 2012 11:10 PM, "Carl Eugen Hoyos" wrote: > > Denis writes: > > > Does ffmpeg supports dv codec? > > Yes > > > Where can I find the source? > > http://ffmpeg.org/download.html > > 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 cehoyos at ag.or.at Sat Sep 22 18:56:33 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sat, 22 Sep 2012 16:56:33 +0000 (UTC) Subject: [Libav-user] DV Condec References: <201209212019.47781.info@denisgottardello.it> Message-ID: Steve Hart writes: > FYI, As far as I know only dv25 and dv50 are supported on encode. What is not supported? Carl Eugen From steve.hart at rtsw.co.uk Sat Sep 22 22:14:48 2012 From: steve.hart at rtsw.co.uk (Steve Hart) Date: Sat, 22 Sep 2012 21:14:48 +0100 Subject: [Libav-user] DV Condec In-Reply-To: References: <201209212019.47781.info@denisgottardello.it> Message-ID: I believe encoding PAL/NTSC works but HD (1920x1080 - 422) is not. Am I mistaken? Steve On 22 September 2012 17:56, Carl Eugen Hoyos wrote: > Steve Hart writes: > > > FYI, As far as I know only dv25 and dv50 are supported on encode. > > What is not supported? > > 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 cehoyos at ag.or.at Sun Sep 23 17:27:56 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 23 Sep 2012 15:27:56 +0000 (UTC) Subject: [Libav-user] DV Condec References: <201209212019.47781.info@denisgottardello.it> Message-ID: Steve Hart writes: > I believe encoding PAL/NTSC works but HD (1920x1080 - 422) is not. DVCPRO HD encoding is not supported, that is correct. (I thought it is not called "dv", sorry if I am wrong.) Please do not top-post here, Carl Eugen From ggarra13 at gmail.com Sun Sep 23 22:59:24 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Sun, 23 Sep 2012 17:59:24 -0300 Subject: [Libav-user] Encoding audio Message-ID: <505F782C.2050101@gmail.com> I am trying to transcode audio from one file to another using my own C++ code. I have the audio divided into frames and want to save each frame of audio into a mov file. After looking at doc/examples/muxing.c, I still have some questions. When opening the stream, I need to set a c->bit_rate, but I have no idea what it means. Then the stream returns a c->frame_size which is smaller than my audio frames. I am currently reseting c->frame_size = frame->nb_samples, but not sure if this is correct. From andrey.krieger.utkin at gmail.com Mon Sep 24 08:37:28 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 24 Sep 2012 09:37:28 +0300 Subject: [Libav-user] Bug in mpegts reader with H.264 video? In-Reply-To: References: Message-ID: 2012/9/19 Thomas Worth : > Ok, fine. BUT, once these errors occur, if I try to seek to the > beginning again the DTS and PTS values are ALWAYS > -9223372036854775808. It doesn't matter how many times I flush > buffers, or close and reopen the codec, I am stuck with never being > able to read the correct DTS and PTS ever again for that file (unless > I quit and restart the app)! It's like something internal to avcodec > is botched and can't be recovered. If these decode errors are > encountered in the middle of a loop, the DTS/PTS are still shown > correctly until the end of the loop but once I issue the > av_seek_frame() and flush buffers to rewind the stream, the timestamps > are always -9223372036854775808 from that point on. > > Has anyone encountered this? Is there something else I need to do to > restore proper DTS/PTS after a decode error? Sounds serious. Could you please supply us with sample media file, and simple app that reproduces the issue? And first ensure you reproduce it with latest revision from git. -- Andrey Utkin From dev at rarevision.com Mon Sep 24 14:52:51 2012 From: dev at rarevision.com (Thomas Worth) Date: Mon, 24 Sep 2012 05:52:51 -0700 Subject: [Libav-user] Bug in mpegts reader with H.264 video? In-Reply-To: References: Message-ID: On Sun, Sep 23, 2012 at 11:37 PM, Andrey Utkin wrote: > 2012/9/19 Thomas Worth : >> Ok, fine. BUT, once these errors occur, if I try to seek to the >> beginning again the DTS and PTS values are ALWAYS >> -9223372036854775808. It doesn't matter how many times I flush >> buffers, or close and reopen the codec, I am stuck with never being >> able to read the correct DTS and PTS ever again for that file (unless >> I quit and restart the app)! It's like something internal to avcodec >> is botched and can't be recovered. If these decode errors are >> encountered in the middle of a loop, the DTS/PTS are still shown >> correctly until the end of the loop but once I issue the >> av_seek_frame() and flush buffers to rewind the stream, the timestamps >> are always -9223372036854775808 from that point on. >> >> Has anyone encountered this? Is there something else I need to do to >> restore proper DTS/PTS after a decode error? > > Sounds serious. Could you please supply us with sample media file, and > simple app that reproduces the issue? > And first ensure you reproduce it with latest revision from git. I just tried it with latest git (ff58480) and the problem remains. I'll send you the sample code and MTS file. I would post here, but the video belongs to a client so I probably shouldn't make it publicly available. From andrey.krieger.utkin at gmail.com Mon Sep 24 15:49:00 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 24 Sep 2012 16:49:00 +0300 Subject: [Libav-user] Bug in mpegts reader with H.264 video? In-Reply-To: References: Message-ID: 2012/9/24 Thomas Worth : > I just tried it with latest git (ff58480) and the problem remains. > I'll send you the sample code and MTS file. I would post here, but the > video belongs to a client so I probably shouldn't make it publicly > available. Sorry, but i didn't mean to check this issue _personally_. I'll look it if i have free time, but you'd better post media file (maybe another) and code to maillist, it is the way lot of guys get help. -- Andrey Utkin From dev at rarevision.com Mon Sep 24 15:56:32 2012 From: dev at rarevision.com (Thomas Worth) Date: Mon, 24 Sep 2012 06:56:32 -0700 Subject: [Libav-user] Bug in mpegts reader with H.264 video? In-Reply-To: References: Message-ID: On Mon, Sep 24, 2012 at 6:49 AM, Andrey Utkin wrote: > 2012/9/24 Thomas Worth : >> I just tried it with latest git (ff58480) and the problem remains. >> I'll send you the sample code and MTS file. I would post here, but the >> video belongs to a client so I probably shouldn't make it publicly >> available. > > Sorry, but i didn't mean to check this issue _personally_. I'll look > it if i have free time, but you'd better post media file (maybe > another) and code to maillist, it is the way lot of guys get help. Thanks. No worries. I'll see if I can track down the owner of the media and try to get permission to post it to the list. From andrey.krieger.utkin at gmail.com Mon Sep 24 17:05:42 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 24 Sep 2012 18:05:42 +0300 Subject: [Libav-user] Bug in mpegts reader with H.264 video? In-Reply-To: References: Message-ID: 2012/9/24 Thomas Worth : > Thanks. No worries. I'll see if I can track down the owner of the > media and try to get permission to post it to the list. You can also try to forge the faulty file. just make up a program that remuxes a media file, and manually corrupt certain AVPacket data. -- Andrey Utkin From info at denisgottardello.it Mon Sep 24 22:31:50 2012 From: info at denisgottardello.it (Denis) Date: Mon, 24 Sep 2012 22:31:50 +0200 Subject: [Libav-user] DV Condec In-Reply-To: References: <201209212019.47781.info@denisgottardello.it> Message-ID: <201209242231.50442.info@denisgottardello.it> In data domenica 23 settembre 2012 17:27:56, Carl Eugen Hoyos ha scritto: > DVCPRO HD encoding is not supported, that is correct. > (I thought it is not called "dv", sorry if I am wrong.) Please, download this zip file. It contains a dv and mjpeg videos. https://dl.dropbox.com/u/44875932/Video_per_test.rar I can play the files "DV-ffmpeg.dv" and "MJPEG_Quality=100.avi" with vlc and with my own player based on libavuser. Libavuser says that the first video stream is dvvideo and the second is mjpeg. Now How must I do in order to write a file in dvvideo or mjpeg format? I have tryed this "avformat_alloc_output_context2(&pAVFormatContext, NULL, NULL, "a.avvideo");" but does not work. -- www.denisgottardello.it Skype: mrdebug Videosurveillance and home automation! http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php From cehoyos at ag.or.at Mon Sep 24 23:11:46 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 24 Sep 2012 21:11:46 +0000 (UTC) Subject: [Libav-user] DV Condec References: <201209212019.47781.info@denisgottardello.it> <201209242231.50442.info@denisgottardello.it> Message-ID: Denis writes: > I can play the files "DV-ffmpeg.dv" and > "MJPEG_Quality=100.avi" with vlc and > with my own player based on libavuser. What is libavuser? Carl Eugen From svetlana.olonetsky at gmail.com Tue Sep 25 08:43:52 2012 From: svetlana.olonetsky at gmail.com (Svetlana Olonetsky) Date: Tue, 25 Sep 2012 08:43:52 +0200 Subject: [Libav-user] How to set number of threads in c++ Message-ID: Hi, I am reading video files using ffmpeg in C++. How can I set number of threads for ffmpeg to use ? (I am running in multiprocessing environment and want to have control over it) Thank you, Svetlana -------------- next part -------------- An HTML attachment was scrubbed... URL: From denisgottardello at gmail.com Tue Sep 25 09:42:50 2012 From: denisgottardello at gmail.com (Denis Gottardello) Date: Tue, 25 Sep 2012 09:42:50 +0200 Subject: [Libav-user] DV Condec In-Reply-To: References: <201209212019.47781.info@denisgottardello.it> <201209242231.50442.info@denisgottardello.it> Message-ID: Sorry for my bad english. It means how to produce video with those codecs using directly the ffmpeg libraries without use ffmpeg executable. 2012/9/24 Carl Eugen Hoyos > Denis writes: > > > I can play the files "DV-ffmpeg.dv" and > > "MJPEG_Quality=100.avi" with vlc and > > with my own player based on libavuser. > > What is libavuser? > > 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 cehoyos at ag.or.at Tue Sep 25 10:26:12 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 25 Sep 2012 08:26:12 +0000 (UTC) Subject: [Libav-user] DV Condec References: <201209212019.47781.info@denisgottardello.it> <201209242231.50442.info@denisgottardello.it> Message-ID: Denis Gottardello writes: > It means how to produce video with those codecs using > directly the ffmpeg libraries without use ffmpeg executable. There are usage examples for the libraries in doc/examples Please do not top-post here, Carl Eugen From cehoyos at ag.or.at Tue Sep 25 10:28:23 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 25 Sep 2012 08:28:23 +0000 (UTC) Subject: [Libav-user] How to set number of threads in c++ References: Message-ID: Svetlana Olonetsky writes: > I am reading video files using ffmpeg in C++. > > How can I set number of threads for ffmpeg to use ? See thread_count in AVCodecContext Carl Eugen From zhao0130 at umn.edu Tue Sep 25 17:49:35 2012 From: zhao0130 at umn.edu (zhao0130 at umn.edu) Date: 25 Sep 2012 10:49:35 -0500 Subject: [Libav-user] warning of "[libmp3lame @ 00CAB020] frame_size is too large" while calling avcodec_encode_audio2() Message-ID: I am using ffmpeg api to transcode a movie (.mp4 -> .mov). I got a warning while calling avcodec_encode_audio2(): "[libmp3lame @ 00CAB020] frame_size is too large". I believe this should be due to that the frame size of decoding AVCodecContext, 1024, is different from that of encoding AVCodecContext, 1152. The audio codec of the mp4 file is AAC and that of the mov file is MP3. The default of frame size of MP3 seems 1152 and I can not force it to be 1024. I set other parameters such as sample_rate, bit_rate, sample_fmt and channels of encoding AVCodecContext same as those of decoding AVCodecContext. Help will be really appreciated! From cg85 at hotmail.com Tue Sep 25 23:17:58 2012 From: cg85 at hotmail.com (CHAUVET Guillaume) Date: Tue, 25 Sep 2012 23:17:58 +0200 Subject: [Libav-user] Memory leak after cropping 300/900 pictures Message-ID: Hello, I try to use FFMpeg, this wonderful library through C language. But I encounter a problem : I have 900 pictures to crop, but at the image number 305, my app crash with message "Failed to allocate packet of size 34296000". I stuck because I don't know where is located my memory leak (av_malloc return NULL and my application consume more than 1800 Mb of RAM) ... Softwares used to build my project : - Pelles C (32 bits) - Windows 7 (32 bits) - ffmpeg-20120919-git-cb3591e-win32-dev.7z and appropriate dlls version (from zeranoe distrib) A snippet from my application : #include #include #include #include #include #include #include "libavcodec/avcodec.h" #include "libavutil/opt.h" #include "libavformat/avformat.h" #include "libavutil/imgutils.h" #include "libswscale/swscale.h" typedef struct { AVCodec *codec; AVCodecContext *context; int index; } DataThumb; static BOOL write_image(AVCodecContext *pCodecCtx, AVFrame *pFrame, char *outfile) { BOOL result = FALSE; AVCodecContext *pOCodecCtx = avcodec_alloc_context3(avcodec_find_encoder(pCodecCtx->codec_id)); // // Allocate the output codec context // if (pOCodecCtx != NULL) { // // Initialise format parameters // pOCodecCtx->bit_rate = pCodecCtx->bit_rate; pOCodecCtx->width = pFrame->width; pOCodecCtx->height = pFrame->height; pOCodecCtx->pix_fmt = pCodecCtx->pix_fmt; pOCodecCtx->codec_id = CODEC_ID_MJPEG; pOCodecCtx->time_base = (AVRational) {1, 1}; pOCodecCtx->codec_type = AVMEDIA_TYPE_VIDEO; // // Allocate the JPEG encoder // AVCodec *pOCodec = avcodec_find_encoder(pOCodecCtx->codec_id); if (pOCodec != NULL) { // // Open the JPEG encoder // if (avcodec_open2(pOCodecCtx, pOCodec, NULL) >= 0) { // // Initialise the "VBR" settings // pOCodecCtx->qmin = pOCodecCtx->qmax = 4; pOCodecCtx->mb_lmin = pOCodecCtx->lmin = pOCodecCtx->qmin * FF_QP2LAMBDA; pOCodecCtx->mb_lmax = pOCodecCtx->lmax = pOCodecCtx->qmax * FF_QP2LAMBDA; pOCodecCtx->flags = CODEC_FLAG_QSCALE; pOCodecCtx->global_quality = pOCodecCtx->qmin * FF_QP2LAMBDA; // // Set the timestamp and quality parameters // pFrame->pts = 1; pFrame->quality = pOCodecCtx->global_quality; AVPacket packet; av_init_packet(&packet); packet.data = NULL; packet.size = 0; // // Write JPEG to file // FILE *file = fopen(outfile, "wb"); int got_output; if (avcodec_encode_video2(pOCodecCtx, &packet, pFrame, &got_output) < 0) { result = FALSE; } else if(got_output) { fwrite(packet.data, 1, packet.size, file); } fclose(file); av_free_packet(&packet); result = TRUE; } } avcodec_close(pOCodecCtx); } return result; } static BOOL sample_crop(char *source, char *destination, FLOAT ratio) { BOOL result = FALSE; AVFormatContext *pFormatCtx = avformat_alloc_context(); if(avformat_open_input(&pFormatCtx, source, NULL, NULL) == 0) { av_dump_format(pFormatCtx, 0, source, 0); AVCodecContext *pCodecCtx = pFormatCtx->streams[0]->codec; pCodecCtx->pix_fmt = PIX_FMT_YUV444P; AVCodec *pCodec = avcodec_find_decoder(pCodecCtx->codec_id); if(pCodec != NULL) { if (avcodec_open2(pCodecCtx, pCodec, NULL) >= 0) { AVFrame *pFrame = avcodec_alloc_frame(); if(pFrame != NULL) { // Read frame AVPacket packet; int frameFinished; while (av_read_frame(pFormatCtx, &packet) >= 0) { if (packet.stream_index == 0) { if (avcodec_decode_video2(pCodecCtx, pFrame, &frameFinished, &packet) > 0) { pFrame->quality = 4; av_free_packet(&packet); // Il nous faut d?terminer le plus grand rectangle // tout en respectant un certain ratio int minimum = 0; int maximum = pFrame->width; do { int mid = minimum + (maximum + minimum) / 2; if(mid / ratio <= pFrame->height) { minimum = mid + 1; } else { maximum = mid - 1; } } while(maximum < minimum); // On a enfin les nouvelles dimensions : AVFrame *cropped = avcodec_alloc_frame(); cropped->width = maximum; cropped->height = roundf(maximum / ratio); const int left = (int) (pFrame->width-cropped->width) / 2; const int top = (int) (pFrame->height-cropped->height) / 2; avpicture_alloc((AVPicture *) cropped, pCodecCtx->pix_fmt, cropped->width, cropped->height); if(av_picture_crop((AVPicture *) cropped, (AVPicture *) pFrame, pCodecCtx->pix_fmt, top, left) >= 0) { // L'image est retaill? : on la sauvegarde dans le fichier de sortie if(write_image(pCodecCtx, cropped, destination) == TRUE) { result = TRUE; } } av_free(cropped); break; } } } av_free(pFrame); } } avcodec_close(pCodecCtx); } } avformat_close_input(&pFormatCtx); return result; } static DataThumb *sample_open(UINT width, UINT height, enum AVCodecID codec, UINT fps) { DataThumb *result = (DataThumb *)av_malloc(sizeof(DataThumb)); result->codec = avcodec_find_encoder(codec); if (result->codec != NULL) { result->index = 0; result->context = avcodec_alloc_context3(result->codec); result->context->width = width; result->context->height = height; result->context->time_base = (AVRational) {1, fps}; result->context->pix_fmt = PIX_FMT_YUV444P; result->context->bit_rate = 5 * 1000 * 1000; result->context->gop_size = fps / 12; result->context->max_b_frames = 1; if (result->codec->id == AV_CODEC_ID_H264) av_opt_set(result->context->priv_data, "preset", "veryslow", 0); if (avcodec_open2(result->context, result->codec, NULL) >= 0) { return result; } } av_free(result); return NULL; } static void sample_close(DataThumb *tla) { avcodec_close(tla->context); av_free(tla); } #define MAXPATH 10 * 1024 int main(int argc, char *argv[]) { if(argc < 3) { printf("\n\tusage : %s {input folder} {output folder}\n", argv[0]); } else { avcodec_register_all(); av_register_all(); DataThumb *tla = sample_open(1920, 1080, AV_CODEC_ID_H264, 25); _DIR *d = _opendir(argv[1]); if (d) { int index = 1; struct _dirent *dir; _mkdir(argv[2]); while ((dir = _readdir(d)) != NULL) { char inputfile[MAXPATH]; struct _stat statbuf; sprintf(inputfile, "%s\\%s", argv[1], dir->d_name); _stat(inputfile, &statbuf); if(!_S_ISDIR(statbuf.st_mode)) { char outputfile[MAXPATH]; sprintf(outputfile, "%s\\%04d.jpg", argv[2], index); sample_crop(inputfile, outputfile, 16. / 9); index++; } } _closedir(d); } sample_close(tla); } return 0; } Sincerly, Guillaume From ggarra13 at gmail.com Wed Sep 26 16:11:48 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Wed, 26 Sep 2012 11:11:48 -0300 Subject: [Libav-user] time_base.num/den muxing Message-ID: <50630D24.4000109@gmail.com> I am trying to encode a video and audio file with a fps of 29.97 in the muxing example. If I set .num = 1, .den = fps the video and audio get saved properly, but with the wrong fps. If I set .num = 1000, .den = 1000 * fps, the video and audio do not get saved properly only saving 4 frames or so. In both cases I am using: picture->pts++; Can someone help me to see what I am doing wrong? From gabassi at tecnet.ind.br Thu Sep 27 01:36:07 2012 From: gabassi at tecnet.ind.br (Alexandre Gabassi) Date: Wed, 26 Sep 2012 20:36:07 -0300 Subject: [Libav-user] help to decode frames from MXF file. Message-ID: Hi all, i need to decode frames from mxf file. my formatContext in the av_read_frame call appears ok, but the pts and dts values from audio packet returns : pts -9223372036854775808 dts -9223372036854775808 whats wrong? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jettoblack at gmail.com Thu Sep 27 02:53:20 2012 From: jettoblack at gmail.com (jettoblack) Date: Wed, 26 Sep 2012 17:53:20 -0700 (PDT) Subject: [Libav-user] warning of "[libmp3lame @ 00CAB020] frame_size is too large" while calling avcodec_encode_audio2() In-Reply-To: References: Message-ID: <1348707200727-4655749.post@n4.nabble.com> zhao0130 wrote > I am using ffmpeg api to transcode a movie (.mp4 -> .mov). I got a warning > while calling avcodec_encode_audio2(): "[libmp3lame @ 00CAB020] frame_size > is too large". I believe this should be due to that the frame size of > decoding AVCodecContext, 1024, is different from that of encoding > AVCodecContext, 1152. The audio codec of the mp4 file is AAC and that of > the mov file is MP3. The default of frame size of MP3 seems 1152 and I can > not force it to be 1024. I set other parameters such as sample_rate, > bit_rate, sample_fmt and channels of encoding AVCodecContext same as those > of decoding AVCodecContext. Help will be really appreciated! You need to use a FIFO for the audio samples. Each time you get samples from the decoder, push them into the FIFO. Whenever the FIFO size is at least the encoder's frame_size, pull one frame's worth of samples out of the FIFO into the encoder. There is audio FIFO code already built into ffmpeg: http://ffmpeg.org/doxygen/trunk/group__lavu__audio.html Some audio codecs like PCM have a frame_size of 0. I use 1024 samples for those. -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-warning-of-libmp3lame-00CAB020-frame-size-is-too-large-while-calling-avcodec-encode-audio-tp4655745p4655749.html Sent from the libav-users mailing list archive at Nabble.com. From cehoyos at ag.or.at Thu Sep 27 05:37:37 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 27 Sep 2012 03:37:37 +0000 (UTC) Subject: [Libav-user] help to decode frames from MXF file. References: Message-ID: Alexandre Gabassi writes: > i need to decode frames from mxf file. > > my formatContext in the av_read_frame call appears ok, > but the pts and dts values from audio packet returns :? > > pts -9223372036854775808 dts -9223372036854775808 Is the problem also reproducible with ffmpeg (the application)? Or ffprobe? Carl Eugen From dev at rarevision.com Thu Sep 27 06:34:06 2012 From: dev at rarevision.com (Thomas Worth) Date: Wed, 26 Sep 2012 21:34:06 -0700 Subject: [Libav-user] Bug in mpegts reader with H.264 video? In-Reply-To: References: Message-ID: On Mon, Sep 24, 2012 at 8:05 AM, Andrey Utkin wrote: > 2012/9/24 Thomas Worth : >> Thanks. No worries. I'll see if I can track down the owner of the >> media and try to get permission to post it to the list. > > You can also try to forge the faulty file. just make up a program that > remuxes a media file, and manually corrupt certain AVPacket data. I was able to get permission to post the clip, so here's a zip file that contains it along with a commented source file that demonstrates the problem: http://rarevision.com/ffmpeg/ffmpeg_mpegts_issue.zip From 34973832 at qq.com Thu Sep 27 10:08:08 2012 From: 34973832 at qq.com (=?ISO-8859-1?B?TXIuIFhpYW8=?=) Date: Thu, 27 Sep 2012 16:08:08 +0800 Subject: [Libav-user] how to multicast data by udp Message-ID: hi all, i wander the code below is right or not: A. thread for receiving data from multicast address DWORD WINAPI recv_thread(LPVOID lp) { AVIOContext * io_ctx = NULL; unsigned char recv_buffer[1024]; int ret = avio_open2( &io_ctx, "udp://224.124.0.1:5000?multicast=1&ttl=16&reuse=1&pkt_size=256", AVIO_FLAG_READ_WRITE, NULL, NULL); ret = url_setbufsize(io_ctx, 4096); ret = avio_read(io_ctx, recv_buffer, sizeof(recv_buffer)); // is this okay? avio_close(io_ctx); return 0; } B. thread to send data to multicast address. DWORD WINAPI send_thread(LPVOID lp) { AVIOContext * io_ctx = NULL; uint8_t snd_buf[] = "abcdef"; int ret = avio_open2( &io_ctx, "udp://224.124.0.1:5000?multicast=1&ttl=16&reuse=1&pkt_size=256", AVIO_FLAG_READ_WRITE, NULL, NULL); ret = url_setbufsize(io_ctx, 4096); avio_write(io_ctx, snd_buf, sizeof(snd_buf)); // is this okay? avio_close(io_ctx); return 0; } is anyone could tell me the result. thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From xhpohanka at gmail.com Thu Sep 27 12:30:35 2012 From: xhpohanka at gmail.com (Jan Pohanka) Date: Thu, 27 Sep 2012 12:30:35 +0200 Subject: [Libav-user] av_seek_frame and AVSEEK_FLAG_FRAME Message-ID: Hello, can I use av_seek_frame() with AVSEEK_FLAG_FRAME flag to search the stream by frames? I have tried to use this function and avformat_seek_file() either to change position in mkv video stream, but I'm getting strange results. Sometimes the position is still at the beginning of the file or the next av_read_frame returns an error. Could you please direct me on any example? regards Jan -- Tato zpr?va byla vytvo?ena p?evratn?m po?tovn?m klientem Opery: http://www.opera.com/mail/ From stephane.debusne at gmail.com Fri Sep 28 14:01:56 2012 From: stephane.debusne at gmail.com (Stephane Debusne) Date: Fri, 28 Sep 2012 14:01:56 +0200 Subject: [Libav-user] asf (.wmv) muxer problem : duration is not good ! Message-ID: <506591B4.8050709@gmail.com> Hi all, i'm developing a graphical application using libav libraries. The application typically takes one MJPEG avi file and a wav file as input and output a muxed video file. I Know that ffmpeg.exe does it well but i have to do it inside my application, without a call to ffmpeg.exe, so i use the libav librairies. A lot of things are working well and i can output avi files, or mov files, with different codec. I can also output .wmv movies with AV_CODEC_ID_MSMPEG4V3 as video codec and CODEC_ID_MWAV2 as audio codec, but in that case, the video duration is not good. Typically, 50 dummy images are added and so the duration is 2s too long. If i remove the audio stream, then the duration is ok. So the audio stream seems to be involved in that problem. Before calling av_write_trailer(), the data in the video and audio streams seems to be good. As an example, i've got a video with : video stream : pts: val = 12760 num=12 den =25 ; nb frames = 319 audio stream : pts: val=12800 num=24000 den=48000 ; nb frames = 299 but after writing the trailer, if i close and reopen the file, the duration read by avlibs is 14805. not 12800... However, the movie plays well and it plays only for 12.8 seconds. If i do exactly the same thing, but in a avi file instead of a wmv file (so the muxer is not the same), movie duration is ok. ==> I really think this is due to asf muxer, but can see why and where. I think it can be solved because ffmpeg.exe has not this problem, so i probably missed something somewhere. My intuition is that it is linked to time_base that is set to 1/1000 in asf files. Just for more information : before sending images or sound to the encoders, i set frame->pts to AV_NOPTS_VALUE to let the encoders set up corrects pts. maybe i have to set pts to correct values (such as for the H264 encoder) but i tried and did not get correct results... Have you ever heard about this problem ? Any suggestions ? Thanks for any help regards Stephane From ggarra13 at gmail.com Fri Sep 28 16:04:17 2012 From: ggarra13 at gmail.com (Gonzalo Garramuno) Date: Fri, 28 Sep 2012 11:04:17 -0300 Subject: [Libav-user] asf (.wmv) muxer problem : duration is not good ! In-Reply-To: <506591B4.8050709@gmail.com> References: <506591B4.8050709@gmail.com> Message-ID: <5065AE61.5060008@gmail.com> On 28/09/12 09:01, Stephane Debusne wrote: > Hi all, > > i'm developing a graphical application using libav libraries. The > application typically takes one MJPEG avi file and a wav file as input > and output a muxed video file. > I Know that ffmpeg.exe does it well but i have to do it inside my > application, without a call to ffmpeg.exe, so i use the libav librairies. > > A lot of things are working well and i can output avi files, or mov > files, with different codec. > I can also output .wmv movies with AV_CODEC_ID_MSMPEG4V3 as video > codec and CODEC_ID_MWAV2 as audio codec, but in that case, the video > duration is not good. Typically, 50 dummy images are added and so the > duration is 2s too long. > If i remove the audio stream, then the duration is ok. So the audio > stream seems to be involved in that problem. > > Before calling av_write_trailer(), the data in the video and audio > streams seems to be good. As an example, i've got a video with : > video stream : pts: val = 12760 num=12 den =25 ; nb frames = 319 > audio stream : pts: val=12800 num=24000 den=48000 ; nb frames = 299 > > but after writing the trailer, if i close and reopen the file, the > duration read by avlibs is 14805. not 12800... > However, the movie plays well and it plays only for 12.8 seconds. > > If i do exactly the same thing, but in a avi file instead of a wmv > file (so the muxer is not the same), movie duration is ok. > > ==> I really think this is due to asf muxer, but can see why and > where. I think it can be solved because ffmpeg.exe has not this > problem, so i probably missed something somewhere. > My intuition is that it is linked to time_base that is set to 1/1000 > in asf files. > Hi, Stephane. I found all sort of weird behavior encoding using mov format (ghost images, audio out of sync, etc). Avi format works better. I am still struggling with audio that shows up as chopped audio. I would appreciate it if you would provide the source code to what you have. From tim at eworker.co.uk Fri Sep 28 17:12:57 2012 From: tim at eworker.co.uk (Tim Cannell) Date: Fri, 28 Sep 2012 17:12:57 +0200 Subject: [Libav-user] LGPL and FFMPeg internal aac encoder Message-ID: I have configured FFMpeg as described below - at the bottom of the output listed below, from the configure tool, it says "License: LGPL version 2.1 or later" which I want to believe. Can anyone confirm that this aac encoder implementation is indeed LGPL.Is it just libaacplus which is not under the LGPL ? *dktca1 at CZC209C69P* * ~/ffmpeg-0.11.1 $ ./configure --disable-everything --enable-decoder=h264 --enable-encoder=aac --enable-shared --disable-debug install prefix /usr/local source path . C compiler gcc ARCH x86 (generic) big-endian no runtime cpu detection no yasm yes MMX enabled yes MMX2 enabled yes 3DNow! enabled yes 3DNow! extended enabled yes SSE enabled yes SSSE3 enabled yes AVX enabled yes CMOV enabled no CMOV is fast no EBX available yes EBP available yes debug symbols no strip symbols yes optimize for size no optimizations yes static yes shared yes postprocessing support no new filter support yes network support yes threading support w32threads 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 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: h264* *Enabled encoders: aac* *Enabled hwaccels:* *Enabled parsers:* *Enabled demuxers:* *Enabled muxers:* *Enabled protocols:* *Enabled filters: aformat buffersink format* *Enabled bsfs:* *Enabled indevs:* *Enabled outdevs:* *License: LGPL version 2.1 or later * -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabassi at tecnet.ind.br Fri Sep 28 21:42:58 2012 From: gabassi at tecnet.ind.br (Alexandre Gabassi) Date: Fri, 28 Sep 2012 16:42:58 -0300 Subject: [Libav-user] help to decode frames from MXF file. In-Reply-To: References: Message-ID: <72C9D359-88AF-475A-BDA3-172AE798ACE4@tecnet.ind.br> Great Carl, Your question made me think outside the box. The application used is a FFMbc. the compilation of FFMpeg for Broadcast media. I have used the FFMbc libraries and the decoder works fine. thanks. Alexandre Gabassi On Sep 27, 2012, at 12:37 AM, Carl Eugen Hoyos wrote: > Alexandre Gabassi writes: > >> i need to decode frames from mxf file. >> >> my formatContext in the av_read_frame call appears ok, >> but the pts and dts values from audio packet returns : >> >> pts -9223372036854775808 dts -9223372036854775808 > > Is the problem also reproducible with ffmpeg (the application)? > Or ffprobe? > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From cehoyos at ag.or.at Fri Sep 28 22:05:30 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 28 Sep 2012 20:05:30 +0000 (UTC) Subject: [Libav-user] LGPL and FFMPeg internal aac encoder References: Message-ID: Tim Cannell writes: > I have configured FFMpeg as described below - at the bottom > of the output listed below, from the configure tool, it says > "License: LGPL version 2.1 or later" which I want to believe. Good idea! > Can anyone confirm that this aac encoder implementation is > indeed LGPL. I am not sure I understand: The code was released under the LGPL, ie the person who implemented it decided to release it under the LGPL. Do you need any more confirmation? > Is it just libaacplus which is not under the?LGPL ? I suspect libaacplus is younger than FFmpeg's internal aac encoder (but I admit I did not check). Note that afaict, the internal aac encoder does not support AAC+. Carl Eugen From tim at eworker.co.uk Sat Sep 29 00:07:56 2012 From: tim at eworker.co.uk (Tim Cannell) Date: Sat, 29 Sep 2012 00:07:56 +0200 Subject: [Libav-user] LGPL and FFMPeg internal aac encoder In-Reply-To: References: Message-ID: Carl Thanks for you reply - I guess my remaining doubt lies in the fact that previously libfaac was incorrectly claimed to be LGPL when in fact it incorporates code from an external source that is not available under this licence. See http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/149682 amonst other references turned up by google searches I wanted to be sure the internal ffmpeg aac encoder implementation did not fall into the same category, but after limited research still have some lingering doubts... Thanks Tim On Fri, Sep 28, 2012 at 10:05 PM, Carl Eugen Hoyos wrote: > Tim Cannell writes: > > > I have configured FFMpeg as described below - at the bottom > > of the output listed below, from the configure tool, it says > > "License: LGPL version 2.1 or later" which I want to believe. > > Good idea! > > > Can anyone confirm that this aac encoder implementation is > > indeed LGPL. > > I am not sure I understand: > The code was released under the LGPL, ie the person > who implemented it decided to release it under the LGPL. > Do you need any more confirmation? > > > Is it just libaacplus which is not under the LGPL ? > > I suspect libaacplus is younger than FFmpeg's internal > aac encoder (but I admit I did not check). > Note that afaict, the internal aac encoder does not > support AAC+. > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- Tim Cannell eWorker Ltd - C++/C# Software Development Tel : +44 (0)20 84630504 tim at eworker.co.uk www.eworker.co.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Sat Sep 29 00:25:30 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 28 Sep 2012 22:25:30 +0000 (UTC) Subject: [Libav-user] LGPL and FFMPeg internal aac encoder References: Message-ID: Tim Cannell writes: > Thanks for you reply - I guess my remaining doubt lies in > the fact that previously libfaac was incorrectly claimed > to be LGPL when in fact it incorporates code from an > external source that is not available under this licence. (Since it is not completely clear to me if you know this:) The FFmpeg developers were the ones who found out that faac can indeed not be distributed under the LGPL... [...] > I wanted to be sure the internal ffmpeg aac encoder > implementation did not fall into the same category, but > after?limited research still have some lingering doubts... What research supported this doubts? Carl Eugen From cehoyos at ag.or.at Sat Sep 29 10:03:38 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sat, 29 Sep 2012 08:03:38 +0000 (UTC) Subject: [Libav-user] asf (.wmv) muxer problem : duration is not good ! References: <506591B4.8050709@gmail.com> Message-ID: Stephane Debusne writes: > but after writing the trailer, if i close and reopen the file, the > duration read by avlibs is 14805. not 12800... > However, the movie plays well and it plays only for 12.8 seconds. Isn't the duration value simply wrong on reopening? Or is that also not reproducible with the file created with ffmpeg (the application)? Carl Eugen From stephane.debusne at gmail.com Sat Sep 29 10:38:54 2012 From: stephane.debusne at gmail.com (Stephane Debusne) Date: Sat, 29 Sep 2012 10:38:54 +0200 Subject: [Libav-user] asf (.wmv) muxer problem : duration is not good ! In-Reply-To: References: <506591B4.8050709@gmail.com> Message-ID: <5066B39E.8070407@gmail.com> Le 29/09/2012 10:03, Carl Eugen Hoyos a ?crit : > Stephane Debusne writes: > >> but after writing the trailer, if i close and reopen the file, the >> duration read by avlibs is 14805. not 12800... >> However, the movie plays well and it plays only for 12.8 seconds. > Isn't the duration value simply wrong on reopening? > Or is that also not reproducible with the file created > with ffmpeg (the application)? > Hi Carl, The problem seems to be not reproductible with the ffmpeg.exe application... That's why I think I do something wrong. (Not like the fps value displayed in the windows explorer, which is wrong either with the ffmepg.exe app, but that's an other problem) What I basically do is something like that : I clear every time frame->pts to AV_NOPTS_VALUE to let the encoder deal with that, because i had some weird things with asf files if I wrote ->pts value.... I think this is due to time_base that is different in asf files... for video : // decode video frame ret = avcodec_decode_video2(input_video_dec_ctx, frame, got_frame, &input_video_pkt); if (ret < 0) { return ret; } if (*got_frame) { m_nVideoFrames++; m_VideoPosition += input_video_dec_ctx->time_base.num / (double) input_video_dec_ctx->time_base.den; // ok now encode image into output format av_init_packet(&output_pkt); output_pkt.data = NULL; // packet data will be allocated by the encoder output_pkt.size = 0; frame->pict_type = AV_PICTURE_TYPE_NONE; frame->format = output_video_enc_ctx->pix_fmt; frame->pts = AV_NOPTS_VALUE; ret = avcodec_encode_video2(output_video_enc_ctx,&output_pkt,frame,&got_output); if (got_output) { output_pkt.stream_index = output_video_stream->index; // Write the compressed frame to the media file. av_interleaved_write_frame(output_fmt_ctx, &output_pkt); av_free_packet(&output_pkt); } } and for audio, it is quite the same thing... then i've got a while loop like this : while (ffmpeg_muxer.read_video_packet() >= 0) { ffmpeg_muxer.decode_encode_video_packet(&got_frame, 0, pParam); ffmpeg_muxer.free_video_packet(); if (bAudio) { while (ffmpeg_muxer.GetAudioPosition() <= ffmpeg_muxer.GetVideoPosition()) { if (ffmpeg_muxer.read_audio_packet() >= 0) { ffmpeg_muxer.decode_audio_packet(&got_audio_frame, 0); ffmpeg_muxer.free_audio_packet(); } else { // flush audio ffmpeg_muxer.flush_audio(&got_audio_frame); bAudio = FALSE; break; } } } } At the end of this while loop, I wrote the correct number of frames (audio and video). The length of the two streams are correct.... but when the trailer is written, the output file is not good.... very very strange... Thanks again for any help