Reputation: 1549
I was wondering if it was possible to get the location of the file of the video with the new API?
I don't want https://www.youtube.com/watch?v=EikPnyG7cfc
I want the actual video file.
Upvotes: 0
Views: 288
Reputation: 42449
I'm not really sure what you're asking, since your "I don't want" link points to a YouTube video, and not API or location information.
Every video contains a recordingDetails
object which contains a string description of the video, as well as the geolocation information associated with the video.
If this is not what you are looking for, you could potentially check the fileDetails
object on the video which contains a recordingLocation
on from the file metadata.
I seem to have misunderstood your question:
You can use a tool such as youtube-dl to download the mp4 file from YouTube.
Install youtube-dl using a package manager or the installation guide. Running the program with no parameters gets the highest quality video and audio for download:
youtube-dl https://www.youtube.com/watch?v=EikPnyG7cfc
Example output:
➜ ~ youtube-dl https://www.youtube.com/watch\?v\=EikPnyG7cfc
[youtube] EikPnyG7cfc: Downloading webpage
[youtube] EikPnyG7cfc: Downloading video info webpage
[youtube] EikPnyG7cfc: Extracting video information
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: Soda Stereo - Ella Usó Mi Cabeza Como un Revólver-EikPnyG7cfc.f135.mp4
[download] 100% of 17.82MiB in 00:00
[download] Destination: Soda Stereo - Ella Usó Mi Cabeza Como un Revólver-EikPnyG7cfc.f251.webm
[download] 100% of 4.25MiB in 00:00
[ffmpeg] Merging formats into "Soda Stereo - Ella Usó Mi Cabeza Como un Revólver-EikPnyG7cfc.mkv"
Deleting original file Soda Stereo - Ella Usó Mi Cabeza Como un Revólver-EikPnyG7cfc.f135.mp4 (pass -k to keep)
Deleting original file Soda Stereo - Ella Usó Mi Cabeza Como un Revólver-EikPnyG7cfc.f251.webm (pass -k to keep)
➜ ~
Upvotes: 1
Reputation: 4185
No, the YouTube API doesn't provide this because YouTube doesn't want people hotlinking their videos outside of their player and ad system. You'll have to look for something outside the API. Note this appears to be prohibited in their TOS:
https://developers.google.com/youtube/terms
Upvotes: 1