Results 1 to 7 of 7

Thread: Qt phonon is only giving black screen when i play the video.what can be the soluition

  1. #1
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Qt phonon is only giving black screen when i play the video.what can be the soluition

    hello,

    I am building a video application in my current project with phonon class of Qt. i have writen following code to play
    my video file. I have compiled and every thing is running video. I am getting the same black screen of 200*200 ,as
    some one before me getting. i have read others same question ,but there was no reply.

    QString filename("path to the .mp3 or .avi file");
    Phonon::MediaObject *mediaObject = new Phonon::MediaObject(mywidget);
    MediaObject.setCurrentSource(filename);

    Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget(mywidget)
    Phonon::createPath(mediaObject, videoWidget);

    Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, mywidget);
    Phonon::createPath(mediaObject, audioOutput);
    videoWidget.setGeometry(0,0,200,200);

    mediaObject->play();

    can some one pls guide me what to do?

  2. #2
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt phonon is only giving black screen when i play the video.what can be the solui

    hellow,

    Lof of guys were having the same problem,thats what i have read from the forums other posts. does anyone got the
    success .please reply if any one gets the solution.

    is it that this problem will remain in qt?if yes,than i can switch to another stuff.

    please guide..thanks to all.

  3. #3
    Join Date
    Apr 2010
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt phonon is only giving black screen when i play the video.what can be the solui

    just a thought? what codec are the avi's encoded with. If the device (or emulator) doesn't have (or support) that specific codec then it it can't decode the stream it is receiving. Try to transcode the video file into a different codec (or container altogether).

    I have no experience in working with video on mobile devices, but lots of video coding experience.. I doubt any 4c (xvid, divx, etc...) will have decoders on the mobile device, so make sure you are using a codec that has a decoder on the mobile end (no .mov h264, nothing that needs a GPU to decode, think oldschool codecs or ffmpeg codec.

  4. #4
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt phonon is only giving black screen when i play the video.what can be the solui

    yes exactly, you are right.Thanks any way.

    When i tried to play the video file with .ogg extenstion its running. But,my need is to play video files which has .mp4 and .avi extension.
    so what should i do? How and from where should i get the codecs for mp4 and avi ?

    Thanks is advance.

  5. #5
    Join Date
    Apr 2010
    Posts
    8
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt phonon is only giving black screen when i play the video.what can be the solui

    no idea where to get codecs that are compiled for symbian... You could start with the ffmpeg source, as they can decode most containers, just get them to compile as shared libraries that you can link to, and include them in your distribution. Of coarse, I have no experience with this, just thinking out a concept that might work for you. If you are getting this to run on windowsMobile(windowsPhone) you should have an easier time finding .dll compiled for winCE.

  6. #6
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt phonon is only giving black screen when i play the video.what can be the solui

    hellow all,

    i can play only the .ogg file and some more nearly 17 formats for audio+video. but i want to play mediafiles of .avi ,.mp4 etc. which shows only the black screen. it only plays the .ogg file,which i can see.

    now,what should i do to run avi and mp4 files?should i get the latest gstreamer and removed what is inside system?

  7. #7
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt phonon is only giving black screen when i play the video.what can be the solui

    please reply some one in the direction.

Similar Threads

  1. Play video file with Phonon and GStreamer show black screen
    By SimbadSubZero in forum Qt Programming
    Replies: 2
    Last Post: 6th May 2010, 12:47
  2. Playing video using Phonon video widget
    By Leolander in forum Newbie
    Replies: 0
    Last Post: 26th February 2010, 07:15
  3. Blank screen when playing video with Phonon
    By rbp in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2010, 13:29
  4. Displaying Text on Black and White Screen
    By Stobie in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 8th December 2009, 02:03
  5. Video freezes during mpeg video playback using Phonon
    By davejames in forum Qt Programming
    Replies: 2
    Last Post: 12th January 2009, 09:45

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.