hi all!

i am currently writing a little python binding to interface libavformat and
libavcodec to get video infos like codec, resolution and so on and to extract
single frames as thumbnails.

i used these great ressources as the basis:
http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html
http://code.google.com/p/pyffmpeg/

and until now everything works as expected.

my problem now are matroska and theora video files.

i used this mkv file as my example:
http://www.matroska.org/samples/mewmew/downloads/mewmew-vorbis-ssa.mkv
but this also occurs with every other mkv

somehow i can get the video info but can not extract frames from it.
av_seek_frame() seems to return with -1 if i try to seek to any position.

also with ffmpeg this fails on the same file:

ffmpeg -i mewmew-vorbis-ssa.mkv -vcodec mjpeg -vframes 1 -an -f rawvideo -ss 10
 -s "test.jpg"
Input #0, matroska, from 'mewmew-vorbis-ssa.mkv':
  Duration: 00:00:58.1, bitrate: N/A
  Stream #0.0: Video: mpeg4, yuv420p, 640x480, 23.98 fps(r)
  Stream #0.1: Audio: vorbis, 48000 Hz, stereo
Incorrect frame size

when opening the video i also get a lot of these errors:

[matroska @ 0x7f1c791de160]Ignoring seekhead entry for ID=0x1f43b675

these seem to already indicate that there will be problems with seeking

then i converted the mkv to theora with ffmpeg2theora and i still was unable 
to extract any frames but this time because of avcodec_decode_video() failing.
the ffmpeg line from above gave nearly the same output:

Input #0, ogg, from 'mewmew-vorbis-ssa.ogg':
  Duration: 00:00:58.1, start: 0.125125, bitrate: 976 kb/s
  Stream #0.0: Video: theora, yuv420p, 640x480, 23.98 fps(r)
  Stream #0.1: Audio: vorbis, 48000 Hz, stereo, 80 kb/s
Incorrect frame size

unsurprisingly other ogg files gave the same error.
ffmpeg was build on ubuntu with
--enable-libvorbis --enable-libtheora --enable-libogg
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Jul 23 2008 22:37:31, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

so what do i do to these errors?

mkv fails with av_seek_frame()
and theora fails with avcodec_decode_video()

ffmpeg -vcodec mjpeg -vframes 1 -f rawvideo
fails on both

for any other video i tested (mostly mpeg4 avi video) ffmpeg and my self-made
python binding works as expected.

thx for your help
josch
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to