A lot depends on the size of your project. You might not need any library at all.
I lately only create static XML-Manialinks [with a single file but multiple "views" that I hide or display] and load dynamic content with ManiaScript which I get from some backend-script that provides some REST-ish access to my data.
When doing that I sometimes use some processor to compile a template language of my liking (jade/pug for me) into the Manialink-XML, as XML has quite some overhead to type.
When my backend only provides something like
GET /api/shoutbox or
POST /api/shoutbox I really don't need any fancy routing or framework.
ManiaLib as well as
FancyManiaLinks both have an object-oriented approach to markup generation, which is quite some code for very little markup.
The former will probably help you into a cleaner project structure with views and controllers etc., the latter is just for generating the manialink (or maniacode) markup.
Note: I have never used any of these libraries.
If you want to use some template engine instead to write more XML-ish code, there are
dozens of alternatives with different syntaxes, phtml probably being the "most native" and most ugly approach as you just can inline too "mighty" code.
Again depending on the size of your project there are multiple frameworks around template engines or you could roll your own project around one, which might end up a bit messy.
I probably should not propose simply inlining php into your markup to get your result, but for my afore-mentioned approach with static XML and maybe including some files or config values it is sufficient.
As for the YouTube thing you will surely find an SDK for PHP and
examples. For basic information you can probably even go without bloated stuff like that and find the needed API endpoints somewhere which you then can cURL, but I cannot judge that based on your question.