[Libav-user] debugging to play a .wmv file that throws EOF on first frame
Blake Senftner
bsenftner at earthlink.net
Tue Jan 10 22:43:15 EET 2017
I have a .wmv file, created from a Windows MovieMaker capture of a USB webcam.
It plays fine in ffplay, vlc, and other media players.
When I try it in my libav based video player, I get AVERROR_EOF on the first frame, first call to av_read_frame().
This same logic plays other media files, USB webcam streams, IP cameras and rtsp streams fine. I’m debugging edge cases after verifying that most media files, USB cams, and URLs play fine.
Note that I AM USING an interrupt_callback - but in the line just above my call to av_read_frame() I set the timeout duration to 10 seconds in the future (for connecting and buffering of rtsp streams.) I also have a breakpoint on the interrupt_callback when it returns 1 (timeout) and that is not happening.
The VLC information about the file reports:
Stream 0 is audio (I’m ignoring audio)
Stream 1 is video
Codec: Windows Media Video 9 (WMV3)
640x480, 29.97 fps, format 4:2:0 YUV
Also while playing this file, the statistics in VLC say no discarded (corrupted) or dropped (discontinued) frames.
When opening the file in my code, after avformat_open_input() and after avformat_find_stream_info(), av_dump_format reports:
"wmv3" Extra data: 8 bits left, value: 0
Input #0, asf, from 'file:C:\Users\bla\bla\bal\Evening.wmv':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: MP at ML
WMFSDKVersion : 12.0.7601.17514
IsVBR : 0
Duration: 00:01:18.68, start: 0.000000, bitrate: 2244 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x480, 90k tbr, 90k tbn, 90k tbc
Metadata:
comment : Movie/video screen capture
Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 48000 Hz, 2 channels, fltp, 192 kb/s
Stream #0:2(eng): Video: wmv3 (Main) (WMV3 / 0x33564D57), yuv420p, 640x480, 5500 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
I guess I could look at the duration and ignore AVERROR_EOF if too early, but that sounds like nonsense…
Any similar experiences out there?
-Blake Senftner
elite code monkey
More information about the Libav-user
mailing list