This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"00 Multicontainer Test": { | |
"container_links": { | |
"test_container_a": [ | |
{ | |
"name": "container_b", | |
"source_container": "test_container_b" | |
} | |
] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
@set_time_limit(0); //disable time limit to make sure the whole video is streamed to the client | |
$id = $_GET['id']; //the youtube video ID | |
$type = $_GET['type']; //the MIME type of the desired format | |
parse_str(file_get_contents('http://www.youtube.com/get_video_info?video_id='.$id),$info); //get video info | |
$streams = explode(',',$info['url_encoded_fmt_stream_map']); //split the stream map into streams | |
foreach($streams as $stream){ | |
parse_str($stream,$real_stream); //parse the splitted stream |