How many videos can be played at the same time?

4 views
Skip to first unread message

Txema Vicente

unread,
Mar 2, 2008, 11:25:12 PM3/2/08
to pyglet...@googlegroups.com
Hi.
 
I would like to know how many videos should I allow to be played at the same time in my app.
 
Randomly I get a crash, it sounds like an audio buffer overflow. It starts happening with 3 videos, not inmediately but sooner or later it crashes.I tested setting volume=0 on all videos, but I get the same error.
 
So, should I limit the maximum playing videos to 2?
Does this depend on something like sizes, duration, or FPS?
 
FPS aprox = {1:60, 2:60, 3:36, 4:23)
 
PC: XP AthlonX2 4200, RAM=2Gb ECC
 
Complete stacktrace:
Traceback (most recent call last):
  File "stx.py", line 25, in <module>
    arrancar()
  File "C:\STX\stx\arranque.py", line 29, in arrancar
    PAN.arrancar()
  File "C:\STX\stx\pantalla.py", line 840, in arrancar
    self.__bucle()
  File "C:\STX\stx\pantalla.py", line 869, in __bucle
    self.refrescar()
  File "C:\STX\stx\pantalla.py", line 873, in refrescar
    self.ver()
  File "C:\STX\stx\principal.py", line 2701, in ver
    elif self.mod==MOD_EDI: self.__ver_editor()
  File "C:\STX\stx\principal.py", line 2663, in __ver_editor
    ESCENA.ver()
  File "C:\STX\stx\principal.py", line 1990, in ver
    self.origen.ver(self.t)
  File "C:\STX\stx\principal.py", line 1138, in ver
    self.__ver_hijos()
  File "C:\STX\stx\principal.py", line 1159, in __ver_hijos
    hijo.ver(self.t)
  File "C:\STX\stx\principal.py", line 1135, in ver
    self.sincronizar()
  File "C:\STX\stx\principal.py", line 890, in sincronizar
    self.sincronizar_video()
  File "C:\STX\stx\archivo.py", line 565, in sincronizar_video
    self.vid.dispatch_events()
  File "C:\Python25\Lib\site-packages\pyglet\media\__init__.py", line 837, in di
spatch_events
    self._fill_audio()
  File "C:\Python25\Lib\site-packages\pyglet\media\__init__.py", line 643, in _f
ill_audio
    for audio_data, audio_format in self._get_audio_data(write_size):
  File "C:\Python25\Lib\site-packages\pyglet\media\__init__.py", line 678, in _g
et_audio_data
    audio_data = source._get_audio_data(bytes)
  File "C:\Python25\Lib\site-packages\pyglet\media\avbin.py", line 334, in _get_
audio_data
    self._audio_buffer, size_out)
WindowsError: exception: access violation reading 0x010F3000
 
 

Alex Holkner

unread,
Mar 2, 2008, 11:35:23 PM3/2/08
to pyglet...@googlegroups.com
On Mon, Mar 3, 2008 at 3:25 PM, Txema Vicente <tx...@nabla.net> wrote:

> File "C:\Python25\Lib\site-packages\pyglet\media\avbin.py", line 334, in
> _get_
> audio_data
> self._audio_buffer, size_out)
> WindowsError: exception: access violation reading 0x010F3000

This is a known problem on Windows that I've not yet isolated. It
seems to be exacerbated by playing more than one movie at a time, but
not caused by it.

With pyglet 1.1 (which has better a better algorithm for decoding
multiple video streams than pyglet 1.0) I can play five standard
definition Xvid movies at once; about 6 or 7 MPEGs at once, and only
one or two high def videos (Linux AMD 3500+, 2.2GHz). Any number of
videos will play at once, but frames will be dropped. The limit is on
the CPU's ability to decode that many streams at once: pyglet's
overhead and texture upload cost is relatively minimal.

Alex.

Txema Vicente

unread,
Mar 2, 2008, 11:39:19 PM3/2/08
to pyglet...@googlegroups.com
Thanks.

Long Live the Pyg

Reply all
Reply to author
Forward
0 new messages