Results 1 to 9 of 9

Thread: Getting Phonon to work on Non-Development (Windows) Machines

  1. #1
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows
    Wiki edits
    5

    Default Getting Phonon to work on Non-Development (Windows) Machines

    I use Phonon in my QT application, and everything seems to work fine on my development machine. However, I can't seem to get Phonon to work on any non-development machines. (I'm using Windows, by the way.) If I attempt to play audio through phonon, nothing comes out of the speakers. If I attempt to play video, nothing appears. I've been checking all the DLLs and using dependency checker. I can't seem to find anything missing.

    I'm using QT 4.7.1, Windows 7, Microsoft VisualStudio. The non-development machines I've tested range from Windows XP to Windows 7, but the main one I'm testing on is Windows 7.

    I eventually copied the entire c:\Qt\4.7.1\bin directory to the non-development machine to see if I could get the Qt Phonon examples working there. (The "bin" directory contains lots of Qt and Phonon DLLs.) Then I copied C:\Qt\4.7.1\examples\phonon\capabilities\release\c apabilities.exe and C:\Qt\4.7.1\examples\phonon\qmusicplayer\release\q musicplayer into the bin directory. When I do this procedure on my development machine, the applications work fine.

    On the non-development machine, when I attempt to run qmusicplayer.exe the application appears and then I try to play a .wav file, but nothing happens (doesn't appear in the audio list, doesn't play). When I run capabilities.exe, the application comes up blank (maybe that means that the backend capability isn't there). This non-development machine I'm using is Windows 7, so I don't know what would be missing. It contains DirectX 11. I downloaded and installed DirectX 9.0c. I think Windows 7 machines already contain DirectShow. I tried copying some extra DLLs into the bin directory - mscvm90.dll, msvcp90.dll, msvcr90.dll, phonon_ds94.dll. Still no luck.

    Here's a screencap of what my non-development machine shows when I run capabilities.exe:
    BritCapabilitiesScreenCap.png

    Here's what it looks like when I run capabilities.exe on my development machine:
    BritCapabilities2.png

    Any idea what I might be missing on the non-development machines? Missing DLLs? Do I need to install something else on the non-development machines?

  2. #2
    Join Date
    Feb 2011
    Posts
    64
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    Try to ship phonon4.dll with your application. There was also a thread like your issues.

  3. The following user says thank you to SIFE for this useful post:

    Brit (11th January 2012)

  4. #3
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows
    Wiki edits
    5

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    Thanks. I had included phonon4.dll, but adding the plugin directories seems to have fixed some of the problems. I have audio working now, but not the video. I'll look into it some more to get that fixed, but this is a step in the right direction. Thanks, again.

  5. #4
    Join Date
    Feb 2011
    Posts
    64
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    Thanks. I had included phonon4.dll, but adding the plugin directories seems to have fixed some of the problems. I have audio working now, but not the video. I'll look into it some more to get that fixed, but this is a step in the right direction. Thanks, again.
    In order to make the video work, you should install vlc or gstream in the targeted machine.

  6. #5
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows
    Wiki edits
    5

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    In order to make the video work, you should install vlc or gstream in the targeted machine.
    Will all of my users will need to install this? There isn't any way to simply add a dll to my install? I'm looking all over the place trying to figure out where to get the VLC installer. Is this it or is this something else? http://www.videolan.org/vlc/releases/1.1.4.html

    I've looked through pages of google search results to try to get this working. I'm surprised Qt/phonon hasn't made this easier.

  7. #6
    Join Date
    Feb 2011
    Posts
    64
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines


  8. #7
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows
    Wiki edits
    5

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    After doing some more testing, I discovered that *.mpg files can be played on my Windows, non-development machine. Presumably the /codecs and /phonon_backend directories contain all the necessary dlls to make that happen.

    I can't play *.mov files, and I tried installing the VLC Player, but it didn't fix anything. I don't know why my development machine can play the *.mov files - either the necessary dlls are inside the QT install or maybe some other video-player installed the appropriate codecs.
    Last edited by Brit; 18th January 2012 at 22:18.

  9. #8
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows
    Wiki edits
    5

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    Well, as I mentioned in my last post, I was able to get the video to play on my non-development Windows 7 machine. It only works if I play *.mpg files and doesn't work if I try to play *.mov files. Now, I've run into another problem: if I attempt to play video on WindowsXP or WindowsVista machines it doesn't work (the video is black, but the audio plays). I'm seriously considering not using Phonon since it seems to be limited to Windows7 machines, documentation is scarce, and nobody seems to know how to fix this problem.

  10. #9
    Join Date
    Apr 2012
    Location
    Geneva
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting Phonon to work on Non-Development (Windows) Machines

    Hello,

    a late answer to this post but that might help others with the same troubles.

    From what I understood Phonon relies on some backends to play multimedia content. When installed on windows (for instance with the Qt SDK) phonon uses the DirectShow backend. You can also compile Qt with a different backend such as VLC. This is the reason why you need to add the backend directory in the directory of the application. You can find it at this place:
    %QTDIR%\plugins\phonon_backend
    this directory will contain a dll (this is the important file) that has a different name depending on the backend you use (in my case phonon_ds94.dll, for Directshow backend, it would be something like phonon_vlc.dll for the VLC backend I guess).

    Some say you also need the directory:
    %QTDIR%\plugins\codecs
    but I am not sure about that last one.

    Finally, and I think this is your problem here. If you are using the Directshow backend you will be able to only play videos from which you have a the adequate pluggin installed. Basically just try to open the video with the windows media player. If it works than you should be able to play the video with phonon. If it does not then you should install the pluggin necessary for directshow (DivX, Xvid, etc...). SO I am nearly sure that the problem does not come from phonon but rather from these %&ç%& pluggin that you always need to install. This is the reason why some prefer to use VLC that is able to read (almost?) any media file easily.

    I hope this will help someone !

Similar Threads

  1. Replies: 1
    Last Post: 21st February 2011, 17:35
  2. Replies: 3
    Last Post: 17th November 2010, 22:41
  3. QPixmap::grabWindow does not work on some machines!
    By dima72 in forum Qt Programming
    Replies: 3
    Last Post: 26th July 2010, 07:02
  4. Qt app problems on non-development machines
    By khw in forum Qt Programming
    Replies: 2
    Last Post: 11th June 2010, 19:50
  5. Replies: 2
    Last Post: 13th December 2009, 20:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.