Peter,
AVbin doesn't "play" a video file, per se. Some application or
framework (like Pyglet, for example) uses AVbin to decode a video
frame by frame and then presents the visual/audio information to some
device to play it.
You can tell that AVbin has nothing left to decode from a video file
when a call to avbin_decode_video() returns 0 (successfull finish) or
-1 (hit an error).
If you are interested in using Pyglet to play video, you can view the
documentation here (
http://pyglet.org/doc/programming_guide/sound_and_video.html ) and the
API reference here ( http://pyglet.org/doc/api/index.html ). There's
even an example player application in examples/video.py in the pyglet
tarball (do examples get put somewhere during binary installs of
Pyglet, anyone?).
Or, you can read Pyglet's source code to see a reference
implementation of how to use AVbin -- though Pyglet is written in
Python, not C++ like I assume you are looking to do from the subject
of this email.
If you are looking to use AVbin directly from your C++ project, I
suggest reading include/avbin.h -- the API is documented fairly
thoroughly in that file in comments. I need to see about generating
an online version of those docs (it looks like it may be already set
up to generate using doxygen, but I've never used doxygen...yet).
~ Nathan
~ Nathan
--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
Well, if you're just trying to detect when it has finished playing,
then after line 118 in your file check to see if res == 0.
~ Nathan
~ Nathan
Do you know whether that segfault happened before res was equal to
zero, or afterwards on the next instance of the loop? If the latter,
then it may be a problem with avbin_seek_file().
~ Nathan
~ Nathan
Great, I am glad you found a workaround!
I wonder if there is a bug in avbin_seek_file(), then.
~ Nathan
~ Nathan
Glad to hear it! What OS and version of AVbin are you using?
~ Nathan
AVbin doesn't "play" a video file, per se. Some application or
framework (like Pyglet, for example) uses AVbin to decode a video
frame by frame and then presents the visual/audio information to some
device to play it.You can tell that AVbin has nothing left to decode from a video file
when a call to avbin_decode_video() returns 0 (successfull finish) or
-1 (hit an error).
FYI, AVbin 8 has been released. It would be great if you could give
that a spin and see if it works any better/worse than AVbin 7.
http://avbin.github.com/AVbin/Download.html
~ Nathan
avbin isn't a Python module - it's a C library that exports a stable
ABI wrapped around the ffmpeg (or libav?) library.
Richard
AVbin documentation is currently in the form of comments in
include/avbin.h in the AVbin source. You WILL need to read that if
you want to use AVbin's interface directly. It's on the Version 9
roadmap to get online documentation generated (in fact, it looks like
it's all set up to be generated by Doxygen, as soon as I figure out
how to use Doxygen).
Pyglet includes a full set of python bindings already in
pyglet.media.avbin (AVbin was originally created just for that
purpose, after all). I don't have any plans to create or maintain a
separate set of Python bindings, though I don't mind if someone else
wants to. If you wanted to, you could take Pyglet's version and adapt
it to your own use. (see pyglet/media/avbin.py) I don't know why
that file isn't included in Pyglet's API reference.
I don't currently have any plans to make a tutorial. There IS an
example C program in AVbin under example/avbin_dump.c that may be
useful towards that end, though.
Those were good questions. Thanks!
~ Nathan
TMIIW It's originaly created to extend pyglet multimedia playback capability
~ Nathan
On Tue, Dec 13, 2011 at 3:52 AM, anatoly techtonik <tech...@gmail.com> wrote:>> when a call to avbin_decode_video() returns 0 (successful finish) or
> On Monday, December 12, 2011 8:11:12 PM UTC+3, Nathan wrote:
>>
>> AVbin doesn't "play" a video file, per se. Some application or
>> framework (like Pyglet, for example) uses AVbin to decode a video
>> frame by frame and then presents the visual/audio information to some
>> device to play it.
>>
>> You can tell that AVbin has nothing left to decode from a video file
>> -1 (hit an error).AVbin documentation is currently in the form of comments in
>
> I couldn't find any documentation on AVbin. pyglet docs are also very
> limited in this regard. Are there any plans to provide some tutorial and
> Python bindings for AVbin out of the box? So that people can `easy_install
> avbin` and `import avbin` to play with its API/features?
include/avbin.h in the AVbin source. You WILL need to read that if
you want to use AVbin's interface directly. It's on the Version 9
roadmap to get online documentation generated (in fact, it looks like
it's all set up to be generated by Doxygen, as soon as I figure out
how to use Doxygen).
Pyglet includes a full set of python bindings already in
pyglet.media.avbin (AVbin was originally created just for that
purpose, after all). I don't have any plans to create or maintain a
separate set of Python bindings, though I don't mind if someone else
wants to.
If you wanted to, you could take Pyglet's version and adapt
it to your own use. (see pyglet/media/avbin.py) I don't know why
that file isn't included in Pyglet's API reference.
I don't currently have any plans to make a tutorial. There IS an
example C program in AVbin under example/avbin_dump.c that may be
useful towards that end, though.
Those were good questions. Thanks!
Version 8 is released for all platforms.
~ Nathan