<div dir="ltr"><span style="font-size:12.8px">Hi, </span><div style="font-size:12.8px">I'm testing a program using  AVIOContext to extract some frames of a video, I need to use an InputStream not a URL.  I'm using the source code of avio_reading.c  to test my sample videos (<a href="https://www.ffmpeg.org/doxygen/trunk/avio__reading_8c_source.html" target="_blank">https://www.ffmpeg.org/doxygen/trunk/avio__reading_8c_source.html</a>)</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I tested this program with video1.wmv without any problems.</div><div style="font-size:12.8px">After that I converted video1.wmv into some video formats like mp4, mov, asf, and avi</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I got some errors only with mp4 and mov videos, the error is the same in both cases:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><font color="#ff0000">[mov,mp4,m4a,3gp,3g2,mj2 @ 0x188ed00] stream 0, offset 0x30: partial file</font></div><div style="font-size:12.8px"><font color="#ff0000">[mov,mp4,m4a,3gp,3g2,mj2 @ 0x188ed00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 960x540, 728 kb/s): unspecified pixel format</font></div><div style="font-size:12.8px"><font color="#ff0000">Consider increasing the value for the 'analyzeduration' and 'probesize' options</font></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have tried to increase these values without success. </div><div style="font-size:12.8px">Looking into the output of this program, I noticed that all video is scanned in order to find these parameters. So, I think the problem is that some metadata are lost when I converted  from wmv to mp4.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I used this command to convert</div><div style="font-size:12.8px"><font color="#0000ff">ffmpeg -i video1.wmv -q:v 0 -vcodec libx264 -pix_fmt yuv420p video1.mp4</font></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">this is the output of av_dump_format using C program</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div><font color="#ff0000">Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/bigdata.mp4':</font></div><div><font color="#ff0000">  Metadata:</font></div><div><font color="#ff0000">    major_brand     : isom</font></div><div><font color="#ff0000">    minor_version   : 512</font></div><div><font color="#ff0000">    compatible_brands: isomiso2avc1mp41</font></div><div><font color="#ff0000">    encoder         : Lavf56.25.101</font></div><div><font color="#ff0000">  Duration: 00:01:07.02, bitrate: N/A</font></div><div><font color="#ff0000">    Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), none, 960x540, 728 kb/s, 30 fps, 30 tbr, 15360 tbn (default)</font></div><div><font color="#ff0000">    Metadata:</font></div><div><font color="#ff0000">      handler_name    : VideoHandler</font></div><div><font color="#ff0000">    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 32000 Hz, 2 channels, 93 kb/s (default)</font></div><div><font color="#ff0000">    Metadata:</font></div><div><font color="#ff0000">      handler_name    : SoundHandler</font></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">As you can see, there is a "none" value,  but I don't know how to fix this.</div><div style="font-size:12.8px">However, I tested this video without using an AVIOContext, and it works fine.</div><div style="font-size:12.8px">Also, I tested it using ffmpeg command and also it works.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Finally this is the output of  ffmpeg -i  with this same video.</div><div style="font-size:12.8px"><div><br></div><div><font color="#ff0000">Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'videos/video1.mp4':</font></div><div><font color="#ff0000">  Metadata:</font></div><div><font color="#ff0000">    major_brand     : isom</font></div><div><font color="#ff0000">    minor_version   : 512</font></div><div><font color="#ff0000">    compatible_brands: isomiso2avc1mp41</font></div><div><font color="#ff0000">    encoder         : Lavf56.25.101</font></div><div><font color="#ff0000">  Duration: 00:01:07.02, start: 0.064000, bitrate: 824 kb/s</font></div><div><font color="#ff0000">    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 960x540, 728 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)</font></div><div><font color="#ff0000">    Metadata:</font></div><div><font color="#ff0000">      handler_name    : VideoHandler</font></div><div><font color="#ff0000">    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 32000 Hz, stereo, fltp, 93 kb/s (default)</font></div><div><font color="#ff0000">    Metadata:</font></div><div><font color="#ff0000">      handler_name    : SoundHandler</font></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">What do you think ?  I'm missing something when converting the video, or  I need to add some lines in avio_reading.c ?</div><div style="font-size:12.8px">I'm using ffmpeg 2.6.2</div><div style="font-size:12.8px">thanks</div></div>