I'm currently trying to patch the Totem Youtube plug-in and I'd like to determine the best quality available for the current played video (&fmt parameter). It's possible in JavaScript but the plug-in is developped in C.
Is that possible?
Are you playing the videos in the YouTube video player?
If so, you can query the quality levels through the ActionScript or JavaScript API,
see http://code.google.com/apis/youtube/js_api_reference.html#Playback_quality.
I found the solution thanks to youtube-dl python script.
The test is to form the final url and try to open it (with curl for example), if the format is available it will return HTTP code 303 (See other location) with the real url into the headers.
If it's not available, it will return 404 (Not found).
Related
My goal is to get an mp4 video i placed in dropbox to work within my Alexa Skill in which I am using an ALP document to include multimedia support. I am not interested in using Amazon S3 storage.
I was following a tutorial by dabbelab.
I could get their video to work: https://player.vimeo.com/external/373749691.hd.mp4?s=e43554c91fc796a20f051dcb8b45a74d035a6daa&profile_id=174
I could not get an mp4 video in my drop box to work:
https://www.dropbox.com/s/i8g0j8ghzprqyp3/Baby%20Cats%20-%20Cute%20and%20Funny%20Baby%20Cat%20Videos%20Compilation.mp4?dl=0
From what I can determine through Amazon's doc, I should be able to use any mp4 as long as I am using https. It is unclear to me what it is I am missing. Any advice greatly appreciated. Thank you.
First thing I'm seeing is the link. It ends with "dl=0." That link opens a dropbox page for playing the video, not the video itself.
Change that to "raw=1" and you should get the video itself like APL needs, not an HTML page.
I am building a website where video sermons are located on a Vimeo channel ... hundreds of them. I would like to scrape the videos in this channel an get from the the title of the video and the URL.
Any ideas?
Thank you very much!
You should use the Vimeo API instead of scraping for content. Scraping may result in getting banned from Vimeo, especially if you want metadata on hundreds of videos.
More information about the Vimeo API can be found on the developer site below, but as another user mentioned you should provide more information about what your intent is, what you've tried, and the programming languages you're comfortable using.
https://developer.vimeo.com/api/start
I am building a website which i would be uploading songs to my database. I am planning to upload the songs manually while another thought came into mind if there was a way to crawl online and get the songs. Is there a way that can be possible? I have looped through stack overflow and find no solution to this. Any help on organization songs would be appreciated. API's are out of my line for now.
There are actually many sites that do this. What you need to do is build a regular crawler that crawls links off web pages. When you hit a URL that has the content type of media files (such as audio/mpeg for MP3 files), then download it.
Once you have the media file, use FFprobe to get the metadata, and store this in your database along with the URL.
An alternative to all of this is let Google figure it out for you. You can actually search for audio content types.
I have stored user uploaded document (.doc ,.pdf) as a Blob object into data-store.
Instead of allowing user to download the document, I would like to present it as an HTML page
for viewing the doc. how do I convert Blob into HTML ? does google app engine provides any ready made API for the same?
There is no ready made API in AppEngine to convert .doc or .pdf (or or other types of) files to HTML. You would need to find a library for your preferred language to parse the blob file into its parts structured as an object model (like a DOM). Then you would need to write code to convert individual parts of the object model to HTML, unless you are lucky enough to find another library. And no, StackOverflow is not a good place to ask "what library is there...".
No. AppEngine itself does not provide any file format conversion tools. You might want to look into Google Drive API, which might, to some extent, do the format conversion for you.
You can have embed a PDF reader on a web page by using pdf.js.
Most browsers already have a built-in PDF viewer. If you provide a link to a PDF file, when users click on it, many browsers will automatically display the document. Those browsers that do not support this option, will offer a user to download the file to their hard-drive.
This is the easiest solution - you don't have to do anything at all.
I uploaded 2 .mp4 videointo blobstore.
When I served 311.0KB mp4 video, there is no problem with it. I can play the video
But when I served 3.3MB mp4 video, video is not loaded. So I went to admin console, and click Blob Viewer menu. When I clicked to see 3.3MB video, it doesn't load as well. Why?
I am using free version of GAE.
After some time I found out that using the X-AppEngine-BlobKey and X-AppEngine-BlobRange is working fine. I use Django and here is part of the code that I use, it should give you the idea how it works
response = HttpResponse()
response['Accept-Ranges'] = 'bytes'
response['Content-Type'] = content_type
response['X-AppEngine-BlobKey'] = blob_key
if 'HTTP_RANGE' in request.META:
response['X-AppEngine-BlobRange'] = request.META['HTTP_RANGE']
return response
Please note that X-AppEngine-BlobRange is set to exactly the same value as range header in request. GAE documentation for that case might be a little bit confusing as the examples show values like "0-499" when it should be set to "bytes=0-499".