How to play youtube video with Qt 4.8? (downloaded video or url)
-
Heya ~MaximAlien
There are two different solutions:
- Use WebKit here (QWebView, I hope), but it requires internet connection
- Use Phonon playback here, I hope it should be okay
-
Thanks for answer tucnak.
Tried Phonon, but there are issues with codecs, my app is cross-platform, so I need simple and stable solution,
I think I'll try HTML5 with WebKit, Hope it'll work.
-
[quote author="MaximAlien" date="1374000746"]Thanks for answer tucnak.
Tried Phonon, but there are issues with codecs, my app is cross-platform, so I need simple and stable solution,
I think I'll try HTML5 with WebKit, Hope it'll work.[/quote]
Hm, codec problem can be solved with converting the video to available formats. Phonon is quite cross-platform, can't get point.
-
You can also allow to use WebKit plugins (Netscape Plugin) on currently running system (i.e. Flash)....
-
Thanks for suggestion Peppy. I'll try Flash too.
-
Have a look at the article "Embed YouTube Video in QWebView":http://qt-project.org/wiki/Embed_YouTube_Video_in_QWebView at our wiki.
-
Thanks for this article leon.anavi! I'll definitely try it.
-
[quote author="MaximAlien" date="1374044338"]Thanks for this article leon.anavi! I'll definitely try it.[/quote]
You are welcome. The article is a bit older so it has been written and tested with Qt 4.
-
I use Qt 5.0.2 msvc for testing and when page was loaded it says that "The video is currently unavailable".
Probably I'll try HTML5 for this.
-
That's strange, I also tested YouTube View Example from Examples in Qt 5.0.2 and the same issue occurs.