<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-05-12 21:53 GMT+08:00 åšå®šå‰è¡Œ <span dir="ltr"><<a href="mailto:powerpan@qq.com" target="_blank">powerpan@qq.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi, </div><div><br></div><div>thanks for the reply but your answer didn't help. first of all, i need to register a codec and open it automatically, but decode_audio.c did not show the right way.</div><div>second, I copied a third party demo, it works well but still have some warning for the OLD API and decode_audio.c did not use the latest API to demostrate what ffmpeg suggest to do. I need a perfect demo, anybody could help?</div></blockquote><div>1. 别在邮件的最上é¢å›žå¤å†…容,最好在最下é¢å›žå¤</div><div>2. ä½ æ˜¯æ€Žä¹ˆè·‘çš„demo代ç ,全部过程能å¦è¯¦ç»†æ述一下</div><div>3. decode_audio.c里é¢æ˜¯ç”¨çš„最新的APIåšéŸ³é¢‘解ç 的,ä¸åŒ…å«demuxæ“作,仅仅是解ç ,而且是音频解ç </div><div>4. æœ€å¥½è¿˜æ˜¯æŠŠä½ çš„å…¨éƒ¨è¿‡ç¨‹å’Œä½ çš„ä»£ç 贴出æ¥ï¼Œå¤§ä¼™æ‰å¥½ç¡®è®¤é—®é¢˜</div><div><br></div><div>除了1,  å¦å¤–ä¸‰ç‚¹åº”è¯¥èƒ½å¾—åˆ°ä½ æƒ³è¦çš„ç”å¤ï¼Œè¿™ä¸ªæ˜¯apiä½¿ç”¨çš„åˆ—è¡¨ï¼Œä¼°è®¡èƒ½å¾—åˆ°ä½ æƒ³è¦çš„ç”å¤çš„å¯èƒ½æ€§ä¸å¤§ï¼Œå› 为大伙ä¸çŸ¥é“ä½ æ€Žä¹ˆåšçš„,ä¸çŸ¥é“ä½ ä»£ç 实现,如果能够按照我说的三点åšä¸€ä¸‹ï¼Œä¹Ÿè®¸æœ‰ç»“果。</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br></div><div>Best regards,</div><div>pp</div><div><br></div><div><br></div><div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ 原始邮件 ------<wbr>------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>å‘件人:</b> "Gonzalo Garramuño";<<a href="mailto:ggarra13@gmail.com" target="_blank">ggarra13@gmail.com</a><wbr>>;</div><div><b>å‘é€æ—¶é—´:</b> 2017å¹´5月12æ—¥(星期五) 晚上9:15</div><div><b>收件人:</b> "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter."<<a href="mailto:libav-user@ffmpeg.org" target="_blank">libav-user@<wbr>ffmpeg.org</a>>; </div><div></div><div><b>主题:</b> Re: [Libav-user]回å¤ï¼š just wanna get a decode demo for libav</div></div><div><div class="h5"><div><br></div>
<p><br>
</p>
<br>
<div class="m_-2695723922228370470moz-cite-prefix">El 12/05/17 a las 07:25, åšå®šå‰è¡Œ escribió:<br>
</div>
<blockquote type="cite">
<div>Hi, </div>
<div>
<div><br>
</div>
<div>that's the demo I tried </div>
<div>
<div style="line-height:21px">with warning 'avcodec_decode_audio4<wbr>'
is deprecated.</div>
<div style="line-height:21px">and that demo could not work
with : Codec not found.</div>
</div>
<div style="line-height:21px"><br>
</div>
<div style="line-height:21px">Best regards,</div>
<div style="line-height:21px">pp<br>
</div>
</div>
</blockquote>
Usually, if you get "codec not found" it means your ffmpeg
compilation was lacking a certain codec. The audio example uses
mpeg2 audio, so you need to have ffmpeg compiled with mpeg2.<br>
You can check the codecs you have by doing:<br>
<br>
$ ffmpeg -codecs<br>
<br>
For it to work, you should have a line like:<br>
<br>
 DEA.L. mp2                 MP2 (MPEG audio layer 2) (decoders: mp2
mp2float ) (encoders: mp2 mp2fixed )<br>
<br>
<br></div></div></div><br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div></div>