I believe these are essential for apps like Youtube, but the codecs are closed source. How does Ubuntu touch resolves this issue? Does it use VLC as the backend?
Much of what Canonical did when building Ubuntu Touch was about enabling OEMs to use their existing android drivers with UT. OEMs are reluctant to release sources for their devices' drivers. Not only that, there are many hardware manufacturers which have different policies so it is hard to get something more than a binary blob. Essentially, there is an interfacing layer called libhybris which talks to a part of Android's multimedia stack called AndroidMedia. Then there is a gst-hybris GStreamer plugin. GStreamer is used as a backend for Qt's multimedia stack. In the end, you have your hardware acceleration if your chip supports and OpenMAX (omx) APIs are implemented.
Take a look at the page 20 in the "Ubuntu touch internals" and at Android's multimedia stack: http://elinux.org/images/c/cf/Ubuntu_Touch_Internals_1.pdf#20 https://source.android.com/devices/media.html
I recommend installing the Fluendo codec. An easy way to install this codec and a few others is to install the ubuntu-restricted-extras package. First, make sure you have the Universe repositories enabled. Then you will need to open a terminal. How to do this varies by GNU/Linux distro and desktop, but you can figure it out. Then, type
sudo apt-get install ubuntu-restricted-extras in it. Press Enter. This will install some useful codecs, some fonts made by Microsoft, but no programs, except for Adobe Flash Player. You may need to restart your system afterwards. However there is no prompt or warning of any kind to restart your system, I recommend doing so anyway. The reason doing all of this is necessary is because Canonical Ltd. (the makers of Ubuntu) could not include the proprietary codecs in Ubuntu because they were not free. However, installing this package takes care of it and installs the codecs, Adobe Flash Player, and Microsoft TrueType Fonts anyway.