IOError: Unable to read frame: -32

9 views
Skip to first unread message

Heribert

unread,
Feb 15, 2011, 1:02:23 PM2/15/11
to pyffmpeg
hi,
I have trying to test pyffmpeg with a couple of video files:

reader = FFMpegReader()
reader.open("my\\video\\file")
reader.run()


but I always get:

Traceback (most recent call last):
File "pyffmpeg_test.py", line 24, in <module>
reader.run()
File "pyffmpeg.pyx", line 2385, in pyffmpeg.FFMpegReader.run
(pyffmpeg.c:15738)
File "pyffmpeg.pyx", line 2380, in pyffmpeg.FFMpegReader.step
(pyffmpeg.c:15686)
File "pyffmpeg.pyx", line 1523, in pyffmpeg.VideoTrack.get_next_frame
(pyffmpeg.c:8052)
File "pyffmpeg.pyx", line 1604, in pyffmpeg.VideoTrack.__next_frame
(pyffmpeg.c:8753)
File "pyffmpeg.pyx", line 2145, in pyffmpeg.FFMpegReader.read_packet
(pyffmpeg.c:13290)
IOError: Unable to read frame: -32


what is going wrong here?!
(windows, python 2.7, latest pyffmpeg version from git)

Bertrand Nouvel

unread,
Feb 17, 2011, 11:57:44 AM2/17/11
to pyff...@googlegroups.com
Hi Heribert,

Due to problem with many file with their indicated start-time, and end-time,
pyffmpeg currently tries to read until there is no more packet to be read in the file,
and it raise an Exception when it cannot find anymore any packet.
This is the exception that you are seeing.

Thus you had just type the three lines indicated, pyffmpeg has
read the entire video file (, doing nothing, as you did not specify any callback),
until it crashed because the end of the file has been reached.

As the error returned may depend on the codec, or may also due
to malformed files, I have currently let this exception been raised as this.
It is still possible to determine the nature of the reason why the exception
was raised by comparing the PTS of the last packet with the duration
of the file.

Bertrand


2011/2/16 Heribert <der.f...@googlemail.com>

--
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.


Bertrand Nouvel

unread,
Feb 17, 2011, 11:59:47 AM2/17/11
to pyff...@googlegroups.com


2011/2/18 Bertrand Nouvel <bertran...@gmail.com>

Hi Heribert,

Due to problem with many file with their indicated start-time, and end-time,
pyffmpeg currently tries to read until there is no more packet to be read in the file,
and it raise an Exception when it cannot find anymore any packet.
This is the exception that you are seeing.

Thus you had just type the three lines indicated, pyffmpeg has
read the entire video file (, doing nothing, as you did not specify any callback),
until it crashed because the end of the file has been reached.

As the error returned may depend on the codec, or may also due
to malformed files, I have currently let this exception been raised as this.
It is still possible to determine the nature of the reason why the exception
was raised by comparing the PTS of the last packet with the duration
of the file.

Bertrand

PS : this is bad point for me, but I believe I did not upgrade the git last time, I fixed up a bug and made a new release...
So it is likely that the 2.1 is more recent than the git version
Reply all
Reply to author
Forward
0 new messages