number of frames less than expected

23 views
Skip to first unread message

Paul

unread,
Mar 28, 2011, 2:34:36 AM3/28/11
to pyffmpeg
Thank you very much for releasing this code.

I am trying to convert an mp4 xvid movie created with mencoder
lavcodec to a 3D hdf5 array (t, rows, cols) using h5py.

For two separate movies, the number of frames I get by stepping
through the movie using tracks[0].get_next_frame() is shorter than the
number of frames in the original movie. I am not sure what I am doing
wrong.

I also tried converting the movie to raw encoding but pyffmpeg
complained that it could not find the corresponding codec.

Thanks,
Paul.

Martin Haller

unread,
Mar 28, 2011, 9:08:05 AM3/28/11
to pyffmpeg
Hello Paul,

you are using 2.1 beta? Try to use check_start option for
mp.open(filename, options) with
options = { 'video1':(CODEC_TYPE_VIDEO, -1, {'check_start':0})}

check_start reads already some packets and the subsequently seek
operation does not properly seek back. That is currently an open issue
for version 2.1 alpha

Best regards,
Martin

Paul

unread,
Mar 29, 2011, 12:40:43 AM3/29/11
to pyffmpeg
Martin,

I will try 2.1 beta, though I remember I had difficulty building on
latest Ubuntu. I am using 2.0.

Thanks for the tip about the first few packets.

Is it possible to specify a frame rate for the movie stream? When
using command line ffmpeg, I always have issues with these particular
movies and have to explicitly specify the frame rate. Is it possible
to do the same with pyffmpeg?

Thanks,
Paul

Paul

unread,
Mar 31, 2011, 1:43:00 AM3/31/11
to pyffmpeg
Btw,

I wasn't able to use 2.1beta as I get the error:

/home/paul/local/lib/python/pyffmpeg.so: undefined symbol:
avcodec_decode_audio3

I wasn't able to find any info on this function in the ffmpeg docs and
the function doesn't exist in my ffmpeg libs (0.6.1).

Paul

Martin Haller

unread,
Apr 7, 2011, 5:22:07 AM4/7/11
to pyff...@googlegroups.com
Hi Paul,

Current release for FFmpeg is 0.6.9 (http://ffmpeg.org/download.html). Maybe, you should check this version. However, I use the repository version. But, I think for the ease of use further releases should link against official releases.

Best regards,
Martin

> --
> You received this message because you are subscribed to the Google Groups "pyffmpeg" group.
> To post to this group, send email to pyff...@googlegroups.com.
> To unsubscribe from this group, send email to pyffmpeg+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyffmpeg?hl=en.
>

Hallo,


Viele Grüße,
Martin


Reply all
Reply to author
Forward
0 new messages