Get all Youtube video’s from posts and embed them on a different page

Another method can be like this, On the current post when you save look for youtube video in the content, if found save it to the transient 'videos' and the post_id (for the link to the post later) insted of regex im using parse_url() and parse_str()

add_action( 'save_post', 'save_youtube_videos' );
function save_youtube_videos( $post_id ) 
{
    $saved   = get_transient( 'videos' ); // If we have videos before
    $videos  = !empty( $saved ) ? $saved : array();
    $content = isset( $_POST['post_content'] ) ? $_POST['post_content'] : null;

    if( $content )
    {
        parse_str( parse_url( $content, PHP_URL_QUERY ), $video );
        if( !in_array( $video['v'], $videos ) )
        {
            $videos[ $post_id ] = $video['v']; // Push post_id and the vide_id
            set_transient( 'videos', $videos );  // Save all videos as array
        }
    }
}

Save your post_id and youtube_id if your post have one. So on update or publish look for a video using parse_str and parse_url, if we find one add it to the transient cache so we dont need to find all the posts again.

function get_youtube_archive( $width="415", $height="250" )
{
    $videos = get_transient( 'videos' );

    if( !empty( $videos ) && count( $videos ) > 0 )
    {
        $output="";

        foreach( $videos as $key => $value ) 
        {
            $output .= '<object width="'. $width .'" height="'. $height .'">';
                $output .= '<param name="movie" value="http://www.youtube.com/v/'. $value .'/&hl=en_US&fs=1&"></param>';
                $output .= '<param name="allowFullScreen" value="true"></param>';
                $output .= '<param name="allowscriptaccess" value="always"></param>';
                $output .= '<embed src="http://www.youtube.com/v/'. $value .'&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'. $width .'" height="'. $height .'"></embed>';
            $output .= '</object>';

            $output .= '<a href="'. get_permalink( $key ) .'" alt="Go to post">Go to post</a>';
        }

        return $output;
    }
}

And a listing function so you can get the videos by just add:

echo get_youtube_archive();

Where you want them. You have to save the posts where you have videos for this to work.