From invite+zrdogoilcz11 at facebookmail.com Wed Feb 1 02:30:30 2012 From: invite+zrdogoilcz11 at facebookmail.com (=?UTF-8?B?7KGw6rK97Iud?=) Date: Tue, 31 Jan 2012 17:30:30 -0800 Subject: [Libav-user] =?utf-8?b?6rK97Iud64uY7J20IExpYmF2ZGV2aWNl64uY7J2E?= =?utf-8?b?IEZhY2Vib29r7Jy866GcIOy0iOuMgO2VmOyFqOyKteuLiOuLpA==?= Message-ID: <28e6096fb77b730f5bd8e037d84c3f59@async.facebook.com> ?????, Libavdevice?! ? ??, ???, ???? ??? ? ?? Facebook ???? ??????. ??? ?? ???? ? ? ??? ??? ???? ????. ???? ?? ??? Facebook? ???? ???! ???? ???? ??? ???? ?? ? ????. ?????! ?? Facebook? ????? ?? ??? ?????. http://www.facebook.com/p.php?i=1695939179&k=AQA3Lm44UH1NGgzf47lY98jRf6i2RJ8UOTULW_kyd98TUedIaf3f6qvQEn6kPl27SUEU7AUGWBInDHRJ&r ?? ??? ?? ????? ??? ? ??? ??? ?????. http://www.facebook.com/n/?merge_accounts.php&e=libav-user%40ffmpeg.org&c=AQDT6tb97-cktoY4UKudRYAzSudgtAOItGzUVHBzhjYlrg ======================================= ???? libav-user at ffmpeg.org(?)? ???????. ??? ??? ???? ?? ???? ??? ??? ??? ??? ??? ???. http://www.facebook.com/o.php?k=d77e44&u=100003357923701&mid=59292e3G5af3d8a01975G0G8 Facebook, Inc. Attention: Department 415 P.O Box 10005 Palo Alto CA 94303 -------------- next part -------------- An HTML attachment was scrubbed... URL: From invite+zrdogoilcz11 at facebookmail.com Wed Feb 1 02:31:06 2012 From: invite+zrdogoilcz11 at facebookmail.com (=?UTF-8?B?7KGw6rK97Iud?=) Date: Tue, 31 Jan 2012 17:31:06 -0800 Subject: [Libav-user] =?utf-8?b?6rK97Iud64uY7J20IExpYmF2ZGV2aWNl64uY7J2E?= =?utf-8?b?IEZhY2Vib29r7Jy866GcIOy0iOuMgO2VmOyFqOyKteuLiOuLpA==?= Message-ID: ?????, Libavdevice?! ? ??, ???, ???? ??? ? ?? Facebook ???? ??????. ??? ?? ???? ? ? ??? ??? ???? ????. ???? ?? ??? Facebook? ???? ???! ???? ???? ??? ???? ?? ? ????. ?????! ?? Facebook? ????? ?? ??? ?????. http://www.facebook.com/p.php?i=1695939179&k=AQA-zttzeJDO4NeD705NkgY_syE2CCLJnwAmyA1Eao3LChbwORHMGjqzFGD9OXmQ4cAhjhhejLIZHlBI&r ?? ??? ?? ????? ??? ? ??? ??? ?????. http://www.facebook.com/n/?merge_accounts.php&e=libav-user%40ffmpeg.org&c=AQDT6tb97-cktoY4UKudRYAzSudgtAOItGzUVHBzhjYlrg ======================================= ???? libav-user at ffmpeg.org(?)? ???????. ??? ??? ???? ?? ???? ??? ??? ??? ??? ??? ???. http://www.facebook.com/o.php?k=d77e44&u=100003357923701&mid=5929308G5af3d8a01975G0G8 Facebook, Inc. Attention: Department 415 P.O Box 10005 Palo Alto CA 94303 -------------- next part -------------- An HTML attachment was scrubbed... URL: From francesco at bltitalia.com Thu Feb 2 17:02:46 2012 From: francesco at bltitalia.com (francesco at bltitalia.com) Date: Thu, 2 Feb 2012 17:02:46 +0100 (added by postmaster@virgilio.it) Subject: [Libav-user] av_open_input_file with URLProtocol problem Message-ID: <4F1D432900A4FF29@vsmtp1.tin.it> (added by postmaster@virgilio.it) Hi to all i have the subsequent problem. I wrote my own URLProtocol routines as in the subsequent: unsigned char InputCompressed[0x400000]; // 4M buffer unsigned long bufPnt, fileSize; int myReadFunction (URLContext *h, uint8_t *buf, int buf_size) { if(((bufPnt + buf_size) > 0x400000)||(buf_size<0)) return -1; memcpy(buf,&InputCompressed[bufPnt],buf_size); bufPnt +=buf_size; return buf_size; } int64_t mySeekFunction (URLContext *h, const int64_t offset, int whence) { int64_t retval=0; switch(whence) { case SEEK_SET : if( offset > 0x400000) retval= -1; else bufPnt = offset; break; case SEEK_CUR : if((bufPnt + offset) > 0x400000) retval= -1; else bufPnt += offset; break; case SEEK_END : if( offset > 0x400000) retval= -1; else bufPnt = 0x400000 - offset; break; case AVSEEK_SIZE : retval=(fileSize<0x400000) ? fileSize : 0x400000; break; } return retval; } int myWriteFunction (URLContext *h, const uint8_t *buf, int buf_size) { int realSize; if((bufPnt==0x400000)||(buf_size<0)) return -1; realSize = ((bufPnt + buf_size) > 0x400000) ? 0x400000 - bufPnt: buf_size; memcpy(&InputCompressed[bufPnt],buf, realSize); bufPnt +=realSize; return realSize; } int myOpenFunction(URLContext *h, const char *pseudofilename, int flags) { bufPnt = 0; } int myCloseFunction(URLContext* h) { return 0; } URLProtocol my_protocol = { "myProto", myOpenFunction, myReadFunction, myWriteFunction, mySeekFunction, myCloseFunction, }; used in this way (after loading the raw image into the InputCompressed buffer) : pCodec = NULL; pFrame = NULL; pFormatCtx = NULL; pCodecCtx = NULL; av_init_packet(&packet); av_register_protocol2(&my_protocol,sizeof (URLProtocol)); str1.printf("myProto:0x%08lx",InputCompressed); if(av_open_input_file(&pFormatCtx,str1.c_str(),NULL,0,NULL)!=0) // >>> if(av_open_input_file(&pFormatCtx,filename.c_str(),NULL,0,NULL)!=0) <<<<< {Memo1->Lines->Add("Error opening raw file"); goto end_conv;} if(av_find_stream_info(pFormatCtx)>0) {Memo1->Lines->Add("Error reading stream info"); goto end_conv;} videoStream=-1; for(i=0; inb_streams; i++) if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { videoStream=i; break; } if(videoStream==-1) {Memo1->Lines->Add("Unable to detect stream type"); goto end_conv;} // Get a pointer to the codec context for the video stream The strange thing is that if the image is a MPEG2 one it works and detect the codec_type, while if the image is a mjpeg compressed, the result is "Unable to detect stream type". If I use the av_open_input_file with the filename, then is possible to detect the codec_type. I think the problem is inthe myProtocol functions. Any idea ? From aboyd at a2etech.com Thu Feb 2 18:05:04 2012 From: aboyd at a2etech.com (Alistair Boyd) Date: Thu, 2 Feb 2012 17:05:04 -0000 Subject: [Libav-user] FW: Add metadata to video file Message-ID: <13C773F039B242D98BFFDFF5A40AE204@ABLenovo> I am encoding MPEG4 to an mp4 file using libavformat. I would like to add some metadata to the MP4 file such as date/time. Can someone give me some indication of how this can be done? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mika_rajala_2 at hotmail.com Thu Feb 2 14:43:17 2012 From: mika_rajala_2 at hotmail.com (Mika Rajala) Date: Thu, 2 Feb 2012 13:43:17 +0000 Subject: [Libav-user] Looking for a tutorial on libavfilter Message-ID: Hi Here's the thing: http://stackoverflow.com/questions/9112521/how-do-i-use-libavfilter-to-deinterlace-frames-in-my-video-player-software Or in short.. I got my video player working, how do i apply the 'yadif' filter to the frames? Any tutorial on libavfilter anywhere? Any sample programs I could look at? I got some ideas from ffmpeg.c, but i'm unable to figure out how to set up the filters thanks -mika -------------- next part -------------- An HTML attachment was scrubbed... URL: From simondaniels23 at gmail.com Thu Feb 2 23:51:45 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Thu, 2 Feb 2012 14:51:45 -0800 Subject: [Libav-user] Seeking during trimming command takes quite a while In-Reply-To: References: Message-ID: Worked like a charm Carl. Thanks! On Mon, Jan 30, 2012 at 4:56 PM, Carl Eugen Hoyos wrote: > Simon Daniels writes: > >> I'm using the -ss and -t flags to trim a section of video out of a >> longer original one. As an example, if the video is 60 minutes long, >> and I want minutes 50-52, ffmpeg takes quite a while to get to that >> point. I'll see something like the following (I know my -ss flag >> values don't exactly match my example) >> >> Users-MacBook-Pro:ffmpeg-0.10 user$ ./ffmpeg -i "Long GOPRO.MP4" >> -vcodec copy -acodec copy -ss 0:05:10 -t 0:00:30 "output1.mp4" > > Your command line asks ffmpeg to decode the complete input file and start > encoding / remuxing after 5:10 (for 30 seconds). The faster (but possibly less > exact) variant is to seek to 5:10 and start decoding there: > ffmpeg -ss 5:10 -i input -vcodec copy -acodec copy out.mp4 > (-ss may not always work with -codec copy but I just tested it successfully on a > mov trailer.) > >> ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers > > Completely unrelated to your question: > If you are an end user, you are strongly encouraged to always use latest git > head instead of a release: git head always contains more features and fixes. > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From andrey.krieger.utkin at gmail.com Fri Feb 3 09:54:20 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 3 Feb 2012 10:54:20 +0200 Subject: [Libav-user] Looking for a tutorial on libavfilter In-Reply-To: References: Message-ID: 2012/2/2 Mika Rajala : > Hi > > Here's the thing: > > http://stackoverflow.com/questions/9112521/how-do-i-use-libavfilter-to-deinterlace-frames-in-my-video-player-software > > Or in short.. > > I got my video player working, how do i?apply the 'yadif' filter to the > frames? > > Any tutorial on libavfilter anywhere? > > Any sample programs I could look at? > > I got some ideas from ffmpeg.c, but i'm unable to figure out how to set up > the filters > > thanks > > -mika > See doc/examples/filtering.c in git tree. Also you can look at my application: https://github.com/krieger-od/imgs2video/blob/master/imgs2video.c -- Andrey Utkin From sankha93 at gmail.com Sat Feb 4 11:29:00 2012 From: sankha93 at gmail.com (Sankha Narayan Guria) Date: Sat, 4 Feb 2012 15:59:00 +0530 Subject: [Libav-user] A cross platform media converter using ffmpeg Message-ID: Hi, ??? I am an undergraduate student, recently developed a media converting application called Panther. It is based on ffmpeg project and Java. The source is hosted at https://github.com/sankha93/Panther The recent release can be downloaded from https://github.com/sankha93/Panther/downloads I tried to make a very simple and easy to use user interface to perform the common conversion tasks. Kindly review the project and please give your feedback and suggestions. I will be glad if somebody joins me on the project. Thanks, Sankha Narayan Guria From nitinkumgoyal at gmail.com Sat Feb 4 16:04:04 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Sat, 4 Feb 2012 20:34:04 +0530 Subject: [Libav-user] A cross platform media converter using ffmpeg In-Reply-To: References: Message-ID: Hi It seems to be the nice effort and UI looks good. It sees to be a file conversion app from one format to another and in general its same as other data conversion tools in the market. Can you tell me what is the new thing or special thing you have added in it which is nt commonly available? Also, file type supports are very less and there can be hundreds of many other features which can be included in this project. Regards Nitin On Sat, Feb 4, 2012 at 3:59 PM, Sankha Narayan Guria wrote: > Hi, > I am an undergraduate student, recently developed a media > converting application called Panther. It is based on ffmpeg project > and Java. > > The source is hosted at https://github.com/sankha93/Panther > > The recent release can be downloaded from > https://github.com/sankha93/Panther/downloads > > I tried to make a very simple and easy to use user interface to > perform the common conversion tasks. > > Kindly review the project and please give your feedback > and suggestions. I will be glad if somebody joins me on the > project. > > Thanks, > Sankha Narayan Guria > _______________________________________________ > 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 jdxsolutions at gmail.com Sat Feb 4 16:49:43 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Sat, 4 Feb 2012 15:49:43 +0000 Subject: [Libav-user] Getting to grips with ffmpeg Message-ID: Hello all, I develop software (C++ using wxWidgets for Mac and Windows) which does 3D rendering (using Ogre3D) and we want to allow users to record a video as they work. ffmpeg was recommended in a couple of places but to be honest, it looks quite big and scary so before committing to using it, I have two starter questions I hope you can help me with... 1. How hard is it to learn to use the library to programatically create videos where each frame is basically just a 2D texture? Do I have to learn a lot about the library or can I "just use it" with a handful of API calls? I know it's a subjective question, but when you were noobs how easy was it to get started? 2. I had some concerns reading about the legal side, GPL and LGPL. Our software is totally closed source and while we use LGPL libraries, it sounded like some parts of ffmpeg are GPL-only. Will this realistically affect me 3. codecs. As a user of various video-conversion tools, I have always found them confusing and awkward. How does ffmpeg handle them - will my users have to install codecs (or rely on my app doing so for them through an installer script), or do you take the approach of bundling codecs so my users can just unzip my app onto their PC and it works? That's it for now. I'll try to come up with tougher questions next time. Thanks, John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sankha93 at gmail.com Sat Feb 4 19:20:59 2012 From: sankha93 at gmail.com (Sankha Narayan Guria) Date: Sat, 4 Feb 2012 23:50:59 +0530 Subject: [Libav-user] A cross platform media converter using ffmpeg In-Reply-To: References: Message-ID: Hi, Thank you. I have just focused on simplicity of the user interface for now. Among the new few features that I tried to implement are: 1. A easy way to reduce size of MP3s by reducing the bitrate, without the user knowing much technical details. 2. Ability to create presets to create a set of predefined easily accessible setting for video conversion. I am planning to implement the following features: 1. A scripting language kind of support to do batch processing tasks more easily. But if you have more features in mind, then please give your feedback and suggestions to me. Thanks, Sankha Narayan Guria On 2/4/12, NITIN GOYAL wrote: > Hi > > It seems to be the nice effort and UI looks good. > > It sees to be a file conversion app from one format to another and in > general its same as other data conversion tools in the market. > > Can you tell me what is the new thing or special thing you have added in it > which is nt commonly available? > > Also, file type supports are very less and there can be hundreds of many > other features which can be included in this project. > > Regards > Nitin > > On Sat, Feb 4, 2012 at 3:59 PM, Sankha Narayan Guria > wrote: > >> Hi, >> I am an undergraduate student, recently developed a media >> converting application called Panther. It is based on ffmpeg project >> and Java. >> >> The source is hosted at https://github.com/sankha93/Panther >> >> The recent release can be downloaded from >> https://github.com/sankha93/Panther/downloads >> >> I tried to make a very simple and easy to use user interface to >> perform the common conversion tasks. >> >> Kindly review the project and please give your feedback >> and suggestions. I will be glad if somebody joins me on the >> project. >> >> Thanks, >> Sankha Narayan Guria >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> > From andrey.krieger.utkin at gmail.com Sat Feb 4 20:38:48 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Sat, 4 Feb 2012 21:38:48 +0200 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: 2012/2/4 John Dexter : > Hello all, > > I develop software (C++ using wxWidgets for Mac and Windows) which does 3D > rendering (using Ogre3D) and we want to allow users to record a video as > they work. ffmpeg was recommended in a couple of places but to be honest, it > looks quite big and scary so before committing to using it, I have two > starter questions I hope you can help me with... I also was scary about it when started (a year ago). But now i can say that i didn't find any (opensource or proprietary) libraries that are so mature and widely functional as ffmpeg libs. This project looks #1 in automated audio\video processing for me :) > 1. How hard is it to learn to use the library to programatically create > videos where each frame is basically just a 2D texture? Do I have to learn a > lot about the library or can I "just use it" with a handful of API calls? I > know it's a subjective question, but when you were noobs how easy was it to > get started? It's hard if you don't know anything about structure of media files. It's easy "just to use it" when you have learned that. There're some code examples - in sources tree, and elsewhere. Documentation is mostly inside includable headers. > 2. I had some concerns reading about the legal side, GPL and LGPL. Our > software is totally closed source and while we use LGPL libraries, it > sounded like some parts of ffmpeg are GPL-only. Will this realistically > affect me I'm not keen on that, so i skip this question. Sorry. > 3. codecs. As a user of various video-conversion tools, I have always found > them confusing and awkward. How does ffmpeg handle them - will my users have > to install codecs (or rely on my app doing so for them through an installer > script), or do you take the approach of bundling codecs so my users can just > unzip my app onto their PC and it works? You have to compile ffmpeg libs by yourself, all codecs are be compiled into it. Then just distribute libs with your application. Or link it statically into your app. (Of course, if you're allowed to do it all, with respect to license terms.) On linux it is possible also to rely on libs installed by distro's packaging system. -- Andrey Utkin From kalileo at universalx.net Sun Feb 5 14:47:58 2012 From: kalileo at universalx.net (Kalileo) Date: Sun, 5 Feb 2012 20:47:58 +0700 Subject: [Libav-user] Remuxing mpegts udp stream, how to fill AVCodecContext.extradata of outgoing stream? Message-ID: <1C67023A-260C-40AB-B80B-8AE76FC6C342@universalx.net> I have a mpegts file (h264/aac) which was created by dumping a mpegts udp stream to a file. (the file can be played with vlc etc. perfectly). Now I need to convert that file again to a stream (without decoding/encoding). If I simply parse the file and remux the frames to an mpegts udp stream the resulting stream is not really playable, vlc can play just fragments of video and audio and a lot of errors. (remuxing to a file in any format works though). Apparently the headers in the outgoing h264 and in the outgoing aac are missing, and to add them I need to fill the extradata of their CodecContext . Because I do not have an incoming stream anymore, but read a file, I cannot copy the extradata from the incoming stream's codec context (it is empty), but apparently I need to manually fill the extradata of the Context of the outgoing stream. Despite going through the mailing list archives up and down and scanning the source code of ffmpeg and libavcodec /libavformat (and googling for days) I still do not see how I can copy the header info from the (incoming) x264 and aac codecs into the extradata of the outgoing Codec Context. Any sample code (or pointer to source code) where I can see where to get the required info (priv_data?) and how to format and write it into extradata is very much appreciated! From cehoyos at ag.or.at Sun Feb 5 17:38:44 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 5 Feb 2012 16:38:44 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: Message-ID: John Dexter writes: > 2. I had some concerns reading about the legal side, GPL and LGPL. Our > software is totally closed source and while we use LGPL libraries, it > sounded like some parts of ffmpeg are GPL-only. Will this realistically > affect me It is your choice if you compile FFmpeg with support for GPL-parts (which makes the whole library GPL and forbids linking against your proprietary application) or without. So only you know if it affects you or not. (Or in other words: It will only affect you if you want H264 encoding but are not willing to buy a commercial x264 license.) Please consider reading the License Compliance Checklist on http://ffmpeg.org/legal.html and if you think anything is not clear on this page, please report! Carl Eugen From bruce at spearmorgan.com Sun Feb 5 18:17:53 2012 From: bruce at spearmorgan.com (Bruce Wheaton) Date: Sun, 5 Feb 2012 09:17:53 -0800 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: <4434B76F-D36C-4633-8B70-841D03D5F156@spearmorgan.com> On Feb 5, 2012, at 8:38, Carl Eugen Hoyos > (Or in other words: It will only affect you if you want H264 encoding > but are not willing to buy a commercial x264 license.) Carl, for my own information - there are also some 'less important' codecs that are GPL only, correct? And some scaling optimizations still? Bruce > > Please consider reading the License Compliance Checklist on > http://ffmpeg.org/legal.html and if you think anything is not > clear on this page, please report! > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From jdxsolutions at gmail.com Sun Feb 5 18:26:19 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Sun, 5 Feb 2012 17:26:19 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: On 5 February 2012 16:38, Carl Eugen Hoyos wrote: > John Dexter writes: > > > 2. I had some concerns reading about the legal side, GPL and LGPL. Our > > software is totally closed source and while we use LGPL libraries, it > > sounded like some parts of ffmpeg are GPL-only. Will this realistically > > affect me > > It is your choice if you compile FFmpeg with support for GPL-parts > (which makes the whole library GPL and forbids linking against your > proprietary application) or without. > So only you know if it affects you or not. > I was aware some parts are GPL only and you can compile without those parts... but the legal page doesn't say which, and whether they 'matter'. But you follow on with > (Or in other words: It will only affect you if you want H264 encoding > but are not willing to buy a commercial x264 license.) > So is that the only major restriction? It sounds fairly major since I'm fairly sure our client demands H264 as the primary format. It's hardly part of ffmpeg I know, but any clarification what I can['t] do here would be awesome so I can clearly explain why (if) I can't provide what they consider the standard. Feel free to direct me elsewhere to discuss that topic. > > Please consider reading the License Compliance Checklist on > http://ffmpeg.org/legal.html and if you think anything is not > clear on this page, please report! > Since you mention it, I would prefer a list of what I MUST do and a list of what you PREFER I do, in terms of open-source etiquette :) Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdxsolutions at gmail.com Sun Feb 5 18:40:28 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Sun, 5 Feb 2012 17:40:28 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: > > (Or in other words: It will only affect you if you want H264 encoding > but are not willing to buy a commercial x264 license.) Sorry, I need to ask about that in more detail after more thought. There are 2 separate issues here it seems... 1. Whether I can use ffmpeg libraries to encode H264 without making my entire application GPL? 2. Whether I need to pay for a H264 license Is the situation I can use ffmpeg L-GPL if I pay for a H264 license, but without buying that license I can only use H264 for full GPL? Or am I totally misunderstanding the situation? John. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aviadr1 at gmail.com Sun Feb 5 18:49:45 2012 From: aviadr1 at gmail.com (aviad rozenhek) Date: Sun, 5 Feb 2012 19:49:45 +0200 Subject: [Libav-user] using avconv to transmux MPEGTS over RTP to MPEGTS over UDP Message-ID: Dear libav, i'm trying to use avconv to read MPEGTS over RTP and transfer it to MPEGTS over udp. here is the command line i'm using >avconv -i rtp://234.5.5.5:10201 -c copy -f mpegts udp://localhost:4444 and here's the output avconv version v0.8-293-g86b57e4, Copyright (c) 2000-2011 the Libav > developers > built on Feb 4 2012 23:34:56 with gcc 4.5.2 > [NULL @ 006cf780] non-existing SPS 32 referenced in buffering period > [NULL @ 006cf780] non-existing PPS referenced > [h264 @ 006cf780] non-existing SPS 32 referenced in buffering period > [h264 @ 006cf780] non-existing PPS 0 referenced > [h264 @ 006cf780] decode_slice_header error > [h264 @ 006cf780] no frame! > [rtp @ 007fd8c0] Estimating duration from bitrate, this may be inaccurate > Input #0, rtp, from 'rtp://234.5.5.5:10201': > Duration: N/A, start: 669.528000, bitrate: 192 kb/s > Stream #0.0: Audio: mp2, 48000 Hz, stereo, s16, 192 kb/s > Stream #0.1: Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR > 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc > [mpegts @ 039ffb00] muxrate VBR, pcr every 9000 pkts, sdt every 200, > pat/pmt every 40 pkts > Output #0, mpegts, to 'udp://localhost:4444': > Metadata: > encoder : Lavf54.0.0 > Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], > q=2-31, 90k tbn, 90k tbc > Stream #0.1: Audio: mp2, 48000 Hz, stereo, 192 kb/s > Stream mapping: > Stream #0:1 -> #0:0 (copy) > Stream #0:0 -> #0:1 (copy) > Press ctrl-c to stop encoding > [mpegts @ 039ffb00] first pts value must set > *av_interleaved_write_frame(): Operation not permitted* I tried various flags, but none seem to work, the transmuxing always fails with the same "*av_interleaved_write_frame(): Operation not permitted" * message btw, using avplay to play the same RTP stream, works. -- Aviad Rozenhek -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Sun Feb 5 19:27:57 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 5 Feb 2012 18:27:57 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: Message-ID: John Dexter writes: > (Or in other words: It will only affect you if you want H264 encoding > but are not willing to buy a commercial x264 license.) > > Sorry, I need to ask about that in more detail after more thought. > There are 2 separate issues here it seems... > > > Whether I can use ffmpeg libraries to encode H264 without making my > entire application GPL? > > Whether I need to pay for a H264 license? > Is the situation I can use ffmpeg L-GPL if I pay for a H264 license, > but without buying that license I can only use H264 for full GPL? > Or am I totally misunderstanding the situation? The situation is that if you link your application against a GPL'd library (or against libavcodec linking against a GPL'd library) then your application gets GPL'd itself (or you are not complying with the GPL, making you a copyright violator). The LGPL allows you to link against non-free object files as long as you follow some restrictions - see http://ffmpeg.org/legal.html - so if your H264 encoding library is *not* licensed under the GPL (but a proprietary or "commercial" license) there should be no problem. The remaining questions are certainly not within the scope of this mailing list, please visit http://x264licensing.com/ Please set your mailer to "plain text" instead of html, Carl Eugen From cehoyos at ag.or.at Sun Feb 5 19:31:44 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 5 Feb 2012 18:31:44 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: Message-ID: John Dexter writes: > > Please consider reading the License Compliance Checklist on > > http://ffmpeg.org/legal.html and if you think anything is not > > clear on this page, please report! > > Since you mention it, I would prefer a list of what I MUST > do and a list of what you PREFER I do, in terms of > open-source etiquette :)? (Not being a native speaker, I wonder if there is some insult hidden in this sentence...) The list contains all things you have to do afaict, and some things that really make a lot of sense if you trying to fulfil the requirements of the LGPL (as opposed to trying very hard not to fulfil its concept and getting away with it). Carl Eugen From cehoyos at ag.or.at Sun Feb 5 19:39:21 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 5 Feb 2012 18:39:21 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: <4434B76F-D36C-4633-8B70-841D03D5F156@spearmorgan.com> Message-ID: Bruce Wheaton writes: > On Feb 5, 2012, at 8:38, Carl Eugen Hoyos > > (Or in other words: It will only affect you if you want H264 > > encoding but are not willing to buy a commercial x264 license.) > > Carl, for my own information - there are also some > 'less important' codecs that are GPL only, correct? Some video filters, the X11 framegrab code and the avs encoder are examples for GPL'd parts of FFmpeg. Carl Eugen From cehoyos at ag.or.at Sun Feb 5 19:42:19 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 5 Feb 2012 18:42:19 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: Message-ID: Carl Eugen Hoyos writes: > The list contains all things you have to do afaict, > and some things that really make a lot of sense if you trying > to fulfil the requirements of the LGPL (as opposed to trying > very hard not to fulfil its concept and getting away with it). [About http://ffmpeg.org/legal.html ] I just saw that above is of course not true for point 2 (use dynamic linking) but since using static linking makes conforming to the LGPL more difficult I think it clearly counts as good advice. Carl Eugen From andrey.krieger.utkin at gmail.com Sun Feb 5 21:13:50 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Sun, 5 Feb 2012 22:13:50 +0200 Subject: [Libav-user] using avconv to transmux MPEGTS over RTP to MPEGTS over UDP In-Reply-To: References: Message-ID: Please run with adding option -loglevel debug It will make ./configure options appear in log, so we can try to reproduce the issue. Also maybe some more information will appear. What happens if you split this command into two? avconv -loglevel debug -i rtp://234.5.5.5:10201 -c copy out.ts then, if it succeeds, avconv -loglevel debug -i out.ts -vcodec copy -acodec copy -f mpegts udp://localhost:4444 -- Andrey Utkin From jdxsolutions at gmail.com Mon Feb 6 03:07:18 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Mon, 6 Feb 2012 02:07:18 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: On 5 February 2012 18:42, Carl Eugen Hoyos wrote: > Carl Eugen Hoyos writes: > > > The list contains all things you have to do afaict, > > and some things that really make a lot of sense if you trying > > to fulfil the requirements of the LGPL (as opposed to trying > > very hard not to fulfil its concept and getting away with it). > > [About http://ffmpeg.org/legal.html ] > I just saw that above is of course not true for point 2 > (use dynamic linking) but since using static linking makes > conforming to the LGPL more difficult I think it clearly > counts as good advice. > > That page includes "distribute the ffmpeg source code". IIRC that's *not* a requirement for LGPL? There is no hidden insult, I am simply remarking a legal page should clearly differentiate between what is a legal requirement from the license, and what is considered polite. If we start adding what we *want* to what is mandatory, we end up confusing people. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdxsolutions at gmail.com Mon Feb 6 03:58:28 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Mon, 6 Feb 2012 02:58:28 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: On 5 February 2012 18:27, Carl Eugen Hoyos wrote: > > John Dexter writes: > > > (Or in other words: It will only affect you if you want H264 encoding > > but are not willing to buy a commercial x264 license.) > > > > Sorry, I need to ask about that in more detail after more thought. > > There are 2 separate issues here it seems... > > > > > > Whether I can use ffmpeg libraries to encode H264 without making my > > entire application GPL? > > > > Whether I need to pay for a H264 license > > > Is the situation I can use ffmpeg L-GPL if I pay for a H264 license, > > but without buying that license I can only use H264 for full GPL? > > Or am I totally misunderstanding the situation? > > The situation is that if you link your application against a GPL'd > library (or against libavcodec linking against a GPL'd library) > then your application gets GPL'd itself (or you are not complying > with the GPL, making you a copyright violator). > > The LGPL allows you to link against non-free object files as long > as you follow some restrictions - see http://ffmpeg.org/legal.html > - so if your H264 encoding library is *not* licensed under the GPL > (but a proprietary or "commercial" license) there should be no > problem. OK that is clearer - I missed that x264 was GPL and thought H264 was special some way. The rules about how using any GPL code makes my whole app GPL are clear. I'll look into this more and start a new discussion on specifics if needed. > > The remaining questions are certainly not within the scope of > this mailing list, please visit http://x264licensing.com/ Thanks for the link. > > Please set your mailer to "plain text" instead of html, Carl Eugen Is that a list rule? And, does _this_ mail conform? If so I'll try to remember in future. Thanks! From cehoyos at ag.or.at Mon Feb 6 04:03:49 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 6 Feb 2012 03:03:49 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: Message-ID: John Dexter writes: > > [About http://ffmpeg.org/legal.html ] > > That page includes "distribute the ffmpeg source code". > IIRC that's not?a requirement for LGPL? It is a crystal-clear requirement. Carl Eugen From jdxsolutions at gmail.com Mon Feb 6 04:29:04 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Mon, 6 Feb 2012 03:29:04 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: On 6 February 2012 03:03, Carl Eugen Hoyos wrote: > > John Dexter writes: > > > > [About http://ffmpeg.org/legal.html ] > > > > That page includes "distribute the ffmpeg source code". > > IIRC that's not?a requirement for LGPL? > > It is a crystal-clear requirement. If you're going to make such assertions please back them up. My research into dynamic linking of (L)GPL libraries finds multiple explicit claims that distribution of the library source code is _not_ required if I haven't modified the original, according to LGPL section 6, specifically 6b. (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html linked from ffmpeg legal page). John. From philip at turmel.org Mon Feb 6 06:21:48 2012 From: philip at turmel.org (Phil Turmel) Date: Mon, 06 Feb 2012 00:21:48 -0500 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: <4F2F636C.7090309@turmel.org> John, On 02/05/2012 10:29 PM, John Dexter wrote: > > If you're going to make such assertions please back them up. My > research into dynamic linking of (L)GPL libraries finds multiple > explicit claims that distribution of the library source code is _not_ > required if I haven't modified the original, according to LGPL section > 6, specifically 6b. > (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html linked from > ffmpeg legal page). Section 6b applies only when the LGPL object is "already present on the user's computer system", that is, when installed by the user from other sources and your code just dynamically links to it. Whomever they got the binary from must comply with one of the other methods in section 6. If your installer supplies the LGPL DLLs, 6b doesn't apply to you. You will need to be prepared to offer the source code if you don't ship it with your installer. If you are getting the DLLs you use from a compliant third party, and they cease operating, you are still required to offer the source code for the versions you shipped. Maybe as long as three years later. Of course, I Am Not A Lawyer, and you are free to disagree. You should consult a real lawyer for a more definitive opinion. HTH, Phil From simondaniels23 at gmail.com Mon Feb 6 06:44:17 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Sun, 5 Feb 2012 21:44:17 -0800 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file Message-ID: Hello, I've come across a particular MTS file that doesn't seem to want to be decoded. I've decoded plenty of other MTS, M4V, and MOV files with my code so something seems to be unique to this one. I can play the file just fine too. Any idea what's going on here? Here's the media info for the bad file: General ID : 0 (0x0) Complete name : D:\Projects\Investigation\00793.MTS Format : BDAV Format/Info : Blu-ray Video File size : 91.9 MiB Duration : 34s 97ms Overall bit rate : 22.6 Mbps Maximum Overall bit rate : 24.0 Mbps Video ID : 4113 (0x1011) Menu ID : 1 (0x1) Format : AVC Format/Info : Advanced Video Codec Format profile : High at L4.0 Format settings, CABAC : No Format settings, ReFrames : 2 frames Format settings, GOP : M=1, N=28 Codec ID : 27 Duration : 33s 984ms Bit rate mode : Variable Bit rate : 21.4 Mbps Maximum bit rate : 22.6 Mbps Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate : 29.970 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Interlaced Scan order : Top Field First Bits/(Pixel*Frame) : 0.345 Stream size : 86.8 MiB (94%) Audio ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : AC-3 Format/Info : Audio Coding 3 Mode extension : CM (complete main) Codec ID : 129 Duration : 34s 16ms Bit rate mode : Constant Bit rate : 256 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Bit depth : 16 bits Compression mode : Lossy Delay relative to video : -34ms Stream size : 1.04 MiB (1%) Text ID : 4608 (0x1200) Menu ID : 1 (0x1) Format : PGS Codec ID : 144 Duration : 33s 602ms Delay relative to video : -34ms Here's a somewhat simplified version of my code. I use av_open_input_file, av_find_stream_info, avcodec_find_decoder, and avcodec_open in my helper functions. // Allocate video frame pFrame=avcodec_alloc_frame(); // Allocate an AVFrame structure pFrameYUV=avcodec_alloc_frame(); if(pFrameYUV==NULL) { return NULL; } // Determine required buffer size and allocate buffer numBytes=avpicture_get_size(PIX_FMT_YUV420P, width, height); buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t)); // Assign appropriate parts of buffer to image planes in pFrameYUV avpicture_fill((AVPicture *)pFrameYUV, buffer, PIX_FMT_YUV420P, width, height); AVFormatContext* pFormatCtx; pFormatCtx = pHelper->FormatContextPointer(); int videoStreamIndex = pHelper->VideoStreamIndex(); int frameScanCount = 0; AVCodecContext* pCodecCtx; pCodecCtx = pHelper->CodecContextPointer(); while (av_read_frame(pFormatCtx, &packet) >= 0) { // Is this a packet from the video stream? if (packet.stream_index == videoStreamIndex && frameLocation++) { // Decode video frame avcodec_decode_video2(pCodecCtx, pFrameYUV, &isFrameFinished, &packet); *// FOR THIS VIDEO, **isFrameFinished **IS ALWAYS 0* if (isFrameFinished == 0) { pLog->Write("Frame %d not finished", frameLocation); } // Did we get a video frame? if (isFrameFinished) { // do some analysis on the pixels } // whether we successfully decoded the frame } // whether we were supposed to decode the frame av_free_packet(&packet); } // for each available frame //delete [] buffer; av_free(buffer); av_free(pFrame); // Free the YUV frame av_free(pFrameYUV); Thanks! Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.george at normalesup.org Mon Feb 6 10:32:19 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Mon, 6 Feb 2012 10:32:19 +0100 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: <20120206093219.GB19107@phare.normalesup.org> L'octidi 18 pluvi?se, an CCXX, John Dexter a ?crit?: > If you're going to make such assertions please back them up. My > research into dynamic linking of (L)GPL libraries finds multiple > explicit claims that distribution of the library source code is _not_ > required if I haven't modified the original, according to LGPL section > 6, specifically 6b. > (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html linked from > ffmpeg legal page). As pointed out by someone else, 6b covers the case where you do not distribute the library at all, you distribute only the application, and rely on the user to provide a suitable version of the library, probably by already having it on their system. Theoretically, the (L)GPL requires you to distribute the source code, even if it was just compiled and not modified. A lot of projects will not take it amiss if you do not distribute unmodified sources, provided you meet the other requirements, especially the prominent notice. In other words, they are interested in your enhancements to the code, not in hogging your bandwidth. People in ffmpeg are more strict about the requirements because there have been problems in the past. Please also note that 6c is more risky than it appears, and more risky than 6a: with 6a, you only need to provide the source code to the people you distributed the product, that is just a few megabytes in one corner on your installation medium. With 6c, you must provide the source code to whoever asks, because the offer can be transmitted from one person to another, outside your control. Regards, -- Nicolas George From nitinkumgoyal at gmail.com Mon Feb 6 10:35:35 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Mon, 6 Feb 2012 15:05:35 +0530 Subject: [Libav-user] G711 Codec support Message-ID: Hi I have some audio with G.711 and g.729 codecs. I am able to decode the g729 but not g711. So, I ant to know do FFMPEg supports g711 at all? It has two flavours i guess:- u-law and a-law. So, if somebody has any idea how to decode g711 codec with ffmpeg do let me know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Mon Feb 6 10:41:26 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 6 Feb 2012 09:41:26 +0000 (UTC) Subject: [Libav-user] G711 Codec support References: Message-ID: NITIN GOYAL writes: > I am able to decode the g729 but not g711. Command line and complete, uncut console output missing. And consider providing a sample. Carl Eugen From andrey.krieger.utkin at gmail.com Mon Feb 6 11:56:09 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 6 Feb 2012 12:56:09 +0200 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: Please help us help you - provide - version of libs you use - compilable minimized source code of your app - this sample file BTW, did you try to transcode it with ffmpeg command-line utility? If it also fails, please provide its full output with -loglevel debug BTW2 try to av_log_set_level(AV_LOG_DEBUG); in your app - maybe you'll see useful messages on stderr. -- Andrey Utkin From jdxsolutions at gmail.com Mon Feb 6 15:02:01 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Mon, 6 Feb 2012 14:02:01 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: <20120206093219.GB19107@phare.normalesup.org> References: <20120206093219.GB19107@phare.normalesup.org> Message-ID: On 6 February 2012 09:32, Nicolas George wrote: > L'octidi 18 pluvi?se, an CCXX, John Dexter a ?crit?: >> If you're going to make such assertions please back them up. My >> research into dynamic linking of (L)GPL libraries finds multiple >> explicit claims that distribution of the library source code is _not_ >> required if I haven't modified the original, according to LGPL section >> 6, specifically 6b. >> (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html linked from >> ffmpeg legal page). > > As pointed out by someone else, 6b covers the case where you do not > distribute the library at all, you distribute only the application, and rely > on the user to provide a suitable version of the library, probably by > already having it on their system. > > Theoretically, the (L)GPL requires you to distribute the source code, even > if it was just compiled and not modified. A lot of projects will not take it > amiss if you do not distribute unmodified sources, provided you meet the > other requirements, especially the prominent notice. In other words, they > are interested in your enhancements to the code, not in hogging your > bandwidth. People in ffmpeg are more strict about the requirements because > there have been problems in the past. > > Please also note that 6c is more risky than it appears, and more risky than > 6a: with 6a, you only need to provide the source code to the people you > distributed the product, that is just a few megabytes in one corner on your > installation medium. With 6c, you must provide the source code to whoever > asks, because the offer can be transmitted from one person to another, > outside your control. > Thanks Nicholas and Phil... obviously I have no problem providing source if asked to, and in putting the license in my redistributable. I read somewhere that including a link to where users could download the source themselves can be counted as "distributing the source"? I was very surprised by claims it's a requirement, simply because none of the LGPL libraries I've used have ever mentioned it in the case of dynamic linking. I found this discussion: http://teem.sourceforge.net/lgpl.html - search for "the interesting part". Obviously only one person's view of it, but it seemed to make sense. Thanks again. John. From cehoyos at ag.or.at Mon Feb 6 18:14:41 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 6 Feb 2012 17:14:41 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: <20120206093219.GB19107@phare.normalesup.org> Message-ID: John Dexter writes: > obviously I have no problem providing source if asked to, You misunderstand: If you don't want to "accompany" your binary distribution with the corresponding source code, you have to add a legally binding written offer that you will provide the source code on request. This may have been useful at a time when there was no internet but expensive discs, to save you from that burden nowadays, we recommend you to ... > and in putting the license in my redistributable. > I read somewhere that including a link to where users could download > the source themselves can be counted as "distributing the source"? ... do exactly this as explained on http://ffmpeg.org/legal.html (because we think you can argue that the corresponding sources "accompany" the binary distribution both if you distribute them together in the same installation package and also if you provide the sources as a separate link next to the download link for your installer. If you don't trust me on this because you interpret "accompany" differently then you will have to add the source code to the installer, remember I am not a native speaker.) > I was very surprised by claims it's a requirement, simply because none > of the LGPL libraries I've used have ever mentioned it in the case of > dynamic linking. Please read http://www.gnu.org/licenses/gpl-faq.html#UnchangedJustBinary and for the sake of our discussion assume that it was written by the very same person who wrote the license. Carl Eugen From cehoyos at ag.or.at Mon Feb 6 18:17:40 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Mon, 6 Feb 2012 17:17:40 +0000 (UTC) Subject: [Libav-user] Getting to grips with ffmpeg References: <20120206093219.GB19107@phare.normalesup.org> Message-ID: Carl Eugen Hoyos writes: > > I read somewhere that including a link to where users could download > > the source themselves can be counted as "distributing the source"? > > ... do exactly this as explained on http://ffmpeg.org/legal.html > (because we think you can argue that the corresponding sources > "accompany" the binary distribution both if you distribute > them together in the same installation package and also if you > provide the sources as a separate link next to the download link > for your installer. Or in other words: I assume that would count as "offering equivalent access" to the source code. Carl Eugen From jdxsolutions at gmail.com Mon Feb 6 18:30:31 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Mon, 6 Feb 2012 17:30:31 +0000 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: <20120206093219.GB19107@phare.normalesup.org> Message-ID: On 6 February 2012 17:14, Carl Eugen Hoyos wrote: > John Dexter writes: > > > obviously I have no problem providing source if asked to, > > You misunderstand: > If you don't want to "accompany" your binary distribution with the > corresponding source code, you have to add a legally binding written > offer that you will provide the source code on request. > This may have been useful at a time when there was no internet > but expensive discs, to save you from that burden nowadays, > we recommend you to ... > > > and in putting the license in my redistributable. > > > I read somewhere that including a link to where users could download > > the source themselves can be counted as "distributing the source"? > > ... do exactly this as explained on http://ffmpeg.org/legal.html > (because we think you can argue that the corresponding sources > "accompany" the binary distribution both if you distribute > them together in the same installation package and also if you > provide the sources as a separate link next to the download link > for your installer. If you don't trust me on this because you > interpret "accompany" differently then you will have to add the source > code to the installer, remember I am not a native speaker.) > > > I was very surprised by claims it's a requirement, simply because none > > of the LGPL libraries I've used have ever mentioned it in the case of > > dynamic linking. > > Please read > http://www.gnu.org/licenses/gpl-faq.html#UnchangedJustBinary > and for the sake of our discussion assume that it was written > by the very same person who wrote the license. Thanks Carl. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.george at normalesup.org Mon Feb 6 10:31:49 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Mon, 6 Feb 2012 10:31:49 +0100 Subject: [Libav-user] Getting to grips with ffmpeg In-Reply-To: References: Message-ID: <20120206093149.GA19107@phare.normalesup.org> L'octidi 18 pluvi?se, an CCXX, John Dexter a ?crit?: > If you're going to make such assertions please back them up. My > research into dynamic linking of (L)GPL libraries finds multiple > explicit claims that distribution of the library source code is _not_ > required if I haven't modified the original, according to LGPL section > 6, specifically 6b. > (http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html linked from > ffmpeg legal page). As pointed out by someone else, 6b covers the case where you do not distribute the library at all, you distribute only the application, and rely on the user to provide a suitable version of the library, probably by already having it on their system. Theoretically, the (L)GPL requires you to distribute the source code, even if it was just compiled and not modified. A lot of projects will not take it amiss if you do not distribute unmodified sources, provided you meet the other requirements, especially the prominent notice. In other words, they are interested in your enhancements to the code, not in hogging your bandwidth. People in ffmpeg are more strict about the requirements because there have been problems in the past. Please also note that 6c is more risky than it appears, and more risky than 6a: with 6a, you only need to provide the source code to the people you distributed the product, that is just a few megabytes in one corner on your installation medium. With 6c, you must provide the source code to whoever asks, because the offer can be transmitted from one person to another, outside your control. Regards, -- Nicolas George From alexcohn at netvision.net.il Mon Feb 6 21:36:14 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 6 Feb 2012 22:36:14 +0200 Subject: [Libav-user] G711 Codec support In-Reply-To: References: Message-ID: On Feb 6, 2012 11:36 AM, "NITIN GOYAL" wrote: > > Hi > > I have some audio with G.711 and g.729 codecs. > > I am able to decode the g729 but not g711. > > So, I ant to know do FFMPEg supports g711 at all? It has two flavours i guess:- u-law and a-law. Yes, theoretically both flavors are supported. > So, if somebody has any idea how to decode g711 codec with ffmpeg do let me know. See for example http://linux.byexamples.com/archives/295/convert-audio-encoding-format-with-ffmpeg/ BR, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvaraj.tr at gmail.com Tue Feb 7 05:54:29 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Tue, 7 Feb 2012 10:24:29 +0530 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: Hi All, I compiled the ffmpeg source to generate the static(.a foramt) libraries ?in linux. When i am linking the static libraries with my application, i am getting undefined reference for many functions. Even i tried with pkg-config. Here command , what i tried gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread -lXdamage -lXfixes -lXmu -lXi -lX11 -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o It is generated the librecorder library. I have all dependency libs when executing ld command #ld librecorder.so.1.1 librecorder.so.1: undefined reference to `av_new_stream' librecorder.so.1: undefined reference to `av_read_packet' librecorder.so.1: undefined reference to `avcodec_alloc_frame' librecorder.so.1: undefined reference to `av_close_input_file' librecorder.so.1: undefined reference to `audio_resample' librecorder.so.1: undefined reference to `avcodec_find_encoder' librecorder.so.1: undefined reference to `av_find_input_format' librecorder.so.1: undefined reference to `avcodec_encode_audio' librecorder.so.1: undefined reference to `dump_format' librecorder.so.1: undefined reference to `av_open_input_file' librecorder.so.1: undefined reference to `avcodec_find_decoder' librecorder.so.1: undefined reference to `avcodec_close' librecorder.so.1: undefined reference to `av_find_stream_info' librecorder.so.1: undefined reference to `audio_resample_init' librecorder.so.1: undefined reference to `avpicture_get_size' librecorder.so.1: undefined reference to `av_register_all' librecorder.so.1: undefined reference to `avcodec_decode_audio' librecorder.so.1: undefined reference to `avcodec_open' librecorder.so.1: undefined reference to `avcodec_encode_video' librecorder.so.1: undefined reference to `av_destruct_packet_nofree' librecorder.so.1: undefined reference to `avpicture_fill' librecorder.so.1: undefined reference to `av_set_parameters' librecorder.so.1: undefined reference to `av_alloc_format_c Now problem with static libraries. #pkg-config --list-all | grep mpeg libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling library libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format library libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library How do i solve this issue Thanks Yuvaraj R From simondaniels23 at gmail.com Tue Feb 7 06:47:33 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Mon, 6 Feb 2012 21:47:33 -0800 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: Hi Andrey, Thanks for the help! 1. Lib versions: Using the shared library and my code below, I tried 0.8.3 (PC) and 08d2cee4 (Mac) and could not scan the file. However, I tried the static executable of 0.8 and 0.10 on Mac and I *could* transcode it to MP4. 2. Link to video (it's almost 2gb): http://dl.dropbox.com/u/28441949/00793.MTS 3. Simplified, but compilable source code: int Scan(const char *inputfile) { totalFrames = 0; frameLocation = 0; AVFormatContext *pFormatCtx; unsigned int i, videoStream; AVCodecContext *pCodecCtx; AVCodec *pCodec; AVFrame *pFrame; AVFrame *pFrameYUV; int numBytes; uint8_t *buffer; clock_t start = clock(); // Register all formats and codecs av_register_all(); // Open video file if(av_open_input_file(&pFormatCtx, inputfile, NULL, 0, NULL)!=0) { return -1; // Couldn't open file } // Retrieve stream information if(av_find_stream_info(pFormatCtx)<0) { return -2; // Couldn't find stream information } // Dump information about file onto standard error dump_format(pFormatCtx, 0, inputfile, false); // Find the first video stream videoStream=-1; for(i=0; inb_streams; i++) { if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) { videoStream=i; break; } } if(videoStream==-1) { return -3; // Didn't find a video stream } // Get a pointer to the codec context for the video stream pCodecCtx = pFormatCtx->streams[videoStream]->codec; // get duration double duration = double(pFormatCtx->duration) / AV_TIME_BASE; cout << "Video duration: " << duration << std::endl; // Find the decoder for the video stream pCodec=avcodec_find_decoder(pCodecCtx->codec_id); if(pCodec==NULL) { return -4; // Codec not found } // Inform the codec that we can handle truncated bitstreams -- i.e., // bitstreams where frame boundaries can fall in the middle of packets if(pCodec->capabilities & CODEC_CAP_TRUNCATED) pCodecCtx->flags|=CODEC_FLAG_TRUNCATED; // Open codec if(avcodec_open(pCodecCtx, pCodec)<0) { return -5; // Could not open codec } std::cout << "Using codec: " << pCodec->name << std::endl; // Allocate video frame pFrame=avcodec_alloc_frame(); // Allocate an AVFrame structure pFrameYUV=avcodec_alloc_frame(); if(pFrameYUV==NULL) { return -6; } // Determine required buffer size and allocate buffer // originally: PIX_FMT_RGB24 numBytes=avpicture_get_size(PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height); buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t)); // Assign appropriate parts of buffer to image planes in pFrameRGB // originally: PIX_FMT_RGB24 avpicture_fill((AVPicture *)pFrameYUV, buffer, PIX_FMT_YUV420P, pCodecCtx->width, pCodecCtx->height); totalFrames = pFormatCtx->streams[videoStream]->nb_frames; printf("Frames: %d\n", totalFrames); AVPacket packet; int isFrameFinished = 0; int pixelScanCount = 0; std::cout << "videoWidth = " << pCodecCtx->width << std::endl; std::cout << "videoHeight = " << pCodecCtx->height << std::endl; while (av_read_frame(pFormatCtx, &packet) >= 0) { // Is this a packet from the video stream? if (packet.stream_index == videoStream && frameLocation++ % frameSkip == 0) { // Decode video frame avcodec_decode_video2(pCodecCtx, pFrame, &isFrameFinished, &packet); // Did we get a video frame? if (isFrameFinished) { // SCANNING GOES HERE pixelScanCount = 0; for (int y = 0; y < pCodecCtx->height; y++) { uint8_t *p = pFrame->data[0] + y * pFrame->linesize[0]; // this gets Y' in YUV for (int x = 0; x < pCodecCtx->width; x++) { pixelScanCount++; //printf("Frame %d at %d, %d has Y'=%d\n", frameLocation, x, y, p[x]); } } av_free_packet(&packet); } else // frame isn't finished. not sure why we'd hit this { av_free_packet(&packet); } } } delete [] buffer; av_free(pFrameYUV); // Free the YUV frame av_free(pFrame); // Close the codec avcodec_close(pCodecCtx); // Close the video file av_close_input_file(pFormatCtx); } 4. When I enabled av_log_set_level(AV_LOG_DEBUG) in my app, I saw several of these: [h264 @ 09FC0940] Frame num gap 10 8 [h264 @ 09FC0940] Frame num gap 15 12 [h264 @ 09FC0940] Frame num gap 15 13 [h264 @ 09FC0940] Frame num gap 20 17 ... So considering the fact that the command-line utility was able to transcode, I'm assuming there's something wrong in my code. I've seen some warnings for deprecated functions so maybe that's my problem? Thanks! Simon On Mon, Feb 6, 2012 at 2:56 AM, Andrey Utkin wrote: > Please help us help you - provide > - version of libs you use > - compilable minimized source code of your app > - this sample file > > BTW, did you try to transcode it with ffmpeg command-line utility? If > it also fails, please provide its full output with -loglevel debug > BTW2 try to av_log_set_level(AV_LOG_DEBUG); in your app - maybe you'll > see useful messages on stderr. > > > -- > Andrey Utkin > _______________________________________________ > 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 simondaniels23 at gmail.com Tue Feb 7 07:14:25 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Mon, 6 Feb 2012 22:14:25 -0800 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: I updated all the deprecated functions and I'm still having the same problem. On Mon, Feb 6, 2012 at 9:47 PM, Simon Daniels wrote: > Hi Andrey, > > Thanks for the help! > > 1. Lib versions: Using the shared library and my code below, I tried 0.8.3 > (PC) and 08d2cee4 (Mac) and could not scan the file. However, I tried the > static executable of 0.8 and 0.10 on Mac and I *could* transcode it to MP4. > > 2. Link to video (it's almost 2gb): > http://dl.dropbox.com/u/28441949/00793.MTS > > 3. Simplified, but compilable source code: > > int Scan(const char *inputfile) > { > > totalFrames = 0; > frameLocation = 0; > > AVFormatContext *pFormatCtx; > unsigned int i, videoStream; > AVCodecContext *pCodecCtx; > AVCodec *pCodec; > AVFrame *pFrame; > AVFrame *pFrameYUV; > int numBytes; > uint8_t *buffer; > > clock_t start = clock(); > > // Register all formats and codecs > av_register_all(); > > // Open video file > if(av_open_input_file(&pFormatCtx, inputfile, NULL, 0, NULL)!=0) > { > return -1; // Couldn't open file > } > > // Retrieve stream information > if(av_find_stream_info(pFormatCtx)<0) > { > return -2; // Couldn't find stream information > } > > // Dump information about file onto standard error > dump_format(pFormatCtx, 0, inputfile, false); > > // Find the first video stream > videoStream=-1; > for(i=0; inb_streams; i++) > { > if(pFormatCtx->streams[i]->codec->codec_type==AVMEDIA_TYPE_VIDEO) > { > videoStream=i; > break; > } > } > if(videoStream==-1) > { > return -3; // Didn't find a video stream > } > > // Get a pointer to the codec context for the video stream > pCodecCtx = pFormatCtx->streams[videoStream]->codec; > > // get duration > double duration = double(pFormatCtx->duration) / AV_TIME_BASE; > cout << "Video duration: " << duration << std::endl; > > // Find the decoder for the video stream > pCodec=avcodec_find_decoder(pCodecCtx->codec_id); > if(pCodec==NULL) > { > return -4; // Codec not found > } > > // Inform the codec that we can handle truncated bitstreams -- i.e., > // bitstreams where frame boundaries can fall in the middle of packets > if(pCodec->capabilities & CODEC_CAP_TRUNCATED) > pCodecCtx->flags|=CODEC_FLAG_TRUNCATED; > > // Open codec > if(avcodec_open(pCodecCtx, pCodec)<0) > { > return -5; // Could not open codec > } > > std::cout << "Using codec: " << pCodec->name << std::endl; > > > // Allocate video frame > pFrame=avcodec_alloc_frame(); > > // Allocate an AVFrame structure > pFrameYUV=avcodec_alloc_frame(); > if(pFrameYUV==NULL) > { > return -6; > > } > > // Determine required buffer size and allocate buffer > // originally: PIX_FMT_RGB24 > numBytes=avpicture_get_size(PIX_FMT_YUV420P, pCodecCtx->width, > pCodecCtx->height); > buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t)); > > // Assign appropriate parts of buffer to image planes in pFrameRGB > // originally: PIX_FMT_RGB24 > avpicture_fill((AVPicture *)pFrameYUV, buffer, PIX_FMT_YUV420P, > pCodecCtx->width, pCodecCtx->height); > > totalFrames = pFormatCtx->streams[videoStream]->nb_frames; > printf("Frames: %d\n", totalFrames); > > AVPacket packet; > int isFrameFinished = 0; > > int pixelScanCount = 0; > > std::cout << "videoWidth = " << pCodecCtx->width << std::endl; > std::cout << "videoHeight = " << pCodecCtx->height << std::endl; > > > while (av_read_frame(pFormatCtx, &packet) >= 0) > { > > // Is this a packet from the video stream? > if (packet.stream_index == videoStream && > frameLocation++ % frameSkip == 0) > { > // Decode video frame > > avcodec_decode_video2(pCodecCtx, pFrame, &isFrameFinished, > &packet); > > > // Did we get a video frame? > if (isFrameFinished) { > > // SCANNING GOES HERE > pixelScanCount = 0; > > for (int y = 0; y < pCodecCtx->height; y++) > { > uint8_t *p = pFrame->data[0] + y * > pFrame->linesize[0]; // this gets Y' in YUV > > for (int x = 0; x < pCodecCtx->width; x++) > { > > pixelScanCount++; > > //printf("Frame %d at %d, %d has Y'=%d\n", > frameLocation, x, y, p[x]); > } > > } > > av_free_packet(&packet); > > } > else // frame isn't finished. not sure why we'd hit this > { > av_free_packet(&packet); > } > > > } > > } > > delete [] buffer; > av_free(pFrameYUV); > > > // Free the YUV frame > av_free(pFrame); > > // Close the codec > avcodec_close(pCodecCtx); > > // Close the video file > av_close_input_file(pFormatCtx); > } > > > 4. When I enabled av_log_set_level(AV_LOG_DEBUG) in my app, I saw several > of these: > [h264 @ 09FC0940] Frame num gap 10 8 > [h264 @ 09FC0940] Frame num gap 15 12 > [h264 @ 09FC0940] Frame num gap 15 13 > [h264 @ 09FC0940] Frame num gap 20 17 > ... > > > So considering the fact that the command-line utility was able to > transcode, I'm assuming there's something wrong in my code. I've seen some > warnings for deprecated functions so maybe that's my problem? > > Thanks! > > Simon > > > > > > > On Mon, Feb 6, 2012 at 2:56 AM, Andrey Utkin < > andrey.krieger.utkin at gmail.com> wrote: > >> Please help us help you - provide >> - version of libs you use >> - compilable minimized source code of your app >> - this sample file >> >> BTW, did you try to transcode it with ffmpeg command-line utility? If >> it also fails, please provide its full output with -loglevel debug >> BTW2 try to av_log_set_level(AV_LOG_DEBUG); in your app - maybe you'll >> see useful messages on stderr. >> >> >> -- >> Andrey Utkin >> _______________________________________________ >> 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 Tue Feb 7 09:57:16 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 7 Feb 2012 10:57:16 +0200 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: 2012/2/7 Simon Daniels : > I updated all the deprecated functions and I'm still having the same > problem. Please share your updated code, via pastebin, and i'll take a look. -- Andrey Utkin From Marlon at scansoft.co.za Tue Feb 7 10:27:05 2012 From: Marlon at scansoft.co.za (Marlon Reid) Date: Tue, 7 Feb 2012 11:27:05 +0200 Subject: [Libav-user] FW: AVCodecContext and decoding PCM Message-ID: <002962EA5927BE45B2FFAB0B5B5D67970A8B35@SSTSVR1.sst.local> Hi everyone, When decoding a compressed audio format such as MP3 to PCM, is it possible to set the output sample rate and the output channels for the decoded PCM data? Or does the decoder look internally at the input stream and use the same sample rate and channels as the input stream? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hoelscher at codergrid.de Tue Feb 7 10:50:24 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Tue, 7 Feb 2012 10:50:24 +0100 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: Is your Library written in "C" or in "C++"? 2012/2/7 yuvaraj r > Hi All, > > > I compiled the ffmpeg source to generate the static(.a foramt) > libraries in linux. > > When i am linking the static libraries with my application, > > i am getting undefined reference for many functions. > > Even i tried with pkg-config. > > Here command , what i tried > > > gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' -lpthread > -lXdamage -lXfixes -lXmu -lXi -lX11 > -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib > -lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags > libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs > --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o > librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o > > > It is generated the librecorder library. I have all dependency libs > > when executing ld command > > #ld librecorder.so.1.1 > > librecorder.so.1: undefined reference to `av_new_stream' > librecorder.so.1: undefined reference to `av_read_packet' > librecorder.so.1: undefined reference to `avcodec_alloc_frame' > librecorder.so.1: undefined reference to `av_close_input_file' > librecorder.so.1: undefined reference to `audio_resample' > librecorder.so.1: undefined reference to `avcodec_find_encoder' > librecorder.so.1: undefined reference to `av_find_input_format' > librecorder.so.1: undefined reference to `avcodec_encode_audio' > librecorder.so.1: undefined reference to `dump_format' > librecorder.so.1: undefined reference to `av_open_input_file' > librecorder.so.1: undefined reference to `avcodec_find_decoder' > librecorder.so.1: undefined reference to `avcodec_close' > librecorder.so.1: undefined reference to `av_find_stream_info' > librecorder.so.1: undefined reference to `audio_resample_init' > librecorder.so.1: undefined reference to `avpicture_get_size' > librecorder.so.1: undefined reference to `av_register_all' > librecorder.so.1: undefined reference to `avcodec_decode_audio' > librecorder.so.1: undefined reference to `avcodec_open' > librecorder.so.1: undefined reference to `avcodec_encode_video' > librecorder.so.1: undefined reference to `av_destruct_packet_nofree' > librecorder.so.1: undefined reference to `avpicture_fill' > librecorder.so.1: undefined reference to `av_set_parameters' > librecorder.so.1: undefined reference to `av_alloc_format_c > > Now problem with static libraries. > > > #pkg-config --list-all | grep mpeg > libswscale libswscale - FFmpeg image rescaling > library > libavutil libavutil - FFmpeg utility library > libavformat libavformat - FFmpeg container format > library > libavcodec libavcodec - FFmpeg codec library > > > How do i solve this issue > > > Thanks > > > Yuvaraj R > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Tue Feb 7 11:00:23 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 7 Feb 2012 10:00:23 +0000 (UTC) Subject: [Libav-user] FW: AVCodecContext and decoding PCM References: <002962EA5927BE45B2FFAB0B5B5D67970A8B35@SSTSVR1.sst.local> Message-ID: Marlon Reid writes: > does the decoder look internally at the input stream and use > the same sample rate and channels as the input stream? This is what I would expect a sane decoder to do, there are exceptions like "request_channels". Carl Eugen From yuvaraj.tr at gmail.com Tue Feb 7 11:09:25 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Tue, 7 Feb 2012 15:39:25 +0530 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: C language On Tue, Feb 7, 2012 at 3:20 PM, jan h?lscher wrote: > Is your Library written in "C" or in "C++"? > > > 2012/2/7 yuvaraj r >> >> Hi All, >> >> >> I compiled the ffmpeg source to generate the static(.a foramt) >> libraries ?in linux. >> >> When i am linking the static libraries with my application, >> >> i am getting undefined reference for many functions. >> >> Even i tried with pkg-config. >> >> Here command , what i tried >> >> >> gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread >> -lXdamage -lXfixes -lXmu -lXi -lX11 >> -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib >> ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags >> libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs >> --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o >> librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o >> >> >> It is generated the librecorder library. I have all dependency libs >> >> when executing ld command >> >> #ld librecorder.so.1.1 >> >> librecorder.so.1: undefined reference to `av_new_stream' >> librecorder.so.1: undefined reference to `av_read_packet' >> librecorder.so.1: undefined reference to `avcodec_alloc_frame' >> librecorder.so.1: undefined reference to `av_close_input_file' >> librecorder.so.1: undefined reference to `audio_resample' >> librecorder.so.1: undefined reference to `avcodec_find_encoder' >> librecorder.so.1: undefined reference to `av_find_input_format' >> librecorder.so.1: undefined reference to `avcodec_encode_audio' >> librecorder.so.1: undefined reference to `dump_format' >> librecorder.so.1: undefined reference to `av_open_input_file' >> librecorder.so.1: undefined reference to `avcodec_find_decoder' >> librecorder.so.1: undefined reference to `avcodec_close' >> librecorder.so.1: undefined reference to `av_find_stream_info' >> librecorder.so.1: undefined reference to `audio_resample_init' >> librecorder.so.1: undefined reference to `avpicture_get_size' >> librecorder.so.1: undefined reference to `av_register_all' >> librecorder.so.1: undefined reference to `avcodec_decode_audio' >> librecorder.so.1: undefined reference to `avcodec_open' >> librecorder.so.1: undefined reference to `avcodec_encode_video' >> librecorder.so.1: undefined reference to `av_destruct_packet_nofree' >> librecorder.so.1: undefined reference to `avpicture_fill' >> librecorder.so.1: undefined reference to `av_set_parameters' >> librecorder.so.1: undefined reference to `av_alloc_format_c >> >> Now problem with static libraries. >> >> >> #pkg-config --list-all | grep mpeg >> libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling >> library >> libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library >> libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format >> library >> libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library >> >> >> How do i solve this issue >> >> >> Thanks >> >> >> Yuvaraj R >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user > > > > > -- > Media Encoding Cluster, > the first Open Source Cluster Encoding Solution > for distributed Media Encoding. > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From jan.hoelscher at codergrid.de Tue Feb 7 11:22:18 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Tue, 7 Feb 2012 11:22:18 +0100 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: 2012/2/7 yuvaraj r > C language > > > On Tue, Feb 7, 2012 at 3:20 PM, jan h?lscher > wrote: > > Is your Library written in "C" or in "C++"? > > > > > > 2012/2/7 yuvaraj r > >> > >> Hi All, > >> > >> > >> I compiled the ffmpeg source to generate the static(.a foramt) > >> libraries in linux. > >> > >> When i am linking the static libraries with my application, > >> > >> i am getting undefined reference for many functions. > >> > >> Even i tried with pkg-config. > >> > >> Here command , what i tried > >> > >> > >> gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' -lpthread > >> -lXdamage -lXfixes -lXmu -lXi -lX11 > >> -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib > >> -lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags > >> libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs > >> --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o > >> librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o > >> > >> > >> It is generated the librecorder library. I have all dependency libs > >> > >> when executing ld command > >> > >> #ld librecorder.so.1.1 > >> > >> librecorder.so.1: undefined reference to `av_new_stream' > >> librecorder.so.1: undefined reference to `av_read_packet' > >> librecorder.so.1: undefined reference to `avcodec_alloc_frame' > >> librecorder.so.1: undefined reference to `av_close_input_file' > >> librecorder.so.1: undefined reference to `audio_resample' > >> librecorder.so.1: undefined reference to `avcodec_find_encoder' > >> librecorder.so.1: undefined reference to `av_find_input_format' > >> librecorder.so.1: undefined reference to `avcodec_encode_audio' > >> librecorder.so.1: undefined reference to `dump_format' > >> librecorder.so.1: undefined reference to `av_open_input_file' > >> librecorder.so.1: undefined reference to `avcodec_find_decoder' > >> librecorder.so.1: undefined reference to `avcodec_close' > >> librecorder.so.1: undefined reference to `av_find_stream_info' > >> librecorder.so.1: undefined reference to `audio_resample_init' > >> librecorder.so.1: undefined reference to `avpicture_get_size' > >> librecorder.so.1: undefined reference to `av_register_all' > >> librecorder.so.1: undefined reference to `avcodec_decode_audio' > >> librecorder.so.1: undefined reference to `avcodec_open' > >> librecorder.so.1: undefined reference to `avcodec_encode_video' > >> librecorder.so.1: undefined reference to `av_destruct_packet_nofree' > >> librecorder.so.1: undefined reference to `avpicture_fill' > >> librecorder.so.1: undefined reference to `av_set_parameters' > >> librecorder.so.1: undefined reference to `av_alloc_format_c > >> > >> Now problem with static libraries. > >> > >> > >> #pkg-config --list-all | grep mpeg > >> libswscale libswscale - FFmpeg image rescaling > >> library > >> libavutil libavutil - FFmpeg utility library > >> libavformat libavformat - FFmpeg container format > >> library > >> libavcodec libavcodec - FFmpeg codec library > >> > >> > >> How do i solve this issue > >> > >> > >> Thanks > >> > >> > >> Yuvaraj R > >> _______________________________________________ > >> Libav-user mailing list > >> Libav-user at ffmpeg.org > >> http://ffmpeg.org/mailman/listinfo/libav-user > > > > > > > > > > -- > > Media Encoding Cluster, > > the first Open Source Cluster Encoding Solution > > for distributed Media Encoding. > > > > > > _______________________________________________ > > Libav-user mailing list > > Libav-user at ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/libav-user > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > what output did you get when executing the pkg-config --libs --cflags libavutil pkg-config --libs --cflags libswscale pkg-config --libs --cflags libavcodec pkg-config --libs --cflags libavformat commands -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Tue Feb 7 11:40:01 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 7 Feb 2012 12:40:01 +0200 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: On Tue, Feb 7, 2012 at 06:54, yuvaraj r wrote: > Hi All, > > > I compiled the ffmpeg source to generate the static(.a foramt) > libraries ?in linux. > > When i am linking the static libraries with my application, > > i am getting undefined reference for many functions. > > Even i tried with pkg-config. > > Here command , what i tried > > > gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread > -lXdamage -lXfixes -lXmu -lXi -lX11 > -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib > ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags > libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs > --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o > librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o > > > It is generated the librecorder library. I have all dependency libs > > when executing ld command > > #ld librecorder.so.1.1 > > librecorder.so.1: undefined reference to `av_new_stream' > librecorder.so.1: undefined reference to `av_read_packet' > librecorder.so.1: undefined reference to `avcodec_alloc_frame' > librecorder.so.1: undefined reference to `av_close_input_file' > librecorder.so.1: undefined reference to `audio_resample' > librecorder.so.1: undefined reference to `avcodec_find_encoder' > librecorder.so.1: undefined reference to `av_find_input_format' > librecorder.so.1: undefined reference to `avcodec_encode_audio' > librecorder.so.1: undefined reference to `dump_format' > librecorder.so.1: undefined reference to `av_open_input_file' > librecorder.so.1: undefined reference to `avcodec_find_decoder' > librecorder.so.1: undefined reference to `avcodec_close' > librecorder.so.1: undefined reference to `av_find_stream_info' > librecorder.so.1: undefined reference to `audio_resample_init' > librecorder.so.1: undefined reference to `avpicture_get_size' > librecorder.so.1: undefined reference to `av_register_all' > librecorder.so.1: undefined reference to `avcodec_decode_audio' > librecorder.so.1: undefined reference to `avcodec_open' > librecorder.so.1: undefined reference to `avcodec_encode_video' > librecorder.so.1: undefined reference to `av_destruct_packet_nofree' > librecorder.so.1: undefined reference to `avpicture_fill' > librecorder.so.1: undefined reference to `av_set_parameters' > librecorder.so.1: undefined reference to `av_alloc_format_c > > Now problem with static libraries. > > > #pkg-config --list-all | grep mpeg > libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling library > libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library > libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format library > libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library > > > How do i solve this issue > > > Thanks > > > Yuvaraj R As far as I know, -l flag on the gcc command line will prefer the shared version of the library. I.e. if you have both libavformat.a and libavformat.so visible to gcc, the latter will be used. BR, Alex From yuvaraj.tr at gmail.com Tue Feb 7 11:40:06 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Tue, 7 Feb 2012 16:10:06 +0530 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: #pkg-config --libs --cflags libavutil -I/usr/local/include -I/usr/local/include/ffmpeg -L/usr/local/lib -lavutil # pkg-config --libs --cflags libswscale -I/usr/local/include -I/usr/local/include/swscale -I/usr/local/include/ffmpeg -L/usr/local/lib -lswscale -lavutil # pkg-config --libs --cflags libavcodec -I/usr/local/include -I/usr/local/include/ffmpeg -L/usr/local/lib -lavcodec -lm -lz -ldl -lavutil #pkg-config --libs --cflags libavformat -I/usr/local/include -I/usr/local/include/ffmpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz -ldl -lavutil Could provide any example regarding how to use ffpmpeg static libraries Thanks Yuvaraj On Tue, Feb 7, 2012 at 3:52 PM, jan h?lscher wrote: > > > 2012/2/7 yuvaraj r >> >> C language >> >> >> On Tue, Feb 7, 2012 at 3:20 PM, jan h?lscher >> wrote: >> > Is your Library written in "C" or in "C++"? >> > >> > >> > 2012/2/7 yuvaraj r >> >> >> >> Hi All, >> >> >> >> >> >> I compiled the ffmpeg source to generate the static(.a foramt) >> >> libraries ?in linux. >> >> >> >> When i am linking the static libraries with my application, >> >> >> >> i am getting undefined reference for many functions. >> >> >> >> Even i tried with pkg-config. >> >> >> >> Here command , what i tried >> >> >> >> >> >> gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread >> >> -lXdamage -lXfixes -lXmu -lXi -lX11 >> >> >> >> -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib >> >> ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags >> >> libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs >> >> --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o >> >> librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o >> >> >> >> >> >> It is generated the librecorder library. I have all dependency libs >> >> >> >> when executing ld command >> >> >> >> #ld librecorder.so.1.1 >> >> >> >> librecorder.so.1: undefined reference to `av_new_stream' >> >> librecorder.so.1: undefined reference to `av_read_packet' >> >> librecorder.so.1: undefined reference to `avcodec_alloc_frame' >> >> librecorder.so.1: undefined reference to `av_close_input_file' >> >> librecorder.so.1: undefined reference to `audio_resample' >> >> librecorder.so.1: undefined reference to `avcodec_find_encoder' >> >> librecorder.so.1: undefined reference to `av_find_input_format' >> >> librecorder.so.1: undefined reference to `avcodec_encode_audio' >> >> librecorder.so.1: undefined reference to `dump_format' >> >> librecorder.so.1: undefined reference to `av_open_input_file' >> >> librecorder.so.1: undefined reference to `avcodec_find_decoder' >> >> librecorder.so.1: undefined reference to `avcodec_close' >> >> librecorder.so.1: undefined reference to `av_find_stream_info' >> >> librecorder.so.1: undefined reference to `audio_resample_init' >> >> librecorder.so.1: undefined reference to `avpicture_get_size' >> >> librecorder.so.1: undefined reference to `av_register_all' >> >> librecorder.so.1: undefined reference to `avcodec_decode_audio' >> >> librecorder.so.1: undefined reference to `avcodec_open' >> >> librecorder.so.1: undefined reference to `avcodec_encode_video' >> >> librecorder.so.1: undefined reference to `av_destruct_packet_nofree' >> >> librecorder.so.1: undefined reference to `avpicture_fill' >> >> librecorder.so.1: undefined reference to `av_set_parameters' >> >> librecorder.so.1: undefined reference to `av_alloc_format_c >> >> >> >> Now problem with static libraries. >> >> >> >> >> >> #pkg-config --list-all | grep mpeg >> >> libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling >> >> library >> >> libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library >> >> libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format >> >> library >> >> libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library >> >> >> >> >> >> How do i solve this issue >> >> >> >> >> >> Thanks >> >> >> >> >> >> Yuvaraj R >> >> _______________________________________________ >> >> Libav-user mailing list >> >> Libav-user at ffmpeg.org >> >> http://ffmpeg.org/mailman/listinfo/libav-user >> > >> > >> > >> > >> > -- >> > Media Encoding Cluster, >> > the first Open Source Cluster Encoding Solution >> > for distributed Media Encoding. >> > >> > >> > _______________________________________________ >> > Libav-user mailing list >> > Libav-user at ffmpeg.org >> > http://ffmpeg.org/mailman/listinfo/libav-user >> > >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user > > > what output did you get when executing the > > pkg-config --libs --cflags?libavutil > pkg-config --libs --cflags libswscale > pkg-config --libs?--cflags libavcodec > pkg-config --libs --cflags libavformat > > commands > -- > Media Encoding Cluster, > the first Open Source Cluster Encoding Solution > for distributed Media Encoding. > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From yuvaraj.tr at gmail.com Tue Feb 7 11:43:23 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Tue, 7 Feb 2012 16:13:23 +0530 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: I have only static libraries Thanks Yuvaraj On Tue, Feb 7, 2012 at 4:10 PM, Alex Cohn wrote: > On Tue, Feb 7, 2012 at 06:54, yuvaraj r wrote: >> Hi All, >> >> >> I compiled the ffmpeg source to generate the static(.a foramt) >> libraries ?in linux. >> >> When i am linking the static libraries with my application, >> >> i am getting undefined reference for many functions. >> >> Even i tried with pkg-config. >> >> Here command , what i tried >> >> >> gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread >> -lXdamage -lXfixes -lXmu -lXi -lX11 >> -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib >> ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags >> libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs >> --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o >> librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o >> >> >> It is generated the librecorder library. I have all dependency libs >> >> when executing ld command >> >> #ld librecorder.so.1.1 >> >> librecorder.so.1: undefined reference to `av_new_stream' >> librecorder.so.1: undefined reference to `av_read_packet' >> librecorder.so.1: undefined reference to `avcodec_alloc_frame' >> librecorder.so.1: undefined reference to `av_close_input_file' >> librecorder.so.1: undefined reference to `audio_resample' >> librecorder.so.1: undefined reference to `avcodec_find_encoder' >> librecorder.so.1: undefined reference to `av_find_input_format' >> librecorder.so.1: undefined reference to `avcodec_encode_audio' >> librecorder.so.1: undefined reference to `dump_format' >> librecorder.so.1: undefined reference to `av_open_input_file' >> librecorder.so.1: undefined reference to `avcodec_find_decoder' >> librecorder.so.1: undefined reference to `avcodec_close' >> librecorder.so.1: undefined reference to `av_find_stream_info' >> librecorder.so.1: undefined reference to `audio_resample_init' >> librecorder.so.1: undefined reference to `avpicture_get_size' >> librecorder.so.1: undefined reference to `av_register_all' >> librecorder.so.1: undefined reference to `avcodec_decode_audio' >> librecorder.so.1: undefined reference to `avcodec_open' >> librecorder.so.1: undefined reference to `avcodec_encode_video' >> librecorder.so.1: undefined reference to `av_destruct_packet_nofree' >> librecorder.so.1: undefined reference to `avpicture_fill' >> librecorder.so.1: undefined reference to `av_set_parameters' >> librecorder.so.1: undefined reference to `av_alloc_format_c >> >> Now problem with static libraries. >> >> >> #pkg-config --list-all | grep mpeg >> libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling library >> libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library >> libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format library >> libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library >> >> >> How do i solve this issue >> >> >> Thanks >> >> >> Yuvaraj R > > As far as I know, -l flag on the gcc command line will prefer the > shared version of the library. I.e. if you have both libavformat.a and > libavformat.so visible to gcc, the latter will be used. > > BR, > Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From alexcohn at netvision.net.il Tue Feb 7 11:51:33 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 7 Feb 2012 12:51:33 +0200 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: On Tue, Feb 7, 2012 at 12:43, yuvaraj r wrote: > I have only static libraries > > Thanks > > Yuvaraj I'd recommend to add -Wl,--no-undefined to your gcc command line. Alex > On Tue, Feb 7, 2012 at 4:10 PM, Alex Cohn wrote: >> On Tue, Feb 7, 2012 at 06:54, yuvaraj r wrote: >>> Hi All, >>> >>> >>> I compiled the ffmpeg source to generate the static(.a foramt) >>> libraries ?in linux. >>> >>> When i am linking the static libraries with my application, >>> >>> i am getting undefined reference for many functions. >>> >>> Even i tried with pkg-config. >>> >>> Here command , what i tried >>> >>> >>> gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread >>> -lXdamage -lXfixes -lXmu -lXi -lX11 >>> -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib >>> ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags >>> libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs >>> --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o >>> librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o >>> >>> >>> It is generated the librecorder library. I have all dependency libs >>> >>> when executing ld command >>> >>> #ld librecorder.so.1.1 >>> >>> librecorder.so.1: undefined reference to `av_new_stream' >>> librecorder.so.1: undefined reference to `av_read_packet' >>> librecorder.so.1: undefined reference to `avcodec_alloc_frame' >>> librecorder.so.1: undefined reference to `av_close_input_file' >>> librecorder.so.1: undefined reference to `audio_resample' >>> librecorder.so.1: undefined reference to `avcodec_find_encoder' >>> librecorder.so.1: undefined reference to `av_find_input_format' >>> librecorder.so.1: undefined reference to `avcodec_encode_audio' >>> librecorder.so.1: undefined reference to `dump_format' >>> librecorder.so.1: undefined reference to `av_open_input_file' >>> librecorder.so.1: undefined reference to `avcodec_find_decoder' >>> librecorder.so.1: undefined reference to `avcodec_close' >>> librecorder.so.1: undefined reference to `av_find_stream_info' >>> librecorder.so.1: undefined reference to `audio_resample_init' >>> librecorder.so.1: undefined reference to `avpicture_get_size' >>> librecorder.so.1: undefined reference to `av_register_all' >>> librecorder.so.1: undefined reference to `avcodec_decode_audio' >>> librecorder.so.1: undefined reference to `avcodec_open' >>> librecorder.so.1: undefined reference to `avcodec_encode_video' >>> librecorder.so.1: undefined reference to `av_destruct_packet_nofree' >>> librecorder.so.1: undefined reference to `avpicture_fill' >>> librecorder.so.1: undefined reference to `av_set_parameters' >>> librecorder.so.1: undefined reference to `av_alloc_format_c >>> >>> Now problem with static libraries. >>> >>> >>> #pkg-config --list-all | grep mpeg >>> libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling library >>> libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library >>> libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format library >>> libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library >>> >>> >>> How do i solve this issue >>> >>> >>> Thanks >>> >>> >>> Yuvaraj R >> >> As far as I know, -l flag on the gcc command line will prefer the >> shared version of the library. I.e. if you have both libavformat.a and >> libavformat.so visible to gcc, the latter will be used. >> >> BR, >> Alex From yuvaraj.tr at gmail.com Tue Feb 7 12:04:23 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Tue, 7 Feb 2012 16:34:23 +0530 Subject: [Libav-user] ffmpeg static library linking issue In-Reply-To: References: Message-ID: Hi As per my understanding all the symbols in libraries are linked properly. Now problem with,the way of using static library linking. Could anybody provide steps to compile ffmpeg based example programs here? Thanks Yuvaraj On Tue, Feb 7, 2012 at 4:21 PM, Alex Cohn wrote: > On Tue, Feb 7, 2012 at 12:43, yuvaraj r wrote: >> I have only static libraries >> >> Thanks >> >> Yuvaraj > > I'd recommend to add -Wl,--no-undefined to your gcc command line. > > Alex > >> On Tue, Feb 7, 2012 at 4:10 PM, Alex Cohn wrote: >>> On Tue, Feb 7, 2012 at 06:54, yuvaraj r wrote: >>>> Hi All, >>>> >>>> >>>> I compiled the ffmpeg source to generate the static(.a foramt) >>>> libraries ?in linux. >>>> >>>> When i am linking the static libraries with my application, >>>> >>>> i am getting undefined reference for many functions. >>>> >>>> Even i tried with pkg-config. >>>> >>>> Here command , what i tried >>>> >>>> >>>> gcc -shared -Wl,-soname,librecorder.so.1 '-Wl,-rpath,lib' ?-lpthread >>>> -lXdamage -lXfixes -lXmu -lXi -lX11 >>>> -L/home/peter/Desktop/screenrecorder/librecorder/src/../dependencies/lib >>>> ?-lavformat -lavcodec -lavutil -lswscale `pkg-config --libs --cflags >>>> libavutil` `pkg-config --libs --cflags libswscale` `pkg-config --libs >>>> --cflags libavcodec` `pkg-config --libs --cflags libavformat` -o >>>> librecorder.so.1.1 init.o main_entry.o xtoffmpeg.o >>>> >>>> >>>> It is generated the librecorder library. I have all dependency libs >>>> >>>> when executing ld command >>>> >>>> #ld librecorder.so.1.1 >>>> >>>> librecorder.so.1: undefined reference to `av_new_stream' >>>> librecorder.so.1: undefined reference to `av_read_packet' >>>> librecorder.so.1: undefined reference to `avcodec_alloc_frame' >>>> librecorder.so.1: undefined reference to `av_close_input_file' >>>> librecorder.so.1: undefined reference to `audio_resample' >>>> librecorder.so.1: undefined reference to `avcodec_find_encoder' >>>> librecorder.so.1: undefined reference to `av_find_input_format' >>>> librecorder.so.1: undefined reference to `avcodec_encode_audio' >>>> librecorder.so.1: undefined reference to `dump_format' >>>> librecorder.so.1: undefined reference to `av_open_input_file' >>>> librecorder.so.1: undefined reference to `avcodec_find_decoder' >>>> librecorder.so.1: undefined reference to `avcodec_close' >>>> librecorder.so.1: undefined reference to `av_find_stream_info' >>>> librecorder.so.1: undefined reference to `audio_resample_init' >>>> librecorder.so.1: undefined reference to `avpicture_get_size' >>>> librecorder.so.1: undefined reference to `av_register_all' >>>> librecorder.so.1: undefined reference to `avcodec_decode_audio' >>>> librecorder.so.1: undefined reference to `avcodec_open' >>>> librecorder.so.1: undefined reference to `avcodec_encode_video' >>>> librecorder.so.1: undefined reference to `av_destruct_packet_nofree' >>>> librecorder.so.1: undefined reference to `avpicture_fill' >>>> librecorder.so.1: undefined reference to `av_set_parameters' >>>> librecorder.so.1: undefined reference to `av_alloc_format_c >>>> >>>> Now problem with static libraries. >>>> >>>> >>>> #pkg-config --list-all | grep mpeg >>>> libswscale ? ? ? ? ? ? ? ? ? ? ? libswscale - FFmpeg image rescaling library >>>> libavutil ? ? ? ? ? ? ? ? ? ? ? ?libavutil - FFmpeg utility library >>>> libavformat ? ? ? ? ? ? ? ? ? ? ?libavformat - FFmpeg container format library >>>> libavcodec ? ? ? ? ? ? ? ? ? ? ? libavcodec - FFmpeg codec library >>>> >>>> >>>> How do i solve this issue >>>> >>>> >>>> Thanks >>>> >>>> >>>> Yuvaraj R >>> >>> As far as I know, -l flag on the gcc command line will prefer the >>> shared version of the library. I.e. if you have both libavformat.a and >>> libavformat.so visible to gcc, the latter will be used. >>> >>> BR, >>> Alex > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user From simondaniels23 at gmail.com Tue Feb 7 17:36:25 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Tue, 7 Feb 2012 08:36:25 -0800 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: Here you go: http://pastebin.com/kKuh49ZD Thanks! On Tue, Feb 7, 2012 at 12:57 AM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/7 Simon Daniels : > > I updated all the deprecated functions and I'm still having the same > > problem. > > Please share your updated code, via pastebin, and i'll take a look. > > -- > Andrey Utkin > _______________________________________________ > 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 cat_zero_0083 at yahoo.com.hk Tue Feb 7 09:26:02 2012 From: cat_zero_0083 at yahoo.com.hk (cfyeung3) Date: Tue, 7 Feb 2012 00:26:02 -0800 (PST) Subject: [Libav-user] Receive video Streaming In-Reply-To: References: Message-ID: <1328603162550-4364059.post@n4.nabble.com> Felipe Santana wrote > > Hi, > > I need to build an application that uses ffmpeg for receiving a video > streaming. > And I have been looking for an example, or something that could help me to > use the functions on libavformat/rtsp.h. > > Does anyone have an example, that I could use? > Or could anyone help with that? > > Thanks! > > Best regards! > > -- > Felipe Santana > > Software Developer > XMobots Robotic Systems > > _______________________________________________ > Libav-user mailing list > Libav-user@ > http://ffmpeg.org/mailman/listinfo/libav-user > Yeah, I would also want to know this. After calling avformat_network_init(), I discovered that just call avformat_open_input() with url(applehttp:// prefix) as filename would do almost the whole thing. The url is point to m3u8 playlist and it can probe the content correctly. However, I am not sure that it really can be done so easily. What about the functions in applehttp.c? Is avformat_open_input() somehow call those function? Is this enough to support http live streaming? If not, is there any sample example to do so? -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Receive-video-Streaming-tp4205926p4364059.html Sent from the libav-users mailing list archive at Nabble.com. From andrey.krieger.utkin at gmail.com Tue Feb 7 21:05:15 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 7 Feb 2012 22:05:15 +0200 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: Well, i tested it, and it does decodes for me. This is source file, which _really_ compiles and works http://pastebin.com/ByYzePa3 And this is showdown of ffmpeg version (i used rev 08d2cee4 you mentioned), compile and run log. http://pastebin.com/1p22b1k8 This clearly shows that getting full frame indeed happens regularly. So you had mistake of perception. -- Andrey Utkin From scott.brown at movenetworks.com Tue Feb 7 21:58:34 2012 From: scott.brown at movenetworks.com (Scott Brown) Date: Tue, 7 Feb 2012 13:58:34 -0700 Subject: [Libav-user] DTS audio out of sync with video Message-ID: Hey everyone, I'm using ffmpeg libraries to read from a UDP transport stream, and I've been working on handling short term signal loss if ffmpeg can no longer read from the UDP stream. Basically the call to av_read_frame() takes a long time (up to a minute or so) and then begins reading packets again. The trouble I have is with the PTS and DTS for the audio and video. Specifically, the audio and video are no longer in sync. The audio is about 2 seconds before the video. So if a video frame has the same PTS as a audio frame, during playback the video looks like it's behind the audio, even though the PTS is the same. Interestingly enough, this only happens after signal loss. If there is no signal loss, everything looks great. For a transport stream, is the PTS/DTS dependent on the packets before it? I've tried clearing out the AVFormatContext packet_buffer via calling the ff_frame_flush function, but this didn't help. Does anyone know why the audio and video get out of sync if packets are lost? Thanks for the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kalileo at universalx.net Wed Feb 8 00:33:53 2012 From: kalileo at universalx.net (Kalileo) Date: Wed, 8 Feb 2012 06:33:53 +0700 Subject: [Libav-user] DTS audio out of sync with video In-Reply-To: References: Message-ID: <2D27D04A-F6C1-43E0-A42D-8F54447C30E4@universalx.net> On Feb 8, 2012, at 03:58 , Scott Brown wrote: > Hey everyone, > > I'm using ffmpeg libraries to read from a UDP transport stream, and I've been working on handling short term signal loss if ffmpeg can no longer read from the UDP stream. Basically the call to av_read_frame() takes a long time (up to a minute or so) and then begins reading packets again. > > The trouble I have is with the PTS and DTS for the audio and video. Specifically, the audio and video are no longer in sync. The audio is about 2 seconds before the video. So if a video frame has the same PTS as a audio frame, during playback the video looks like it's behind the audio, even though the PTS is the same. Interestingly enough, this only happens after signal loss. If there is no signal loss, everything looks great. > > For a transport stream, is the PTS/DTS dependent on the packets before it? I've tried clearing out the AVFormatContext packet_buffer via calling the ff_frame_flush function, but this didn't help. Does anyone know why the audio and video get out of sync if packets are lost? > > Thanks for the help. When you say "the audio and video are no longer in sync. The audio is about 2 seconds before the video." I assume you come to this conclusion when you play the stream. Does your player have any mechanism to synchronize based on DTS/PTS, or is it simply playing the audio/video frames as they come? The streams I have worked with have always had a usable DTS/PTS, If there were frames missing/arriving corrupted then the DTS/PTS would show a "jump" and the player could sync back based on DTS/PTS. Thus, to my experience, the answer is "No" to your question "For a transport stream, is the PTS/DTS dependent on the packets before it?". What flags do you set when you open the stream? IIRC there is a flag to "fill in" corrected PTS values. I've never set such a flag. From scott.brown at movenetworks.com Wed Feb 8 00:44:47 2012 From: scott.brown at movenetworks.com (Scott Brown) Date: Tue, 7 Feb 2012 16:44:47 -0700 Subject: [Libav-user] DTS audio out of sync with video In-Reply-To: <2D27D04A-F6C1-43E0-A42D-8F54447C30E4@universalx.net> Message-ID: My player is looking at PTS and DTS values, not just playing them as they come. If it's missing samples for a given time, it plays silence (for audio). I don't set any flags when I open the transport stream, although I did once try setting the "mpeg2ts_compute_pcr" option to "1" in the AVDictionary parameter. Although, since this didn't fix the problem I removed it. Honestly though, I'm not even sure what it did. On 2/7/12 4:33 PM, "Kalileo" wrote: > >On Feb 8, 2012, at 03:58 , Scott Brown wrote: > >> Hey everyone, >> >> I'm using ffmpeg libraries to read from a UDP transport stream, and >>I've been working on handling short term signal loss if ffmpeg can no >>longer read from the UDP stream. Basically the call to av_read_frame() >>takes a long time (up to a minute or so) and then begins reading packets >>again. >> >> The trouble I have is with the PTS and DTS for the audio and video. >>Specifically, the audio and video are no longer in sync. The audio is >>about 2 seconds before the video. So if a video frame has the same PTS >>as a audio frame, during playback the video looks like it's behind the >>audio, even though the PTS is the same. Interestingly enough, this only >>happens after signal loss. If there is no signal loss, everything looks >>great. >> >> For a transport stream, is the PTS/DTS dependent on the packets before >>it? I've tried clearing out the AVFormatContext packet_buffer via >>calling the ff_frame_flush function, but this didn't help. Does anyone >>know why the audio and video get out of sync if packets are lost? >> >> Thanks for the help. > >When you say "the audio and video are no longer in sync. The audio is >about 2 seconds before the video." I assume you come to this conclusion >when you play the stream. Does your player have any mechanism to >synchronize based on DTS/PTS, or is it simply playing the audio/video >frames as they come? > >The streams I have worked with have always had a usable DTS/PTS, If there >were frames missing/arriving corrupted then the DTS/PTS would show a >"jump" and the player could sync back based on DTS/PTS. > >Thus, to my experience, the answer is "No" to your question "For a >transport stream, is the PTS/DTS dependent on the packets before it?". > >What flags do you set when you open the stream? IIRC there is a flag to >"fill in" corrected PTS values. I've never set such a flag. > > > >_______________________________________________ >Libav-user mailing list >Libav-user at ffmpeg.org >http://ffmpeg.org/mailman/listinfo/libav-user From kalileo at universalx.net Wed Feb 8 02:46:37 2012 From: kalileo at universalx.net (Kalileo) Date: Wed, 8 Feb 2012 08:46:37 +0700 Subject: [Libav-user] DTS audio out of sync with video In-Reply-To: References: Message-ID: <97E93588-D66E-4D87-934D-B7AD556A158E@universalx.net> On Feb 8, 2012, at 06:44 , Scott Brown wrote: > My player is looking at PTS and DTS values, not just playing them as they > come. If it's missing samples for a given time, it plays silence (for > audio). I don't set any flags when I open the transport stream, although I > did once try setting the "mpeg2ts_compute_pcr" option to "1" in the > AVDictionary parameter. Although, since this didn't fix the problem I > removed it. Honestly though, I'm not even sure what it did. Then I would check if your input stream is not already containing wrong dts/pts values. From scott.brown at movenetworks.com Wed Feb 8 19:25:42 2012 From: scott.brown at movenetworks.com (Scott Brown) Date: Wed, 8 Feb 2012 11:25:42 -0700 Subject: [Libav-user] DTS audio out of sync with video In-Reply-To: <97E93588-D66E-4D87-934D-B7AD556A158E@universalx.net> Message-ID: Ok, I have some more info about this problem. For some reason, it's taking quite a while after the signal returns to get video frames, which is strange because I start to get audio frames right away: Here's my timeline: 12:00:00 start decoding 12:00:10 signal lost (av_read_frame waits) 12:00:25 signal returned, av_read_frame returns Immediately after the signal comes back av_read_frame returns one or two audio and video frames for 12:00:10 (before signal loss). Then right after that (12:00:25) it starts returning some audio frames for the new time (12:00:25). After reading a lot of audio packets, av_read_frame finally starts to return some video frames, around 12:00:29. The first video frame it returns is for 12:00:10 (before signal loss) and then right afterwards it returns a video frame for 12:00:29. After this it reads audio and video frames "normally", with DTS values that are out of sync. So playing the audio for 12:00:30 with a video frame with a PTS of 12:00:30 ends up with the audio that is a couple of seconds before the video. Here's ffmpeg's log of what happens immediately following the signal coming back (12:00:25): [h264 @ 0x916b3c0] error while decoding MB 58 34, bytestream (-3) [h264 @ 0x916b3c0] mmco: unref short failure [h264 @ 0x916b3c0] reference picture missing during reorder [h264 @ 0x916b3c0] Missing reference picture [h264 @ 0x916b3c0] Increasing reorder buffer to 16 [h264 @ 0x916b3c0] illegal short term buffer state detected [mpegts @ 0x9149a00] PES packet size mismatch [ac3 @ 0x9171640] frame CRC mismatch [ac3 @ 0x9171640] frame sync error [h264 @ 0x916b3c0] reference picture missing during reorder [h264 @ 0x916b3c0] Missing reference picture I'm particularly concerned with the reorder buffer of 16. However, at 30 fps, even if this was the cause, the audio should only be off by 1/2 of a second, but it's clearly more off than that. As always, I appreciate any help you can give. Thanks On 2/7/12 6:46 PM, "Kalileo" wrote: > >On Feb 8, 2012, at 06:44 , Scott Brown wrote: > >> My player is looking at PTS and DTS values, not just playing them as >>they >> come. If it's missing samples for a given time, it plays silence (for >> audio). I don't set any flags when I open the transport stream, >>although I >> did once try setting the "mpeg2ts_compute_pcr" option to "1" in the >> AVDictionary parameter. Although, since this didn't fix the problem I >> removed it. Honestly though, I'm not even sure what it did. > >Then I would check if your input stream is not already containing wrong >dts/pts values. > > >_______________________________________________ >Libav-user mailing list >Libav-user at ffmpeg.org >http://ffmpeg.org/mailman/listinfo/libav-user From scott.brown at movenetworks.com Wed Feb 8 20:06:20 2012 From: scott.brown at movenetworks.com (Scott Brown) Date: Wed, 8 Feb 2012 12:06:20 -0700 Subject: [Libav-user] DTS audio out of sync with video In-Reply-To: Message-ID: Actually, perhaps the audio is only 1/2 a second off (it's hard to tell by just watching). As per the dranger tutorial, for video frames I get the pts using the packet's dts value. Perhaps when the reorder buffer increases to 16 the dts and pts are more and more off? On 2/8/12 11:25 AM, "Scott Brown" wrote: >Ok, I have some more info about this problem. For some reason, it's taking >quite a while after the signal returns to get video frames, which is >strange because I start to get audio frames right away: > >Here's my timeline: >12:00:00 start decoding >12:00:10 signal lost (av_read_frame waits) >12:00:25 signal returned, av_read_frame returns > >Immediately after the signal comes back av_read_frame returns one or two >audio and video frames for 12:00:10 (before signal loss). Then right after >that (12:00:25) it starts returning some audio frames for the new time >(12:00:25). After reading a lot of audio packets, av_read_frame finally >starts to return some video frames, around 12:00:29. The first video frame >it returns is for 12:00:10 (before signal loss) and then right afterwards >it returns a video frame for 12:00:29. After this it reads audio and video >frames "normally", with DTS values that are out of sync. So playing the >audio for 12:00:30 with a video frame with a PTS of 12:00:30 ends up with >the audio that is a couple of seconds before the video. > >Here's ffmpeg's log of what happens immediately following the signal >coming back (12:00:25): > >[h264 @ 0x916b3c0] error while decoding MB 58 34, bytestream (-3) >[h264 @ 0x916b3c0] mmco: unref short failure >[h264 @ 0x916b3c0] reference picture missing during reorder >[h264 @ 0x916b3c0] Missing reference picture >[h264 @ 0x916b3c0] Increasing reorder buffer to 16 >[h264 @ 0x916b3c0] illegal short term buffer state detected >[mpegts @ 0x9149a00] PES packet size mismatch >[ac3 @ 0x9171640] frame CRC mismatch >[ac3 @ 0x9171640] frame sync error >[h264 @ 0x916b3c0] reference picture missing during reorder >[h264 @ 0x916b3c0] Missing reference picture > >I'm particularly concerned with the reorder buffer of 16. However, at 30 >fps, even if this was the cause, the audio should only be off by 1/2 of a >second, but it's clearly more off than that. > >As always, I appreciate any help you can give. Thanks > > > > > >On 2/7/12 6:46 PM, "Kalileo" wrote: > >> >>On Feb 8, 2012, at 06:44 , Scott Brown wrote: >> >>> My player is looking at PTS and DTS values, not just playing them as >>>they >>> come. If it's missing samples for a given time, it plays silence (for >>> audio). I don't set any flags when I open the transport stream, >>>although I >>> did once try setting the "mpeg2ts_compute_pcr" option to "1" in the >>> AVDictionary parameter. Although, since this didn't fix the problem I >>> removed it. Honestly though, I'm not even sure what it did. >> >>Then I would check if your input stream is not already containing wrong >>dts/pts values. >> >> >>_______________________________________________ >>Libav-user mailing list >>Libav-user at ffmpeg.org >>http://ffmpeg.org/mailman/listinfo/libav-user > >_______________________________________________ >Libav-user mailing list >Libav-user at ffmpeg.org >http://ffmpeg.org/mailman/listinfo/libav-user From denisgottardello at gmail.com Wed Feb 8 21:31:57 2012 From: denisgottardello at gmail.com (Denis) Date: Wed, 8 Feb 2012 21:31:57 +0100 Subject: [Libav-user] avio_open_dyn_buf versus avio_open Message-ID: <201202082131.57280.denisgottardello@gmail.com> "avio_open" function is used to manage a file. Someone can explain to me which is the right use of "avio_open_dyn_buf" function and which are the cases on that this function must to be used? Thanks a lot. Denis. -- www.denisgottardello.it Skype: mrdebug Videosurveillance and home automation! http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php From simondaniels23 at gmail.com Wed Feb 8 23:59:31 2012 From: simondaniels23 at gmail.com (Simon Daniels) Date: Wed, 8 Feb 2012 14:59:31 -0800 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: Ah - I think I know what's going on. In my real code, I was actually skipping over frames (intentionally). For some reason the frame that I would actually scan would never be available so I had assumed that none of them were available (my bad!). Any idea why this video has so many frames that aren't available--return "NOT got pic". I haven't seen that with other videos I'm tried. Thanks Andrey! On Tue, Feb 7, 2012 at 12:05 PM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > Well, i tested it, and it does decodes for me. > > This is source file, which _really_ compiles and works > http://pastebin.com/ByYzePa3 > And this is showdown of ffmpeg version (i used rev 08d2cee4 you > mentioned), compile and run log. > http://pastebin.com/1p22b1k8 > This clearly shows that getting full frame indeed happens regularly. > So you had mistake of perception. > > -- > Andrey Utkin > _______________________________________________ > 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 kennethjjgibson at gmail.com Thu Feb 9 04:53:12 2012 From: kennethjjgibson at gmail.com (Kenneth Gibson) Date: Thu, 9 Feb 2012 16:53:12 +1300 Subject: [Libav-user] AVFilter overlay change image Message-ID: Hi, I am using Libavfilter programmatically and I know its possible to overlay an image like a logo onto a video with a filterchain. Is it possible to change the image that I am overlaying part way through the video? The idea being that the overlaid image will change every *n* number of frames. Is this possible with a filtergraph? The only other way I can think of is to make a separate video where each frame contains my overlay image with a transparent background. Then overlay one on top of the other. Does this sound viable? Cheers, -------------- next part -------------- An HTML attachment was scrubbed... URL: From henell at gmail.com Thu Feb 9 10:15:38 2012 From: henell at gmail.com (Daniel Henell) Date: Thu, 9 Feb 2012 10:15:38 +0100 Subject: [Libav-user] Encoding depth video from Kinect Message-ID: Hello! I'm working on a project where we would like to transfer RGBD video captured with a Kinect from our users to a server hosted by us for research purposes. It will be used by users in homes with normal Internet connections and thus it has be compressed somehow so that it won't take hours to upload a video. We are not looking for real-time streaming but we would like it to be as quick as possible. We use OpenNI to capture the video and it gives us a 640x480 24-bit RGB image and a 640x280 16-bit depth image each frame. The depth values are stored in mm and the max range of the depth sensor is around 5 m so the full 16-bit depth is not used. It's also possible to get the raw depth values (without calibration and conversion to mm) and I think the raw data is around 12-14 bits per pixel. The RGB video is encoded with x264 and that is working perfect. However there doesn't seem to be any video codec that can handle >8 bit grayscale video. I have done quite a lot of testing to compress the depth by - mapping depth <-> rgb value and encode as lossless x264 - compressing as jpeg-2000 lossless and lossy - compressing group of frames with bzip2 - compressing group of frames with zlib - compression using the algorithm presented in "Low-Complexity, Near-Lossless Coding of Depth Maps from Kinect-Like Depth Cameras", Mehrotra et al. (Microsoft Research) Of the above bzip2 gives the best compression rates but is also very slow. It's actually so CPU intensive that it's interfering with the OpenNI driver so we get flickers in the video if we compress while capturing. zlib has the best performance but not very good compression rate. I'm wondering if there is any way of doing this that I haven't thought of yet. For example if there is a video codec that could handle 16-bit grayscale. Someone must have been doing something similar before? Best regards, Daniel Henell From cehoyos at ag.or.at Thu Feb 9 11:19:03 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 9 Feb 2012 10:19:03 +0000 (UTC) Subject: [Libav-user] Encoding depth video from Kinect References: Message-ID: Daniel Henell writes: > However there doesn't seem to be any video codec that can handle >8 > bit grayscale video. grep GRAY16 libavcodec/*.c shows jpegls, ffv1 and libopenjpeg as codecs that do support >8 bit grayscale video. Carl EUgen From andrey.krieger.utkin at gmail.com Thu Feb 9 11:23:18 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 9 Feb 2012 12:23:18 +0200 Subject: [Libav-user] got_picture_ptr of avcodec_decode_video2 always returns 0 for a particular MTS file In-Reply-To: References: Message-ID: 2012/2/9 Simon Daniels : > Ah - I think I know what's going on. In my real code, I was actually > skipping over frames (intentionally). For some reason the frame that I would > actually scan would never be available so I had assumed that none of them > were available (my bad!). Pity. Next time, please... well, you get the point. > Any idea why this video has so many frames that aren't available--return > "NOT got pic". I haven't seen that with other videos I'm tried. I got "NOT got pic" each second frame. In my practice it is ok. Although i don't know what this means, you can check specific decoder module used in your file, and find out in which cases got_picture is set to 0. -- Andrey Utkin From nitinkumgoyal at gmail.com Thu Feb 9 11:45:15 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Thu, 9 Feb 2012 16:15:15 +0530 Subject: [Libav-user] Issue in Decoding AMR Message-ID: Hi I am trying to decode some Amrnb audio using the avcodec_decode_audio3 function. I want to input frame by frame and save the raw output frame by frame as well. *int len = avcodec_decode_audio3(mpCodecContext, (short *)outbuf, &out_size, &pkt);* Now, the issue is that when I give the input of a frame of 32 bytes without the AMR header, i got the len >0, but the outsize value is always 640 that I am sure is not correct and I am also able to read the 640 values in the output buffer. When i try to extract the raw audio from my media file, using the standalone ffmpeg windows build i get a different output, which is correct. I have used the following command: *ffmpeg -i input.amr -f amr Output.raw* * * *Now, I am not sure if the output of **avcodec_decode_audio3 function **is correct or not as even if i send the bugger input say 64 byte or 128 or the whole while at one go, the output buffer size is always 640 bytes.* * * *Can someone let me know where I am doing the mistake for the same as I want the same out as the standalone .* * * *I have the sample attached which I am trying to decode also I have attached the sample code which I am using to decode.* * * * * * * *Regards* *Nitin* * * * * -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sound2.amr Type: application/octet-stream Size: 8701 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sample_code.cpp Type: text/x-c++src Size: 1396 bytes Desc: not available URL: From henell at gmail.com Thu Feb 9 12:41:40 2012 From: henell at gmail.com (Daniel Henell) Date: Thu, 9 Feb 2012 12:41:40 +0100 Subject: [Libav-user] Encoding depth video from Kinect In-Reply-To: References: Message-ID: > Daniel Henell writes: > >> However there doesn't seem to be any video codec that can handle >8 >> bit grayscale video. > > grep GRAY16 libavcodec/*.c > shows jpegls, ffv1 and libopenjpeg as codecs that do support >8 bit > grayscale video. > > Carl EUgen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user Hi, I tried encoding the depth frames as ffv1 using the following command: ffmpeg -r10 -i data/d-%06d.pgm -sameq -vsync1 -vcodec ffv1 vid.mov However I got the following output and errors: Incompatible pixel format 'gray16le' for codec 'ffv1', auto-selecting format 'yuv420p16le' [buffer @ 0x9bc8980] w:640 h:480 pixfmt:gray16be tb:1/1000000 sar:0/1 sws_param: [buffersink @ 0x9bdb4c0] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out' [scale @ 0x9bdba40] w:640 h:480 fmt:gray16be -> w:640 h:480 fmt:yuv420p16le flags:0x4 [ffv1 @ 0x9bc83e0] bits_per_raw_sample invalid Output #0, mov, to 'vid.mov': Stream #0:0: Video: ffv1, yuv420p16le, 640x480, q=2-31, 200 kb/s, 90k tbn, 10 tbc Stream mapping: Stream #0:0 -> #0:0 (pgm -> ffv1) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Is ffv1 really supporting GRAY16? -- Daniel From cehoyos at ag.or.at Thu Feb 9 13:05:05 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 9 Feb 2012 12:05:05 +0000 (UTC) Subject: [Libav-user] Encoding depth video from Kinect References: Message-ID: Daniel Henell writes: > I tried encoding the depth frames as ffv1 using the following command: > > ffmpeg -r10 -i data/d-%06d.pgm -sameq -vsync1 -vcodec ffv1 vid.mov > > However I got the following output and errors: > > Incompatible pixel format 'gray16le' for codec 'ffv1', auto-selecting > format 'yuv420p16le' Complete, uncut console output missing. Carl Eugen From gaoyuanhot at gmail.com Thu Feb 9 13:18:15 2012 From: gaoyuanhot at gmail.com (Yuan Gao) Date: Thu, 9 Feb 2012 13:18:15 +0100 Subject: [Libav-user] a proxy problem of libav Message-ID: Hallo all, I am quite new for libav, hope you dont mind if the question too simple for you. Currently I am using libav to decode audio stream from internet. Having tested it by local files and internet stream it runs well. the function avformat_open_input(), has filename parameter which I simply pass the local file address like "c:/temp/file.mp3" or url address like "http://...." . My problem is how to pass the file path if I need to pass a proxy? of course the proxy address and port is known. from http.c file which is in libav source files, I found inside it has defined dealing with http protocol and proxy, so I am sure somewhere must be a way to set up proxy parameter by using libav. Unfortunately didnt find anything useful. From ffmpeg documentation, only one paragraph briefly states that "by using http_proxy, it is useful to set proxy..." that makes no sence for me... anyone who knows how to deal with this problem? Thanks in advance. -- * Best regards -------------------- Mr. Gao Yuan* Uni-Stuttgart Infotech CEMT TEL: 017656442259 MSN:gaoyuanyes at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom.vercauteren at gmail.com Thu Feb 9 19:12:45 2012 From: tom.vercauteren at gmail.com (Tom Vercauteren) Date: Thu, 9 Feb 2012 19:12:45 +0100 Subject: [Libav-user] Possible bug in msmpeg4.c Message-ID: Hi Folks, First of all, thanks for the nice piece of software that has been serving me quite nicely. I have read that bug reports should be made with the bug tracker but I first wanted to confirm an issue that I am encountering. I am indeed not really familiar with the ffmpeg code. I am calling ffmpeg from c++ code to encode MSMPEG4V3 video from grabbed images. My program segfaulted within get_rl_index. This was caused because of the a previous issue in ff_msmpeg4_encode_block. --------------- void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) { int level, run, last, i, j, last_index; int last_non_zero, sign, slevel; int code, run_diff, dc_pred_dir; const RLTable *rl; const uint8_t *scantable; if (s->mb_intra) { msmpeg4_encode_dc(s, block[0], n, &dc_pred_dir); i = 1; if (n < 4) { rl = &rl_table[s->rl_table_index]; ---------------- The problem arises here as s->rl_table_index is equal to -1. I attempted a very quick and dirty workaround without actually trying to understand the code. It is shown below. It seems to actually provide usable results but, as I said, I have no clue whether this really makes sense. ---------------- void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) { int level, run, last, i, j, last_index; int last_non_zero, sign, slevel; int code, run_diff, dc_pred_dir; const RLTable *rl; const uint8_t *scantable; if (s->mb_intra) { msmpeg4_encode_dc(s, block[0], n, &dc_pred_dir); i = 1; if (n < 4) { if( !( s->rl_table_index>0 && s->rl_table_indexrl_table_index]; } ---------------- Can this problem come from my bad usage of ffmpeg or is this an actual bug that I should file? Also, would someone suggest a better workaround? I know that this is not a self-contained test case but I hope that it provides sufficient information to help. Best regards, Tom From stefasab at gmail.com Fri Feb 10 00:14:56 2012 From: stefasab at gmail.com (Stefano Sabatini) Date: Fri, 10 Feb 2012 00:14:56 +0100 Subject: [Libav-user] AVFilter overlay change image In-Reply-To: References: Message-ID: <20120209231456.GB2141@arborea> On date Thursday 2012-02-09 16:53:12 +1300, Kenneth Gibson encoded: > Hi, > > I am using Libavfilter programmatically and I know its possible to overlay > an image like a logo onto a video with a filterchain. > Is it possible to change the image that I am overlaying part way through > the video? You can push events into the filtergraph and make every filter process them. Right now this interface is implemented only in drawtext, but adding that capability to the overlay filter should be straightforward, and patches are welcome in this case. > The idea being that the overlaid image will change every *n* number of > frames. > Is this possible with a filtergraph? You may programmatically push a reconfiguration event every n frames. > The only other way I can think of is to make a separate video where each > frame contains my overlay image with a transparent background. Then overlay > one on top of the other. Does this sound viable? From kennethjjgibson at gmail.com Fri Feb 10 00:25:08 2012 From: kennethjjgibson at gmail.com (Kenneth Gibson) Date: Fri, 10 Feb 2012 12:25:08 +1300 Subject: [Libav-user] AVFilter overlay change image In-Reply-To: <20120209231456.GB2141@arborea> References: <20120209231456.GB2141@arborea> Message-ID: Thanks for the advice =) > You may programmatically push a reconfiguration event every n frames. Would this be practical if I wanted to push a reconfiguration every single frame? -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Fri Feb 10 04:46:38 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Fri, 10 Feb 2012 14:46:38 +1100 Subject: [Libav-user] Can ffmpeg extract I-Frames from a video stream? Message-ID: I know that ffmpeg is enable to extract images at any desired time interval from a video stream. i.e the below command: ffmpeg -i test.avi -r 1 -s WxH -f image2 test-%03d.jpeg extract 1 second image interval from test.avi. But i dont know how to change this command to extract just I-Frames from the stream, regardless of the frame time position. Can u help me to find the solution? -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvaraj.tr at gmail.com Fri Feb 10 11:16:09 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Fri, 10 Feb 2012 15:46:09 +0530 Subject: [Libav-user] [mpeg4 @ 0x3aeb775c]too many threads Message-ID: Hi I write simple application to encode the video. It was worked fine on MY Linux desktop(Ubuntu) Then i cross compiled the ffmpeg and executed app on my Nokia phone #./configure --arch=arm --cross-compile --prefix=/home/peter/Desktop/lib --enable-shared --cross-prefix=arm-none-linux-gnueabi- Then i got these error "[mpeg4 @ 0x3aeb775c]too many threads " How do i solve these error Thanks Yuvaraj R From jan.hoelscher at codergrid.de Fri Feb 10 12:52:54 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Fri, 10 Feb 2012 12:52:54 +0100 Subject: [Libav-user] [mpeg4 @ 0x3aeb775c]too many threads In-Reply-To: References: Message-ID: set the AVCodecContext * ->thread_count=1 in your App. this solves the problem. 2012/2/10 yuvaraj r > Hi > > I write simple application to encode the video. It was worked fine on > MY Linux desktop(Ubuntu) > > Then i cross compiled the ffmpeg and executed app on my Nokia phone > > > #./configure --arch=arm --cross-compile > --prefix=/home/peter/Desktop/lib --enable-shared > --cross-prefix=arm-none-linux-gnueabi- > > Then i got these error "[mpeg4 @ 0x3aeb775c]too many threads " > > How do i solve these error > > > Thanks > > Yuvaraj R > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvaraj.tr at gmail.com Fri Feb 10 13:18:15 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Fri, 10 Feb 2012 17:48:15 +0530 Subject: [Libav-user] [mpeg4 @ 0x3aeb775c]too many threads In-Reply-To: References: Message-ID: Hi did, I am getting segmentation fault @ avcodec_open if i comment st->codec->thread_count , i am not getting segmentation fault Thanks Yuvaraj R On Fri, Feb 10, 2012 at 5:22 PM, jan h?lscher wrote: > set the AVCodecContext * ->thread_count=1 in your App. > > this solves the problem. > > > > 2012/2/10 yuvaraj r >> >> Hi >> >> I write simple application to encode the video. It was worked fine on >> MY Linux desktop(Ubuntu) >> >> Then i cross compiled the ffmpeg and ?executed app on my Nokia phone >> >> >> #./configure --arch=arm --cross-compile >> --prefix=/home/peter/Desktop/lib --enable-shared >> --cross-prefix=arm-none-linux-gnueabi- >> >> Then i got these error "[mpeg4 @ 0x3aeb775c]too many threads " >> >> How do i solve these error >> >> >> Thanks >> >> Yuvaraj R >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user > > > > > -- > Media Encoding Cluster, > the first Open Source Cluster Encoding Solution > for distributed Media Encoding. > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > From andrey.krieger.utkin at gmail.com Fri Feb 10 14:00:30 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 10 Feb 2012 15:00:30 +0200 Subject: [Libav-user] AVFilter overlay change image In-Reply-To: References: Message-ID: AFAIK filter 'movie' is used for animated watermark. -- Andrey Utkin From tom.vercauteren at gmail.com Fri Feb 10 14:12:01 2012 From: tom.vercauteren at gmail.com (Tom Vercauteren) Date: Fri, 10 Feb 2012 14:12:01 +0100 Subject: [Libav-user] Possible bug in msmpeg4.c In-Reply-To: References: Message-ID: On Thu, Feb 9, 2012 at 19:12, Tom Vercauteren wrote: > Hi Folks, > > First of all, thanks for the nice piece of software that has been > serving me quite nicely. I have read that bug reports should be made > with the bug tracker but I first wanted to confirm an issue that I am > encountering. I am indeed not really familiar with the ffmpeg code. > > I am calling ffmpeg from c++ code to encode MSMPEG4V3 video from > grabbed images. My program segfaulted within get_rl_index. This was > caused because of the a previous issue in ff_msmpeg4_encode_block. > > --------------- > void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) > { > ? ?int level, run, last, i, j, last_index; > ? ?int last_non_zero, sign, slevel; > ? ?int code, run_diff, dc_pred_dir; > ? ?const RLTable *rl; > ? ?const uint8_t *scantable; > > ? ?if (s->mb_intra) { > ? ? ? ?msmpeg4_encode_dc(s, block[0], n, &dc_pred_dir); > ? ? ? ?i = 1; > ? ? ? ?if (n < 4) { > ? ? ? ? ? ? ? rl = &rl_table[s->rl_table_index]; > ---------------- > The problem arises here as s->rl_table_index is equal to -1. I > attempted a very quick and dirty workaround without actually trying to > understand the code. It is shown below. It seems to actually provide > usable results but, as I said, I have no clue whether this really > makes sense. > > ---------------- > void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) > { > ? ?int level, run, last, i, j, last_index; > ? ?int last_non_zero, sign, slevel; > ? ?int code, run_diff, dc_pred_dir; > ? ?const RLTable *rl; > ? ?const uint8_t *scantable; > > ? ?if (s->mb_intra) { > ? ? ? ?msmpeg4_encode_dc(s, block[0], n, &dc_pred_dir); > ? ? ? ?i = 1; > ? ? ? ?if (n < 4) { > ? ? ? ? ? ?if( !( s->rl_table_index>0 && s->rl_table_index ? ? ? ? ? ? ? rl = &rl_table[1]; > ? ? ? ? ? ?} > ? ? ? ? ? ?else { > ? ? ? ? ? ? ? rl = &rl_table[s->rl_table_index]; > ? ? ? ? ? ?} > ---------------- > > Can this problem come from my bad usage of ffmpeg or is this an actual > bug that I should file? Also, would someone suggest a better > workaround? I know that this is not a self-contained test case but I > hope that it provides sufficient information to help. For the record, I have been able to repoduce the bug with the ffmpeg executable. I have therefore opened a bug report that contains the test case: https://ffmpeg.org/trac/ffmpeg/ticket/990 Tom From mail.christoph.winter at googlemail.com Fri Feb 10 20:38:35 2012 From: mail.christoph.winter at googlemail.com (Christoph Winter) Date: Fri, 10 Feb 2012 20:38:35 +0100 Subject: [Libav-user] av_probe_input_buffer wont recognize AAC Message-ID: <4F35723B.1060705@gmail.com> Hey all, I have problems with mp4 files with encoded AAC audio stream. If I use av_probe_input_buffer with av_open_input_stream the AAC stream wont get recognized correctly; an av_dump_format shows: Duration: 00:01:41.98, start: 0.000000, bitrate: 1326 kb/s Stream #0.0(eng): Video: mpeg4, yuv420p, 640x360 [PAR 1:1 DAR 16:9], 1207 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc Metadata: creation_time : 2011-08-09 09:32:18 Stream #0.1(eng): Audio: aac, stereo, s16, 117 kb/s as you can se the sample rate is missing; my code works for other formats/codecs. Most surprising is, that if I use the simple av_open_input_file the file playes fine. What does av_open_input_file better than av_open_input_stream? Thanks, Christoph PS: the problem remains with newer versions of libav libraries -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptothez at live.ca Fri Feb 10 20:53:11 2012 From: ptothez at live.ca (Patrick Zielinski) Date: Fri, 10 Feb 2012 14:53:11 -0500 Subject: [Libav-user] Getting options Message-ID: /** * Look for an option in an object. Consider only options which * have all the specified flags set. * * @param[in] obj A pointer to a struct whose first element is a * pointer to an AVClass. * Alternatively a double pointer to an AVClass, if * AV_OPT_SEARCH_FAKE_OBJ search flag is set. * @param[in] name The name of the option to look for. * @param[in] unit When searching for named constants, name of the unit * it belongs to. * @param opt_flags Find only options with all the specified flags set (AV_OPT_FLAG). * @param search_flags A combination of AV_OPT_SEARCH_*. * * @return A pointer to the option found, or NULL if no option * was found. * * @note Options found with AV_OPT_SEARCH_CHILDREN flag may not be settable * directly with av_set_string3(). Use special calls which take an options * AVDictionary (e.g. avformat_open_input()) to set options found with this * flag. */const AVOption *av_opt_find(void *obj, const char *name, const char *unit, int opt_flags, int search_flags); I don't get the unit and opt_flags parameter, let's say I want to get width from an ACCodecContext, how do I do it? const AVOption *options = av_opt_find(codecCtx, option, NULL, NULL, NULL); -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Fri Feb 10 21:08:10 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 10 Feb 2012 22:08:10 +0200 Subject: [Libav-user] av_probe_input_buffer wont recognize AAC In-Reply-To: <4F35723B.1060705@gmail.com> References: <4F35723B.1060705@gmail.com> Message-ID: 1. Try with ffprobe util, and share the results here. 2. Share your sample files. 3. If problem reproduces with your app only, provide simplified, but compiling&running&reproducing code sample. 4. Try increasing AVFormatContext.max_analyze_duration over 5*1000*1000, also .probe_size to sth more than default. -- Andrey Utkin From i.like.privacy.too at gmail.com Sat Feb 11 05:52:56 2012 From: i.like.privacy.too at gmail.com (Camera Man) Date: Fri, 10 Feb 2012 23:52:56 -0500 Subject: [Libav-user] Adding parameters to rtsp url with ffmpeg 0.10? Message-ID: <4F35F428.1090604@gmail.com> An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Sat Feb 11 16:58:35 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Sat, 11 Feb 2012 17:58:35 +0200 Subject: [Libav-user] a proxy problem of libav In-Reply-To: References: Message-ID: 2012/2/9 Yuan Gao : > My problem is how to pass the file path if I need to pass a proxy? of course > the proxy address and port is known. > from http.c file which is in libav source files, I found inside it has > defined dealing with http protocol and proxy, so I am sure somewhere must be > a way to set up proxy parameter > by using libav. Unfortunately didnt find anything useful. From ffmpeg > documentation, only one paragraph briefly states that "by using http_proxy, > it is useful to set proxy..." that makes > no sence for me... Set environment variable "http_proxy". See libavformat/http.c:101 For POSIX systems, use setenv(). For Windows, there're SetEnvironmentVariable(). -- Andrey Utkin From andrey.krieger.utkin at gmail.com Sat Feb 11 17:35:25 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Sat, 11 Feb 2012 18:35:25 +0200 Subject: [Libav-user] Getting options In-Reply-To: References: Message-ID: 2012/2/10 Patrick Zielinski : > I don't get the unit and opt_flags parameter, let's say I want to get width > from an ACCodecContext, how do I do it? int width = codecCtx->width; // see avcodec.h -- Andrey Utkin From mail.christoph.winter at googlemail.com Sat Feb 11 18:12:14 2012 From: mail.christoph.winter at googlemail.com (Christoph Winter) Date: Sat, 11 Feb 2012 18:12:14 +0100 Subject: [Libav-user] av_probe_input_buffer wont recognize AAC In-Reply-To: References: <4F35723B.1060705@gmail.com> Message-ID: <4F36A16E.60202@gmail.com> Hey Andrey, thanks for your reply. 1) ffprobe recognizes the correct sample_rate (av_open_input_file, too) 4) I tried that before but it did not work neither 2-3) I uploaded a small sample including the mp4 file: www.asamnet.de/~winterch/libav_stream.tar.gz It's a small Qt project so you need qmake and maybe also change the LIB paths in the .pro file to compile. You should see that in the first av_dump_format the sample_rate in the aac audio stream is missing. Thanks in advance, Christoph Am 10.02.2012 21:08, schrieb Andrey Utkin: > 1. Try with ffprobe util, and share the results here. > 2. Share your sample files. > 3. If problem reproduces with your app only, provide simplified, but > compiling&running&reproducing code sample. > 4. Try increasing AVFormatContext.max_analyze_duration over > 5*1000*1000, also .probe_size to sth more than default. > From cehoyos at ag.or.at Sat Feb 11 23:50:44 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sat, 11 Feb 2012 22:50:44 +0000 (UTC) Subject: [Libav-user] Encoding depth video from Kinect References: Message-ID: Daniel Henell writes: > ffmpeg -r10 -i data/d-%06d.pgm -sameq -vsync1 -vcodec ffv1 vid.mov For 16bit encoding, "-coder 1" is needed. (FFmpeg's output tells you anyway.) > Is ffv1 really supporting GRAY16? It was only supported since shorty before you wrote your mail (which I didn't realize), but did not work in all cases: A problem that made encoding difficult (it did not work with above command line) has been fixed, please test current git head! Carl Eugen From andrey.krieger.utkin at gmail.com Sun Feb 12 02:09:22 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Sun, 12 Feb 2012 03:09:22 +0200 Subject: [Libav-user] Re-encoding a time interval in existing video Message-ID: I am trying to transcode video only in certail time interval of video file, simply copying the rest of video AVPackets. The point is saving time, because videos are large by duration and picture scale, and only small time amount must be edited using filters. The sample of file i must handle is http://dl.dropbox.com/u/43104344/interval_transcoding.mp4 My code is here https://github.com/krieger-od/interval_transcoding I launched it with command ./interval_transcoding -i http://dl.dropbox.com/u/43104344/interval_transcoding.mp4 -o out.mov --encode_start 58 --v_bitrate 100000 --loglevel 6 On playback, i get errors, see below. [h264 @ 0x872e840]AVC: nal size 1296048089 [h264 @ 0x872e840]no frame! Error while decoding frame! [h264 @ 0x872e840]error while decoding MB 0 0, bytestream (-6) [h264 @ 0x872e840]AVC: nal size -1707405113 [h264 @ 0x872e840]concealing 2040 DC, 2040 AC, 2040 MV errors [h264 @ 0x872e840]error while decoding MB 0 0, bytestream (-20) [h264 @ 0x872e840]AVC: nal size -1706096540 [h264 @ 0x872e840]concealing 2040 DC, 2040 AC, 2040 MV errors I've tried to remux source file to mpegts, using -bsf h264_mp4toannexb, the resulting video&audio was desynchronized, and after transcoding with command ./interval_transcoding -i orig.ts -o out.ts --encode_start 58 --v_bitrate 100000 --loglevel 6 i got playback error, and grey screen at time my transcoded frames should go. [h264 @ 0x872e840]Overread VUI by 93 bits I'm surely missing some point, because i'm not familiar with H.264 and its flavours. -- Andrey Utkin From gaoyuanhot at gmail.com Sun Feb 12 14:34:12 2012 From: gaoyuanhot at gmail.com (Yuan Gao) Date: Sun, 12 Feb 2012 14:34:12 +0100 Subject: [Libav-user] a proxy problem of libav In-Reply-To: References: Message-ID: Thanks Andrey. I have found in http.c file, there is http_proxy parameter to setup proxy, but may I know where this setenvironment() function locates? from libavformat didnt find any.... On Sat, Feb 11, 2012 at 4:58 PM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/9 Yuan Gao : > > My problem is how to pass the file path if I need to pass a proxy? of > course > > the proxy address and port is known. > > from http.c file which is in libav source files, I found inside it has > > defined dealing with http protocol and proxy, so I am sure somewhere > must be > > a way to set up proxy parameter > > by using libav. Unfortunately didnt find anything useful. From ffmpeg > > documentation, only one paragraph briefly states that "by using > http_proxy, > > it is useful to set proxy..." that makes > > no sence for me... > > Set environment variable "http_proxy". See libavformat/http.c:101 > For POSIX systems, use setenv(). For Windows, there're > SetEnvironmentVariable(). > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- * Best regards -------------------- Mr. Gao Yuan* Uni-Stuttgart Infotech CEMT TEL: 017656442259 MSN:gaoyuanyes at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lclemens at gmail.com Sun Feb 12 19:21:27 2012 From: lclemens at gmail.com (Luke Clemens) Date: Sun, 12 Feb 2012 11:21:27 -0700 Subject: [Libav-user] How to decode H.264 RTP packet using ffmpeg? In-Reply-To: <3bbd605a6db6a32608191c29c4c93f54@tweb17-2.nm> References: <3bbd605a6db6a32608191c29c4c93f54@tweb17-2.nm> Message-ID: you can't use avcodec_decode_video2 () to decode rtp packets. setup an AVFormatContext and use av_read_frame() and then after you get the frame, use avcodec_decode_video. On Fri, Dec 2, 2011 at 12:05 AM, ??? wrote: > Hi, > > > > I'm wondering how to decode h.264 rtp packet using avcodec_decode_video2() > function. > > On encoding side, STAP-A type or FU-A mode rtp packets are sending. > > I depacketize one rtp packet and input the data(avpkt) to > avcodec_decode_video2(). > > But there are some errors and the decoding does not working. > > > > The errors are as follows: > > non-existing PPS 933740 referenced > decode_slice_header error > no frame! > > > > Please give some advice and thank you. > > > > Regards, > > HSK > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -- - - - - Luke Clemens http://clemens.bytehammer.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Mon Feb 13 03:06:13 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 13 Feb 2012 04:06:13 +0200 Subject: [Libav-user] Re-encoding a time interval in existing video In-Reply-To: References: Message-ID: I've solved my issue. Shortly: I remuxed MP4 file to Annex B format with -bsf h264_mp4toannexb. Then, concatenating pieces of original (Annex B) file, and pieces filtered/transcoded by ffmpeg succeeds. As i have guess, Annex B format does not depend on on global headers aka extradata, and all the decoding information lies in the frames. Please correct me if i am not right. -- Andrey Utkin From dzeesea at gmail.com Sat Feb 11 21:16:24 2012 From: dzeesea at gmail.com (Patrick Zielinski) Date: Sat, 11 Feb 2012 15:16:24 -0500 Subject: [Libav-user] Getting options In-Reply-To: References: Message-ID: The comments section recommends using an AVOptions object to access these, but I guess I'll just settle for getting them directly from the struct. On Sat, Feb 11, 2012 at 11:35 AM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/10 Patrick Zielinski : > > I don't get the unit and opt_flags parameter, let's say I want to get > width > > from an ACCodecContext, how do I do it? > > int width = codecCtx->width; // see avcodec.h > > -- > Andrey Utkin > _______________________________________________ > 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 i.like.privacy.too at gmail.com Mon Feb 13 10:10:12 2012 From: i.like.privacy.too at gmail.com (Camera Man) Date: Mon, 13 Feb 2012 04:10:12 -0500 Subject: [Libav-user] Adding parameters to rtsp url with ffmpeg 0.10 or libav 0.8 ? Message-ID: <4F38D374.4080305@gmail.com> An HTML attachment was scrubbed... URL: From gstream at ccc2.com Mon Feb 13 11:31:04 2012 From: gstream at ccc2.com (gstream at ccc2.com) Date: Mon, 13 Feb 2012 02:31:04 -0800 Subject: [Libav-user] help with raw fifo as movie src & overlay Message-ID: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> Hi All, I am hoping you can help with getting the libavfilter movie and overlay working correctly. My objective is to get two RTSP camera feeds to go side by side in sync. I started with the below that works to transmit the final image but due to the loading times of each overlay the streams are out of sync. ffmpeg -loop_input -i 800x600.jpg -an -s 1288x360 -vf 'movie=rtsp\\://192.168.20.112\\:551/channel1,scale=640:352[wm]; movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352[wm2]; [in][wm] overlay=2:4[in+wm]; [in+wm][wm2] overlay=646:4 [out]' -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv so firstly, is there a way I can add a video buffer to the first overlay so it syncs with the second? If not, can I use rawvideo from upstream ffmpeg's. I am assuming that by having upstream decoders the sink going into the overlay's will be the same. I have tried several ways to get the rawvideo to load but an diff error returns every time. The below.... ffmpeg -loop_input -i 1280x720.jpg -an -s 1288x360 -vf 'movie=/home/fifo/mpegpipe1.yuv,buffer=640:352:yuv420p:1:25:1:1 [wm]; movie=/home/fifo/mpegpipe2.yuv,buffer=640:354:yuv420p:1:25:1:1 [wm2]; [in][wm] overlay=2:4[in+wm]; [in+wm][wm2] overlay=646:4 [out]' -vcodec rawvideo /home/zorobigz_2/fifo/mpegpipe99.yuv -s 1280x360 generates the following error..... [movie @ 0x1ab6b00] seek_point:0 format_name:(null) file_name:/home/fifo/mpegpipe1.yuv stream_index:0 [buffer @ 0x1ab6a80] w:640 h:352 pixfmt:yuv420p tb:1/25 sar:1/1 sws_param: Too many inputs specified for the "buffer" filter. this does seem to be the right number of params as per the doc's. your help would be very much appreciated. thx Art From andrey.krieger.utkin at gmail.com Mon Feb 13 12:02:11 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 13 Feb 2012 13:02:11 +0200 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> Message-ID: 2012/2/13 : > Hi All, > > I am hoping you can help with getting the libavfilter movie and overlay > working correctly. > > My objective is to get two RTSP camera feeds to go side by side in sync. > > I started with the below that works to transmit the final image but due to > the loading times of each overlay the streams are out of sync. > > ffmpeg ?-loop_input -i 800x600.jpg -an -s 1288x360 -vf > 'movie=rtsp\\://192.168.20.112\\:551/channel1,scale=640:352[wm]; > ?movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352[wm2]; > [in][wm] overlay=2:4[in+wm]; > [in+wm][wm2] overlay=646:4 [out]' > -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv > > so firstly, is there a way I can add a video buffer to the first overlay > so it syncs with the second? I assume you have de-sync of nearly 5 seconds, with video coming from first mentioned URL coming late. Is that correct? If so, point must be the streams recognition delay (during opening). I suspect that libavfilter opens your sources sequentially, not in parallel. (Just speculations, haven't check in sources.) You could try adding to second source the "setpts" filter, to shift its timestamps. So your invoke should look like ffmpeg ?-loop_input -i 800x600.jpg -an -s 1288x360 -vf 'movie=rtsp\\://192.168.20.112\\:551/channel1,scale=640:352[wm]; ?movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352,setpts=PTS+5[wm2]; [in][wm] overlay=2:4[in+wm]; [in+wm][wm2] overlay=646:4 [out]' -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv If that doesn't help, imo it requires hacking libavfilter or writing an application. -- Andrey Utkin From j.baumgarten at netvisio.com Mon Feb 13 17:04:43 2012 From: j.baumgarten at netvisio.com (Julien Baumgarten) Date: Mon, 13 Feb 2012 17:04:43 +0100 Subject: [Libav-user] Decode H264 video using ffmpeg through Xuggler Message-ID: <20F9EE89-AA0E-4329-9C1F-6A4DD20A7137@netvisio.com> Hi everyone, I come here in order to get some information about decoding h264 video. I am using Xuggler to decode some video. My code works if I use another codec than H264 but I need this one. When I use the H264 codec, I have an error with the ffmpeg library: 16:52:51.313 [main] ERROR org.ffmpeg - [h264 @ 0x7fe82d0b9e00] no frame! What does this error mean? I try to set some basic information such as frame rate, time base, width and height, bit rate but the error is still here. If someone can help me... Yours sincerely, Julien From alexcohn at netvision.net.il Mon Feb 13 20:24:07 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 13 Feb 2012 21:24:07 +0200 Subject: [Libav-user] Decode H264 video using ffmpeg through Xuggler In-Reply-To: <20F9EE89-AA0E-4329-9C1F-6A4DD20A7137@netvisio.com> References: <20F9EE89-AA0E-4329-9C1F-6A4DD20A7137@netvisio.com> Message-ID: On Feb 13, 2012 6:05 PM, "Julien Baumgarten" wrote: > > Hi everyone, > I come here in order to get some information about decoding h264 video. I am using Xuggler to decode some video. My code works if I use another codec than H264 but I need this one. When I use the H264 codec, I have an error with the ffmpeg library: 16:52:51.313 [main] ERROR org.ffmpeg - [h264 @ 0x7fe82d0b9e00] no frame! > > What does this error mean? > > I try to set some basic information such as frame rate, time base, width and height, bit rate but the error is still here. If someone can help me... > > Yours sincerely, > Julien Please post your complete command line and the version you are using. It would make troubleshooting much easier if you could make a short sample video available, too. BR, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Tue Feb 14 07:44:05 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Tue, 14 Feb 2012 17:44:05 +1100 Subject: [Libav-user] Whats wrong with this select filter? Message-ID: Hi when i use the below command for testing the select filter, it extract all frames and it is correct: ffmpeg -i D:\test\1.mpg -vf "select=1 " -f image2 d:\Test\IFrames\I-Frm-%03d.jpeg But when i uses the select filter in below format for selecting i-frames i encountered the error as can be seen here. can you say me the reason? D:\>ffmpeg -i D:\test\1.mpg -vf "select='eq(pict_type\,I)'" -f image2 d:\Test\IFrames\I-Frm-%03d.jpeg ffmpeg version N-31247-g5d4fd1d, Copyright (c) 2000-2011 the FFmpeg developers built on Jul 4 2011 21:40:51 with gcc 4.6.1 configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --e nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --en able-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enab le-zlib libavutil 51. 11. 0 / 51. 11. 0 libavcodec 53. 7. 0 / 53. 7. 0 libavformat 53. 5. 0 / 53. 5. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 24. 3 / 2. 24. 3 libswscale 2. 0. 0 / 2. 0. 0 libpostproc 51. 2. 0 / 51. 2. 0 [mpeg @ 0208BFA0] max_analyze_duration 5000000 reached at 5000000 Input #0, mpeg, from 'D:\test\1.mpg': Duration: 00:00:49.64, start: 0.540000, bitrate: 438 kb/s Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 360x240 [PAR 1:1 DAR 3:2], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p' [buffer @ 01E13FA0] w:360 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param: [select @ 01E5F940] [Eval @ 0022EDF8] Missing ')' or too many args in 'eq(pict_type\,I)' [select @ 01E5F940] Error while parsing expression 'eq(pict_type\,I)' Error initializing filter 'select' with args 'eq(pict_type\,I)' -------------- next part -------------- An HTML attachment was scrubbed... URL: From ubitux at gmail.com Tue Feb 14 08:01:34 2012 From: ubitux at gmail.com (=?utf-8?B?Q2zDqW1lbnQgQsWTc2No?=) Date: Tue, 14 Feb 2012 08:01:34 +0100 Subject: [Libav-user] Whats wrong with this select filter? In-Reply-To: References: Message-ID: <20120214070134.GP28372@leki> On Tue, Feb 14, 2012 at 05:44:05PM +1100, amir.rouhi at rmit.edu.au wrote: > Hi > when i use the below command for testing the select filter, it extract all > frames and it is correct: > > ffmpeg -i D:\test\1.mpg -vf "select=1 " -f image2 > d:\Test\IFrames\I-Frm-%03d.jpeg > > But when i uses the select filter in below format for selecting i-frames i > encountered the error as can be seen here. can you say me the reason? > > D:\>ffmpeg -i D:\test\1.mpg -vf "select='eq(pict_type\,I)'" -f image2 > d:\Test\IFrames\I-Frm-%03d.jpeg > ffmpeg version N-31247-g5d4fd1d, Copyright (c) 2000-2011 the FFmpeg > developers > built on Jul 4 2011 21:40:51 with gcc 4.6.1 > configuration: --enable-gpl --enable-version3 --enable-memalign-hack > --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r > --e > nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype > --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp > --en > able-libschroedinger --enable-libspeex --enable-libtheora > --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs > --enable-libxvid --enab > le-zlib > libavutil 51. 11. 0 / 51. 11. 0 > libavcodec 53. 7. 0 / 53. 7. 0 > libavformat 53. 5. 0 / 53. 5. 0 > libavdevice 53. 2. 0 / 53. 2. 0 > libavfilter 2. 24. 3 / 2. 24. 3 > libswscale 2. 0. 0 / 2. 0. 0 > libpostproc 51. 2. 0 / 51. 2. 0 > [mpeg @ 0208BFA0] max_analyze_duration 5000000 reached at 5000000 > Input #0, mpeg, from 'D:\test\1.mpg': > Duration: 00:00:49.64, start: 0.540000, bitrate: 438 kb/s > Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 360x240 [PAR 1:1 DAR > 3:2], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc > Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting > format 'yuvj420p' > [buffer @ 01E13FA0] w:360 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 > sws_param: > [select @ 01E5F940] [Eval @ 0022EDF8] Missing ')' or too many args in > 'eq(pict_type\,I)' > [select @ 01E5F940] Error while parsing expression 'eq(pict_type\,I)' > Error initializing filter 'select' with args 'eq(pict_type\,I)' Try removing the simple quotes: -vf "select=eq(pict_type\,I)" BTW, this is likely a ffmpeg-user question. -- Cl?ment B. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From amir.rouhi at rmit.edu.au Tue Feb 14 08:28:08 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Tue, 14 Feb 2012 18:28:08 +1100 Subject: [Libav-user] Whats wrong with this select filter? In-Reply-To: <20120214070134.GP28372@leki> References: <20120214070134.GP28372@leki> Message-ID: When i removed the single quotes and put double quotes instead, i get bellow errors. BTW i am using FFMPEG on windows with win xp platform. does it make any causes for such errors? ffmpeg -i D:\test\1.mpg -vf "select=eq(pict_type\,I)" -f image2 d:\Test\IFrames\I-Frm-%03d.jpeg [select @ 01E5F940] [Eval @ 0022EDF8] Undefined constant or missing '(' in 'I)' [select @ 01E5F940] [Eval @ 0022EDF8] Missing ')' or too many args in 'eq(pict_type,I)' [select @ 01E5F940] Error while parsing expression 'eq(pict_type,I)' Error initializing filter 'select' with args 'eq(pict_type,I)' On 14 February 2012 18:01, Cl?ment B?sch wrote: > On Tue, Feb 14, 2012 at 05:44:05PM +1100, amir.rouhi at rmit.edu.au wrote: > > Hi > > when i use the below command for testing the select filter, it extract > all > > frames and it is correct: > > > > ffmpeg -i D:\test\1.mpg -vf "select=1 " -f image2 > > d:\Test\IFrames\I-Frm-%03d.jpeg > > > > But when i uses the select filter in below format for selecting i-frames > i > > encountered the error as can be seen here. can you say me the reason? > > > > D:\>ffmpeg -i D:\test\1.mpg -vf "select='eq(pict_type\,I)'" -f image2 > > d:\Test\IFrames\I-Frm-%03d.jpeg > > ffmpeg version N-31247-g5d4fd1d, Copyright (c) 2000-2011 the FFmpeg > > developers > > built on Jul 4 2011 21:40:51 with gcc 4.6.1 > > configuration: --enable-gpl --enable-version3 --enable-memalign-hack > > --enable-runtime-cpudetect --enable-avisynth --enable-bzlib > --enable-frei0r > > --e > > nable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfreetype > > --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp > > --en > > able-libschroedinger --enable-libspeex --enable-libtheora > > --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs > > --enable-libxvid --enab > > le-zlib > > libavutil 51. 11. 0 / 51. 11. 0 > > libavcodec 53. 7. 0 / 53. 7. 0 > > libavformat 53. 5. 0 / 53. 5. 0 > > libavdevice 53. 2. 0 / 53. 2. 0 > > libavfilter 2. 24. 3 / 2. 24. 3 > > libswscale 2. 0. 0 / 2. 0. 0 > > libpostproc 51. 2. 0 / 51. 2. 0 > > [mpeg @ 0208BFA0] max_analyze_duration 5000000 reached at 5000000 > > Input #0, mpeg, from 'D:\test\1.mpg': > > Duration: 00:00:49.64, start: 0.540000, bitrate: 438 kb/s > > Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 360x240 [PAR 1:1 DAR > > 3:2], 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc > > Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting > > format 'yuvj420p' > > [buffer @ 01E13FA0] w:360 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 > > sws_param: > > [select @ 01E5F940] [Eval @ 0022EDF8] Missing ')' or too many args in > > 'eq(pict_type\,I)' > > [select @ 01E5F940] Error while parsing expression 'eq(pict_type\,I)' > > Error initializing filter 'select' with args 'eq(pict_type\,I)' > > Try removing the simple quotes: -vf "select=eq(pict_type\,I)" > > BTW, this is likely a ffmpeg-user question. > > -- > Cl?ment B. > > _______________________________________________ > 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 j.baumgarten at netvisio.com Tue Feb 14 09:58:20 2012 From: j.baumgarten at netvisio.com (Julien Baumgarten) Date: Tue, 14 Feb 2012 09:58:20 +0100 Subject: [Libav-user] Decode H264 video using ffmpeg through Xuggler In-Reply-To: References: <20F9EE89-AA0E-4329-9C1F-6A4DD20A7137@netvisio.com> Message-ID: I got this error when I use Xuggler to decode one video (Click here to start the download ...) that I encode myself using Xuggler too. I set the baseline, frame rate, frame size, the number of pictures in group of pictures, the pixel type, the bit rate and a preset but the decode fail. I decided to try to encode and decode the video only by using ffmpeg software (ffmpeg and ffplay) and using a RED5 server. Encode command line: /usr/local/xuggler/bin/ffmpeg -i ~/Desktop/The\ Simpsons\ Movie\ -\ Trailer.mp4 -re -vcodec libx264 -vpre ultrafast -vpre baseline -g 60 -vb 150000 -strict experimental -acodec copy -f flv rtmp://10.120.1.90/oflaDemo/test123 Decode command line to save the result in a flv file: /usr/local/xuggler/bin/ffmpeg -i rtmp://10.120.1.90/oflaDemo/test123 -acodec copy -vcodec copy -y toto.flv Decode command line to display the result on the screen: /usr/local/xuggler/bin/ffplay -i rtmp://10.120.1.90/oflaDemo/test123 The problem is: - The quality is disgusting in the flv file. I assume that comes from the ultrafast preset but - FFPLAY play 2 or 3 frames and stop but continue to play the sound => So it does not work - My software gives me the "no frame!" error If someone has an idea... :) Yours sincerely, Julien Le 13 f?vr. 2012 ? 20:24, Alex Cohn a ?crit : > On Feb 13, 2012 6:05 PM, "Julien Baumgarten" wrote: > > > > Hi everyone, > > I come here in order to get some information about decoding h264 video. I am using Xuggler to decode some video. My code works if I use another codec than H264 but I need this one. When I use the H264 codec, I have an error with the ffmpeg library: 16:52:51.313 [main] ERROR org.ffmpeg - [h264 @ 0x7fe82d0b9e00] no frame! > > > > What does this error mean? > > > > I try to set some basic information such as frame rate, time base, width and height, bit rate but the error is still here. If someone can help me... > > > > Yours sincerely, > > Julien > > Please post your complete command line and the version you are using. It would make troubleshooting much easier if you could make a short sample video available, too. > > 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 cehoyos at ag.or.at Tue Feb 14 11:10:08 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 14 Feb 2012 10:10:08 +0000 (UTC) Subject: [Libav-user] Whats wrong with this select filter? References: <20120214070134.GP28372@leki> Message-ID: writes: > BTW i am using FFMPEG on windows with win xp platform. > does it make any causes for such errors? > ffmpeg -i D:\test\1.mpg -vf "select=eq(pict_type\,I)" I know this will not really help you, but both above line and your original single quotes work fine on a Linux shell. Perhaps try MSys? Carl Eugen From gstream at ccc2.com Tue Feb 14 11:29:54 2012 From: gstream at ccc2.com (gstream at ccc2.com) Date: Tue, 14 Feb 2012 02:29:54 -0800 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> Message-ID: > 2012/2/13 : >> Hi All, >> >> I am hoping you can help with getting the libavfilter movie and overlay >> working correctly. >> >> My objective is to get two RTSP camera feeds to go side by side in sync. >> >> I started with the below that works to transmit the final image but due >> to >> the loading times of each overlay the streams are out of sync. >> >> ffmpeg ?-loop_input -i 800x600.jpg -an -s 1288x360 -vf >> 'movie=rtsp\\://192.168.20.112\\:551/channel1,scale=640:352[wm]; >> ?movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352[wm2]; >> [in][wm] overlay=2:4[in+wm]; >> [in+wm][wm2] overlay=646:4 [out]' >> -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv >> >> so firstly, is there a way I can add a video buffer to the first overlay >> so it syncs with the second? > > I assume you have de-sync of nearly 5 seconds, with video coming from > first mentioned URL coming late. Is that correct? > If so, point must be the streams recognition delay (during opening). I > suspect that libavfilter opens your sources sequentially, not in > parallel. (Just speculations, haven't check in sources.) > You could try adding to second source the "setpts" filter, to shift > its timestamps. So your invoke should look like > > ffmpeg ?-loop_input -i 800x600.jpg -an -s 1288x360 -vf > 'movie=rtsp\\://192.168.20.112\\:551/channel1,scale=640:352[wm]; > ?movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352,setpts=PTS+5[wm2]; > [in][wm] overlay=2:4[in+wm]; > [in+wm][wm2] overlay=646:4 [out]' > -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv > > If that doesn't help, imo it requires hacking libavfilter or writing > an application. > > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > Thanks Andrey the delay is about 1 sec and is 1st behind 2nd as you suggested. I tried the PTS but no change in the delay at all. -filters says setpts is available. Is there any other setting I need to check? thx Art From nitinkumgoyal at gmail.com Tue Feb 14 11:44:41 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 14 Feb 2012 16:14:41 +0530 Subject: [Libav-user] RTP payload Depacketization for bandwidth Efficient mode for AMR audio Message-ID: Hi Do FFMPEG also supports the depacketization of the Bandwidth Efficient Mode packetized RTP payload for AMR audio content? in *rtpdec_amr.c*, I am seeing that the algo used seems to be having the octet aligned format only. I am looking for the clear algo which can be used to depacketize the RTP payload which is bandwidth efficent mode. Can somebody have any idea/suggestion for the same. Regards Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From yuvaraj.tr at gmail.com Tue Feb 14 13:26:41 2012 From: yuvaraj.tr at gmail.com (yuvaraj r) Date: Tue, 14 Feb 2012 17:56:41 +0530 Subject: [Libav-user] [mpeg4 @ 0x3aeb775c]too many threads In-Reply-To: References: Message-ID: Hi All, I am getting segmentation fault ,while setting the thread count on arm target. printf(" THread loop count %d\n",output_file->nb_streams); for (i = 0; i < output_file->nb_streams; i++) { printf("Set thread count \n"); output_file->streams[i]->codec->thread_count = 1; } printf(" Open codec\n"); // open the codec if (avcodec_open (out_st->codec, codec) < 0) { printf("Av codec open failed \n"); exit (1); } printf("Codec open success\n"); Please help to solve these issue Thanks Yuvaraj R On 2/10/12, yuvaraj r wrote: > Hi did, > > I am getting segmentation fault @ avcodec_open > > if i comment st->codec->thread_count , i am not getting segmentation fault > > > Thanks > > Yuvaraj R > > > > On Fri, Feb 10, 2012 at 5:22 PM, jan h?lscher > wrote: >> set the AVCodecContext * ->thread_count=1 in your App. >> >> this solves the problem. >> >> >> >> 2012/2/10 yuvaraj r >>> >>> Hi >>> >>> I write simple application to encode the video. It was worked fine on >>> MY Linux desktop(Ubuntu) >>> >>> Then i cross compiled the ffmpeg and ?executed app on my Nokia phone >>> >>> >>> #./configure --arch=arm --cross-compile >>> --prefix=/home/peter/Desktop/lib --enable-shared >>> --cross-prefix=arm-none-linux-gnueabi- >>> >>> Then i got these error "[mpeg4 @ 0x3aeb775c]too many threads " >>> >>> How do i solve these error >>> >>> >>> Thanks >>> >>> Yuvaraj R >>> _______________________________________________ >>> Libav-user mailing list >>> Libav-user at ffmpeg.org >>> http://ffmpeg.org/mailman/listinfo/libav-user >> >> >> >> >> -- >> Media Encoding Cluster, >> the first Open Source Cluster Encoding Solution >> for distributed Media Encoding. >> >> >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user >> > From nitinkumgoyal at gmail.com Tue Feb 14 14:29:15 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 14 Feb 2012 18:59:15 +0530 Subject: [Libav-user] RTP payload Depacketization for bandwidth Efficient mode for AMR audio In-Reply-To: References: Message-ID: Hi Do anybody have idea that how can i convert the RTP packetized AMR audio content into standalone AMR file? I have the dump of RTP payload and I want to convert it into the standalone AMR file. I have followed up RFC 3267 and RFC 4867 and understood the byte pattern but I havenot found anywhere the also where i can see how can i packetize the AMR frames into RTP or vice-versa. Regards Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Tue Feb 14 16:59:17 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 14 Feb 2012 17:59:17 +0200 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> Message-ID: 2012/2/14 : > the delay is about 1 sec and is 1st behind 2nd as you suggested. I tried > the PTS but no change in the delay at all. -filters says setpts is > available. Is there any other setting I need to check? Looks like we need to implement a filter that delays output by given time. -- Andrey Utkin From i.like.privacy.too at gmail.com Tue Feb 14 20:34:24 2012 From: i.like.privacy.too at gmail.com (Camera Man) Date: Tue, 14 Feb 2012 14:34:24 -0500 Subject: [Libav-user] [libav-api] Adding parameters to rtsp url with ffmpeg 0.10 or libav 0.8 ? In-Reply-To: References: <4F38D374.4080305@gmail.com> Message-ID: <4F3AB740.1010006@gmail.com> An HTML attachment was scrubbed... URL: From i.like.privacy.too at gmail.com Tue Feb 14 21:40:33 2012 From: i.like.privacy.too at gmail.com (Camera Man) Date: Tue, 14 Feb 2012 15:40:33 -0500 Subject: [Libav-user] [libav-api] Adding parameters to rtsp url with ffmpeg 0.10 or libav 0.8 ? In-Reply-To: References: <4F38D374.4080305@gmail.com> <4F3AB740.1010006@gmail.com> Message-ID: <4F3AC6C1.6020002@gmail.com> An HTML attachment was scrubbed... URL: From rsbultje at gmail.com Tue Feb 14 19:56:16 2012 From: rsbultje at gmail.com (Ronald S. Bultje) Date: Tue, 14 Feb 2012 10:56:16 -0800 Subject: [Libav-user] [libav-api] Adding parameters to rtsp url with ffmpeg 0.10 or libav 0.8 ? In-Reply-To: <4F38D374.4080305@gmail.com> References: <4F38D374.4080305@gmail.com> Message-ID: Hi, On Mon, Feb 13, 2012 at 1:10 AM, Camera Man wrote: > I've just upgraded to the latest trunk, recompiled and re-linked -- and > realized that there is no way to pass options to the udp layer; > > In the past, it was possible to use a url like: > "rstp://user:password at a.b.c.d/axis-media/media.amp?udp&buffer_size=1048576". > With latest trunk, it is possible to specify the transport through an option > dictionary ("rtsp_transport" -> "udp"), but I can't figure out how to pass > options like buffer_size, connect, fifo_size etc. ./avconv -rtsp_transport udp -i rtsp://... -rtsp_transport goes before the -i. Also see ./avconv -h. Ronald From andrey.krieger.utkin at gmail.com Wed Feb 15 01:19:00 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 15 Feb 2012 02:19:00 +0200 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> Message-ID: Hey, got an idea for you. Try ffmpeg ?-loop_input -i 800x600.jpg -an -s 1288x360 -vf 'movie=rtsp\\://192.168.20.112\\:551/channel1,select='gte(t\,1)',scale=640:352[wm]; ?movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352[wm2]; [in][wm] overlay=2:4[in+wm]; [in+wm][wm2] overlay=646:4 [out]' -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv This should skip first second of video from first source. Amount of time can be adjusted (second operand in gte( ). I can't test it, so i'm looking forward for your results. -- Andrey Utkin From jeff.warren at gmail.com Wed Feb 15 02:31:29 2012 From: jeff.warren at gmail.com (Jeff Warren) Date: Wed, 15 Feb 2012 01:31:29 -0000 Subject: [Libav-user] mp3 structure question Message-ID: <005a01cceb81$8aedf1a0$a0c9d4e0$@gmail.com> Hi, hoping someone can help me with a query. I am trying to reconstruct mp3 files using stream data only, with the help of ffmpeg. I have tried recreating the 10 byte id3v2 header (for example, [0x49, 0x44, 0x33, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], and then after seeking to time 0 in the input file using av_read_frame, I copy each frame's payload into the output file. However this doesn't seem to give me valid files, what am I doing wrong? Is what I am trying to do not actually possible in this way? Essentially I want to create a new version of the file containing only the stream data, with no metadata. Any pointers appreciated! Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Wed Feb 15 03:29:02 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Wed, 15 Feb 2012 13:29:02 +1100 Subject: [Libav-user] Whats wrong with this select filter? In-Reply-To: References: <20120214070134.GP28372@leki> Message-ID: In windows the problem is still as before which is very wired. i checked bellow command with different combination of single quote and double quote, but always errors were there: ffmpeg -i D:\test\1.mpg -vf "select='eq(pict_type\,I)' " -f image2 d:\Test\IFrames\I-Frm-%03d.jpeg The problem is still there when i install ffmpeg on my ubuntu. when i runt the command here , the ffmpeg error is that can not get -vf as a switch, and does not accept it and when i removed the -vf, the error changes to, can no recognized output format. The command in linux is: ffmpeg -i test/1.mpg -vf select='eq(pict_type\,I)' -f image2 test/IFrames/I-Frm-%03d.jpeg On 14 February 2012 21:10, Carl Eugen Hoyos wrote: > writes: > > > BTW i am using FFMPEG on windows with win xp platform. > > does it make any causes for such errors? > > ffmpeg -i D:\test\1.mpg -vf "select=eq(pict_type\,I)" > > I know this will not really help you, but both above line and > your original single quotes work fine on a Linux shell. > > Perhaps try MSys? > > Carl Eugen > > _______________________________________________ > 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 Wed Feb 15 06:43:22 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Wed, 15 Feb 2012 16:43:22 +1100 Subject: [Libav-user] Enquiry about I-Frame rate Message-ID: The scenario is that, I have an .mpg video file. When I extract the I-Frames from this file by below command: ffmpeg -i D:\test\1.mpg -vsync 0 -vf select="eq(pict_type\, PICT_TYPE_I)" d:\Test\IFrames\I-Frm-%03d.jpeg I will get 104 images which is about an I-Frame for every 12 frames of the 1.mpg stream. Then I tried to change the video format to MP4 by below command: ffmpeg -i D:\test\1.mpg -vcodec libx264 -g 0 d:\Test\11.mp4 and ffmpeg -i D:\test\1.mpg -vcodec libx264 -g 10 d:\Test\12.mp4 the question is that the new generated videos, 11.mp4 and 12.mp4, in spite of using different ?g values , the I-Frames of these two video is same and just is 5 images. I extract them by below command: ffmpeg -i D:\test\11.mp4 -vsync 0 -vf select="eq(pict_type\, PICT_TYPE_I)" d:\Test\IFrames\I-Frm-%03d.jpeg I want to know why there is a big difference between the mpg and mp4 files and why in spite of different ?g in last two video, I have exactly same I-Frames? -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Wed Feb 15 06:45:15 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Wed, 15 Feb 2012 16:45:15 +1100 Subject: [Libav-user] Whats wrong with this select filter? In-Reply-To: References: <20120214070134.GP28372@leki> Message-ID: it seems the problem solved with the below command: ffmpeg -i input-video -vsync 0 -vf select="eq(pict_type\, PICT_TYPE_I)" d:\Test\IFrames\I-Frm-%03d.jpeg tnx On 15 February 2012 13:29, wrote: > In windows the problem is still as before which is very wired. i checked > bellow command with different combination of single quote and double quote, > but always errors were there: > > ffmpeg -i D:\test\1.mpg -vf "select='eq(pict_type\,I)' " -f image2 > d:\Test\IFrames\I-Frm-%03d.jpeg > > > The problem is still there when i install ffmpeg on my ubuntu. when i runt > the command here , the ffmpeg error is that can not get -vf as a switch, > and does not accept it and when i removed the -vf, the error changes to, > can no recognized output format. The command in linux is: > > ffmpeg -i test/1.mpg -vf select='eq(pict_type\,I)' -f image2 > test/IFrames/I-Frm-%03d.jpeg > > > On 14 February 2012 21:10, Carl Eugen Hoyos wrote: > >> writes: >> >> > BTW i am using FFMPEG on windows with win xp platform. >> > does it make any causes for such errors? >> > ffmpeg -i D:\test\1.mpg -vf "select=eq(pict_type\,I)" >> >> I know this will not really help you, but both above line and >> your original single quotes work fine on a Linux shell. >> >> Perhaps try MSys? >> >> Carl Eugen >> >> _______________________________________________ >> 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/ > -- 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 gstream at ccc2.com Wed Feb 15 08:33:50 2012 From: gstream at ccc2.com (gstream at ccc2.com) Date: Tue, 14 Feb 2012 23:33:50 -0800 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> Message-ID: <8bdcbe54628e6acaf6e9ec590581d80a.squirrel@webmail.ccc2.com> > Hey, got an idea for you. Try > > ffmpeg ?-loop_input -i 800x600.jpg -an -s 1288x360 -vf > 'movie=rtsp\\://192.168.20.112\\:551/channel1,select='gte(t\,1)',scale=640:352[wm]; > ?movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352[wm2]; > [in][wm] overlay=2:4[in+wm]; > [in+wm][wm2] overlay=646:4 [out]' > -s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv > > This should skip first second of video from first source. Amount of > time can be adjusted (second operand in gte( ). > I can't test it, so i'm looking forward for your results. > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > Hi Andrey, no joy I'm afraid. it just makes both streams break up and jitter. I assume its because of the RTSP codec and timestamps not being the most accurate. I am keen for advice on constructing the filter you mentioned, are there any tutorials? Also a bit of a NooB Q. but is there a way to update/change parameters once the cmd has been started? In particular if we can get this delay fixed, I am assuming some form of drift over a 60+ period and we would need to dynamically adjust this over time. Thx for the idea and help Art. From andrey.krieger.utkin at gmail.com Wed Feb 15 10:00:15 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 15 Feb 2012 11:00:15 +0200 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: <8bdcbe54628e6acaf6e9ec590581d80a.squirrel@webmail.ccc2.com> References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> <8bdcbe54628e6acaf6e9ec590581d80a.squirrel@webmail.ccc2.com> Message-ID: 2012/2/15 : > assume its because of the RTSP codec and timestamps not being the most > accurate. > I am keen for advice on constructing the filter you mentioned, are there > any tutorials? I think more probably timestamps are ok, but inter-frame interval (FPS) may be not very accurate. And maybe overlay filter just gets one frame from one source, and one from another, and puts together, thus if one camera may "forget" to send particular frame sometimes, the second source will "be late" on visualization. If we had a filter that forces constant frame rate, this could be solved. (Just speculations again) > Also a bit of a NooB Q. but is there a way to update/change parameters > once the cmd has been started? In particular if we can get this delay > fixed, I am assuming some form of drift over a 60+ period and we would > need to dynamically adjust this over time. For cmdline util, it's impossible. For API that's re-initializing all filtering stuff. You can do it, but it's a lot of code. You must read your streams and push to filters manually, not by 'movie' filter. -- Andrey Utkin From gstream at ccc2.com Wed Feb 15 11:59:51 2012 From: gstream at ccc2.com (gstream at ccc2.com) Date: Wed, 15 Feb 2012 02:59:51 -0800 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> <8bdcbe54628e6acaf6e9ec590581d80a.squirrel@webmail.ccc2.com> Message-ID: > 2012/2/15 : > >> assume its because of the RTSP codec and timestamps not being the most >> accurate. >> I am keen for advice on constructing the filter you mentioned, are there >> any tutorials? > > I think more probably timestamps are ok, but inter-frame interval > (FPS) may be not very accurate. And maybe overlay filter just gets one > frame from one source, and one from another, and puts together, thus > if one camera may "forget" to send particular frame sometimes, the > second source will "be late" on visualization. If we had a filter that > forces constant frame rate, this could be solved. (Just speculations > again) > >> Also a bit of a NooB Q. but is there a way to update/change parameters >> once the cmd has been started? In particular if we can get this delay >> fixed, I am assuming some form of drift over a 60+ period and we would >> need to dynamically adjust this over time. > > For cmdline util, it's impossible. For API that's re-initializing all > filtering stuff. You can do it, but it's a lot of code. You must read > your streams and push to filters manually, not by 'movie' filter. > > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > Your a good man for helping this far Andrey. One last Q for this. I am trying to understand the mapping between the pix_fmt and fourcc. ie if I want to output rawvideo for fourcc AYUV how do I work out what the pix_fmt version is? Thx again Art From andrey.krieger.utkin at gmail.com Wed Feb 15 12:03:46 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 15 Feb 2012 13:03:46 +0200 Subject: [Libav-user] help with raw fifo as movie src & overlay In-Reply-To: References: <67d1d16b112152b77990d4ffb38dacdf.squirrel@webmail.ccc2.com> <8bdcbe54628e6acaf6e9ec590581d80a.squirrel@webmail.ccc2.com> Message-ID: 2012/2/15 : > Your a good man for helping this far Andrey. One last Q for this. I am > trying to understand the mapping between the pix_fmt and fourcc. ie if I > want to output rawvideo for fourcc AYUV how do I work out what the pix_fmt > version is? 1. Better start another topic. 2. I completely don't understand the question. -- Andrey Utkin From andrey.krieger.utkin at gmail.com Wed Feb 15 12:11:30 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 15 Feb 2012 13:11:30 +0200 Subject: [Libav-user] No pix_fmt auto conversion in avfilter? Message-ID: Could somebody explain why this code fails when FILTER_STRING is not "scale", but just "fifo" or "copy"? https://gist.github.com/1834778 The reason is that AVFrame out from filtergraph has 0x0 dimensions. The point is that pixel format conversion must take place, but i don't understand why avfilter doesn't sort it out automatically. It is surprising because when i open "buffer" video source for avfilter, i point in its params that input is in PIX_FMT_RGBA. Could / should this be "fixed", so auto-coversion took place in such cases? If so, i'd appreciate advices how to patch the libavfilter. -- Andrey Utkin From kennethjjgibson at gmail.com Thu Feb 16 00:28:15 2012 From: kennethjjgibson at gmail.com (Kenneth Gibson) Date: Thu, 16 Feb 2012 12:28:15 +1300 Subject: [Libav-user] Video overlay only overlays first frame Message-ID: Hi, I'm trying to overlay a .mp4 on top of another .mp4 programmatically. This is my filter description: "movie=myvid.mp4, setpts=PTS-STARTPTS [movie]; [in] setpts=PTS-STARTPTS, [movie] overlay=0:0 [out]" This results in only the first frame of myvid.mp4 being overlaid on my video. And the first frame persists for the length of the video, like it is a static image. My code is basically identical to that of filtering.c (the difference being that I output the result into a .mp4) What would cause the filter to only overlay the first frame? Cheers -------------- next part -------------- An HTML attachment was scrubbed... URL: From amir.rouhi at rmit.edu.au Thu Feb 16 01:20:39 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Thu, 16 Feb 2012 11:20:39 +1100 Subject: [Libav-user] How to convert a video format to h264 MPEG4/AVC with non-static I-Frame Rate? Message-ID: I want to know that the below command convert the input .mpg format video to a pure h264 (MPEG4/AVC) with non-static I-Frame rate? ffmpeg -i D:\test\1.mpg -vcodec libx264 -g 0 d:\Test\1new.mp4 as can be seen i used -vcodec libx264 for h264 format and -g 0 for non static I-Frame rate. is that correct? -------------- next part -------------- An HTML attachment was scrubbed... URL: From kennethjjgibson at gmail.com Thu Feb 16 01:58:46 2012 From: kennethjjgibson at gmail.com (Kenneth Gibson) Date: Thu, 16 Feb 2012 13:58:46 +1300 Subject: [Libav-user] Video overlay only overlays first frame In-Reply-To: References: Message-ID: I found this somewhere: "The first frame of one of the videos will also be repeated in the beginning if the videos that have different initial timestamps." I guess that was what was happening, even though I was attempting to set both initial timestamps to 0. Just as a test I changed the overlay setpts to -10 and now it plays the video properly, although I don't really understand why. On Thu, Feb 16, 2012 at 12:28 PM, Kenneth Gibson wrote: > Hi, > > I'm trying to overlay a .mp4 on top of another .mp4 programmatically. > > This is my filter description: > > "movie=myvid.mp4, setpts=PTS-STARTPTS [movie]; [in] setpts=PTS-STARTPTS, > [movie] overlay=0:0 [out]" > > This results in only the first frame of myvid.mp4 being overlaid on my > video. And the first frame persists for the length of the video, like it is > a static image. > > My code is basically identical to that of filtering.c (the > difference being that I output the result into a .mp4) > > What would cause the filter to only overlay the first frame? > > Cheers > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Thu Feb 16 15:54:58 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Thu, 16 Feb 2012 20:24:58 +0530 Subject: [Libav-user] avcodec_decode_audio3() output format and its validation Message-ID: Hi I have used the *avcodec_decode_audio3* function to decode the amr content in the frame order. I am getting the output buffer of 640 bytes for each frame and Sample format is float and I have saved that content as well in a raw output file. Now, the issue is that I want to validate that this content is correct or not but I can't play it any player as it don?t have any header or media related info and I am ot finding any command in ffmpeg which gives me rawAudio output. Now, if want to re-encode that raw out content i have saved using the above decode function, what would be the input format i need to give as its in a raw format. Can anybody give some suggestion on this? Regards Nitin Regards Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsbultje at gmail.com Thu Feb 16 17:45:52 2012 From: rsbultje at gmail.com (Ronald S. Bultje) Date: Thu, 16 Feb 2012 08:45:52 -0800 Subject: [Libav-user] [libav-api] No pix_fmt auto conversion in avfilter? In-Reply-To: References: Message-ID: Hi, On Wed, Feb 15, 2012 at 3:11 AM, Andrey Utkin wrote: > Could somebody explain why this code fails when FILTER_STRING is not > "scale", but just "fifo" or "copy"? > https://gist.github.com/1834778 > The reason is that AVFrame out from filtergraph has 0x0 dimensions. > The point is that pixel format conversion must take place, but i don't > understand why avfilter doesn't sort it out automatically. > It is surprising because when i open "buffer" video source for > avfilter, i point in its params that input is in PIX_FMT_RGBA. > Could / should this be "fixed", so auto-coversion took place in such cases? > If so, i'd appreciate advices how to patch the libavfilter. It could be fixed, but the problem is that it's not an easy fix, format conversion is rather expensive and can cause loss of precision, chroma information, and introduce rounding error. Maybe make it settable (auto-introduce-scale-filter)? Ronald From kennethjjgibson at gmail.com Thu Feb 16 22:07:04 2012 From: kennethjjgibson at gmail.com (killkenny64) Date: Thu, 16 Feb 2012 13:07:04 -0800 (PST) Subject: [Libav-user] Which video codecs support alpha? Message-ID: <1329426424909-4395450.post@n4.nabble.com> I'm trying to make a video that has transparency so that I can overlay it on another, but the original mp4v codec I was using doesn't support alpha channels. What format and container would be best to create a video with alpha? Would this format cause any problems when overlaying it? Is h264 the only one? Because I can't use that codec. -- View this message in context: http://libav-users.943685.n4.nabble.com/Which-video-codecs-support-alpha-tp4395450p4395450.html Sent from the libav-users mailing list archive at Nabble.com. From gstream at ccc2.com Fri Feb 17 00:30:13 2012 From: gstream at ccc2.com (gstream at ccc2.com) Date: Thu, 16 Feb 2012 15:30:13 -0800 Subject: [Libav-user] what is the -pix_fmt for AYUV? Message-ID: Hi All, I have listed my pix_fmts available on my encoder but can not work out what ones match the FOURCC codes used by other applications. Can someone advise what the rawvideo AYUV equivalent is for ffmpeg and how I work out what the others are in fourcc. -pix_fmts IO... yuv420p 3 12 IO... yuyv422 3 16 IO... rgb24 3 24 IO... bgr24 3 24 IO... yuv422p 3 16 IO... yuv444p 3 24 IO... yuv410p 3 9 IO... yuv411p 3 12 gstreamer i420 - GST_VIDEO_FORMAT_I420 yv12 - GST_VIDEO_FORMAT_YV12 yuy2 - GST_VIDEO_FORMAT_YUY2 uyvy - GST_VIDEO_FORMAT_UYVY ayuv - GST_VIDEO_FORMAT_AYUV For example on www.fourcc.org/yuv.php AYUV This is a 4:4:4 YUV format with 8 bit samples for each component along with an 8 bit alpha blend value per pixel. how do I find the matching pix_fmt? ultimately I am looking to save the output from ffmpeg to rawvideo and import it into GST without having to reconvert it to AYUV for internal processing. any thoughts or suggestions? many thx Art From mika_rajala_2 at hotmail.com Fri Feb 17 09:35:29 2012 From: mika_rajala_2 at hotmail.com (Mika Rajala) Date: Fri, 17 Feb 2012 08:35:29 +0000 Subject: [Libav-user] How do i clear filter buffers after avformat_seek_file Message-ID: Hi I'm using the yadif - filter to deinterlace my video. After i use the avformat_seek_file to seek the video, the filter sometimes provides incorrect frame data. How do i correctly flush/clear the buffersink / buffersrc after seeking the video? -mika -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hoelscher at codergrid.de Fri Feb 17 14:43:18 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Fri, 17 Feb 2012 14:43:18 +0100 Subject: [Libav-user] in the list of supported Encoder, i will only get the libx264rgb codec but not the libx264 Message-ID: when i give me the list of supported codecs from ffmpeg, i get the following definition for the x264 codec. in the past i didnt had that problem. EA libmp3lame libmp3lame MP3 (MPEG audio layer 3) EV libtheora libtheora Theora EA libvorbis libvorbis Vorbis DEV libvpx libvpx VP8 * V libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10* EV on libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB EV libxvid libxvidcore MPEG-4 part 2 EV ljpeg Lossless JPEG ./ffmpeg -codecs ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers built on Feb 16 2012 23:01:37 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4) configuration: --prefix=/build/workspace/ffmpeg/build_type/debug/label/linux/trunk/source/build/ffmpeg --extra-cflags=-I/build/workspace/ffmpeg/build_type/debug/label/linux/trunk/source/build/include --extra-ldflags=-L/build/workspace/ffmpeg/build_type/debug/label/linux/trunk/source/build/lib --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libvpx --disable-devices --extra-cflags=-fno-common --disable-stripping --disable-zlib --enable-gpl --enable-shared --disable-static libavutil 51. 39.100 / 51. 39.100 libavcodec 54. 2.100 / 54. 2.100 libavformat 54. 1.100 / 54. 1.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 62.100 / 2. 62.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From xeioexception at gmail.com Fri Feb 17 15:48:39 2012 From: xeioexception at gmail.com (Dmitry Volyntsev) Date: Fri, 17 Feb 2012 18:48:39 +0400 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO Message-ID: Hi All! I have a question related to demuxing of incoming rtp stream by means of libavformat. 1) My program has it own event loop (libevent) and I can't easily integrate libavformat routines to reading from udp and tcp sockets straightforwardly 2) I already wrote custom IO routines and RTSP protocol negotiator (communicates with other side and requests streaming from RTSP server to local udp ports) What I tried to do: ioBuffer_ = (unsigned char *)av_mallocz(_IO_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); ioContext_ = avio_alloc_context(ioBuffer_, _IO_BUFFER_SIZE, 0, ptr, my_read, NULL, NULL); formatCtx_ = avformat_alloc_context(); formatCtx_->flags |= AVFMT_FLAG_CUSTOM_IO | AVFMT_FLAG_NONBLOCK; formatCtx_->pb = ioContext_; res = avformat_open_input(&formatCtx_, "spf-avs", NULL, NULL); my_read() - reads incoming raw RTP stream packets Unfortunately constantly returns AVERROR(EAGAIN) I just want to feed raw RTP data to libavformat for demuxing purposes and just get the pure videodata back for further processing What should I do for to get it done? Thanks in advance! -- Be happy, Best regards, Dmitry Volyntsev -------------- next part -------------- An HTML attachment was scrubbed... URL: From pavel at sokolov.me Fri Feb 17 18:47:29 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Fri, 17 Feb 2012 21:47:29 +0400 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream Message-ID: <4F3E92B1.3030904@sokolov.me> Hi All! I have successfully remuxed AVI/MPEG2 to Elementary stream: av_read_frame(_ffmpeg_format_context, &_ffmpeg_packet); av_read_frame also returns Elementary stream, after this i get only video packets, write them to file and all works fine. But when I do av_read_frame at the MKV/H264 file and than save video stream to file than VLC reports: [mp3 @ 0x1964d80] Header missing [mp3 @ 0x1964d80] Header missing [mp3 @ 0x1964d80] Header missing ... May be I need to add some extra header to the packets? From alexcohn at netvision.net.il Fri Feb 17 20:14:39 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Fri, 17 Feb 2012 21:14:39 +0200 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: <4F3E92B1.3030904@sokolov.me> References: <4F3E92B1.3030904@sokolov.me> Message-ID: On Feb 17, 2012 7:48 PM, "Pavel Sokolov" wrote: > > Hi All! > > I have successfully remuxed AVI/MPEG2 to Elementary stream: > av_read_frame(_ffmpeg_format_context, &_ffmpeg_packet); > av_read_frame also returns Elementary stream, after this i get only video packets, write them to file and all works fine. > > But when I do av_read_frame at the MKV/H264 file and than save video stream to file than VLC reports: > [mp3 @ 0x1964d80] Header missing > [mp3 @ 0x1964d80] Header missing > [mp3 @ 0x1964d80] Header missing > ... > > May be I need to add some extra header to the packets? Elementary stream does not work for h264. With h264, we speak about a raw video in Appex B byte stream format, see http://wiki.multimedia.cx/index.php?title=H.264. Ffmpeg suppliers conversion to appex B without transcoding. BR Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdeshpande at mvista.com Fri Feb 17 09:02:31 2012 From: sdeshpande at mvista.com (Sunil Deshpande) Date: Fri, 17 Feb 2012 13:32:31 +0530 Subject: [Libav-user] How to tune the starting delay in streamed video playback in ffmpeg? In-Reply-To: References: Message-ID: > > Hi All, > > I am looking for the code in ffmpeg tool, in which I can tune the starting > delay time for the start of playback in streaming usecase. > > I want to know the below terminologies and do they help in reducing the > starting delay for the playback. > > 1) VideoQMin > 2) VideoQMax > 3) Preroll > > > Please forward the mail to concerned person if I am missing. > > Thanks and Regards, > Sunil Deshpande > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Fri Feb 17 21:00:11 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 17 Feb 2012 22:00:11 +0200 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: <4F3E92B1.3030904@sokolov.me> References: <4F3E92B1.3030904@sokolov.me> Message-ID: 2012/2/17 Pavel Sokolov : > May be I need to add some extra header to the packets? You can do it by duplicating AVCodecContext.extradata. avcodec_copy_context() can do that for you. -- Andrey Utkin From cehoyos at ag.or.at Fri Feb 17 23:32:36 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 17 Feb 2012 22:32:36 +0000 (UTC) Subject: [Libav-user] Which video codecs support alpha? References: <1329426424909-4395450.post@n4.nabble.com> Message-ID: killkenny64 writes: > What format and container would be best to create a video with alpha? I cannot answer this question, but the question in the subject: ffv1, qtrle, png, libopenjpeg and nearly all image formats. > Would this format cause any problems when overlaying it? > Is h264 the only one? I don't think h264 supports alpha (at least x264, the only encoder FFmpeg can use, does not support it). Carl Eugen From cehoyos at ag.or.at Fri Feb 17 23:37:37 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 17 Feb 2012 22:37:37 +0000 (UTC) Subject: [Libav-user] =?utf-8?q?what_is_the_-pix=5Ffmt_for_AYUV=3F?= References: Message-ID: writes: > I have listed my pix_fmts available on my encoder but can not work > out what ones match the FOURCC codes used by other applications. > Can someone advise what the rawvideo AYUV equivalent is for ffmpeg > and how I work out what the others are in fourcc. I tried to implement AYUV but found no sample and WMP did not play the files I encoded. Could you provide a sample? Carl Eugen From cehoyos at ag.or.at Fri Feb 17 23:58:34 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Fri, 17 Feb 2012 22:58:34 +0000 (UTC) Subject: [Libav-user] in the list of supported Encoder, i will only get the libx264rgb codec but not the libx264 References: Message-ID: jan h?lscher writes: > ? ?V ? ?libx264 Should be fixed, thank you. Carl Eugen From deron at pagestream.org Sun Feb 19 04:38:59 2012 From: deron at pagestream.org (Deron) Date: Sat, 18 Feb 2012 20:38:59 -0700 Subject: [Libav-user] need advice on new player Message-ID: <4F406ED3.5000700@pagestream.org> Hello, I've been using a decklink driver for mplayer to output video to the Blackmagic Decklink card but I've run into several problems which just don't seem to have an easy fix. In talking with the original developer of the decklink driver for mplayer, he agreed that the only reasonable recourse was to write a customer player based on libav directly. I've gone over his roughed out decklink player, I've looked at ffplay.c, and the tutorial at http://dranger.com/ffmpeg/ and I have a decent idea on what needs to be done on the decklink side but some items that mplayer took care of I am still unsure off. We are trying to work with all kinds of odd ball videos, and I have to accommodate either odd ball audio streams like != 48kHz, or two audio streams with mono samples instead of a single stereo stream, wrong sample size, or something that is too loud. Something like "-af resample=48000:0:2,channels=2,volume=-12,format=s16le" in mplayer would be used. What I'm not finding in ffplay is how to implement something similar. The other minor case is when dealing with SD or 1080i video that needs to be scaled and/or clipped. It appears that ffplay includes video filters support. Correct? Am I just missing the support for the audio filtergraphs? At this point I am comfortable with implementing the decklink output using either ffplay or dranger's source, but I'm not comfortable with changes needs on the libav interface end of things to support the audio filtering. I am sure I can just modify the buffered audio stream myself to implement the functionality I need, but if optimized functioning code already exists... I suppose the real question is, and no one but myself might be able to answer it but here goes, what would be the best place to base this on? It seems that modifying ffplay would be best? Just looking for some inspiration, thanks! Deron From kalileo at universalx.net Sun Feb 19 06:03:59 2012 From: kalileo at universalx.net (Kalileo) Date: Sun, 19 Feb 2012 12:03:59 +0700 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: References: <4F3E92B1.3030904@sokolov.me> Message-ID: <75B39957-CF22-456C-92FC-64DE96CABCE3@universalx.net> On Feb 18, 2012, at 03:00 , Andrey Utkin wrote: > 2012/2/17 Pavel Sokolov : >> May be I need to add some extra header to the packets? > > You can do it by duplicating AVCodecContext.extradata. > avcodec_copy_context() can do that for you. When I read from a file (video.ts) in mpegts format, avcodec_copy_context() does not help me, because there is no extradata in the "in"-AVCodecContext.extradata. How can i manually fill extradata with the correct values in such a case? Which format must the data be in extradata? From nicolas.george at normalesup.org Sun Feb 19 09:32:23 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Sun, 19 Feb 2012 09:32:23 +0100 Subject: [Libav-user] need advice on new player In-Reply-To: <4F406ED3.5000700@pagestream.org> References: <4F406ED3.5000700@pagestream.org> Message-ID: <20120219083223.GA18944@phare.normalesup.org> Le decadi 30 pluvi?se, an CCXX, Deron a ?crit?: > We are trying to work with all kinds of odd ball videos, and I have > to accommodate either odd ball audio streams like != 48kHz, or two > audio streams with mono samples instead of a single stereo stream, > wrong sample size, or something that is too loud. Something like > "-af resample=48000:0:2,channels=2,volume=-12,format=s16le" in > mplayer would be used. What I'm not finding in ffplay is how to > implement something similar. > > The other minor case is when dealing with SD or 1080i video that > needs to be scaled and/or clipped. It appears that ffplay includes > video filters support. Correct? Am I just missing the support for > the audio filtergraphs? The FFmpeg system includes audio filtering, and a lot of filters that can do what you require. The catch is that audio filtering is not implemented in the command line tools: ffmpeg and ffplay. But it is still usable in a roundabout way, using the lavfi pseudo-device: ffmpeg -f lavfi -i 'amovie=file.ogg, ...' instead of: ffmpeg -i file.ogg -af ... > I suppose the real question is, and no one but myself might be able > to answer it but here goes, what would be the best place to base > this on? It seems that modifying ffplay would be best? I suggest adding it in libavdevice. Ideally, MPlayer and ffmpeg should be made to be able to use libavdevice for audio and video output. Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From pavel at sokolov.me Sun Feb 19 10:22:42 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Sun, 19 Feb 2012 13:22:42 +0400 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: References: <4F3E92B1.3030904@sokolov.me> Message-ID: <4F40BF62.7080303@sokolov.me> 17.02.2012 23:14, Alex Cohn ?????: > > Elementary stream does not work for h264. With h264, we speak about a > raw video in Appex B byte stream format, see > http://wiki.multimedia.cx/index.php?title=H.264. > > Ffmpeg suppliers conversion to appex B without transcoding. > My hardware decoder on the embeded device can play MPEG2 PES (packetized elementary stream). Finally I need to remux H.264 to MPEG2 PES I manually adding PES header to data returned by "av_read_frame". I'm using function "mpegts_write_pes" from libavformat/mpegtsenc.c This works fine for MPEG2 video. Is there some way to remux H264 to PES? From alexcohn at netvision.net.il Sun Feb 19 12:35:41 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Sun, 19 Feb 2012 13:35:41 +0200 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: <4F40BF62.7080303@sokolov.me> References: <4F3E92B1.3030904@sokolov.me> <4F40BF62.7080303@sokolov.me> Message-ID: On Sun, Feb 19, 2012 at 11:22, Pavel Sokolov wrote: > > 17.02.2012 23:14, Alex Cohn ?????: >> >> >> Elementary stream does not work for h264. With h264, we speak about a raw >> video in Appex B byte stream format, see >> http://wiki.multimedia.cx/index.php?title=H.264. >> >> Ffmpeg suppliers conversion to appex B without transcoding. >> > My hardware decoder on the embeded device can play MPEG2 PES (packetized > elementary stream). > Finally I need to remux H.264 to MPEG2 PES > > I manually adding PES header to data returned by "av_read_frame". > I'm using function "mpegts_write_pes" from libavformat/mpegtsenc.c > This works fine for MPEG2 video. > > Is there some way to remux H264 to PES? Please have a look at mpegts_write_packet() public function in the same c file. You notice that it accepts h264 packets in annex B format only: libavformat/mpegtsenc.c(977): if (st->codec->codec_id == CODEC_ID_H264) { const uint8_t *p = buf, *buf_end = p+size; uint32_t state = -1; if (pkt->size < 5 || AV_RB32(pkt->data) != 0x0000001) { av_log(s, AV_LOG_ERROR, "h264 bitstream malformated, " "no startcode found, use -vbsf h264_mp4toannexb\n"); return -1; } ... ?????, Alex Cohn From jan.hoelscher at codergrid.de Sun Feb 19 14:12:09 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Sun, 19 Feb 2012 14:12:09 +0100 Subject: [Libav-user] in the list of supported Encoder, i will only get the libx264rgb codec but not the libx264 In-Reply-To: References: Message-ID: Hi, but now when i try to get the codecs with the following code, i did not get both libx264 codecs anymore AVCodec *p = NULL; int a = 0; while ((p = av_codec_next(p))) { if (p->encode ) { JSONNode cnode(JSON_NODE); cnode.push_back(JSONNode("longname", p->long_name)); cnode.push_back(JSONNode("id", p->name)); cnode.push_back(JSONNode("type", p->type)); c.push_back(cnode); } } under pastebin is the resulting list of codecs. http://pastebin.com/kbUMyK4i ./ffmpeg ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers built on Feb 19 2012 01:12:38 with gcc 4.0.1 (Apple Inc. build 5490) configuration: --prefix=/private/tmp/workspace/ffmpeg/build_type/debug/label/mac/trunk/source/build/ffmpeg --extra-cflags=-I/private/tmp/workspace/ffmpeg/build_type/debug/label/mac/trunk/source/build/include --extra-ldflags=-L/private/tmp/workspace/ffmpeg/build_type/debug/label/mac/trunk/source/build/lib --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libvpx --disable-devices --extra-cflags=-fno-common --disable-stripping --disable-zlib --enable-gpl --enable-shared --disable-static libavutil 51. 39.100 / 51. 39.100 libavcodec 54. 3.100 / 54. 3.100 libavformat 54. 1.100 / 54. 1.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 62.101 / 2. 62.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 libpostproc 52. 0.100 / 52. 0.100 2012/2/17 Carl Eugen Hoyos > jan h?lscher writes: > > > V libx264 > > Should be fixed, thank you. > > Carl Eugen > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From deron at pagestream.org Sun Feb 19 19:57:47 2012 From: deron at pagestream.org (Deron) Date: Sun, 19 Feb 2012 11:57:47 -0700 Subject: [Libav-user] need advice on new player In-Reply-To: <20120219083223.GA18944@phare.normalesup.org> References: <4F406ED3.5000700@pagestream.org> <20120219083223.GA18944@phare.normalesup.org> Message-ID: <4F41462B.9010006@pagestream.org> On 2/19/12 1:32 AM, Nicolas George wrote: > Le decadi 30 pluvi?se, an CCXX, Deron a ?crit : >> We are trying to work with all kinds of odd ball videos, and I have >> to accommodate either odd ball audio streams like != 48kHz, or two >> audio streams with mono samples instead of a single stereo stream, >> wrong sample size, or something that is too loud. Something like >> "-af resample=48000:0:2,channels=2,volume=-12,format=s16le" in >> mplayer would be used. What I'm not finding in ffplay is how to >> implement something similar. >> >> The other minor case is when dealing with SD or 1080i video that >> needs to be scaled and/or clipped. It appears that ffplay includes >> video filters support. Correct? Am I just missing the support for >> the audio filtergraphs? > The FFmpeg system includes audio filtering, and a lot of filters that can do > what you require. The catch is that audio filtering is not implemented in > the command line tools: ffmpeg and ffplay. But it is still usable in a > roundabout way, using the lavfi pseudo-device: > > ffmpeg -f lavfi -i 'amovie=file.ogg, ...' > > instead of: > > ffmpeg -i file.ogg -af ... So, I presume then that avformat_open_input (or?) does the interpreting in the background and amends the stream list etc so that packet info is basically the output from the filtergraph? How would I implement that in some other app? Pass "lavfi" to avformat_open_input as the input format? > >> I suppose the real question is, and no one but myself might be able >> to answer it but here goes, what would be the best place to base >> this on? It seems that modifying ffplay would be best? > I suggest adding it in libavdevice. Well, I never knew that the devices included support for _output_. Thought it was input only. Looking at the existing devices, I only see 4 output devices (alsa, sdl, oss, and sndio). None of those work like the decklink (well, SDL can be the keeper of time as demonstrated in ffplay but the libavdevice simply draws every time it gets an image). Since timing was the biggest mplayer problem, I am not at all confident that this can be made to work. I'm willing to try, if you can confirm that this is not an issue. As I understand it, the device will need to create 2 queues (one for video, one for audio), with timing, and then simply not return(block) when a highwater mark is reached in the queues to stop ffmpeg from further decoding until the decklink catches up. Any examples of this in action as a libavdevice? Or more complex (output) libavdevices? > Ideally, MPlayer and ffmpeg should be made to be able to use libavdevice for > audio and video output. Are you saying that ffmpeg does not current support libavdevice for audio/video output? Or that the ideal way is to add a decklink libavdevice so that mplayer/ffmpeg supports decklink "automatically"? > Regards, > The other concern is that the way the decklink library is written, the decklink libavdevice will need to be c++. Does that pose a problem for the maintainers? The main incentive to me to do it as a libavdevice would be to get it included in the project (obviously as a conditional build), but if there is a flat refusal to allow it because it is c++ I'd like to know that now. Thanks, Deron From cehoyos at ag.or.at Sun Feb 19 20:34:21 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 19 Feb 2012 19:34:21 +0000 (UTC) Subject: [Libav-user] need advice on new player References: <4F406ED3.5000700@pagestream.org> <20120219083223.GA18944@phare.normalesup.org> <4F41462B.9010006@pagestream.org> Message-ID: Deron writes: > The other concern is that the way the decklink library is written, the > decklink libavdevice will need to be c++. Does that pose a problem for > the maintainers? The main incentive to me to do it as a libavdevice > would be to get it included in the project (obviously as a conditional > build), but if there is a flat refusal to allow it because it is c++ I'd > like to know that now. This used to be true in the past, but there are (optional) parts of FFmpeg now that require C++. Carl Eugen From cehoyos at ag.or.at Sun Feb 19 20:29:58 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Sun, 19 Feb 2012 19:29:58 +0000 (UTC) Subject: [Libav-user] in the list of supported Encoder, i will only get the libx264rgb codec but not the libx264 References: Message-ID: jan h?lscher writes: > ? ? AVCodec *p = NULL; > ? ? int a = 0; > ? ? while ((p = av_codec_next(p))) { > ? ? ? if (p->encode ) { There is an additional API now that defines p->encode2() instead. Please do not top post here, Carl Eugen From pavel at sokolov.me Sun Feb 19 22:26:34 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Mon, 20 Feb 2012 01:26:34 +0400 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: References: <4F3E92B1.3030904@sokolov.me> <4F40BF62.7080303@sokolov.me> Message-ID: <4F41690A.8090501@sokolov.me> 19.02.2012 15:35, Alex Cohn ?????: > Please have a look at mpegts_write_packet() public function in the > same c file. You notice that it accepts h264 packets in annex B format > only: Alex, thank you, now all works fine with the two steps: 1. Adding 'h264_mp4toannexb' bitstream filter processing after each call of the av_read_frame 2. Adding the next code from mpegtsenc.c after bitstream filter: do { p = avpriv_mpv_find_start_code(p, buf_end, &state); //av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f); } while (p < buf_end && (state & 0x1f) != 9 && (state & 0x1f) != 5 && (state & 0x1f) != 1); if ((state & 0x1f) != 9) { // AUD NAL data = av_malloc(pkt->size+6); if (!data) return -1; memcpy(data+6, pkt->data, pkt->size); AV_WB32(data, 0x00000001); data[4] = 0x09; data[5] = 0xf0; // any slice type (0xe) + rbsp stop one bit buf = data; size = pkt->size+6; } -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From alexcohn at netvision.net.il Sun Feb 19 23:02:04 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Mon, 20 Feb 2012 00:02:04 +0200 Subject: [Libav-user] remuxing MKV/H.264 to MPEG2 Elemntary Stream In-Reply-To: <4F41690A.8090501@sokolov.me> References: <4F3E92B1.3030904@sokolov.me> <4F40BF62.7080303@sokolov.me> <4F41690A.8090501@sokolov.me> Message-ID: On Feb 19, 2012 11:27 PM, "Pavel Sokolov" wrote: > > 19.02.2012 15:35, Alex Cohn ?????: > >> Please have a look at mpegts_write_packet() public function in the >> same c file. You notice that it accepts h264 packets in annex B format >> only: > > Alex, thank you, now all works fine with the two steps: > > 1. Adding 'h264_mp4toannexb' bitstream filter processing after each call of the av_read_frame > 2. Adding the next code from mpegtsenc.c after bitstream filter: > > do { > p = avpriv_mpv_find_start_code(p, buf_end, &state); > //av_log(s, AV_LOG_INFO, "nal %d\n", state & 0x1f); > } while (p < buf_end && (state & 0x1f) != 9 && > (state & 0x1f) != 5 && (state & 0x1f) != 1); > > if ((state & 0x1f) != 9) { // AUD NAL > data = av_malloc(pkt->size+6); > if (!data) > return -1; > memcpy(data+6, pkt->data, pkt->size); > AV_WB32(data, 0x00000001); > data[4] = 0x09; > data[5] = 0xf0; // any slice type (0xe) + rbsp stop one bit > buf = data; > size = pkt->size+6; > } > > > > -- > > With best regards, Pavel A. Sokolov > mobile: +7(921)419-1819 > skype: pavel_a_sokolov ???! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.george at normalesup.org Mon Feb 20 00:05:52 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Mon, 20 Feb 2012 00:05:52 +0100 Subject: [Libav-user] need advice on new player In-Reply-To: <4F41462B.9010006@pagestream.org> References: <4F406ED3.5000700@pagestream.org> <20120219083223.GA18944@phare.normalesup.org> <4F41462B.9010006@pagestream.org> Message-ID: <20120219230552.GB1817@phare.normalesup.org> Le primidi 1er vent?se, an CCXX, Deron a ?crit?: > So, I presume then that avformat_open_input (or?) does the interpreting > in the background and amends the stream list etc so that packet info is > basically the output from the filtergraph? How would I implement that in > some other app? Pass "lavfi" to avformat_open_input as the input format? Exactly, and the filtergraph as the file name. But if you write your own application, you can also use audio filters directly. > Looking at the existing devices, I only see 4 output devices (alsa, sdl, > oss, and sndio). None of those work like the decklink (well, SDL can be > the keeper of time as demonstrated in ffplay but the libavdevice simply > draws every time it gets an image). Since timing was the biggest mplayer > problem, I am not at all confident that this can be made to work. > > I'm willing to try, if you can confirm that this is not an issue. As I > understand it, the device will need to create 2 queues (one for video, > one for audio), with timing, and then simply not return(block) when a > highwater mark is reached in the queues to stop ffmpeg from further > decoding until the decklink catches up. Any examples of this in action > as a libavdevice? Or more complex (output) libavdevices? I do not know how the decklink card work at all, I can only make some educated guesses. An output device in lavd looks almost exactly like a muxer: your can try to create various streams in it (but usually, it will cause an error if they are not the expected number and type; but the same would happen if you try to mux video in WAV), and then mux packets. The device will usually want their streams to be in raw video or PCM, but there is no constraint. As for timing, there are various solutions: The audio devices usually write continuously to the sound card, either blocking or returning EAGAIN (depending on whether nonblocking mode has been activated) when the driver's buffer is full. There is an API to get accurate and allow to sync with other events: av_get_output_timestamp; currently, only ALSA implements it. The SDL driver is assumed to be instantaneous: whatever you write_frame() to it is considered to be immediately displayed on the screen. Delaying and syncing is left to the application. For that reason, if you use ffmpeg -i ... -f sdl -, the video will play as fast as your CPU allows, completely disregarding the normal speed. You can get slightly better results with -re, but that is only an approximate. If you wanted to write an application using avdevice both for audio and video output, I guess you would assume the video output is instantaneous, feed the audio continuously to the audio device, keep a queue of the decoded video frames and send them to the video device when av_get_output_timestamp on the audio devices goes beyond their PTS. If the decklink card can handle both audio and video, I guess you would need to write an avdevice muxer that is able to accept both a video and an audio stream and internally ensure the sync, either blocking or returning EAGAIN. And if the video output has a delay too... then the problem is not easy. > >Ideally, MPlayer and ffmpeg should be made to be able to use libavdevice for > >audio and video output. > Are you saying that ffmpeg does not current support libavdevice for > audio/video output? Or that the ideal way is to add a decklink > libavdevice so that mplayer/ffmpeg supports decklink "automatically"? I was saying that someone ought to write the code in mplayer to allow something like that: mplayer -vo lavd:device=sdl -ao lavd:device=alsa That way, anything added to libavdevice would automatically be available in mplayer for no additional cost. I may give it a shot sometime, but my TODO list is quite full right now. Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From deron at pagestream.org Mon Feb 20 01:16:21 2012 From: deron at pagestream.org (Deron) Date: Sun, 19 Feb 2012 17:16:21 -0700 Subject: [Libav-user] need advice on new player In-Reply-To: <20120219230552.GB1817@phare.normalesup.org> References: <4F406ED3.5000700@pagestream.org> <20120219083223.GA18944@phare.normalesup.org> <4F41462B.9010006@pagestream.org> <20120219230552.GB1817@phare.normalesup.org> Message-ID: <4F4190D5.5040309@pagestream.org> Thanks for you input. This is giving me a better sense of direction. On 2/19/12 4:05 PM, Nicolas George wrote: > Le primidi 1er vent?se, an CCXX, Deron a ?crit : >> So, I presume then that avformat_open_input (or?) does the interpreting >> in the background and amends the stream list etc so that packet info is >> basically the output from the filtergraph? How would I implement that in >> some other app? Pass "lavfi" to avformat_open_input as the input format? > Exactly, and the filtergraph as the file name. But if you write your own > application, you can also use audio filters directly. Ok, let me understand this part first before I dive into a libavdevice. If I want to reduce the volume by 10db, what would be the command line be in ffmpeg (using libavi of course)? ffmpeg -f libavi -i "amovie=movie.avi, volume=-10db" ?? How would I reproduce that with the audio filters directly? Any example out there? I think it will take me much time to get a libavdevice working from the sounds of it, but I'm willing to try. Deron From amir.rouhi at rmit.edu.au Mon Feb 20 08:21:57 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Mon, 20 Feb 2012 18:21:57 +1100 Subject: [Libav-user] Need your advice in video format conversion by ffmpeg Message-ID: I want to know that the below command convert the input .mpg format video to a pure h264 (MPEG4/AVC) with non-static I-Frame rate? ffmpeg -i D:\test\1.mpg -vcodec libx264 -g 0 d:\Test\1new.mp4 as can be seen i used -vcodec libx264 for h264 format and -g 0 for non static I-Frame rate. is that correct? Amir -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.george at normalesup.org Mon Feb 20 08:28:58 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Mon, 20 Feb 2012 08:28:58 +0100 Subject: [Libav-user] need advice on new player In-Reply-To: <4F4190D5.5040309@pagestream.org> References: <4F406ED3.5000700@pagestream.org> <20120219083223.GA18944@phare.normalesup.org> <4F41462B.9010006@pagestream.org> <20120219230552.GB1817@phare.normalesup.org> <4F4190D5.5040309@pagestream.org> Message-ID: <20120220072858.GA20059@phare.normalesup.org> Le primidi 1er vent?se, an CCXX, Deron a ?crit?: > If I want to reduce the volume by 10db, what would be the command line > be in ffmpeg (using libavi of course)? > ffmpeg -f libavi -i "amovie=movie.avi, volume=-10db" > ?? Yes. > How would I reproduce that with the audio filters directly? Any example > out there? With the ffmpeg command line tool, you can not, not yet. With the library API, see examples/filtering.c: it is about video, but audio works the same way, just use abuffer instead of buffer, etc. Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From peter at thefoundry.co.uk Mon Feb 20 17:37:16 2012 From: peter at thefoundry.co.uk (Peter Pearson) Date: Mon, 20 Feb 2012 16:37:16 +0000 Subject: [Libav-user] Question regarding old deprecated functions Message-ID: <4F4276BC.4040109@thefoundry.co.uk> Hi, I've recently upgraded some code to the latest ffmpeg from git, previously the ffmpeg being used was from 4 years ago. I'm having issues with two things specifically: 1. av_interleaved_write_frame() I can't find any recent examples of using this - the existing code I had with the 4 year old ffmpeg builds (with changes to things like AVFormatContext* and other minor things), but generally crashes when running it - usually in utils.c/compute_pkt_fields2() with invalid timebase values. I've found a couple of examples of using it online, but they all use av_set_parameters() with comments mentioning it's needed: 2. av_set_parameters() used to be deprecated, but now it seems to have disappeared completely - is it still the case that this function (or its replacement) is required? If so, what should I use now? Has anyone got any ideas or examples to point me in the right direction? Thanks, Peter Pearson From andrey.krieger.utkin at gmail.com Mon Feb 20 17:58:08 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 20 Feb 2012 18:58:08 +0200 Subject: [Libav-user] Question regarding old deprecated functions In-Reply-To: <4F4276BC.4040109@thefoundry.co.uk> References: <4F4276BC.4040109@thefoundry.co.uk> Message-ID: 2012/2/20 Peter Pearson : > Has anyone got any ideas or examples to point me in the right direction? Present here (probably using pastebin) minimalized working source code of your app that represents your problem, and its debug output that explains what exactly happens. If crash takes place - give full backtrace. For meaningful backtrace, build everything with debug options. -- Andrey Utkin From barhom at gmail.com Mon Feb 20 21:44:00 2012 From: barhom at gmail.com (Ibrahim Tachijian) Date: Mon, 20 Feb 2012 21:44:00 +0100 Subject: [Libav-user] HIRE: Looking for a developer for some MPEG2-ts -> H264 application [linux][C][C++] Message-ID: Hello! I'm looking for a developer that is available for hire that has good knowledge of transcoding video, mainly from mpeg2-ts to h264-ts. Im wishing to build some "dynamic" transcoder that would serve the transcoded video+audio as a HTTP stream. What I mean with dynamic is that whilst there are users watching the stream, then transcode, when last one quits then stop transcoding and free up CPU power. I can see this project using libcurl (for fetching HTTP mpeg2-ts), transcode with libavcodec (h264) and then serve the stream with libmicrohttpd. The application is to be run on Linux (64bit) only and be written in C/C++ Regards, Ibrahim Tachijian From Ajita-Pandey at hcl.com Tue Feb 21 09:09:05 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Tue, 21 Feb 2012 13:39:05 +0530 Subject: [Libav-user] Need Help!!!!!!!!!!!!!!!!!! Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BBAF13AB66E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi all, I am getting stuck while decoding the MP3 audio files. Acttually I want to do this via my hardware decoder then try to return back to the ffmpeg code in AVFrame format . For this I have seen the software decoding part of MP3 decoder but any how I am able to understand what type of output MP3 decoder generated Is this any PCM format?? My hardware decoder will give me the pcm samples. So how can I map it with existing sequence of FFmpeg code. Act. I just want to decode the audio stream via my audio hardware decoder.and rest part will be done by ffmpeg. Is this possible. Regards, Techno2007 ________________________________ ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Tue Feb 21 10:08:22 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Tue, 21 Feb 2012 14:38:22 +0530 Subject: [Libav-user] Need Help!!!!!!!!!!!!!!!!!! In-Reply-To: <45F3FDEC759D21468F1F910D2B1CC43BBAF13AB66E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> References: <45F3FDEC759D21468F1F910D2B1CC43BBAF13AB66E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: Hi Decoding output is generally 32bit float or you can PCM float output. Why do you mean by mapping the data?? I dont think you will be bale to map up the bytes of of both decoder. Also, once you have decoded the content, what you want to do with the ffmpeg using that decoded data? You want to re-encode it or some other operation you want to perform on the same> Regads Nitin Alcatel Lucent Bell Labs On Tue, Feb 21, 2012 at 1:39 PM, Ajita Pandey wrote: > ** > > Acttually I want to do this via my hardware decoder then try to return > back to the ffmpeg code in AVFrame format .**** > > For this I have seen the software decoding part of MP3 decoder but any how > I am able to understand what type of output MP3 decoder generated **** > > Is this any PCM format?? My hardware decoder will give me the pcm samples. > So how can I map it with existing sequence of FFmpeg code.**** > > ** ** > > ** ** > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ajita-Pandey at hcl.com Tue Feb 21 10:32:31 2012 From: Ajita-Pandey at hcl.com (Ajita Pandey) Date: Tue, 21 Feb 2012 15:02:31 +0530 Subject: [Libav-user] Need Help!!!!!!!!!!!!!!!!!! In-Reply-To: References: <45F3FDEC759D21468F1F910D2B1CC43BBAF13AB66E@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Message-ID: <45F3FDEC759D21468F1F910D2B1CC43BBAF13AB726@NDA-HCLT-EVS04.HCLT.CORP.HCL.IN> Hi, Decoding output ie being done by my hardware is 16 bit signed little endian PCM audio data . My scenario is that I want to just decode/encoded functionality with my hardware and rest functionality be done by ffmpeg. So I just to make it as a external library. So for example I have one mp3 audio file then when ffmpeg called decoded_frame function of this decoder . I can call my hardware decoder API's and after that decoded data will return back to Ffmpeg for further processing. I can decoded it successfully (I have checked with dump data). But not able to map it with further processing. Just want to know that if someone face similar issue. What I need to do for this scenario. Regards, Ajita From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org] On Behalf Of NITIN GOYAL Sent: Tuesday, February 21, 2012 2:38 PM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: Re: [Libav-user] Need Help!!!!!!!!!!!!!!!!!! Hi Decoding output is generally 32bit float or you can PCM float output. Why do you mean by mapping the data?? I dont think you will be bale to map up the bytes of of both decoder. Also, once you have decoded the content, what you want to do with the ffmpeg using that decoded data? You want to re-encode it or some other operation you want to perform on the same> Regads Nitin Alcatel Lucent Bell Labs On Tue, Feb 21, 2012 at 1:39 PM, Ajita Pandey > wrote: Acttually I want to do this via my hardware decoder then try to return back to the ffmpeg code in AVFrame format . For this I have seen the software decoding part of MP3 decoder but any how I am able to understand what type of output MP3 decoder generated Is this any PCM format?? My hardware decoder will give me the pcm samples. So how can I map it with existing sequence of FFmpeg code. ________________________________ ::DISCLAIMER:: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.hoelscher at codergrid.de Tue Feb 21 11:17:17 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Tue, 21 Feb 2012 11:17:17 +0100 Subject: [Libav-user] HIRE: Looking for a developer for some MPEG2-ts -> H264 application [linux][C][C++] In-Reply-To: References: Message-ID: 2012/2/20 Ibrahim Tachijian > Hello! > > I'm looking for a developer that is available for hire that has good > knowledge of transcoding video, mainly from mpeg2-ts to h264-ts. Im > wishing to build some "dynamic" transcoder that would serve the > transcoded video+audio as a HTTP stream. > > What I mean with dynamic is that whilst there are users watching the > stream, then transcode, when last one quits then stop transcoding and > free up CPU power. > I can see this project using libcurl (for fetching HTTP mpeg2-ts), > transcode with libavcodec (h264) and then serve the stream with > libmicrohttpd. > > The application is to be run on Linux (64bit) only and be written in C/C++ > > Regards, > Ibrahim Tachijian > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > Hi Ibrahim, likely for this scenario, when you want to encode h264 high quality in real time then you need some kind of Encoding Cluster that support transcoding pipes. This should simply done with Media Encoding Cluster. This Project is written in C/C++ and is Platform independ. The current Version of Media Encoding Cluster is very outdated but in the next few days i will made a new Release with an extended Flow Builder Interface. I would like to implement this for you into the Media Encoding Cluster. I'm glad to hear from you. -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzeesea at gmail.com Tue Feb 21 22:24:09 2012 From: dzeesea at gmail.com (Patrick Zielinski) Date: Tue, 21 Feb 2012 16:24:09 -0500 Subject: [Libav-user] Decoding specific formats? Message-ID: Hello all, I have integrated decoding with libavformat and libavcodec a basic decoder. It works for H264 encoded video's and also I converted one into avi, it also works. But for some reason when I try other formats like .mkv I receive this error: [h264 @ 05f32a80] no frame! I've encoded the mkv's with x264 so I'm having a hard time understand how it cannot find a frame, it occurs when I call avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet); What kind of details am I missing, because the different structs seem to have correct data. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Wed Feb 22 10:38:44 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 22 Feb 2012 11:38:44 +0200 Subject: [Libav-user] Decoding specific formats? In-Reply-To: References: Message-ID: 2012/2/21 Patrick Zielinski : > [h264 @ 05f32a80] no frame! > > I've encoded ?the mkv's with x264 so I'm having a hard time understand how > it cannot find a frame, it occurs when I call > > avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet); > > > What kind of details am I missing, because the different structs seem to > have correct data. Try ignoring such situation, and decode further. -- Andrey Utkin From nitinkumgoyal at gmail.com Wed Feb 22 13:41:01 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Wed, 22 Feb 2012 18:11:01 +0530 Subject: [Libav-user] get_buffer() failed error in avcodec_decode_audio4() function Message-ID: Hi I have upgraded my ffmpeg version to the latest commit and Now i can see that the audio decoding funciton *avcodec_decode_audio3* has been deprecated and when i use the new function*avcodec_decode_audio4*, as per the changes required in it, I get the error as *[amrnb @ 003a5000] get_buffer() failed.* I am not able to find what causes this error. Anyone has a sample example of usng this new function: *avcodec_decode_audio4((AVCodecContext *avctx, AVFrame *frame,int *got_frame_ptr, AVPacket *avpkt);* Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzeesea at gmail.com Wed Feb 22 15:16:23 2012 From: dzeesea at gmail.com (Patrick Zielinski) Date: Wed, 22 Feb 2012 09:16:23 -0500 Subject: [Libav-user] Decoding specific formats? In-Reply-To: References: Message-ID: When I decode the display renders big gray rectangles that fill the screen, it keeps reading and alerting "No frame" until eventually it just stops decoding, probably because it has nothing to decode anymore. On Wed, Feb 22, 2012 at 4:38 AM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/21 Patrick Zielinski : > > [h264 @ 05f32a80] no frame! > > > > I've encoded the mkv's with x264 so I'm having a hard time understand > how > > it cannot find a frame, it occurs when I call > > > > avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet); > > > > > > What kind of details am I missing, because the different structs seem to > > have correct data. > > Try ignoring such situation, and decode further. > > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Wed Feb 22 16:58:48 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Wed, 22 Feb 2012 21:28:48 +0530 Subject: [Libav-user] get_buffer() failed error in avcodec_decode_audio4() function In-Reply-To: References: Message-ID: To follow up. I have used the same example as stated on the following link just copy pasting with the input file and outfile names and it also generates the same error as *get_buffer() failed:* https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decoding_encoding.c Do anybody have any idea about this error? Regards Nitin On Wed, Feb 22, 2012 at 6:11 PM, NITIN GOYAL wrote: > Hi > > I have upgraded my ffmpeg version to the latest commit and Now i can see > that the audio decoding funciton *avcodec_decode_audio3* has been > deprecated and when i use the new function*avcodec_decode_audio4*, as per > the changes required in it, I get the error as > > *[amrnb @ 003a5000] get_buffer() failed.* > > I am not able to find what causes this error. Anyone has a sample example > of usng this new function: > > *avcodec_decode_audio4((AVCodecContext *avctx, AVFrame *frame,int > *got_frame_ptr, AVPacket *avpkt);* > > Nitin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexcohn at netvision.net.il Wed Feb 22 17:22:37 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 22 Feb 2012 18:22:37 +0200 Subject: [Libav-user] Decoding specific formats? In-Reply-To: References: Message-ID: On Tue, Feb 21, 2012 at 23:24, Patrick Zielinski wrote: > Hello all, I have integrated decoding with libavformat and libavcodec a > basic decoder. It works for H264 encoded video's and also I converted one > into avi, it also works. > > But for some reason when I try other formats like .mkv I receive this > error: > > [h264 @ 05f32a80] no frame! > > I've encoded ?the mkv's with x264 so I'm having a hard time understand how > it cannot find a frame, it occurs when I call > > avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet); > > > What kind of details am I missing, because the different structs seem to > have correct data. You probably have metadata missing, e.g. SPS/PPS, if MKV container keeps this information not with the frames that you push into avcodec_decode_video2(). Please make sure that your mkv can be played by command-line ffmpeg. If this simple test succeeds, please make your initialization code available (e.g. via pastebin). BR, Alex From z4zeeshan at gmail.com Wed Feb 22 12:18:53 2012 From: z4zeeshan at gmail.com (Zeeshan Mahmood) Date: Wed, 22 Feb 2012 16:18:53 +0500 Subject: [Libav-user] Help Required - FFmpeg usage in own product Message-ID: Hi , Can you quickly tell me is there any problem if I use FFmpeg executable file (without modifying and providing source code) in my own software, which will NOT be available as FREE for its customers? Please help with legal issues, before I get into it. -- Best Regards, *Zeeshan* -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjamingamisch at alice.de Wed Feb 22 16:53:19 2012 From: benjamingamisch at alice.de (Benjamin Gamisch) Date: Wed, 22 Feb 2012 16:53:19 +0100 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) Message-ID: <4F450F6F.9010806@alice.de> Dear FFMPEG-Team, a few days ago, I started a YouTube downloader project which can be used to download & convert videos to mp3. The download part is completely finished, but the convert part is not. I would really like to use FFMPEG for this part. I created two screenshots how I imagined to use it (see appendix), but I am not sure whether I am allowed to do so. As you can see in the screenshots, ffmpeg.org is displayed when the cursor is over the checkbox, but the program itself is hidden (because a console could make people think that a virus is executed or an error occured, etc.) I would appreciate an answer whether I am allowed to use the FFMPEG.exe file or not. Yours sincerely B. Gamisch -------------- next part -------------- A non-text attachment was scrubbed... Name: Interface with information about FFMPEG.png Type: image/png Size: 39684 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Project as it is given to other people.png Type: image/png Size: 115143 bytes Desc: not available URL: From 83670 at studenti.unimore.it Wed Feb 22 18:59:53 2012 From: 83670 at studenti.unimore.it (ALESSANDRO PAGANELLI) Date: Wed, 22 Feb 2012 18:59:53 +0100 Subject: [Libav-user] Muxing settings for h264 + mp4 Message-ID: Hi all, my name is Alessandro Paganelli and I'm a PhD student in ICT at University of Modena and Reggio Emilia (Italy). I'm working on a project (which uses Libav/Ffmpeg) in which I have to transmit an h264 encoded file (with Mp4 file format) over a simulated network (I'm using network simulator 3 for this), to "emulate" a real video streaming. Now, I'm facing the problem regarding how to "rebuild" the transmitted file at the receiver side. More in details, this issue regards the settings needed to replicate the configurations for AVFormatContext, AVStream and AVCodecContext, starting from the same structures I have at the transmitter. As for now, I just copied the content of the sender's AVCodecContext structure to the receiver's one, but the resulting file is broken. I suspect that other settings have to be replicated too, but it's not clear which ones are those required by h264 and Mp4. Is there any document/tutorial about the required settings for each specific codec or format? More in general, do you have suggestions about how to approach this problem for a generic combination of codec and format? I planned to implement different possible combinations of them, so it would be great if there is a "smart" way to copy these contexts without doing it "by hand" :) . Thanks in advance, best regards. Alessandro -- ______________________________________________ Ing. Alessandro Paganelli, Ph. D. Student, 25th Cycle Department of Information Engineering University of Modena and Reggio Emilia via Vignolese 905, 41125 Modena (MO), ITALY E-mail: alessandro.paganelli at unimore.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From dzeesea at gmail.com Thu Feb 23 01:16:38 2012 From: dzeesea at gmail.com (Patrick Zielinski) Date: Wed, 22 Feb 2012 19:16:38 -0500 Subject: [Libav-user] Decoding specific formats? In-Reply-To: References: Message-ID: Ok, firstly please bare with me, up until two weeks ago I didn't even know what codec were and how encoding worked. Also, this code is ported within a C++ framework so it might not comply with your usual coding standards. Essentially here is the code that I have written which resembles closely to the libav decoding example with minor tweaks due to deprecated functions. I actually have a different version in our code, but it's mostly just working with the buffer and the image data to add to our own structure. http://pastebin.ca/2120920 I'd like to have either tips on how I could make this more robust, or what steps I should take to extract each frame from different formats. I've taken a look at ffmpeg.c, but not as much as I wanted. On Wed, Feb 22, 2012 at 11:22 AM, Alex Cohn wrote: > On Tue, Feb 21, 2012 at 23:24, Patrick Zielinski > wrote: > > Hello all, I have integrated decoding with libavformat and libavcodec a > > basic decoder. It works for H264 encoded video's and also I converted one > > into avi, it also works. > > > > But for some reason when I try other formats like .mkv I receive this > > error: > > > > [h264 @ 05f32a80] no frame! > > > > I've encoded the mkv's with x264 so I'm having a hard time understand > how > > it cannot find a frame, it occurs when I call > > > > avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet); > > > > > > What kind of details am I missing, because the different structs seem to > > have correct data. > > You probably have metadata missing, e.g. SPS/PPS, if MKV container > keeps this information not with the frames that you push into > avcodec_decode_video2(). Please make sure that your mkv can be played > by command-line ffmpeg. If this simple test succeeds, please make your > initialization code available (e.g. via pastebin). > > 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 philip at turmel.org Thu Feb 23 02:09:24 2012 From: philip at turmel.org (Phil Turmel) Date: Wed, 22 Feb 2012 20:09:24 -0500 Subject: [Libav-user] Help Required - FFmpeg usage in own product In-Reply-To: References: Message-ID: <4F4591C4.5080907@turmel.org> On 02/22/2012 06:18 AM, Zeeshan Mahmood wrote: > Hi , > > Can you quickly tell me is there any problem if I use FFmpeg executable > file (without modifying and providing source code) in my own software, > which will NOT be available as FREE for its customers? If you aren't shipping FFmpeg with your software, you can do as you please. But that doesn't sound like what you are asking. If you *are* shipping FFmpeg with your software, you must follow either the GPL or the LGPL, depending on the options you compiled in. In either case, you have to provide or offer to provide the FFmpeg source code you used to build your binary. > Please help with legal issues, before I get into it. Of course, I Am Not A Lawyer--you might want to pay one for real advice. You can also look here: http://ffmpeg.org/legal.html Phil From philip at turmel.org Thu Feb 23 02:19:17 2012 From: philip at turmel.org (Phil Turmel) Date: Wed, 22 Feb 2012 20:19:17 -0500 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: <4F450F6F.9010806@alice.de> References: <4F450F6F.9010806@alice.de> Message-ID: <4F459415.2090701@turmel.org> On 02/22/2012 10:53 AM, Benjamin Gamisch wrote: [...] > I would appreciate an answer whether I am allowed to use the FFMPEG.exe file or not. Per your screenshot, probably not. If you distribute FFmpeg, you must follow the license. There's no exception for non-commercial use. You must provide or offer to provide the source code for the version of FFmpeg you ship. As I told Zeeshan a few minutes ago, I Am Not A Lawyer. You might want one if you have trouble figuring out your responsibilities under the (L)GPL. http://ffmpeg.org/legal.html Phil From kalileo at universalx.net Thu Feb 23 04:24:51 2012 From: kalileo at universalx.net (Kalileo) Date: Thu, 23 Feb 2012 10:24:51 +0700 Subject: [Libav-user] Muxing settings for h264 + mp4 In-Reply-To: References: Message-ID: On Feb 23, 2012, at 00:59 , ALESSANDRO PAGANELLI wrote: > I'm working on a project (which uses Libav/Ffmpeg) in which I have to transmit an h264 encoded file (with Mp4 file format) over a simulated network (I'm using network simulator 3 for this), to "emulate" a real video streaming. > > Now, I'm facing the problem regarding how to "rebuild" the transmitted file at the receiver side. More in details, this issue regards the settings needed to replicate the configurations for AVFormatContext, AVStream and AVCodecContext, starting from the same structures I have at the transmitter. > As for now, I just copied the content of the sender's AVCodecContext structure to the receiver's one, but the resulting file is broken. I suspect that other settings have to be replicated too, but it's not clear which ones are those required by h264 and Mp4. > > Is there any document/tutorial about the required settings for each specific codec or format? If your source file is mp4 and your stream is mpegts then you might need to add the h264_mp4toannexb filter. This filter is available as an option for ffmpeg and you can also use it between av_read_frame and av_write_frame. > More in general, do you have suggestions about how to approach this problem for a generic combination of codec and format? I planned to implement different possible combinations of them, so it would be great if there is a "smart" way to copy these contexts without doing it "by hand" :) . If you scan through this list you'll note a lot of questions which basically come back to the same problem you see here (and yes, one of them I had been asking). As far as I understood this problem the reason is that h264 (and I think also aac) are packed differently depending of if they are to be saved to a file or if they are to be streamed. h264 frames in a mpegts stream require a specific header for each frame, which is this "annex B". This h264_mp4toannexb filter will take the required information from the file header and put it in the annex B frame header. This is meant to work if you have a mp4 file to begin with. (There is a similar filter for aac.) If your source file is not in the mp4 format which this filter expects then you're out of luck (this is where I'm stuck too :( ). I have source files which are h264+aac in mpegts format, and there these filters do not work. Unfortunately there seems to be no other documentation about how to build a correct annex B header manually except what's in the source code (if there is, please point me to it!). From jdxsolutions at gmail.com Thu Feb 23 10:05:26 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Thu, 23 Feb 2012 09:05:26 +0000 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: <4F459415.2090701@turmel.org> References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> Message-ID: On 23 February 2012 01:19, Phil Turmel wrote: > On 02/22/2012 10:53 AM, Benjamin Gamisch wrote: > [...] >> I would appreciate an answer whether I am allowed to use the FFMPEG.exe file or not. > > Per your screenshot, probably not. ?If you distribute FFmpeg, you must follow the license. ?There's no exception for non-commercial use. ?You must provide or offer to provide the source code for the version of FFmpeg you ship. In cases where just the .EXE is distributed and used, isn't standard practice simply to include a license.txt which has the GPL license, credits use of ffmpeg and provides a link, etc - and to add a notice to your in-app credits section, installer wizard, etc if applicable? From jan.hoelscher at codergrid.de Thu Feb 23 10:41:31 2012 From: jan.hoelscher at codergrid.de (=?ISO-8859-1?Q?jan_h=F6lscher?=) Date: Thu, 23 Feb 2012 10:41:31 +0100 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> Message-ID: 2012/2/23 John Dexter > On 23 February 2012 01:19, Phil Turmel wrote: > > On 02/22/2012 10:53 AM, Benjamin Gamisch wrote: > > [...] > >> I would appreciate an answer whether I am allowed to use the FFMPEG.exe > file or not. > > > > Per your screenshot, probably not. If you distribute FFmpeg, you must > follow the license. There's no exception for non-commercial use. You must > provide or offer to provide the source code for the version of FFmpeg you > ship. > > In cases where just the .EXE is distributed and used, isn't standard > practice simply to include a license.txt which has the GPL license, > credits use of ffmpeg and provides a link, etc - and to add a notice > to your in-app credits section, installer wizard, etc if applicable? > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > this could be interresting for you! http://www.gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins -- *Media Encoding Cluster , * *the first Open Source Cluster Encoding Solution * *for distributed Media Encoding.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Thu Feb 23 10:49:25 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Thu, 23 Feb 2012 11:49:25 +0200 Subject: [Libav-user] Help Required - FFmpeg usage in own product In-Reply-To: References: Message-ID: 2012/2/22 Zeeshan Mahmood : > use FFmpeg executable file > (without modifying and providing source code) in my own software, which will > NOT ?be available as FREE for its customers? Do you mean 1) Software is available for customers, but NOT for free, i.e. you sell it; 2) FFmpeg is used on server side, and is not distributed to consumers. -- Andrey Utkin From jdxsolutions at gmail.com Thu Feb 23 11:30:44 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Thu, 23 Feb 2012 10:30:44 +0000 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> Message-ID: On 23 February 2012 09:41, jan h?lscher wrote: > > > 2012/2/23 John Dexter >> >> On 23 February 2012 01:19, Phil Turmel wrote: >> > On 02/22/2012 10:53 AM, Benjamin Gamisch wrote: >> > [...] >> >> I would appreciate an answer whether I am allowed to use the FFMPEG.exe >> >> file or not. >> > >> > Per your screenshot, probably not. ?If you distribute FFmpeg, you must >> > follow the license. ?There's no exception for non-commercial use. ?You must >> > provide or offer to provide the source code for the version of FFmpeg you >> > ship. >> >> In cases where just the .EXE is distributed and used, isn't standard >> practice simply to include a license.txt which has the GPL license, >> credits use of ffmpeg and provides a link, etc - and to add a notice >> to your in-app credits section, installer wizard, etc if applicable? >> _______________________________________________ >> Libav-user mailing list >> Libav-user at ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/libav-user > > > this could be interresting for you! > > http://www.gnu.org/licenses/gpl-faq.html#NFUseGPLPlugins Yep - his case is to simply run the .EXE from his application (emulating automated command-line usage basically). So his app avoids the 'viral' nature of GPL but he still has some responsibilities. See: http://stackoverflow.com/questions/9162234/packaging-a-gpled-utility-with-an-application From 83670 at studenti.unimore.it Thu Feb 23 12:37:32 2012 From: 83670 at studenti.unimore.it (ALESSANDRO PAGANELLI) Date: Thu, 23 Feb 2012 12:37:32 +0100 Subject: [Libav-user] Muxing settings for h264 + mp4 In-Reply-To: References: Message-ID: The stream I'm using is coded with h264 without mpegts. However, I'm following a sort of "low level" approach, since my goal is to read frames from the file, move their content into a RTP packet and, at the receiver side, rebuild the set of sent packets (regardless if this has an actual sense for the file I consider). I supposed that a simple copy of the packet's payload could be enough to rebuild the stream at the receiver side, but I guess that I'm missing something important. Another weird thing: if I make a raw copy of the following AVStream's parameters (m_copyStream is the original sender-side stream, while outputStream is the one at the receiver side) outputStream->r_frame_rate = m_copyStream.r_frame_rate; outputStream->first_dts = m_copyStream.first_dts; outputStream->pts = m_copyStream.pts; outputStream->time_base = m_copyStream.time_base; outputStream->pts_wrap_bits = m_copyStream.pts_wrap_bits; outputStream->start_time = AV_NOPTS_VALUE; outputStream->sample_aspect_ratio = m_copyStream.sample_aspect_ratio; outputStream->avg_frame_rate = m_copyStream.avg_frame_rate; which I assume should replicate the sender AVStream at the receiver, the program stops for an arithmetic exception caused by the pts, whose denominator is 0. However, it's not clear how the original file could play perfectly without these information... Regards, Alessandro Il giorno 23 febbraio 2012 04:24, Kalileo ha scritto: > > On Feb 23, 2012, at 00:59 , ALESSANDRO PAGANELLI wrote: > > > I'm working on a project (which uses Libav/Ffmpeg) in which I have to > transmit an h264 encoded file (with Mp4 file format) over a simulated > network (I'm using network simulator 3 for this), to "emulate" a real video > streaming. > > > > Now, I'm facing the problem regarding how to "rebuild" the transmitted > file at the receiver side. More in details, this issue regards the settings > needed to replicate the configurations for AVFormatContext, AVStream and > AVCodecContext, starting from the same structures I have at the transmitter. > > As for now, I just copied the content of the sender's AVCodecContext > structure to the receiver's one, but the resulting file is broken. I > suspect that other settings have to be replicated too, but it's not clear > which ones are those required by h264 and Mp4. > > > > Is there any document/tutorial about the required settings for each > specific codec or format? > > If your source file is mp4 and your stream is mpegts then you might need > to add the h264_mp4toannexb filter. This filter is available as an option > for ffmpeg and you can also use it between av_read_frame and av_write_frame. > > > More in general, do you have suggestions about how to approach this > problem for a generic combination of codec and format? I planned to > implement different possible combinations of them, so it would be great if > there is a "smart" way to copy these contexts without doing it "by hand" :) > . > > If you scan through this list you'll note a lot of questions which > basically come back to the same problem you see here (and yes, one of them > I had been asking). > > As far as I understood this problem the reason is that h264 (and I think > also aac) are packed differently depending of if they are to be saved to a > file or if they are to be streamed. h264 frames in a mpegts stream require > a specific header for each frame, which is this "annex B". > > This h264_mp4toannexb filter will take the required information from the > file header and put it in the annex B frame header. This is meant to work > if you have a mp4 file to begin with. (There is a similar filter for aac.) > > If your source file is not in the mp4 format which this filter expects > then you're out of luck (this is where I'm stuck too :( ). I have source > files which are h264+aac in mpegts format, and there these filters do not > work. > > Unfortunately there seems to be no other documentation about how to build > a correct annex B header manually except what's in the source code (if > there is, please point me to it!). > > > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- ______________________________________________ Ing. Alessandro Paganelli, Ph. D. Student, 25th Cycle Department of Information Engineering University of Modena and Reggio Emilia via Vignolese 905, 41125 Modena (MO), ITALY E-mail: alessandro.paganelli at unimore.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From philip at turmel.org Thu Feb 23 13:07:01 2012 From: philip at turmel.org (Phil Turmel) Date: Thu, 23 Feb 2012 07:07:01 -0500 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> Message-ID: <4F462BE5.1020404@turmel.org> On 02/23/2012 04:05 AM, John Dexter wrote: > On 23 February 2012 01:19, Phil Turmel wrote: >> On 02/22/2012 10:53 AM, Benjamin Gamisch wrote: >> [...] >>> I would appreciate an answer whether I am allowed to use the FFMPEG.exe file or not. >> >> Per your screenshot, probably not. If you distribute FFmpeg, you must follow the license. There's no exception for non-commercial use. You must provide or offer to provide the source code for the version of FFmpeg you ship. > > In cases where just the .EXE is distributed and used, isn't standard > practice simply to include a license.txt which has the GPL license, > credits use of ffmpeg and provides a link, etc - and to add a notice > to your in-app credits section, installer wizard, etc if applicable? I can't say whether it is standard practice, but it is wrong. If you distribute, *you* are responsible for the source code of what you distributed. If the original app website disappears, or stops carrying the source for the version you used, you must still be able to deliver that source to your users. If you deliver the correct source code with every installer, you don't have to offer later delivery of the source code. If you haven't delivered the source in your installer, your copyright notice in your app can't just be an acknowledgement. There must be a link or a contact address where your users can request the source from *you*. Finally, whatever the legality, it is at least rude to hijack an open- source app's website bandwidth to deliver source code to *your* users. Phil From jdxsolutions at gmail.com Thu Feb 23 13:16:24 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Thu, 23 Feb 2012 12:16:24 +0000 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: <4F462BE5.1020404@turmel.org> References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> <4F462BE5.1020404@turmel.org> Message-ID: On 23 February 2012 12:07, Phil Turmel wrote: > Finally, whatever the legality, it is at least rude to hijack an open- > source app's website bandwidth to deliver source code to *your* users. Apart from the inherent problem of defining social etiquette within a legal contract... if I distribute ffmpeg.exe _un-modified_, are the users MY users or ffmpeg's users? If I _don't_ distribute it but tell users they need to download it, then who is responsible? From philip at turmel.org Thu Feb 23 13:25:18 2012 From: philip at turmel.org (Phil Turmel) Date: Thu, 23 Feb 2012 07:25:18 -0500 Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) In-Reply-To: References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> <4F462BE5.1020404@turmel.org> Message-ID: <4F46302E.40806@turmel.org> On 02/23/2012 07:16 AM, John Dexter wrote: > On 23 February 2012 12:07, Phil Turmel wrote: >> Finally, whatever the legality, it is at least rude to hijack an open- >> source app's website bandwidth to deliver source code to *your* users. > > Apart from the inherent problem of defining social etiquette within a > legal contract... if I distribute ffmpeg.exe _un-modified_, are the > users MY users or ffmpeg's users? If I _don't_ distribute it but tell > users they need to download it, then who is responsible? The GPL is a license to distribute. The terms of distributing binary versions do not distinguish between modified and unmodified. (Section 6). Modifying the source, and then distributing, whether in source or binary form, has further requirements. (Section 5). http://www.gnu.org/licenses/gpl.html Phil From kalileo at universalx.net Thu Feb 23 18:51:28 2012 From: kalileo at universalx.net (Kalileo) Date: Fri, 24 Feb 2012 00:51:28 +0700 Subject: [Libav-user] Muxing settings for h264 + mp4 In-Reply-To: References: Message-ID: <146BE2E9-06EB-49E8-87A4-DE3CF42D821D@universalx.net> On Feb 23, 2012, at 18:37 , ALESSANDRO PAGANELLI wrote: > The stream I'm using is coded with h264 without mpegts. if you have as input an mp4 file and as output an h264 stream, with or without mpegts, then AFAIK you need the h264_mp4toannexb filter. From deron at pagestream.org Thu Feb 23 20:36:38 2012 From: deron at pagestream.org (Deron) Date: Thu, 23 Feb 2012 12:36:38 -0700 Subject: [Libav-user] DeckLink libavdevice Message-ID: <4F469546.70101@pagestream.org> Taking Nicolas George's suggestion, I have created a basic libavdevice for Blackmagic's DeckLink HD-SDI cards. I'm thrilled to have it working to any degree (much easier than I expected), but still have several issues to work out. Where is the proper place to ask questions for a new libavdevice? ffmpeg-dev or here or ? The most important is that the normal use of the device will be to output a specific frame size/fps and the audio is _always_ 48k s16le 2, 8 or 16 channels. The issues I'm not sure about are: 1) Automatically converting audio to 48k, s16le, 2/4/8 channels. 2) Automatically scale/crop video to output. 3) Proper configure detection of installed DeckLink includes. And of course getting past the patch review ;-) I am certainly not compliant at this moment! If creating an input device is as easy as this has been so far, then I hope to create a capture device next. Thanks, Deron -------------- next part -------------- An HTML attachment was scrubbed... URL: From cehoyos at ag.or.at Thu Feb 23 22:16:03 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 23 Feb 2012 21:16:03 +0000 (UTC) Subject: [Libav-user] Using ffmpeg.exe in a project (non-commercial) References: <4F450F6F.9010806@alice.de> <4F459415.2090701@turmel.org> <4F462BE5.1020404@turmel.org> Message-ID: John Dexter writes: > On 23 February 2012 12:07, Phil Turmel wrote: > > Finally, whatever the legality, it is at least rude to hijack an open- > > source app's website bandwidth to deliver source code to *your* users. > > Apart from the inherent problem of defining social etiquette within a > legal contract... if I distribute ffmpeg.exe _un-modified_, are the > users MY users or ffmpeg's users? If I _don't_ distribute it but tell > users they need to download it, then who is responsible? You have to tell them where they can download the exact sources you used to compile ffmpeg.exe - therefore you have to provide the source on your own download server, because this is the only way to make sure the sources are really available. If your installer installs ffmpeg.exe on the user's computer, do not forget to inform your users (in your EULA) that you are installing FFmpeg, that FFmpeg is released under the GPL and where to find the authors of FFmpeg (and repeat that for all other projects that you use, like for example x264). Note that all requirements you have to follow make absolutely no difference between commercial and non-commercial projects. Carl Eugen From cehoyos at ag.or.at Thu Feb 23 22:18:31 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Thu, 23 Feb 2012 21:18:31 +0000 (UTC) Subject: [Libav-user] DeckLink libavdevice References: <4F469546.70101@pagestream.org> Message-ID: Deron writes: > Taking Nicolas George's suggestion, I have created a basic > libavdevice for Blackmagic's DeckLink HD-SDI cards. Then please send the patch to ffmpeg-devel where it can be discussed (and later applied). Consider running tools/patcheck over your patch and please note that plain text is heavily preferred over html on all mailing lists. Carl Eugen From alexcohn at netvision.net.il Thu Feb 23 22:28:50 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Thu, 23 Feb 2012 23:28:50 +0200 Subject: [Libav-user] Decoding specific formats? In-Reply-To: References: Message-ID: On Thu, Feb 23, 2012 at 02:16, Patrick Zielinski wrote: > Ok, firstly please bare with me, up until two weeks ago I didn't even know > what codec were and how encoding worked. Also, this code is ported within a > C++ framework so it might not comply with your usual coding standards. > > Essentially here is the code that I have written which?resembles?closely to > the libav decoding example with minor tweaks due to deprecated functions. I > actually have a different version in our code, but it's mostly just working > with the buffer and the image data to add to our own structure. > > http://pastebin.ca/2120920 > > I'd like to have either tips on how I could make this more robust, or what > steps I should take to extract each frame from different formats. I've taken > a look at ffmpeg.c, but not as much as I wanted. Regarding the specific problem decoding an MKV file, you did not write if you succeed to open this particular file with command-line ffmpeg. Regarding your code, you should use the AVCodecContext you get from avformat_open_input() for the chosen stream, no need to create a new one as you do in lines 127 and on. BR, Alex From amir.rouhi at rmit.edu.au Fri Feb 24 00:29:59 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Fri, 24 Feb 2012 10:29:59 +1100 Subject: [Libav-user] A very general question Message-ID: When somebody ask a question and don't receive any response...what does it mean? -------------- next part -------------- An HTML attachment was scrubbed... URL: From enerccio at gmail.com Fri Feb 24 02:15:34 2012 From: enerccio at gmail.com (Peter Enerccio) Date: Fri, 24 Feb 2012 02:15:34 +0100 Subject: [Libav-user] A very general question In-Reply-To: References: Message-ID: C-C-C-C-COMBO BREAKER 2012/2/24 > When somebody ask a question and don't receive any response...what does it > mean? > > > _______________________________________________ > 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 Fri Feb 24 03:11:51 2012 From: amir.rouhi at rmit.edu.au (amir.rouhi at rmit.edu.au) Date: Fri, 24 Feb 2012 13:11:51 +1100 Subject: [Libav-user] A very general question In-Reply-To: References: Message-ID: Whats is that? C-C-C-C-COMBO BREAKER !!!! i have no idea toward this On 24 February 2012 12:15, Peter Enerccio wrote: > C-C-C-C-COMBO BREAKER > > 2012/2/24 > >> When somebody ask a question and don't receive any response...what does >> it mean? >> >> >> _______________________________________________ >> 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 dev at rarevision.com Fri Feb 24 03:18:35 2012 From: dev at rarevision.com (Thomas Worth) Date: Thu, 23 Feb 2012 18:18:35 -0800 Subject: [Libav-user] A very general question In-Reply-To: References: Message-ID: On Thu, Feb 23, 2012 at 6:11 PM, wrote: > Whats is that?? C-C-C-C-COMBO BREAKER?!!!! i have no idea toward this http://en.wikipedia.org/wiki/Killer_Instinct From xeioexception at gmail.com Fri Feb 24 08:30:17 2012 From: xeioexception at gmail.com (Dmitry Volyntsev) Date: Fri, 24 Feb 2012 11:30:17 +0400 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: I found out the answer by myself. May be it could be useful for other ffmpeg newbies. It is impossible to feed only rtp stream to libav for just depacketising purpose without establishing rtsp input by means of libav //! Demuxer will use avio_open, no opened file should be provided by the caller. #define AVFMT_NOFILE 0x0001 [rtp @ 0x8d2500] Custom AVIOContext makes no sense and will be ignored with AVFMT_NOFILE format. ./libavformat/rtspenc.c: .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, ./libavformat/rtsp.c: .flags = AVFMT_NOFILE, ./libavformat/rtspdec.c: .flags = AVFMT_NOFILE, /* * I/O context. * * decoding: either set by the user before avformat_open_input() (then * the user must close it manually) or set by avformat_open_input(). * encoding: set by the user. * * Do NOT set this field if AVFMT_NOFILE flag is set in * iformat/oformat.flags. In such a case, the (de)muxer will handle * I/O in some other way and this field will be NULL. */ AVIOContext *pb; On Fri, Feb 17, 2012 at 6:48 PM, Dmitry Volyntsev wrote: > Hi All! > > I have a question related to demuxing of incoming rtp stream by means of > libavformat. > > 1) My program has it own event loop (libevent) and I can't easily > integrate libavformat routines to reading from udp and tcp sockets > straightforwardly > 2) I already wrote custom IO routines and RTSP protocol negotiator > (communicates with other side and requests streaming from RTSP server to > local udp ports) > > What I tried to do: > > ioBuffer_ = (unsigned char *)av_mallocz(_IO_BUFFER_SIZE > + > FF_INPUT_BUFFER_PADDING_SIZE); > > ioContext_ = avio_alloc_context(ioBuffer_, _IO_BUFFER_SIZE, > 0, ptr, my_read, NULL, NULL); > > > formatCtx_ = avformat_alloc_context(); > formatCtx_->flags |= AVFMT_FLAG_CUSTOM_IO | AVFMT_FLAG_NONBLOCK; > formatCtx_->pb = ioContext_; > res = avformat_open_input(&formatCtx_, "spf-avs", NULL, NULL); > > > my_read() - reads incoming raw RTP stream packets > > Unfortunately constantly returns AVERROR(EAGAIN) > > I just want to feed raw RTP data to libavformat for demuxing purposes and > just get the pure videodata back for further processing > > What should I do for to get it done? > > Thanks in advance! > > -- > Be happy, > Best regards, > Dmitry Volyntsev > > -- Be happy, Best regards, Dmitry Volyntsev -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.george at normalesup.org Fri Feb 24 00:08:43 2012 From: nicolas.george at normalesup.org (Nicolas George) Date: Fri, 24 Feb 2012 00:08:43 +0100 Subject: [Libav-user] DeckLink libavdevice In-Reply-To: <4F469546.70101@pagestream.org> References: <4F469546.70101@pagestream.org> Message-ID: <20120223230843.GA17401@phare.normalesup.org> Le quintidi 5 vent?se, an CCXX, Deron a ?crit?: > Taking Nicolas George's suggestion, I have created a basic > libavdevice for Blackmagic's DeckLink HD-SDI cards. I'm thrilled to > have it working to any degree (much easier than I expected), but > still have several issues to work out. Where is the proper place to > ask questions for a new libavdevice? ffmpeg-dev or here or ? I believe ffmpeg-devel is the best place. > The most important is that the normal use of the device will be to > output a specific frame size/fps and the audio is _always_ 48k s16le > 2, 8 or 16 channels. > > The issues I'm not sure about are: > > 1) Automatically converting audio to 48k, s16le, 2/4/8 channels. > > 2) Automatically scale/crop video to output. The usual way is not to convert anything: if the provided data is not in the required format, fail with a clear error message and let the user (or the application) fix it the way they see fit: $ ffmpeg -f s16le -ar 47000 -i /dev/zero -f alsa hw:1 ... [alsa @ 0x1c84de0] cannot set channel count to 1 (Invalid argument) [alsa @ 0x1c84de0] sample rate 47000 not available, nearest is 48000 > 3) Proper configure detection of installed DeckLink includes. The configure script has plenty of support, this should be easy. Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From justin.zhang at dediprog.com Fri Feb 24 04:44:20 2012 From: justin.zhang at dediprog.com (justin) Date: Fri, 24 Feb 2012 11:44:20 +0800 Subject: [Libav-user] Is there any mpeg2 decoder in libstagefright Message-ID: <73E191A995304C1BAB26120F2D5BC966@dediprog.com> Hello all, I have already compiled the 0.10 ffmpeg and using this lib in my android project. It's known that the libstagefright can support H.264 decoding right now. But I wonder whether there is a way make libstagefright also decode MPEG-2 video. Thanks! -- justin Sent with Sparrow (http://www.sparrowmailapp.com/?sig) -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Fri Feb 24 11:56:01 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 24 Feb 2012 12:56:01 +0200 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: 2012/2/24 Dmitry Volyntsev : > I found out the answer by myself. May be it could be useful for other > ffmpeg?newbies. > > It is impossible to feed only rtp stream to libav for just depacketising > purpose without establishing rtsp input by means of libav It is possible, although inconvenient. libavformat has good RTSP protocol client, so usially there's no need to take another one. > //! Demuxer will use avio_open, no opened file should be provided by the > caller. > #define AVFMT_NOFILE ? ? ? ?0x0001 > > [rtp @ 0x8d2500] Custom AVIOContext makes no sense and will be ignored with > AVFMT_NOFILE format. > > ./libavformat/rtspenc.c: ? ?.flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, > ./libavformat/rtsp.c: ? ?.flags = AVFMT_NOFILE, > ./libavformat/rtspdec.c: ? ?.flags = AVFMT_NOFILE, > > > ? ? /* > ? ? ?* I/O context. > ? ? ?* > ? ? ?* decoding: either set by the user before avformat_open_input() (then > ? ? ?* the user must close it manually) or set by avformat_open_input(). > ? ? ?* encoding: set by the user. > ? ? ?* > ? ? ?* Do NOT set this field if AVFMT_NOFILE flag is set in > > ? ? ?* iformat/oformat.flags. In such a case, the (de)muxer will handle > ? ? ?* I/O in some other way and this field will be NULL. > ? ? ?*/ > ? ? AVIOContext *pb; In both of your letters, you wrote lots of low-level stuff that is not so closely relevant to question you ask. Next time, be more concise. We're glad to help anyone who asks, but it's hard to comprehend long and confused letters. Without meaning to be rude, Andrey Utkin From xeioexception at gmail.com Fri Feb 24 12:31:50 2012 From: xeioexception at gmail.com (Dmitry Volyntsev) Date: Fri, 24 Feb 2012 15:31:50 +0400 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: OK, if so. May be I wrong. Could you, please, explain how can I integrate the libavformat rtsp protocol to my program, in case it already has own global event loop. Using libavformat in case of rtsp format leads to blockage of my event loop from time to time. Thanks you for answering On Fri, Feb 24, 2012 at 2:56 PM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/24 Dmitry Volyntsev : > > I found out the answer by myself. May be it could be useful for other > > ffmpeg newbies. > > > > It is impossible to feed only rtp stream to libav for just depacketising > > purpose without establishing rtsp input by means of libav > > It is possible, although inconvenient. libavformat has good RTSP > protocol client, so usially there's no need to take another one. > > > //! Demuxer will use avio_open, no opened file should be provided by the > > caller. > > #define AVFMT_NOFILE 0x0001 > > > > [rtp @ 0x8d2500] Custom AVIOContext makes no sense and will be ignored > with > > AVFMT_NOFILE format. > > > > ./libavformat/rtspenc.c: .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, > > ./libavformat/rtsp.c: .flags = AVFMT_NOFILE, > > ./libavformat/rtspdec.c: .flags = AVFMT_NOFILE, > > > > > > /* > > * I/O context. > > * > > * decoding: either set by the user before avformat_open_input() > (then > > * the user must close it manually) or set by avformat_open_input(). > > * encoding: set by the user. > > * > > * Do NOT set this field if AVFMT_NOFILE flag is set in > > > > * iformat/oformat.flags. In such a case, the (de)muxer will handle > > * I/O in some other way and this field will be NULL. > > */ > > AVIOContext *pb; > > In both of your letters, you wrote lots of low-level stuff that is not > so closely relevant to question you ask. > Next time, be more concise. We're glad to help anyone who asks, but > it's hard to comprehend long and confused letters. > > Without meaning to be rude, > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- Be happy, Best regards, Dmitry Volyntsev -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Fri Feb 24 13:05:40 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 24 Feb 2012 14:05:40 +0200 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: 2012/2/24 Dmitry Volyntsev : > OK, if so. May be I wrong. > Could you, please, explain how can I integrate the libavformat rtsp protocol > to my program, in case it already has own global event loop. > Using libavformat in case of rtsp format leads to blockage of my event loop > from time to time. I don't quite know yet how your event loop looks like, and what functions it serves. I'd propose running libavformat reading in a separate thread. Using struct/object with context data of your application, and mutex, you can track how much data you have processed, when did you receive last data portion, use that data actually etc. For immediate interruption (closing) of stream reading, use avio_open2() int_cb parameter (see libavformat/avio.h). -- Andrey Utkin From xeioexception at gmail.com Fri Feb 24 13:30:12 2012 From: xeioexception at gmail.com (Dmitry Volyntsev) Date: Fri, 24 Feb 2012 16:30:12 +0400 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: Oh, my fault. I had to mention that I can't use threads and locking mechanisms for efficiency reasons (highloaded application). I need to make rtsp/rtp stream processing with least possible overhead. Event loop is libevent-based. But thanks you, again, for advices!:) I have no questions anymore On Fri, Feb 24, 2012 at 4:05 PM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/24 Dmitry Volyntsev : > > OK, if so. May be I wrong. > > Could you, please, explain how can I integrate the libavformat rtsp > protocol > > to my program, in case it already has own global event loop. > > Using libavformat in case of rtsp format leads to blockage of my event > loop > > from time to time. > > I don't quite know yet how your event loop looks like, and what > functions it serves. > I'd propose running libavformat reading in a separate thread. > Using struct/object with context data of your application, and mutex, > you can track how much data you have processed, when did you receive > last data portion, use that data actually etc. > For immediate interruption (closing) of stream reading, use > avio_open2() int_cb parameter (see libavformat/avio.h). > > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- Be happy, Best regards, Dmitry Volyntsev -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Fri Feb 24 13:37:45 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 24 Feb 2012 14:37:45 +0200 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: 2012/2/24 Dmitry Volyntsev : > Oh, my fault. I had to mention that I can't use threads and locking > mechanisms for efficiency reasons (highloaded application). > I need to make rtsp/rtp stream processing with least possible overhead. > Event loop is libevent-based. > But thanks you, again, for advices!:) > I have no questions anymore Then could you expose how your loop looks like? Or even "dream on" which API calls do you want? There's a WIP on non-blocking protocol functions, BTW. grep NONBLOCK libavformat/*.h -- Andrey Utkin From pavel at sokolov.me Fri Feb 24 13:57:45 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Fri, 24 Feb 2012 16:57:45 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES Message-ID: <4F478949.1040605@sokolov.me> Hi All! I need to get LPCM data from ac3, to add it later to MPEG2 PES packet. I'm using "avcodec_decode_audio4" to decode ac3 packet. In which format the resulting AVFrame structure stores data? Is it in LPCM format or something else format? -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From xeioexception at gmail.com Fri Feb 24 14:02:44 2012 From: xeioexception at gmail.com (Dmitry Volyntsev) Date: Fri, 24 Feb 2012 17:02:44 +0400 Subject: [Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO In-Reply-To: References: Message-ID: >Or even "dream on" which API calls do you want? As far as I understood the problem with rtsp/rtp protocol and customIO because of there more the one endpoint (or entrypoint). there are al least 3 connection should be established 1 tcp and 2 udp. It seems, from API user's point of view, problem could be solved be providing additional custom callback handler (provides user allocated socket descriptor,for example) >Then could you expose how your loop looks like? 1) main polling loop monitor all program's async IO descriptors. 2) Set of data processing chains When data arrives on any of these descriptor the eventloop feeds data to it's chain input. So for the any data to be processed its descriptor should be added to EVLoop I original idea was to feed some raw rtp data to libavformat inside one of the processing element On Fri, Feb 24, 2012 at 4:37 PM, Andrey Utkin < andrey.krieger.utkin at gmail.com> wrote: > 2012/2/24 Dmitry Volyntsev : > > Oh, my fault. I had to mention that I can't use threads and locking > > mechanisms for efficiency reasons (highloaded application). > > I need to make rtsp/rtp stream processing with least possible overhead. > > Event loop is libevent-based. > > But thanks you, again, for advices!:) > > I have no questions anymore > > Then could you expose how your loop looks like? > Or even "dream on" which API calls do you want? > > There's a WIP on non-blocking protocol functions, BTW. > grep NONBLOCK libavformat/*.h > > -- > Andrey Utkin > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > -- Be happy, Best regards, Dmitry Volyntsev -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefasab at gmail.com Fri Feb 24 14:25:28 2012 From: stefasab at gmail.com (Stefano Sabatini) Date: Fri, 24 Feb 2012 14:25:28 +0100 Subject: [Libav-user] A very general question In-Reply-To: References: Message-ID: <20120224132528.GA29504@arborea> On date Thursday 2012-02-23 18:18:35 -0800, Thomas Worth encoded: > On Thu, Feb 23, 2012 at 6:11 PM, wrote: > > Whats is that?? C-C-C-C-COMBO BREAKER?!!!! i have no idea toward this Damn, that was funny. > http://en.wikipedia.org/wiki/Killer_Instinct For more demential stuff: http://knowyourmeme.com/memes/combo-breaker Regarding the question: |When somebody ask a question and don't receive any response...what does it |mean? It may mean: 1) everybody around here is busy or doesn't care 2) nobody has a clue 3) a combination of 1) and 2) General advice: try to ping your question again, possibly giving more details and showing that you did some research / experimentation. From andrey.krieger.utkin at gmail.com Fri Feb 24 15:12:28 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Fri, 24 Feb 2012 16:12:28 +0200 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: <4F478949.1040605@sokolov.me> References: <4F478949.1040605@sokolov.me> Message-ID: 2012/2/24 Pavel Sokolov : > Hi All! > > I need to get LPCM data from ac3, to add it later to MPEG2 PES packet. > I'm using "avcodec_decode_audio4" to decode ac3 packet. > In which format the resulting AVFrame structure stores data? The decoded audio data format can be checked in AVFrame.format, and also AVCodecContext.sample_fmt. For audio, check it with enum AVSampleFormat. Sample rate is in AVCodecContext.sample_rate. > Is it in LPCM > format or something else format? The most widely used is AV_SAMPLE_FMT_S16, which stands for signed 16bit samples. So the answer is practically yes. -- Andrey Utkin From pavel at sokolov.me Fri Feb 24 17:00:29 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Fri, 24 Feb 2012 20:00:29 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> Message-ID: <4F47B41D.4010507@sokolov.me> 24.02.2012 18:12, Andrey Utkin ?????: > 2012/2/24 Pavel Sokolov: >> Hi All! >> >> I need to get LPCM data from ac3, to add it later to MPEG2 PES packet. >> I'm using "avcodec_decode_audio4" to decode ac3 packet. >> In which format the resulting AVFrame structure stores data? > The decoded audio data format can be checked in AVFrame.format, and > also AVCodecContext.sample_fmt. For audio, check it with enum > AVSampleFormat. Sample rate is in AVCodecContext.sample_rate. > >> Is it in LPCM >> format or something else format? > The most widely used is AV_SAMPLE_FMT_S16, which stands for signed > 16bit samples. So the answer is practically yes. > How can I obtain raw data from audio AVFrame? It is array of AV_NUM_DATA_POINTERS: typedef struct AVFrame { .. uint8_t *data[AV_NUM_DATA_POINTERS]; int linesize[AV_NUM_DATA_POINTERS]; .. } Should I use data all array items, something like this? for (int i=0; i LPCM -> MPEG2 PES In-Reply-To: <4F47B41D.4010507@sokolov.me> References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> Message-ID: 2012/2/24 Pavel Sokolov : > How can I obtain raw data from audio AVFrame? > It is array of AV_NUM_DATA_POINTERS: > typedef struct AVFrame { > .. > uint8_t *data[AV_NUM_DATA_POINTERS]; > int linesize[AV_NUM_DATA_POINTERS]; > .. > } > > Should I use data all array items, something like this? > for (int i=0; i uint8_t* currdata=frame.data[i]; > int dataSize=frame.linesize[i]; > > } Currently, PACKED samples format is used everywhere in libav. So for audio, all data goes in data[0], containing frame.nb_samples samples. i think linesize[0] indeed stores number of bytes in data[0]. BBB has explained it to me on #libav this way: (18:10:13) BBB: which, for stereo, is interleaved (18:10:18) BBB: so the data packet looks like this: (18:10:29) BBB: [sample0left][sample0right][sample1left][sample1right][...] (18:10:33) BBB: right? (18:10:46) BBB: there's a new audio format (currently unused) called SAMPLE_FMT_S16LE_PLANAR (18:10:52) BBB: that will look like this: (18:11:02) BBB: [sample0left][sample1left][...][sampleNleft] (18:11:06) BBB: for data[0] (18:11:09) BBB: and data[1] looks like this: (18:11:20) BBB: [sample0right][sample1right][...][sampleNright] (18:11:26) BBB: so then you have multiple pointers -- Andrey Utkin From bytegm at gmail.com Sat Feb 25 08:28:28 2012 From: bytegm at gmail.com (ByteLee) Date: Sat, 25 Feb 2012 15:28:28 +0800 Subject: [Libav-user] About MMST PROTOCOL Message-ID: <013E55DA2AC244AEB853BA07266E3606@gmail.com> Hi All, Today, I want to play a audio source via MMST protocol, the url is mms://203.64.188.76/BBCNews(1000)/BBCNews(1000)201202241000010.asf. When I want to seek this audio source, the av_seek_frame function DO NOT return.I also read the code of mmst.c and mmsh.c, I see that mmst.c DO NOT have seek method and mmsh.c have. So I want to know what can I do if I want to seek this audio source.I also read the LIBMMS source, DO I need to write the seek function by myself? Waiting for your answer, Best wishes! -- ByteLee -------------- next part -------------- An HTML attachment was scrubbed... URL: From moonseraph128 at gmail.com Sun Feb 26 10:43:00 2012 From: moonseraph128 at gmail.com (Carlo Santos) Date: Sun, 26 Feb 2012 17:43:00 +0800 Subject: [Libav-user] Compiling using FFMPEG In-Reply-To: References: Message-ID: I am using Ubuntu 11.04 Natty Narwhal and have installed FFMPEG based on the instructions found here: >>http://ubuntuforums.org/showthread.php?t=786095 I am trying to compile a .CC file using G++ using the following command: >> g++ -Lhome/carlo/ffmpeg/ -lffmpeg test.cc -o test But I am getting the following error: >>test.cc:2:27: fatal error: ffmpeg/avformat: No such file or directory compilation terminated. What am I doing wrong? -- Carlo Santos -------------- next part -------------- An HTML attachment was scrubbed... URL: From quyadong at hotmail.com Sun Feb 26 10:47:10 2012 From: quyadong at hotmail.com (Sheldon Qu) Date: Sun, 26 Feb 2012 17:47:10 +0800 Subject: [Libav-user] Compiling using FFMPEG In-Reply-To: References: Message-ID: FFmpeg is not a library. From: Carlo Santos Sent: Sunday, February 26, 2012 5:43 PM To: libav-user at ffmpeg.org Subject: [Libav-user] Compiling using FFMPEG I am using Ubuntu 11.04 Natty Narwhal and have installed FFMPEG based on the instructions found here: >>http://ubuntuforums.org/showthread.php?t=786095 I am trying to compile a .CC file using G++ using the following command: >> g++ -Lhome/carlo/ffmpeg/ -lffmpeg test.cc -o test But I am getting the following error: >>test.cc:2:27: fatal error: ffmpeg/avformat: No such file or directory compilation terminated. What am I doing wrong? -- Carlo Santos -------------------------------------------------------------------------------- _______________________________________________ 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 moonseraph128 at gmail.com Sun Feb 26 10:54:33 2012 From: moonseraph128 at gmail.com (Carlo Santos) Date: Sun, 26 Feb 2012 17:54:33 +0800 Subject: [Libav-user] Compiling using FFMPEG In-Reply-To: References: Message-ID: But I am still getting the same error when I use the following command: >> g++ test.cc -o test -Lhome/carlo/ffmpeg/libavformat/ -lavformat On Sun, Feb 26, 2012 at 5:47 PM, Sheldon Qu wrote: > FFmpeg is not a library. > > *From:* Carlo Santos > *Sent:* Sunday, February 26, 2012 5:43 PM > *To:* libav-user at ffmpeg.org > *Subject:* [Libav-user] Compiling using FFMPEG > > I am using Ubuntu 11.04 Natty Narwhal and have installed FFMPEG based on > the instructions found here: > > >>http://ubuntuforums.org/showthread.php?t=786095 > > I am trying to compile a .CC file using G++ using the following command: > > >> g++ -Lhome/carlo/ffmpeg/ -lffmpeg test.cc -o test > > But I am getting the following error: > > >>test.cc:2:27: fatal error: ffmpeg/avformat: No such file or directory > compilation terminated. > > What am I doing wrong? > > -- > Carlo Santos > > ------------------------------ > _______________________________________________ > 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 > > -- Carlo Santos -------------- next part -------------- An HTML attachment was scrubbed... URL: From quyadong at hotmail.com Sun Feb 26 11:12:34 2012 From: quyadong at hotmail.com (Sheldon Qu) Date: Sun, 26 Feb 2012 18:12:34 +0800 Subject: [Libav-user] Compiling using FFMPEG In-Reply-To: References: Message-ID: Check the library path or add the include library path. From: Carlo Santos Sent: Sunday, February 26, 2012 5:54 PM To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. Subject: Re: [Libav-user] Compiling using FFMPEG But I am still getting the same error when I use the following command: >> g++ test.cc -o test -Lhome/carlo/ffmpeg/libavformat/ -lavformat On Sun, Feb 26, 2012 at 5:47 PM, Sheldon Qu wrote: FFmpeg is not a library. From: Carlo Santos Sent: Sunday, February 26, 2012 5:43 PM To: libav-user at ffmpeg.org Subject: [Libav-user] Compiling using FFMPEG I am using Ubuntu 11.04 Natty Narwhal and have installed FFMPEG based on the instructions found here: >>http://ubuntuforums.org/showthread.php?t=786095 I am trying to compile a .CC file using G++ using the following command: >> g++ -Lhome/carlo/ffmpeg/ -lffmpeg test.cc -o test But I am getting the following error: >>test.cc:2:27: fatal error: ffmpeg/avformat: No such file or directory compilation terminated. What am I doing wrong? -- Carlo Santos ------------------------------------------------------------------------------ _______________________________________________ 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 -- Carlo Santos -------------------------------------------------------------------------------- _______________________________________________ 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 buyit at live.cn Sun Feb 26 15:19:38 2012 From: buyit at live.cn (=?gb2312?B?srffrszs?=) Date: Sun, 26 Feb 2012 22:19:38 +0800 Subject: [Libav-user] question about libavcodec Message-ID: Hi experts: i have some questions about the libavcodec.so: 1. when compiling, how can i specify this library is compiled for ARM? and it includes NEON instruction supports? 2. suppose ARCH_ARM and HAVE_NEON are defined, which i mentioned in question 1, does it mean this library can only be executed on ARM platform and the chipset must have NEON module? 3. suppose the answer of quesion 2 is yes, then how can user choose libavcodec.so as they want? for example, there is an Android application "ROAMSAVE", it will use libavcodec.so, then how can i choose a suitable version libavcodec.so for roamsave? suppose i do not have any source code, and just want to download this library from internet? 4. if the application roamsave together with a specific libavcodec run well on Samsung smart phone, and i am sure this version libavcodec support ARM and execute NEON instruction. but when i use them on another smart phone(Motorola), it crashs in libavcodec.so, the problem is alignment of second parameter of function ff_scalarproduct_int16_neon(), how can i find the root cause?the libavcodec runs NEON instruction well on Samsumg phone, so it means this library compiled with correct GCC version and can handle stack alignment well , right? but why it crashs because of alignment problem when run on another smart phone which also support NEON instruction? i am very confused about this issue, please help me, thanks very much. Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From buyit at live.cn Mon Feb 27 10:33:19 2012 From: buyit at live.cn (=?gb2312?B?srffrszs?=) Date: Mon, 27 Feb 2012 17:33:19 +0800 Subject: [Libav-user] question about libavcodec In-Reply-To: References: Message-ID: Hi Experts: plase help, thanks very much. Best Regards From: buyit at live.cn To: libav-user at ffmpeg.org Subject: question about libavcodec Date: Sun, 26 Feb 2012 22:19:38 +0800 Hi experts: i have some questions about the libavcodec.so: 1. when compiling, how can i specify this library is compiled for ARM? and it includes NEON instruction supports? 2. suppose ARCH_ARM and HAVE_NEON are defined, which i mentioned in question 1, does it mean this library can only be executed on ARM platform and the chipset must have NEON module? 3. suppose the answer of quesion 2 is yes, then how can user choose libavcodec.so as they want? for example, there is an Android application "ROAMSAVE", it will use libavcodec.so, then how can i choose a suitable version libavcodec.so for roamsave? suppose i do not have any source code, and just want to download this library from internet? 4. if the application roamsave together with a specific libavcodec run well on Samsung smart phone, and i am sure this version libavcodec support ARM and execute NEON instruction. but when i use them on another smart phone(Motorola), it crashs in libavcodec.so, the problem is alignment of second parameter of function ff_scalarproduct_int16_neon(), how can i find the root cause?the libavcodec runs NEON instruction well on Samsumg phone, so it means this library compiled with correct GCC version and can handle stack alignment well , right? but why it crashs because of alignment problem when run on another smart phone which also support NEON instruction? i am very confused about this issue, please help me, thanks very much. Best Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From pavel at sokolov.me Mon Feb 27 17:15:50 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Mon, 27 Feb 2012 20:15:50 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> Message-ID: <4F4BAC36.8090601@sokolov.me> 24.02.2012 20:20, Andrey Utkin ?????: > Currently, PACKED samples format is used everywhere in libav. So for > audio, all data goes in data[0], containing frame.nb_samples samples. > i think linesize[0] indeed stores number of bytes in data[0]. > BBB has explained it to me on #libav this way: > (18:10:13) BBB: which, for stereo, is interleaved > (18:10:18) BBB: so the data packet looks like this: > (18:10:29) BBB: [sample0left][sample0right][sample1left][sample1right][...] > (18:10:33) BBB: right? > (18:10:46) BBB: there's a new audio format (currently unused) called > SAMPLE_FMT_S16LE_PLANAR > (18:10:52) BBB: that will look like this: > (18:11:02) BBB: [sample0left][sample1left][...][sampleNleft] > (18:11:06) BBB: for data[0] > (18:11:09) BBB: and data[1] looks like this: > (18:11:20) BBB: [sample0right][sample1right][...][sampleNright] > (18:11:26) BBB: so then you have multiple pointers > How I can convert this data to LPCM? -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From andrey.krieger.utkin at gmail.com Mon Feb 27 19:11:25 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Mon, 27 Feb 2012 20:11:25 +0200 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: <4F4BAC36.8090601@sokolov.me> References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> Message-ID: 2012/2/27 Pavel Sokolov : > How I can convert this data to LPCM? Isn't _that_ called LPCM? -- Andrey Utkin From jdxsolutions at gmail.com Mon Feb 27 23:37:49 2012 From: jdxsolutions at gmail.com (John Dexter) Date: Mon, 27 Feb 2012 22:37:49 +0000 Subject: [Libav-user] Recommended thread count to record video from rendering software Message-ID: I have a single-thread application which does 3D rendering; it is a moderate-heavy user of the single core it uses (~50%). In my quick tests, recording the rendered output to video using libav is fastest when I use AVCodecContext::thread_count == 3 on my quad-core PC, but it's almost identical with it set to 0. As well as any general advice you can offer, a couple of specific questions... 1)What does setting AVCodecContext::thread_count = 0 do (on Windows x86/64 hardware if it is platform-dependent)? Does it default to num-cores or nothing that simple? 2)In a situation similar to mine with a single-thread app using most of one core on a N-core CPU, what would you set AVCodecContext::thread_count to, and why? Thanks, John. From denim83 at yahoo.com Tue Feb 28 08:58:30 2012 From: denim83 at yahoo.com (Abhishek Ballaney) Date: Mon, 27 Feb 2012 23:58:30 -0800 (PST) Subject: [Libav-user] Audio encode example Message-ID: <1330415910.78193.YahooMailClassic@web112014.mail.gq1.yahoo.com> Hi all, Can someone provide audio_encode_example with new API of avcodec_encode_audio2? Regards, abhishek -------------- next part -------------- An HTML attachment was scrubbed... URL: From pavel at sokolov.me Tue Feb 28 10:12:56 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Tue, 28 Feb 2012 13:12:56 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> Message-ID: <4F4C9A98.7060401@sokolov.me> 27.02.2012 22:11, Andrey Utkin ?????: > 2012/2/27 Pavel Sokolov: >> How I can convert this data to LPCM? > Isn't _that_ called LPCM? > My hardware decoder in the embedded device can play sound in the LpcmDvd, LpcmHdDvd or LpcmBluRay formats. I have found function "pcm_bluray_parse_header" in file "pcm-mpeg.c" Comment on this function is "Parse the header of a LPCM frame read from a MPEG-TS stream" So, I think, that LPCM must have some specific header... -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From pavel at sokolov.me Tue Feb 28 10:48:42 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Tue, 28 Feb 2012 13:48:42 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: <4F4C9A98.7060401@sokolov.me> References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> <4F4C9A98.7060401@sokolov.me> Message-ID: <4F4CA2FA.90904@sokolov.me> 28.02.2012 13:12, Pavel Sokolov ?????: > 27.02.2012 22:11, Andrey Utkin ?????: >> 2012/2/27 Pavel Sokolov: >>> How I can convert this data to LPCM? >> Isn't _that_ called LPCM? >> > My hardware decoder in the embedded device can play sound in the > LpcmDvd, LpcmHdDvd or LpcmBluRay formats. > > I have found function "pcm_bluray_parse_header" in file "pcm-mpeg.c" > Comment on this function is "Parse the header of a LPCM frame read > from a MPEG-TS stream" > So, I think, that LPCM must have some specific header... > I found LPCM header format, but I'm not sure, that it is correct: http://lists.mplayerhq.hu/pipermail/mplayer-dvb/2001-December/000224.html id 8 bit number of frames 8 bit first acces unit pointer, i.e. start of audio frame 16 bit audio emphasis on-off 1 bit audio mute on-off 1 bit reserved 1 bit audio frame number 5 bit quantization word length 2 bit audio sampling frequency (48khz = 0, 96khz = 1) 2 bit reserved 1 bit number of audio channels - 1 (e.g. stereo = 1) 3 bit dynamic range control (0x80 if off) 8 bit -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From andrey.krieger.utkin at gmail.com Tue Feb 28 10:59:21 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 28 Feb 2012 11:59:21 +0200 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: <4F4C9A98.7060401@sokolov.me> References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> <4F4C9A98.7060401@sokolov.me> Message-ID: 2012/2/28 Pavel Sokolov : > 27.02.2012 22:11, Andrey Utkin ?????: > >> 2012/2/27 Pavel Sokolov: >>> >>> How I can convert this data to LPCM? >> >> Isn't _that_ called LPCM? I'm not an expert on media formats, so i can be wrong in some point. So comments from other people are appreciated. > My hardware decoder in the embedded device can play sound in the LpcmDvd, > LpcmHdDvd or LpcmBluRay formats. First of all, you asked to get LPCM _data_. http://en.wikipedia.org/wiki/Linear_pulse-code_modulation http://truehtpc.com/content/chto-takoie-pcm-ili-lpcm >From this, i assume that LPCM is not a container format, but raw data format. That is exactly what i described above, and what you get after avcodec_decode_audio(). Now you talk about your hardware decoder... Maybe you should better ask straightly what your mission is, like "transcode a movie for playback on dvd-player "CORPORATION MODEL100500". > I have found function "pcm_bluray_parse_header" in file "pcm-mpeg.c" > Comment on this function is "Parse the header of a LPCM frame read from a > MPEG-TS stream" > So, I think, that LPCM must have some specific header... (also replying to your newer letter) Headers belong to containers (file folrmats) and codecs (stream formats). Obviously, you have to find out which containers and codecs your hardware supports, and then remux/reencode your existing data to that formats. Or just mux/encode, if you create data. Formats "LpcmDvd, LpcmHdDvd or LpcmBluRay" sound strange to me, so tell us the model and give a link to device specs, so we can figure out the format names which ffmpeg knows. -- Andrey Utkin From andrey.krieger.utkin at gmail.com Tue Feb 28 11:08:36 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Tue, 28 Feb 2012 12:08:36 +0200 Subject: [Libav-user] Recommended thread count to record video from rendering software In-Reply-To: References: Message-ID: 2012/2/28 John Dexter : > I have a single-thread application which does 3D rendering; it is a > moderate-heavy user of the single core it uses (~50%). In my quick > tests, recording the rendered output to video using libav is fastest > when I use AVCodecContext::thread_count == 3 on my quad-core PC, but > it's almost identical with it set to 0. > > As well as any general advice you can offer, a couple of specific questions... > > 1)What does setting AVCodecContext::thread_count = 0 do (on Windows > x86/64 hardware if it is platform-dependent)? Does it default to > num-cores or nothing that simple? If num of cores is 1, then 1. If >1, then num of cores + 1, but not more than 16. (from libavcodec/pthread.c:thread_init()) > 2)In a situation similar to mine with a single-thread app using most > of one core on a N-core CPU, what would you set > AVCodecContext::thread_count to, and why? I'd use 0, if i am sure that only one instance of my app is launched. Otherwise, i'd stay with 1 to avoid overloading CPU and host going slowly responsive. -- Andrey Utkin From h.leppkes at gmail.com Tue Feb 28 11:41:32 2012 From: h.leppkes at gmail.com (Hendrik Leppkes) Date: Tue, 28 Feb 2012 11:41:32 +0100 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> <4F4C9A98.7060401@sokolov.me> Message-ID: 2012/2/28 Andrey Utkin : > Formats "LpcmDvd, LpcmHdDvd or LpcmBluRay" sound strange to me, so > tell us the model and give a link to device specs, so we can figure > out the format names which ffmpeg knows. There is CODEC_ID_PCM_BLURAY and CODEC_ID_PCM_DVD, which are used for the "special" PCM structure on those two disc formats respectively, however neither of those has an encoder in ffmpeg yet, only decoders. From h.leppkes at gmail.com Tue Feb 28 11:43:16 2012 From: h.leppkes at gmail.com (Hendrik Leppkes) Date: Tue, 28 Feb 2012 11:43:16 +0100 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> <4F4C9A98.7060401@sokolov.me> Message-ID: Something i forgot to mention: 16-bit PCM on DVD is just plain CODEC_ID_PCM_S16BE, which does have an encoder. Only 20 and 24-bit use the special DVD variant. From cehoyos at ag.or.at Tue Feb 28 13:27:06 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 28 Feb 2012 12:27:06 +0000 (UTC) Subject: [Libav-user] Recommended thread count to record video from rendering software References: Message-ID: John Dexter writes: > I have a single-thread application which does 3D rendering; it is a > moderate-heavy user of the single core it uses (~50%). In my quick > tests, recording the rendered output to video using libav is fastest > when I use AVCodecContext::thread_count == 3 on my quad-core PC, but > it's almost identical with it set to 0. I don't know your use case, but you typically have to set thread much higher than num_core if you want maximum performance. Carl Eugen From cehoyos at ag.or.at Tue Feb 28 13:45:04 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Tue, 28 Feb 2012 12:45:04 +0000 (UTC) Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> <4F4C9A98.7060401@sokolov.me> Message-ID: Andrey Utkin writes: > Now you talk about your hardware decoder... Maybe you should better > ask straightly what your mission is, like "transcode a movie for > playback on dvd-player "CORPORATION MODEL100500". I thought I am the only one who did not completely understand what the issue is about;-) Pavel, if you have a file that plays on your hardware, please provide complete, uncut console output of "ffmpeg -i input" for that file. Carl Eugen From quyadong at hotmail.com Tue Feb 28 14:00:08 2012 From: quyadong at hotmail.com (Sheldon Qu) Date: Tue, 28 Feb 2012 21:00:08 +0800 Subject: [Libav-user] question about libavcodec In-Reply-To: References: Message-ID: From: ?????? Sent: Monday, February 27, 2012 5:33 PM To: libav-user at ffmpeg.org Subject: Re: [Libav-user] question about libavcodec Hi Experts: plase help, thanks very much. Best Regards -------------------------------------------------------------------------------- From: buyit at live.cn To: libav-user at ffmpeg.org Subject: question about libavcodec Date: Sun, 26 Feb 2012 22:19:38 +0800 Hi experts: i have some questions about the libavcodec.so: 1. when compiling, how can i specify this library is compiled for ARM? and it includes NEON instruction supports? run configure ?Chelp or search in google 2. suppose ARCH_ARM and HAVE_NEON are defined, which i mentioned in question 1, does it mean this library can only be executed on ARM platform and the chipset must have NEON module? yes 3. suppose the answer of quesion 2 is yes, then how can user choose libavcodec.so as they want? for example, there is an Android application "ROAMSAVE", it will use libavcodec.so, then how can i choose a suitable version libavcodec.so for roamsave? suppose i do not have any source code, and just want to download this library from internet? ask your mentor 4. if the appl ication roamsave together with a specific libavcodec run well on Samsung smart phone, and i am sure this version libavcodec support ARM and execute NEON instruction. but when i use them on another smart phone(Motorola), it crashs in libavcodec.so, the problem is alignment of second parameter of function ff_scalarproduct_int16_neon(), how can i find the root cause?the libavcodec runs NEON instruction well on Samsumg phone, so it means this library compiled with correct GCC version and can handle stack alignment well , right? but why it crashs because of alignment problem when run on another smart phone which also support NEON instruction? i am very confused about this issue, please help me, thanks very much. recompile for motor and try it again. Best Regards -------------------------------------------------------------------------------- _______________________________________________ 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 pavel at sokolov.me Tue Feb 28 17:08:02 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Tue, 28 Feb 2012 20:08:02 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> <4F47B41D.4010507@sokolov.me> <4F4BAC36.8090601@sokolov.me> <4F4C9A98.7060401@sokolov.me> Message-ID: <4F4CFBE2.3040602@sokolov.me> 28.02.2012 13:59, Andrey Utkin ?????: > First of all, you asked to get LPCM _data_. > http://en.wikipedia.org/wiki/Linear_pulse-code_modulation > http://truehtpc.com/content/chto-takoie-pcm-ili-lpcm > > From this, i assume that LPCM is not a container format, but raw data > format. That is exactly what i described above, and what you get after > avcodec_decode_audio(). > > Now you talk about your hardware decoder... Maybe you should better > ask straightly what your mission is, like "transcode a movie for > playback on dvd-player "CORPORATION MODEL100500". My h/w decoder is running on the MIPS chipset Broadcom 7213. I think you don't know anything about this chipset. LPCM header for MPEG2 PES info: http://www.mpucoder.com/DVD/ass-hdr.html I have added LPCM header to the PES header over private stream 1 (http://www.mpucoder.com/DVD/pes-hdr.html). Now h/w decoder can play decoded by ffmpeg ac3 stereo, but it still can't play ac3 5.1 sound. -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From alexcohn at netvision.net.il Tue Feb 28 17:46:44 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Tue, 28 Feb 2012 18:46:44 +0200 Subject: [Libav-user] question about libavcodec In-Reply-To: References: Message-ID: On Tue, Feb 28, 2012 at 15:00, Sheldon Qu wrote: > > Hi Experts: > > plase help, thanks very much. > > Best Regards Isn't it considered rude to post the same questions again and again in this huge ugly typeset? Anyway, regarding the roamsave Android application, if they use libavcodec or other ffmpeg flibraries, it's their responsibility, as reuired by LGPL, to provide the way for end-users to compile the library for any supported platform and load it. Sincerely, Alex From bytegm at gmail.com Tue Feb 28 17:52:35 2012 From: bytegm at gmail.com (ByteLee) Date: Wed, 29 Feb 2012 00:52:35 +0800 Subject: [Libav-user] How To Use av_seek_frame via mmst protocol??? Message-ID: Hi All, Today, I want to play a audio source via MMST protocol, the url is mms://203.64.188.76/BBCNews(1000)/BBCNews(1000)201202241000010.asf. When I want to seek this audio source, the av_seek_frame function DO NOT return.I also read the code of mmst.c and mmsh.c, I see that mmst.c DO NOT have seek method and mmsh.c have. So I want to know what can I do if I want to seek this audio source.I also read the LIBMMS source, DO I need to write the seek function by myself? Waiting for your answer, Best wishes! -- ByteLee -------------- next part -------------- An HTML attachment was scrubbed... URL: From pavel at sokolov.me Tue Feb 28 17:52:32 2012 From: pavel at sokolov.me (Pavel Sokolov) Date: Tue, 28 Feb 2012 20:52:32 +0400 Subject: [Libav-user] AC3 -> LPCM -> MPEG2 PES In-Reply-To: References: <4F478949.1040605@sokolov.me> Message-ID: <4F4D0650.3050207@sokolov.me> 24.02.2012 18:12, Andrey Utkin ?????: >> I need to get LPCM data from ac3, to add it later to MPEG2 PES packet. >> > I'm using "avcodec_decode_audio4" to decode ac3 packet. >> > In which format the resulting AVFrame structure stores data? > The decoded audio data format can be checked in AVFrame.format, and > also AVCodecContext.sample_fmt. For audio, check it with enum > AVSampleFormat. Sample rate is in AVCodecContext.sample_rate. > AVFrame.format is always -1 after avcodec_decode_audio4. Is it bug? -- With best regards, Pavel A. Sokolov mobile: +7(921)419-1819 skype: pavel_a_sokolov From fzanelli at tecnosens.it Tue Feb 28 08:49:07 2012 From: fzanelli at tecnosens.it (fzanelli) Date: Mon, 27 Feb 2012 23:49:07 -0800 (PST) Subject: [Libav-user] get if my rtsp input stream supports 'pause' command Message-ID: <1330415347279-4427335.post@n4.nabble.com> I want to play a rtsp input stream from an ip camera and I'd like to know if it supports 'pause' command. At low level (rtsp protocol) would be sufficient read the response from the command 'OPTIONS', but how can I get that information by ffmpeg api? This is my simplified code: AVFormatContext *fc = avformat_alloc_context(); int res; res = avformat_open_input(&fc, "rtsp://10.0.4.58/h264", NULL, NULL); res = avformat_find_stream_info(fc, NULL); AVCodecContext *cc = fc->streams[videoStreamIndex]->codec; once I got FormatContext and CodecContext, how can I get if my stream supports 'pause' command, that means that av_read_pause() api has really effect? thank you Franco -- View this message in context: http://libav-users.943685.n4.nabble.com/get-if-my-rtsp-input-stream-supports-pause-command-tp4427335p4427335.html Sent from the libav-users mailing list archive at Nabble.com. From quyadong at hotmail.com Wed Feb 29 00:51:24 2012 From: quyadong at hotmail.com (Sheldon Qu) Date: Wed, 29 Feb 2012 07:51:24 +0800 Subject: [Libav-user] question about libavcodec In-Reply-To: References: Message-ID: Sorry, I just answer his question in last email with ugly typeset. -----????----- From: Alex Cohn Sent: Wednesday, February 29, 2012 12:46 AM To: This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter. Subject: Re: [Libav-user] question about libavcodec On Tue, Feb 28, 2012 at 15:00, Sheldon Qu wrote: > > Hi Experts: > > plase help, thanks very much. > > Best Regards Isn't it considered rude to post the same questions again and again in this huge ugly typeset? Anyway, regarding the roamsave Android application, if they use libavcodec or other ffmpeg flibraries, it's their responsibility, as reuired by LGPL, to provide the way for end-users to compile the library for any supported platform and load it. Sincerely, Alex _______________________________________________ Libav-user mailing list Libav-user at ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user From buyit at live.cn Wed Feb 29 02:21:58 2012 From: buyit at live.cn (=?gb2312?B?srffrszs?=) Date: Wed, 29 Feb 2012 09:21:58 +0800 Subject: [Libav-user] question about libavcodec In-Reply-To: References: , , Message-ID: > From: quyadong at hotmail.com > To: libav-user at ffmpeg.org > Date: Wed, 29 Feb 2012 07:51:24 +0800 > Subject: Re: [Libav-user] question about libavcodec > > Sorry, I just answer his question in last email with ugly typeset. > > -----????----- > From: Alex Cohn > Sent: Wednesday, February 29, 2012 12:46 AM > To: This list is about using libavcodec, libavformat, libavutil,libavdevice > and libavfilter. > Subject: Re: [Libav-user] question about libavcodec > > On Tue, Feb 28, 2012 at 15:00, Sheldon Qu wrote: > > > > Hi Experts: > > > > plase help, thanks very much. > > > > Best Regards > > Isn't it considered rude to post the same questions again and again in > this huge ugly typeset? > > Anyway, regarding the roamsave Android application, if they use > libavcodec or other ffmpeg flibraries, it's their responsibility, as > reuired by LGPL, to provide the way for end-users to compile the > library for any supported platform and load it. > if the library crashes because of obviously coding mistake which i have shown you, don't you think somebody who is maintaining this library should do something to fix it? at least, give some suggesting to me, i just want to konw whether this is a known bug inside libavcodec, how can this be so difficult to get this feedback from you guys? you do no want anybody report bug??? you do not want anybody use your library but crashs??? > Sincerely, > 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 cehoyos at ag.or.at Wed Feb 29 09:04:11 2012 From: cehoyos at ag.or.at (Carl Eugen Hoyos) Date: Wed, 29 Feb 2012 08:04:11 +0000 (UTC) Subject: [Libav-user] question about libavcodec References: , , Message-ID: ??? writes: > you do no want anybody report bug??? I believe that if you look at our bug tracker (and compare it to the trackers of similar projects) you will find out that we are *very* interested in bug reports. Unfortunately, only reproducible bug reports (or those that include information why they are not easily reproducible) and bug reports that include all necessary information (like backtraces and valgrind output) are likely to be fixed. Carl Eugen From fzanelli at tecnosens.it Wed Feb 29 09:08:05 2012 From: fzanelli at tecnosens.it (Zanelli Franco) Date: Wed, 29 Feb 2012 09:08:05 +0100 Subject: [Libav-user] rtsp over tcp by apies In-Reply-To: <1330415347279-4427335.post@n4.nabble.com> References: <1330415347279-4427335.post@n4.nabble.com> Message-ID: Hi all, I found out that ?tcp option passed via rtsp URL (example rtsp://10.0.0.204/media?tcp) is deprecated and now we use -rtsp_transport parameter, but how can I set this using ffmpeg apies? thank you Franco From denim83 at yahoo.com Wed Feb 29 09:10:28 2012 From: denim83 at yahoo.com (Abhishek Ballaney) Date: Wed, 29 Feb 2012 00:10:28 -0800 (PST) Subject: [Libav-user] audio_encode_example Message-ID: <1330503028.28750.YahooMailClassic@web112010.mail.gq1.yahoo.com> Hi all, Can someone provide me audio_encode_example() with new API of avcodec_encode_audio2()? Regards, abhishek -------------- next part -------------- An HTML attachment was scrubbed... URL: From bytegm at gmail.com Wed Feb 29 09:12:21 2012 From: bytegm at gmail.com (ByteLee) Date: Wed, 29 Feb 2012 16:12:21 +0800 Subject: [Libav-user] audio_encode_example In-Reply-To: <1330503028.28750.YahooMailClassic@web112010.mail.gq1.yahoo.com> References: <1330503028.28750.YahooMailClassic@web112010.mail.gq1.yahoo.com> Message-ID: <8C0BD0034D584167A2C9772D2561F6A9@gmail.com> Do you read the source code of ffmpeg, I remember that there is some code about avcodec_encode_audio2() -- ByteLee On Wednesday, February 29, 2012 at 4:10 PM, Abhishek Ballaney wrote: > Hi all, > > Can someone provide me audio_encode_example() with new API of avcodec_encode_audio2()? > > Regards, > abhishek > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org (mailto:Libav-user at ffmpeg.org) > http://ffmpeg.org/mailman/listinfo/libav-user -------------- next part -------------- An HTML attachment was scrubbed... URL: From fzanelli at tecnosens.it Wed Feb 29 09:59:43 2012 From: fzanelli at tecnosens.it (Zanelli Franco) Date: Wed, 29 Feb 2012 09:59:43 +0100 Subject: [Libav-user] rtsp over tcp by apies Message-ID: Hi all, pardon me, I send again the question because I made a mistake before. this is my code: int res; AVFormatContext *fc = avformat_alloc_context(); res = avformat_open_input(&fc, "rtsp://10.0.0.204/media?tcp", NULL, NULL); I found out that ?tcp option passed via rtsp URL is deprecated and now we use -rtsp_transport parameter, but how can I set this using ffmpeg apies? Is there a parameter in AVFormatContext or AVCodecContext that I have to set? thank you Franco From buyit at live.cn Wed Feb 29 10:16:45 2012 From: buyit at live.cn (=?gb2312?B?srffrszs?=) Date: Wed, 29 Feb 2012 17:16:45 +0800 Subject: [Libav-user] question about libavcodec In-Reply-To: References: , , , , , , Message-ID: > To: libav-user at ffmpeg.org > From: cehoyos at ag.or.at > Date: Wed, 29 Feb 2012 08:04:11 +0000 > Subject: Re: [Libav-user] question about libavcodec > > ??? writes: > > > you do no want anybody report bug??? > > I believe that if you look at our bug tracker (and compare it to the > trackers of similar projects) you will find out that we are *very* > interested in bug reports. > Unfortunately, only reproducible bug reports (or those that include > information why they are not easily reproducible) and bug reports > that include all necessary information (like backtraces and > valgrind output) are likely to be fixed. > i attach the patches which can make Linux Kernel handle un-alignment NEON instructions. anybody who find the same issue with me can use these patches. by the way, it is funny that i modify kernel data abort handler to cater to libavcodec. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Copy of 0001-change-default-alignment-method-for-android-user-app.patch Type: application/octet-stream Size: 797 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Copy of 0001-add-neon-alignment-data-abort-handler.patch Type: application/octet-stream Size: 3586 bytes Desc: not available URL: From alexcohn at netvision.net.il Wed Feb 29 10:28:16 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 29 Feb 2012 11:28:16 +0200 Subject: [Libav-user] question about libavcodec In-Reply-To: References: Message-ID: On Wed, Feb 29, 2012 at 11:16, ??? wrote: > > i attach the patches which can make Linux Kernel handle un-alignment NEON > instructions. > anybody who find the same issue with me can use these patches. > > by the way, it is funny that i modify kernel data abort handler to cater to > libavcodec. Do you seriously suggest these patches applied on Android devices that run the "roamsave' application? Alex From alexcohn at netvision.net.il Wed Feb 29 10:29:42 2012 From: alexcohn at netvision.net.il (Alex Cohn) Date: Wed, 29 Feb 2012 11:29:42 +0200 Subject: [Libav-user] question about libavcodec In-Reply-To: References: Message-ID: On Wed, Feb 29, 2012 at 01:51, Sheldon Qu wrote: > Sorry, I just answer his question in last email with ugly typeset. Probably your answer was destroyed completely, only the original request is visible. BR Alex From denim83 at yahoo.com Wed Feb 29 12:45:12 2012 From: denim83 at yahoo.com (Abhishek Ballaney) Date: Wed, 29 Feb 2012 03:45:12 -0800 (PST) Subject: [Libav-user] [FFmpeg-devel] audio_encode_example In-Reply-To: <8C0BD0034D584167A2C9772D2561F6A9@gmail.com> Message-ID: <1330515912.11937.YahooMailClassic@web112018.mail.gq1.yahoo.com> Hi ByteLee, i've read ffmpeg-0.10\doc\examples\decoding_encoding.c.? Its having audio_encode_example() using avcodec_encode_audio() (which is deprecated).? Can someone provide audio_encode_example() using new API of avcodec_encode_audio2()? Regards, abhishek --- On Wed, 29/2/12, ByteLee wrote: From: ByteLee Subject: Re: [FFmpeg-devel] [Libav-user] audio_encode_example To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." Cc: ffmpeg-devel at ffmpeg.org Date: Wednesday, 29 February, 2012, 1:42 PM Do you read the source code of ffmpeg, I remember that there is some code about avcodec_encode_audio2() -- ByteLee On Wednesday, February 29, 2012 at 4:10 PM, Abhishek Ballaney wrote: > Hi all, > > Can someone provide me audio_encode_example() with new API of avcodec_encode_audio2()? > > Regards, > abhishek > _______________________________________________ > Libav-user mailing list > Libav-user at ffmpeg.org (mailto:Libav-user at ffmpeg.org) > http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel at ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitinkumgoyal at gmail.com Wed Feb 29 13:21:02 2012 From: nitinkumgoyal at gmail.com (NITIN GOYAL) Date: Wed, 29 Feb 2012 17:51:02 +0530 Subject: [Libav-user] [FFmpeg-devel] audio_encode_example In-Reply-To: <1330515912.11937.YahooMailClassic@web112018.mail.gq1.yahoo.com> References: <8C0BD0034D584167A2C9772D2561F6A9@gmail.com> <1330515912.11937.YahooMailClassic@web112018.mail.gq1.yahoo.com> Message-ID: Hi I am seeing that the this example has been updated 10 days ago but that also have avcodec_encode_audio example. see this link https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decoding_encoding.c I am not sure when this encode_audio2(0 has been release. If its released in between then the example has not been created yet and will be available soon. This example I have given below have the latest decode4() available. Thansk Nitin On Wed, Feb 29, 2012 at 5:15 PM, Abhishek Ballaney wrote: > Hi ByteLee, > > i've read ffmpeg-0.10\doc\examples\decoding_encoding.c. Its having > audio_encode_example() using avcodec_encode_audio() (which is deprecated). > > Can someone provide audio_encode_example() using new API of > avcodec_encode_audio2()? > > Regards, > abhishek > > --- On *Wed, 29/2/12, ByteLee * wrote: > > > From: ByteLee > Subject: Re: [FFmpeg-devel] [Libav-user] audio_encode_example > To: "This list is about using libavcodec, libavformat, libavutil, > libavdevice and libavfilter." > Cc: ffmpeg-devel at ffmpeg.org > Date: Wednesday, 29 February, 2012, 1:42 PM > > Do you read the source code of ffmpeg, I remember that there is some code > about avcodec_encode_audio2() > > -- > ByteLee > > > On Wednesday, February 29, 2012 at 4:10 PM, Abhishek Ballaney wrote: > > > Hi all, > > > > Can someone provide me audio_encode_example() with new API of > avcodec_encode_audio2()? > > > > Regards, > > abhishek > > _______________________________________________ > > Libav-user mailing list > > Libav-user at ffmpeg.org (mailto: > Libav-user at ffmpeg.org ) > > http://ffmpeg.org/mailman/listinfo/libav-user > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel at ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > _______________________________________________ > 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 apolyxrono at yahoo.co.uk Wed Feb 29 15:47:14 2012 From: apolyxrono at yahoo.co.uk (adreas Polyxronopoulos) Date: Wed, 29 Feb 2012 14:47:14 +0000 (GMT) Subject: [Libav-user] Using libstagefright-h264 Message-ID: <1330526834.32437.YahooMailNeo@web28614.mail.ukl.yahoo.com> Hello , does anyone know how to use libstagefright-h264 ? I can decode the received frames using the software decoder on an Android 2.2 device , but i can't find any example on how to decode frames using the hardware (libstagefright-h264). thanks ? Adreas Polychronopoulos -------------- next part -------------- An HTML attachment was scrubbed... URL: From i.like.privacy.too at gmail.com Wed Feb 29 18:44:34 2012 From: i.like.privacy.too at gmail.com (Camera Man) Date: Wed, 29 Feb 2012 12:44:34 -0500 Subject: [Libav-user] rtsp over tcp by apies In-Reply-To: References: Message-ID: <4F4E6402.1060403@gmail.com> An HTML attachment was scrubbed... URL: From craigmurray100 at gmail.com Wed Feb 29 20:29:31 2012 From: craigmurray100 at gmail.com (Craig Murray) Date: Wed, 29 Feb 2012 14:29:31 -0500 Subject: [Libav-user] building as .dll and .framework Message-ID: I've been asked to package ffmpeg inside an Adobe AIR application. The Adobe documentation says that this can be done by compiling the app (ffmepg in this case) as a .dll (for windows) and a .framework(for mac). I'll need to do both. So my question is, how hard is going to be to change the make files to produce these linkable lilbraries instead of executables as they are now? And 2nd, can anyone give me some hints of get me started with how to modify the makefiles or whatever else needs changed to achieve this? Thanks much! -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrey.krieger.utkin at gmail.com Wed Feb 29 22:37:44 2012 From: andrey.krieger.utkin at gmail.com (Andrey Utkin) Date: Wed, 29 Feb 2012 23:37:44 +0200 Subject: [Libav-user] building as .dll and .framework In-Reply-To: References: Message-ID: ?????, 29 ??????? 2012 ?. ???????????? Craig Murray < craigmurray100 at gmail.com> ?????: > I've been asked to package ffmpeg inside an Adobe AIR application. The Adobe documentation says that this can be done by compiling the app (ffmepg in this case) as a .dll (for windows) and a .framework(for mac). I'll need to do both. > > So my question is, how hard is going to be to change the make files to produce these linkable lilbraries instead of executables as they are now? > > And 2nd, can anyone give me some hints of get me started with how to modify the makefiles or whatever else needs changed to achieve this? > > > Thanks much! > IIRC, actually you have dll when building on windows. Ensure --enable-shared configure option. Regarding mac - framework is generally a directory with static or dynamic libs. There must be generic tutorials on packaging libs into framework. We'd be very thankful if you contribute to upstream such script for framework-izing. -- Andrey Utkin -------------- next part -------------- An HTML attachment was scrubbed... URL: From donmoir at comcast.net Wed Feb 29 22:58:41 2012 From: donmoir at comcast.net (Don Moir) Date: Wed, 29 Feb 2012 16:58:41 -0500 Subject: [Libav-user] [FFmpeg-devel] audio_encode_example References: <1330515912.11937.YahooMailClassic@web112018.mail.gq1.yahoo.com> Message-ID: <0A69305EA8254CCFB03D394401D8E001@MANLAP> > i've read ffmpeg-0.10\doc\examples\decoding_encoding.c. Its having > audio_encode_example() using avcodec_encode_audio() (which is deprecated). > Can someone provide audio_encode_example() using new API of > avcodec_encode_audio2()? If you look in libavcodec\utils.c you will see that avcodec_encode_audio now calls avcodec_encode_audio2. You can look at the code for avcodec_encode_audio (utils.c) and check how it now handles avcodec_encode_audio2 and that should be enough for you to move to avcodec_encode_audio2.