[libav-user] decoding MPEG4 ASP to RGB

2009-12-02 Thread Igor R
Hello, I'm using the library under Win32. I have to decode MPEG4 ASP frame and then render it with BitBlt. I try to accomplish this using avcodec_decode_video2(), but it seems to produce some YUV image. Is it possible to decode into RGB format directly? Thanks!

Re: [libav-user] decoding MPEG4 ASP to RGB

2009-12-02 Thread Igor R
Please correct me if I'm wrong, but I don't believe that's possible. I'm also decoding MP4's, and I haven't found a way to get around using a call to sws_scale() or the deprecated img_convert to convert the images. I'm not sure I got you right - do you successfully use avcodec_decode_video2()

Re: [libav-user] decoding MPEG4 ASP to RGB

2009-12-02 Thread Igor R
Assuming you prefer the modern version:    struct SwsContext* hSwsContext = sws_getContext(pCodecCtx-width, pCodecCtx-height, pCodecCtx-pix_fmt,          pCodecCtx-width, pCodecCtx-height, PIX_FMT_RGB24,  SWS_AREA, NULL, NULL, NULL)    avcodec_decode_video2(pCodecCtx, pFrame,

Re: [libav-user] decoding MPEG4 ASP to RGB

2009-12-03 Thread Igor R
Assuming you prefer the modern version:    struct SwsContext* hSwsContext = sws_getContext(pCodecCtx-width, pCodecCtx-height, pCodecCtx-pix_fmt,          pCodecCtx-width, pCodecCtx-height, PIX_FMT_RGB24,  SWS_AREA, NULL, NULL, NULL)    avcodec_decode_video2(pCodecCtx, pFrame,

Re: [libav-user] decoding MPEG4 ASP video on iPhone (armv6)

2009-12-15 Thread Igor R
Has anyone managed to do the subj with all the recent ARM-specific optimizations? My application receives MPEG4 video from network, decodes frame by frame with avcodec_decode_video2(), then converts to 32-bit RGB with sws_scale(). On PC (Win32 on Intel) it works well, but on iPhone I always

Re: [libav-user] decoding MPEG4 ASP video on iPhone (armv6)

2009-12-15 Thread Igor R
I did that and had similar problem. I was able to workaround the problems by disabling some build optimizations. To be more specific they were: --disable-mmx --disable-mmx2 --disable-neon --disable-armv5te --disable-iwmmxt --disable-optimizations. Well, as I wrote, I disabled all the

[libav-user] Strange crash in avcodec_encode_video()

2010-01-09 Thread Igor R
Hello, I encountered strange behaviour, when using avcodec_encode_video() to make jpeg image. My project is Windows COM dll, which is used from within a .NET client, and when the above function is called in a thread originated from .NET, it always crashes in a very strange manner. However, if the

Re: [libav-user] Decoding amr-nb

2010-03-03 Thread Igor R .
Use av_audio_resample_init(), audio_resample() and so on to convert audio formats. Thank you for your response. I tried to resample the audio, and it really did the job. Still, one issue remained: along with the voice, there's a very loud permanent noise (kind of background crackles/hum). I

Re: [libav-user] Decoding amr-nb

2010-03-03 Thread Igor R .
I tried to resample the audio, and it really did the job. Still, one issue remained: along with the voice, there's a very loud permanent noise (kind of background crackles/hum). Well, it seems that the problem wasn't in the parameters to av_audio_resample_init(), but in audio_resample(). In

Re: [libav-user] Decoding amr-nb

2010-03-03 Thread Igor R .
Right, it's number of samples, so in this case bytes / sizeof(float). I thought that SAMPLE_FMT_FLT designates 4-byte float. At least, when I treated the original non-resampled sound as SAMPLE_FMT_S32, there was some reasonable sound (with a lot of noise), while SAMPLE_FMT_S16 didn't produce

Re: [libav-user] saving image as jpeg

2010-04-09 Thread Igor R
I'm using Martin Bohme example to extract frame from a video, and I would like to save them with jpeg format (not ppm, as in the example). I suposse I have to change the pix_fmt to other that supports jpeg (for instance PIX_FMT_YUVJ444P). But I don't know yet how to save the header or what I

[libav-user] av_write_frame() and growing memory usage

2010-05-08 Thread Igor R
Hello, In my application I write a video-stream (ASP MPEG4) to an *.avi file using av_write_frame(). During a stress-test, in which I deal with 100 streams simultaneously, I noticed that the memory consumption is going up constantly, until I close the files. In 5 minutes it grows by ~350Mb, then

Re: [libav-user] Correct time_base and pts values - how to?

2010-05-11 Thread Igor R
Thanks a lot for your detailed explanations, the things got more clear now. First of all, lowering time_base solved the memory consumtion issue: http://permalink.gmane.org/gmane.comp.video.ffmpeg.libav.user/4636 If you know that your video has a constant framerate of 10 then you should set

[libav-user] Resampling audio - buffer size issue

2010-06-02 Thread Igor R
Hello, After decoding an AMR-NB audio with avcodec_decode_audio3(), I receive SAMPLE_FMT_FLT output (don't know why). Since my PCM player can't play such a format, I resample it to SAMPLE_FMT_S16: audio_resample(resampleCtx, (short *)pcmResampled, (short *)pcm, cb / sizeof(float)); ...where cb

Re: [libav-user] Remove from mail list

2010-06-15 Thread Igor R
Could you please remove me from forum mail lists. Here you go: https://lists.mplayerhq.hu/mailman/listinfo/libav-user ___ libav-user mailing list libav-user@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Re: [libav-user] Remove from mail list

2010-06-15 Thread Igor R
Tried logging onto your site several times over the last week or two, but always run into the message Firefox can't establish a connection to the server at lists.mplayerhq.hu.. Do not know why this is. I've reset my router a few times during this time. Guess your server has been okay? No

[libav-user] avcodec_decode_video2 fails with some mpeg4 video streams

2010-06-30 Thread Igor R
Hello, In my project I decode ASP MPEG4 video streams with avcodec_decode_video2(). Most of the streams are decoded well, but some fail and produce the following output. FWIW, I can successfully decode them with xvidcore. I'd appreciate any idea. [mpeg4 @ 0357b780]Static Sprites not supported

[libav-user] ver0.6 doesn't decode mpeg4 video

2010-07-01 Thread Igor R
Hello, In my project I use libavcodec to decode mpeg4 videdoe streams. I've just upgraded to 0.6, and all the decoding stopped working. Instead I get the following debug output: [mpeg4 @ 05c204e0]Static Sprites not supported [mpeg4 @ 05c204e0]N-bit not supported [mpeg4 @ 05c204e0]quant precision

[libav-user] building ffmpeg with gcc4.5 fails

2010-07-01 Thread Igor R
Hello, I'm trying to build ver0.6 with gcc4.5.0 (WinXP, MinGW/MSys), and it fails with internal compiler error: $ make distclean $ ./configure --disable-everything --disable-sse --disable-mmx --disable-optimizations $ make CC libavcodec/eval.o libavcodec/eval.c: In function 'eval_expr':

Re: [libav-user] building ffmpeg with gcc4.5 fails

2010-07-03 Thread Igor R
GCC 4.5.0-1, mingwrt-3.18-mingw32, binutils-2.20-1-mingw32 and w32api-3.14-mingw32 work fine with FFMPEG0.6 Thanks for the information! Reinstalling Msys/MinGW really fixed the things. ___ libav-user mailing list libav-user@mplayerhq.hu

Re: [libav-user] Error while decoding mpeg4 data

2010-08-01 Thread Igor R
Hi, Anyone have idea regarding my problem then please help me. i am not able to decode P-Frame only.Please help me by telling what i am missing? I'm not sure if it's relevant to your issue, but I experienced a problem with mpeg4 streams produced by old xvid encoder, and the following patch

Re: [libav-user] Error while decoding mpeg4 data

2010-08-01 Thread Igor R
Can u explain little more about this? I ain't an expert, all I know is that some old xvid encoders used to produce an incorrect vol-header on very low frame-rates, and that the patch I mentioned helps in such a case. Again, I'm not sure it's relevant for your case, but you can try it.

Re: [libav-user] decoding buffer data

2010-08-05 Thread Igor R
I didn’t find any API which decode the buffer data and produce the result. Can any body please lat me know how I can work on Data buffer? Doesn't avcodec_decode_video2() do this? ___ libav-user mailing list libav-user@mplayerhq.hu

Re: [libav-user] Save AVFrame to jpg file

2010-08-05 Thread Igor R
You need libjpeg. I never worked with ppm, but as for bmp, I convert it to jpeg without libjpeg. First I scale it with sws_scale() from RGB to PIX_FMT_YUV420P, then encode with avcodec_encode_video() to PIX_FMT_YUVJ420P. ___ libav-user mailing list

Re: [libav-user] Save AVFrame to jpg file

2010-08-08 Thread Igor R
I would recommend avoid using PIX_FMT_YUV420P for jpeg files, instead convert straight from RGB to PIX_FMT_YUVJ420P. YUV420P has a smaller dynamic range than YUVJ420P and is only useful for video. You may even want to consider using a 422 codec rather than a 420 (or even 444), depending on

Re: [libav-user] Using FFmpeg in iPhone Project

2010-10-20 Thread Igor R
Does anyone have a simple sample iPhone project that allows video to be converted from one format to another I don't have such a sample project, but I do develop projects for iPhone with ffmpeg libs (libavcodec etc), and it doesn't differ from using ffmpeg on Windows. Actually, we compile on

Re: [libav-user] Using FFmpeg in iPhone Project

2010-10-23 Thread Igor R
Sorry to bother you again but I have created an App that executes the command line functions as you suggested. When I run the App  on the  iPhone simulator, the mp4 file that is produced is OK. When I run it on an iPhone the mp4 file has a green screen with distorted images. The sound

Re: [libav-user] Using FFmpeg in iPhone Project

2010-10-23 Thread Igor R
Not sure I understand this comment in the thread. How do I set -arch=c compile option? This is one of configure options, but pay attention that it should begin with double -: --arch=c. ___ libav-user mailing list libav-user@mplayerhq.hu

Re: [libav-user] Decode JPEG

2010-11-16 Thread Igor R
Interesting - I will give it a try. If someone could specify the exact codec to use I would appreciate it. CODEC_ID_MJPEG ___ libav-user mailing list libav-user@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/libav-user

[libav-user] muxing video and audio to avi

2010-12-21 Thread Igor R
Hello, In my application I receive from a remote server synchronized video (mpeg4 asp) and audio (mp3) and mux them to avi file. The video comes frame-by-frame, and the audio comes in small chunks, say 200-250 ms. Both video frames and audio chunks have time-stamps in ms. My question is how to

Re: [libav-user] muxing video and audio to avi

2010-12-22 Thread Igor R
In my application I receive from a remote server synchronized video (mpeg4 asp) and audio (mp3) and mux them to avi file. The video comes frame-by-frame, and the audio comes in small chunks, say 200-250 ms. Both video frames and audio chunks have time-stamps in ms. My question is how to set