<div>Thank you very much. I download a .mov file from <a href="http://www.hd-trailers.net/movie/rogue-one-a-star-wars-story/" class="" style="line-height: 23.3333px;">http://www.hd-trailers.net/movie/rogue-one-a-star-wars-story/</a>, but get the same result, <span style="line-height: 1.5;">avcodec_open2 returns -1.</span></div><div><br></div><div>Function av_dump_format gives .mov file information as :</div><div><div>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mov':</div><div> Metadata:</div><div> major_brand : qt</div><div> minor_version : 537199360</div><div> compatible_brands: qt</div><div> creation_time : 2016-12-15 23:51:52</div><div> timecode : 01:00:49:17</div><div> Duration: 00:00:43.00, start: 0.000000, bitrate: 1080 kb/s</div><div> Stream #0:0(eng): Video: <span style="color: rgb(255, 0, 0);">h264</span> (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 848x360, 997 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 48k tbc (default)</div><div> Metadata:</div><div> creation_time : 2016-12-15 23:51:52</div><div> handler_name : Apple Video Media Handler</div><div> encoder : H.264</div><div> Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)</div><div> Metadata:</div><div> creation_time : 2016-12-15 23:51:52</div><div> handler_name : Time Code Media Handler</div><div> timecode : 01:00:49:17</div><div> Stream #0:2(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 76 kb/s (default)</div><div> Metadata:</div><div> creation_time : 2016-12-15 23:51:52</div><div> handler_name : Apple Sound Media Handler</div></div><div><br></div><div><br></div><div>I tried the stream address rtmp://live.hkstv.hk.lxdns.com/live/hks, the video stream has the type of h264. <span style="line-height: 23.3333px;"> </span><span style="line-height: 1.5;">avcodec_open2 returns -1.</span></div><div><span style="line-height: 23.3333px;">av_dump_format print as:</span></div><div><div><span style="line-height: 23.3333px;">Input #0, flv, from 'rtmp://live.hkstv.hk.lxdns.com/live/hks':</span></div><div><span style="line-height: 23.3333px;"> Metadata:</span></div><div><span style="line-height: 23.3333px;"> author : PowerSmart</span></div><div><span style="line-height: 23.3333px;"> copyright :</span></div><div><span style="line-height: 23.3333px;"> description :</span></div><div><span style="line-height: 23.3333px;"> datarate : 500</span></div><div><span style="line-height: 23.3333px;"> livetime : 1470020146</span></div><div><span style="line-height: 23.3333px;"> timeshift : 0</span></div><div><span style="line-height: 23.3333px;"> Duration: 01:00:00.00, start: 0.000000, bitrate: N/A</span></div><div><span style="line-height: 23.3333px;"> Stream #0:0: Video: <span style="color: rgb(255, 0, 0);">h264</span> (Constrained Baseline), yuv420p, 640x480, 15.17 fps, 15 tbr, 1k tbn, 30 tbc</span></div><div><span style="line-height: 23.3333px;"> Stream #0:1: Audio: aac, 32000 Hz, stereo, fltp</span></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px"><br></div></div><div><div><br></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Blake Senftner";<bsenftner@earthlink.net>;</div><div><b>发送时间:</b> 2016年12月21日(星期三) 晚上11:46</div><div><b>收件人:</b> "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."<libav-user@ffmpeg.org>; <wbr></div><div></div><div><b>主题:</b> Re: [Libav-user] (no subject)</div></div><div><br></div>Is the h264 file you are using available online to test against? <div class=""><br class=""></div><div class="">I have been using the h264 film trailers from here <a href="http://www.hd-trailers.net/movie/rogue-one-a-star-wars-story/" class="">http://www.hd-trailers.net/movie/rogue-one-a-star-wars-story/</a></div><div class=""><br class=""></div><div class="">And they open and play without issue. Do you get the same issue with your software using one of these clips? </div><div class=""><br class=""></div><div class="">You may need to post your function that opens a stream up to the point where you call avcodec_open2()...</div><div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; font-variant-ligatures: normal; line-height: normal; border-spacing: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Arial; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><font class="Apple-style-span" face="Arial"><font class="Apple-style-span" face="Helvetica" size="3"><span class="Apple-style-span" style="font-size: 12px;"><div style="color: rgb(0, 0, 0); margin: 0px;" class=""><font face="Helvetica" size="3" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-family: Helvetica;" class=""><font class="Apple-style-span" color="#0000FF">Sincerely,</font></font></div><div style="color: rgb(0, 0, 0); margin: 0px;" class=""><font face="Helvetica" size="3" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: normal; font-family: Helvetica;" class=""><font class="Apple-style-span" color="#0000FF">-Blake Senftner</font></font></div><div style="margin: 0px;" class=""><font color="#0000ff" class="">Computer Stuff</font></div></span></font></font></span></div></span></div></span></div></span></div></span></div></span></div></span>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Dec 21, 2016, at 7:24 AM, sea <<a href="mailto:2509044372@qq.com" class="">2509044372@qq.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">In transcoding project of LeiXiaoHua(demo of usage of filters), if I use media file with h264 video stream as input file, the function <span style="line-height: 1.5;" class="">avcodec_open2 will return -1. Media file with video stream in other format, such as mpeg4, mjpeg return 0 (OK). Why ? Someone meets the same problem?</span></div>_______________________________________________<br class="">Libav-user mailing list<br class=""><a href="mailto:Libav-user@ffmpeg.org" class="">Libav-user@ffmpeg.org</a><br class="">http://ffmpeg.org/mailman/listinfo/libav-user<br class=""></div></blockquote></div><br class=""></div></div>