[PyQt] phonon video with multiple audio tracks

Miroslav Míšek miroslav.misek at gmail.com
Sun Jul 21 09:01:01 BST 2013


Hi,

I`m trying to write simple video player with Phonon. It is prety simple,
but i found one problem.

I have few movies with more than one audio tracks in it. Phonon
automatically playes first audio track. But i need to be able list and
choose them.

I tryed:

<code>
class MainWindow(QtGui.QMainWindow):
    def __init__(self, parent = None):
        QtGui.QMainWindow.__init__(self, parent)

        filename = 'movie.avi'

        source = Phonon.MediaSource(filename)
        media = Phonon.MediaObject()
        media.setCurrentSource(source)
        crl = Phonon.MediaController(media)
        print "Channels:\n"
        print crl.availableAudioChannels()
</code>

And output is:

Object::connect: No such signal
Phonon::DS9::MediaObject::availableSubtitlesChan
ged()
Object::connect: No such signal
Phonon::DS9::MediaObject::availableAudioChannels
Changed()
Channels:

[]

No available audio channels found.
Please does anyone know what i am doing wrong?

Thank you,
Miroslav Misek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130721/e083b2f0/attachment.html>


More information about the PyQt mailing list