How can i watch internetstreams with phonon?
-
It is important because playing video is a part of my work. :-|
-
i cant see what is wrong with your code :(
What kind of mime types is the output from theType?
If avi and mp4 is in it, then it should work.(same as my inet issues :( )Look "here":http://doc.trolltech.com/4.7-snapshot/phonon-overview.html#installing-phonon if you might miss something.
edit: i saw that you also need directshow. -
yes. it include "video/mp4, video/avi". So, I feel strange also why it can't play mp4 and avi.
-
what is your application output when you try?
-
Thanks vinb.
I fixed this problem. On windows, need to install a Direct Show splitter. After installed it, my video player works perfect. Anyway, thank you so much.
- Frank
-
Nice to hear Frank!
If you let me know, when you know the solution to my inet issue, let me know please. :)
Bye the way, can you try:
http://livestreams.omroep.nl/nos/journaal24-bb
and a youtube for me please? -
Hi!
I have been redirected here from the other post :)
The problem for youtube from this code
bq. playVideo("http://www.youtube.com/watch?v=GEf6d4FqNn4"); //Doesnt work. :(
is not the direct link to the stream: in few words you must query youtube with something like:
bq. http://www.youtube.com/get_video_info?&video_id=GEf6d4FqNn4&el=embedded&ps=default&eurl=&gl=US&hl=en
"reference here":http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#Retrieving_and_searching_for_videos
you will get an xml or a json data to parse and within that you can parse related streams with different formats to gather which video stream you want to play (reference almost on the link above).In other words, you can't play an html (or xml or wathever) page with phonon :) you must retrieve a direct stream media link and have relative codec to play it. For example that http://livestreams.omroep.nl/nos/journaal24-bb is an ASF video format. I tried it in linux with my app but can't play.
To check which codec are supported on your platform you can do this:
@QStringList sl=Phonon::BackendCapabilities::availableMimeTypes();
qDebug() << sl;
@
My app is "here":http://mediadownloader.cz.cc, its free and you can see sources in youtube.cpp to understand how it works. And if you use linux, there is a feature that can monitor firefox and if you are browsing a web page with a compatible streaming video, it will be displayed in the app :)
I have the problem that new html5 youtube videos, needs cookies to be played, and I don't know how to tell phonon to use cookies I got when I query to retrieve video infos.regards
Marco -
Hi Marco,
thanks for the advice!
I will take a look at your app as well as the other link you gave me.
But what i dont understand is the stream in asf format. Xine is the backend of my app and xine can play the stream without a problem. Why then it is not possible in my app?
When i run the capability app provided by Qt in the examples i can see that "x-ms-asf" is indeed supported. So it has to be possible.
Thanks,
vinb -
Hi vinb,
I think that with this post I'll become an Ant :)
btw, if you download that http://livestreams.omroep.nl/nos/journaal24-bb you will see that it is an xml containing the references of mms kind of live streams. If you play one of those, it will play correctly with phonon (I tried). Evidently xine has a parser for that kind of types.
Marco
-
Hi Marco,
So you mean i have to download it and play the downloaded content?
Thanks for helping!
vinb.btw, i looked at your app. WOW, very impressive!
But i have a problem building it. i seem to miss XTest.h, but i have x11-xext-dev installed.:( -
bq. So you mean i have to download it and play the downloaded content?
yes, you have to parse the xml content to get the real urls to play
Tanks for compliments I didnt get so many :)
the libraries needed (only in linux) are libx11-dev and libxtst-dev , by the way there is also a .deb package to download if you use a debian like distro. Some videos in the public release couldn't be downloaded or played for the cookies problem mentioned about youtube and html5.
regards
Marco -
Thanks for the advise Marco!
You are a real help!
Im sorry i can not be of any help for your problem.
regards,
vinb