[Libav-user] Audio decoding error

Ankush wadkes93 at gmail.com
Sat May 10 18:27:22 CEST 2014


Thx dude I figured it out. D sample didnt had the if statement where audio stream was beeng checked and that was it. Really silly of me.
Is there a way to get fixed number of sampels frm ffmpeg. The default I am getting decoded are 1024bytes of chunk which forms 1536sampels. I traversed 3times and got 4608sampels data.. But I need to decide 19200bytes ie. 4800sampels, so I am short of 192sampels. Is there a way to get those 192 sampels

-----Original Message-----
From: "Tushar Paithankar" <p.tushar99 at gmail.com>
Sent: ‎09-‎05-‎2014 04:41 PM
To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user at ffmpeg.org>
Subject: Re: [Libav-user] Audio decoding error

Hi Ankush,


Try using AV_CODEC_ID_MP3 rather than AV_CODEC_ID_MP2 , I have implemented the MP3 Decoder using ffmpeg and it is working fine.



Let me know if you have any further problem n please share issue in detail..




Thanks 

Tushar




On 9 May 2014 09:01, Ankush <wadkes93 at gmail.com> wrote:

I am currently trying to read the audio samples from a video file. I 
tried the sample code provided in the examples section 
decoding_encoding.c and i only changed the 
avcodec_find_decoder(AV_CODEC_ID_MP2) to 
avcodec_find_decoder(pCodecCtx->codec_id), everything works fine with 
this till i reach the avcodec_decode_audio4() where i get a negative 
value from this function.
I managed my way through video decoding sucesfully but seem to be 
stucked here from a long time. i tried with .mts and .mp4 file and even 
.mp3 file but all seem to return a negative value.

Thank you.

_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140510/4a69aa71/attachment.html>


More information about the Libav-user mailing list