ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #01439
[YouTube] Thoughts on video playback
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I thought I'd share some thoughts on how the YouTube app developers
can quickly get started in playing back YouTube videos straight from
the source. I'm a software engineer working for Canonical that is
working on the media backends for the Ubuntu Touch platform. Ideally
it's desirable for the YouTube app to take advantage of these backends.
What exists today:
- ------------------
Today there exists a media player that is fairly robust in playing
back any video/audio files located on local device storage. The media
player is a QML app that uses the MediaPlayer instance from
QtMultimedia 5.0. This in turn uses a QtMultimedia backend service
plugin called qtubuntu-media, which in turn interfaces with the
Android MediaPlayer to do hardware accelerated playback of supported
media codecs. There's a bit more magic to it than this, but the
architecture is basically that simple at a high level.
What needs to be improved/added:
- --------------------------------
Many things need to be improved and/or added to the overall system
design, but specifically for the YouTube app, there is one thing that
needs to be added: the ability to pass a URL through the QML
MediaPlayer instance all the way down the stack to the Android
MediaPlayer. Theoretically this should work today, but I have not
personally tested it yet. I plan to test this very soon, but if
someone beats me to it please let me know of your results.
When this URL pass-through is verified to work, it'll be possible to
instantiate a QML MediaPlayer instance in the YouTube app to play
YouTube videos on the target device. If you're testing on a desktop
Ubuntu, make sure you have GStreamer 0.10 installed and the proper
media codec plugins. QtMultimedia should automatically use the
qgstreamer service backend instead of qtubuntu-media on a desktop
Ubuntu. If for some reason you believe you have GStreamer properly
installed from the Ubuntu packages and have the proper codecs, try
taking a look at the GStreamer output by running like this:
GST_DEBUG=3 qmlscene youtube.qml
Another option:
- ---------------
Another option will be just as above; to verify that a URL can get
passed down to the Android MediaPlayer and then simply to have the
YouTube app call the Ubuntu Touch Media Player app to play back the
YouTube video. One thing that will need to be added is a command line
flag that can be set to instruct the Media Player app to quit when
playback completes and return to the YouTube app. I also intend on
adding this feature to the app in the near future. If the YouTube
developers prefer this route instead of embedding a QML MediaPlayer
instance in their app, let me know and I'll make adding this feature a
higher priority.
Please take a look at the Media Player app's QML source for an example
of using the QML MediaPlayer interface as well as setting up a window
to render the video to.
lp:mediaplayer-app
If you have any questions, please feel free to reply to this email.
I'm also open to setting up an IRC or Google Hangout meeting with the
YouTube app developers.
Lastly, if you want to get involved in helping with any of the media
stuff on Ubuntu Touch, please let me know what you'd like to help with
and what your skills are.
Regards,
Jim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRVJzTAAoJENCYE0OpVkFTVzcH/3qsSJvD9P6cL7M/1faI01pN
97P4do2QiqY64ucTC6juviQcKJ6+EpXKoHhC70humdY5SQF5Eh3eTusYaPQj+qok
zuYzozoPb03uGjp4tMBYEuoUHI96w+8krBp5y8ib1t3k6tp8CImrddQw0vPhE8kp
jMgezDhqfNdbhU89DlcGDqIGUmu2bQWfG0+whdcQDgLKCnc4oA5VIjHVhqhG+Oe3
uP3i4yLkKcOr1WnAfTb6L5l+m6Y+LFNfUFHYmcGhFqRQH3cX+PRJaybvcsg0HqzD
4bj6h5kWLtgx/3nrtjG9yQyjiX9dRjylZQypPoclyZf9SMldrHa2heeNZt3XT1E=
=jp6w
-----END PGP SIGNATURE-----