Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[resolution] - How to show only resolutions #11527
Comments
|
You'll need to use API. See https://github.com/rg3/youtube-dl#embedding-youtube-dl for a reference. |
|
I want to embedd youtube-dl in PhP script is that possible? How should i
print such formats?
…On Sat, Dec 24, 2016 at 10:07 PM, Yen Chi Hsuan ***@***.***> wrote:
Closed #11527 <#11527>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11527 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AXm9sz5r3xpveZ3Ld9tTNqBbvx1OjW_dks5rLVFLgaJpZM4LVQt8>
.
--
"Followerpoint.com"
|
|
You'll need to write some Python scripts first and then call them from PHP. |
|
$cmd_image = 'youtube-dl --get-thumbnail '. escapeshellarg($url); I could print the thumbnail and title on my webpage. The only problem is with formats .. Help me to overcome this issue. |
|
Only resolutions does not provide much sense, so youtube-dl does not provide it. If you really need it, use the python API:
|
|
Hello @yan12125 Can't i take the data from --dump-json using PHP only and then show resolutions from there? |
|
Apparently you already know another way to do it ;) |
$data = json_decode(`youtube-dl -j test:cctv`, true);
foreach($data['formats'] as $f)
{
print $f['format'] . "\n";
}The result is:
|
|
Thanks man @yan12125 My issue has been resolved. can u please have a look at one more issue. Can you help me with that? |
youtube-dl can't escape ISP restrictions automatically. If you can watch them with proxies or VPNs, add |



I am trying to show only resolutions like in the screenshot is it possible? if yes , then how?
