Need help w/ diagnosing video playback on intel atom platform (please)

48 views
Skip to first unread message

Blaine

unread,
Nov 26, 2012, 5:51:02 PM11/26/12
to pyglet...@googlegroups.com
Hi guys,

I'm successfully using pyglet to display a video on my laptop, but when I transfer the project to a small intel atom micro-itx board I run into issues. Can I get some help in figuring out how to diagnose this?
  1. I had to jump through hoops to get video drivers to work, but they do work now (recompile kernel, extract binary drivers, downgrade x11server, use old debian snapshot apt source, etc.). I am able to play the video in VLC on the intel atom board with no issues and I get accelerated performance compared to before I installed intel's cedarview drivers (so I at least know the video works)
  2. When I load it with pyglet into my app, I get the first frame and all the audio but the video does not play. Pyglet also locks up and I have to hard kill the python thread. When I turn pyglet.options['media_debug'] to True, I do get one more warning on the intel board: "<pyglet.media.drivers.alsa.AlsaAudioPlayer object at 0xxx> underrun: reducing update period to 0.11"
  3. I'm actually using cocos2d on top of pyglet, but for video I'm playing it directly with pyglet.media
  4. I've recompiled ffmpeg so that I use the version 1.0 AND h264 support (which is identical in laptop and on the intel board) because it appeared to help with an audio lag issue I was having on my laptop. Pyglet is the same version on both (1.1.4). I am using libavbin0 version 7.1-3 (installed from debian apt archives, unsure if actually using my compiled ffmpeg libraries)
  5. I get the following warning when playing the video in pyglet both on my intel board and on my laptop. 
  6. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x9f83d00] multiple edit list entries, a/v desync might occur, patch welcome
  7. Intel atom board is running Debian Wheezy (stable) with downgraded x11 and the intel-cedarview binary driver set.
Where else can I begin investigating? The fact that it works in VLC and not in pyglet makes me think I just need to update one of the libraries somewhere in the stack.

Sincerely,
Blaine

Nathan

unread,
Nov 28, 2012, 12:19:54 AM11/28/12
to pyglet...@googlegroups.com
On Mon, Nov 26, 2012 at 3:51 PM, Blaine <fri...@gmail.com> wrote:
Hi guys,

I'm successfully using pyglet to display a video on my laptop, but when I transfer the project to a small intel atom micro-itx board I run into issues. Can I get some help in figuring out how to diagnose this?
  1. I had to jump through hoops to get video drivers to work, but they do work now (recompile kernel, extract binary drivers, downgrade x11server, use old debian snapshot apt source, etc.). I am able to play the video in VLC on the intel atom board with no issues and I get accelerated performance compared to before I installed intel's cedarview drivers (so I at least know the video works)
  2. When I load it with pyglet into my app, I get the first frame and all the audio but the video does not play. Pyglet also locks up and I have to hard kill the python thread. When I turn pyglet.options['media_debug'] to True, I do get one more warning on the intel board: "<pyglet.media.drivers.alsa.AlsaAudioPlayer object at 0xxx> underrun: reducing update period to 0.11"
  3. I'm actually using cocos2d on top of pyglet, but for video I'm playing it directly with pyglet.media
  4. I've recompiled ffmpeg so that I use the version 1.0 AND h264 support (which is identical in laptop and on the intel board) because it appeared to help with an audio lag issue I was having on my laptop. Pyglet is the same version on both (1.1.4). I am using libavbin0 version 7.1-3 (installed from debian apt archives, unsure if actually using my compiled ffmpeg libraries)

To answer the implied question at the end of #4:  No, AVbin will not use external FFmpeg/Libav libraries.  AVbin includes its own version of FFmpeg/Libav internally.

AVbin 7 is very old (released either 2007 or 2008, if I remember correctly).  Pyglet 1.1.4 is from around the same time period.  One good thing to try is upgrading to the latest (development) version of pyglet 1.2.  Another good thing to try is upgrading to AVbin 10 (or try the 11 prerelease).

Give that a try and see if the problem persists.

~ Nathan

Blaine Booher

unread,
Nov 28, 2012, 4:25:45 PM11/28/12
to pyglet...@googlegroups.com
Nathan,

Thank you.

When I install libavbin0 from the binary installer, I get the following every time I try to load a video with the pyglet examples/
  • No video in this source
When I try to pull libavbin0 from git and build it, I get the following error when typing ./build.sh linux-x86-32:
  • First time it tries to ask me for a github password for 'libav' module. Then it says permission denied and from then on out:
