Hello all, I am getting some errors when I try to open a video by passing a URL to av_open_input_file. These errors only persist for the first few seconds of the video and result in grey, blocky images. After about 3 seconds, everything returns to normal. There are no problems with my code if I download the video file first. There are also no problems if I call ffmpeg.exe with the URL. Unfortunately, I can't use ffmpeg.exe for my application. I've debugged my code, and it appears that the 'nal size' error occurs when the nal size + buffer pointer > buffer size. The buffer size is actually set by the packet size in AVPacket, but I'm not sure how/what I should change. Here's the code I'm using to open the file/get stream info:
--------------------- char* in_filename = " http://www.youtube.com/get_video.php?video_id=00ySSAGa-S8&t=vjVQa1PpcFO_tEFiC_0X6awFENC1TOVsFXislW2bNrY%3D&fmt=18 "; // Open video file for input if(av_open_input_file(&pFormatCtx, in_filename, NULL, 0, 0) != 0) return -1; // Couldn't open file // Retrieve stream information if(av_find_stream_info(pFormatCtx) < 0) return -1; // Couldn't find stream information ---------------------- And here's the error information: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ' http://www.youtube.com/get_video.php?video_id=00ySSAGa-S8&t=vjVQa1PpcFMPZ6YrHvawaiLxF1-DkbrSrRz4dnMHx64%3D&fmt=18 ': Duration: 00:03:33.15, start: 0.000000, bitrate: N/A Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16 Stream #0.1(und): Video: h264, yuv420p, 480x360, 14.49 tb(r) Output #0, mp4, to 'C:\mydir\videonew.mp4': Stream #0.0: Video: mpeg4, yuv420p, 480x360, q=2-31, 2500 kb/s, 14.49 tb(c) [h264 @ 0xa60070]AVC: nal size 21498 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 49759 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 20817 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 17117 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 54002 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 44717 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 47467 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 40526 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 55135 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 57224 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 22776 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 56603 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 35731 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 34832 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]AVC: nal size 21967 [h264 @ 0xa60070]no frame! [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one [h264 @ 0xa60070]number of reference frames exceeds max (probably corrupt input), discarding one Thanks for any help/direction you can provide. -Mike _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