root@sp:/home/blaine/src/AVbin# ./build.sh linux-x86-32
fatal: Needed a single revision
Unable to find current revision in submodule path 'libav'
fatal: No names found, cannot describe anything.
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
Cleaning up...done
xargs: ./configure: No such file or directory
AVbin: Fatal error: Failed configuring backend.

Any ideas?

Blaine

unread,
Nov 28, 2012, 4:41:55 PM11/28/12
to pyglet...@googlegroups.com
I did the following from inside the cloned AVBin/ git repository.
git clone git://git.libav.org/libav.git

Now we're getting somewhere. I think this counts as the latest builder being broken though. I think it's trying to pull libav from some remote IP address.

Building now successfully, I'm hoping for the best!

Blaine


--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/9JkOcUFBMogJ.
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.

Blaine Booher

unread,
Nov 28, 2012, 5:31:32 PM11/28/12
to pyglet...@googlegroups.com
Nathan,

So both libAVBin 10 and 11 (latest from git), after installed, do not show picture information (for the video). When I run a video, I get "h264 no picture" (twice) debug output. Same thing with wmv, avi, mpeg2... not crashing but not displaying any video. Simply says picture information is not present in the video source.

Where can I go from here?

Blaine

unread,
Nov 28, 2012, 9:02:40 PM11/28/12
to pyglet...@googlegroups.com
To be clear:

When I use the latest libAVBin 10 or 11 (both binary and built on the machine), pyglet (both latest from HEAD and 1.1.4) is unable to play any videos both in my app and with examples/video.py

It simply says that there is no video track available (or no picture source available in the video file).

The micro-itx board i'm using is x86-32bit, and i can play videos on it with VLC without a hitch. libAVbin7 (debian stock) kind of works - it shows the first frame and plays audio, but then crashes (locks up) at the end of the audio.

I can try libAVBin8 next, but I think my best bet is with the latest builds. I'm hoping to get more debug information but I'm not sure where to look.

Blaine


--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/WrRJpr8FiE4J.

Blaine

unread,
Nov 28, 2012, 9:16:32 PM11/28/12
to pyglet...@googlegroups.com
holy crap holy crap. i got it to work. turns out i did not successfully install pyglet 1.2alpha1.

  • With pyglet 1.2alpha1 and livAVbin11 - segmentation fault when playing several example videos (mpeg2 specifically)
  • With pyglet 1.2alpha1 and libAVbin10 - mpeg2 video plays (fast!) with audio!!
THIS IS GREAT NEWS ;). I would love to help debug libavbin11 to see why it is seg faulting, but for now i'm happy as a clam.
Blaine

Blaine

unread,
Nov 28, 2012, 9:25:47 PM11/28/12
to pyglet...@googlegroups.com
Now that I at least have it working it isn't as fast as I thought. In VLC my test video is smooth, but in pyglet / libAVbin0 it is noticeably choppy (but still plays without issue). I will re-visit in the morning. Thanks!

Blaine

Nathan

unread,
Nov 29, 2012, 11:18:26 AM11/29/12
to pyglet...@googlegroups.com
Hmmm.  The only *major* difference between AVbin 10 and 11alpha* is that 11 both supports multithreaded decoding and tries to use it by default.  If you're compiling AVbin yourself anyway, you can try changing line 125 in src/avbin.c in the latest commit in the master branch from:

    return avbin_init_options(NULL);

to:

    return avbin_init_options(1);

Which would restore the default threading to single-threaded, instead of attempting to auto-detect the optimal number of threads.

~ Nathan

Blaine Booher

unread,
Nov 29, 2012, 11:56:15 AM11/29/12
to pyglet...@googlegroups.com
ok i'll give that a shot. thanks nathan. for what it's worth, there is 4 cores on this little board along with hardware support for video decoding. maybe there's something going on between those two interactions.

With a rebuilt libavbin0-11 using your change from avbin_init_options(NULL) to avbin_init_options(1), I still get segmentation fault. re-verting back to libavbin10 works fine again.

Also it's worth noting that I think --fast is broken in the build.sh script because it tries to add -j 4 to the second to last gcc call, and gcc says 'invalid option -j'. i can run that manually by removing -j 4 then do ./build.sh --rebuild linux-x86-32 and it runs the final gcc command and finishes successfully.

Thanks again for all your help!

Sincerely,
Blaine

Nathan

unread,
Nov 30, 2012, 1:25:28 AM11/30/12
to pyglet...@googlegroups.com
How very odd.

Have you tried the precompiled versions from the downloads page at all?


~ Nathan
Reply all
Reply to author
Forward
0 new messages