are there any tools/scripts for analyzing/retrieving flash/html5 video information/metadata - perl

I want to play youtube video with a certain resolution, like 360p
and capture the packets, and then extract the video from the packets
and then I want to analyzing/retrieving flash/html5 video information/metadata from these videos
BTW, are videos still with the same resolution when they are extracted from the captured packets?
note that these videos may not be complete
are there any good tools for analyzing/retrieving flash/html5 video information/metadata
like video bit rate, video resolution(like 360p, 480p), used audio/video codecs, video size and duration/duration
if the video is not complete, the information would ideally include the original video size, the actual video size, the original video length/duration and the actual video length/duration
I hope it is a script, if it is a tool. I hope it can be run through shell using command line coz I want automation.
A paper says perl could do this, but I don't how
thanks!

(long comment, not a complete answer)
IANAL, but your goals may not fit the YouTube Terms of Service:
Section 4. C
You agree not to access Content through any technology or means other than the video playback pages of the Service itself, the Embeddable Player, or other explicitly authorized means YouTube may designate.
Section 4. H
You agree not to use or launch any automated system, including without limitation, "robots," "spiders," or "offline readers," that […] sends more request messages to the YouTube servers […] than a human can reasonably produce in the same period by using a conventional on-line web browser. Notwithstanding the foregoing, YouTube grants the operators of public search engines permission to use spiders to copy materials from the site for the sole purpose of and solely to the extent necessary for creating publicly available searchable indices of the materials, but not caches or archives of such materials. […]
You may be able to access the required information directly using the YouTube Data API. Here is a reference, and here is a list of directly supported programming languages. Perl will work as well, as the underlying data format is plain XML or JSON.
You might also find these SO questions YouTube Player API: How to get duration of a loaded/cued video without playing it? and Youtube API get video duration from the XML enlightening.

Related

Video streaming solutions

I am attempting to stream a video, in a format unity3d can access, like an mjpg. I have gone through several possible solutions, including gstreamer(only does client side as far as I could tell by the examples), yawcam(I couldn't find a way to access the image directly), and silverlight(due to simply not being able to find how the heck webcam streaming was doable) I am currently just looking for any more methods of getting video over from one side to the other. Could I possibly simply read the images into a byte array and send it over a socket? Maybe I missed something in the previous three possible solutions?
If you are looking to stream video from a server than you can use Ogg encoding + WWW.movie to map it to a texture. Assuming you have a Pro license, as I think this is a Pro only feature. If this is a local file, either bundled with the app or in external folder, we use the brilliant AVPro Windows Media or AVPro QuickTime. MJPEG does offers super smooth scrubbing with AVPro but generates enormous files. Definitely not ideal for streaming or even download!
Finally RenderHead also has a Live Camera capture plugin that could meet your needs.

Personalized Video / Facebook App - What is the best approach?

I want to build a facebook app featuring a personalized video which imports content assets from the user's facebook profile and their extended social graph and integrates these assets within the timeline. I am thinking of using Flash however a key stipulation is that the app works on mobile - and so I would need to use HTML5. My question is: Can I use Flash to build the application and then compile the app as HTML5 - or is there an alternative solution in the form of a HTML5 video toolkit with a programming layer that would allow me to build a web app / access the Facebook API?
I have done this a few times over the years and yes flash was the easiest however there are a few options which you have available to you that I know of which will be purely HTML5 based, personally I'd stay away from flash here as it will end up just getting int he way:
1- The cleanest method is to use a video compositing tool on the server side which can be programmed to accept variables. Personally I have only ever done this using ffmpeg however there a couple of alternatives which are out there.
The basic process would be to grab the media from FB then to composite them at certain point on top/below/around a base video which is sitting on the server using a shell script which you then pass the media assets to as variables. There are so many options as to how you might want this to be done, probably best id to have a look at some of these examples:
http://broadcasterproject.wordpress.com/2010/05/18/how-to-layerremix-videos-with-free-command-line-tools/
http://graphcomp.com/ffmpeg/
ffmpeg watermark without vhook?
note that last time I did this I used vhooks and custom filters, vhooks are now deprecated
This method will mean a reasonably heavy server load if your app is popular but it's probably the most robust across devices etc.
2- Use Popcorn.js, and let the processing be done on the client side. you could hard code it using css/js/html but popcorn is pretty stable although I havent seen how it runs on devices but in theory it should work (all standardized technologies). Basically the process would be to use javascript to fire the display of images overlayed on the video base file at preset cue points. Popcorn has all of the methods and means for you to do this already.
Hope this helps a bit. Good luck, sounds fun.
we realised some interactive video apps and one recent project was quite like your question describes.
We used adobe flash to track the motion - and published the project via create.js. You could have an image sequence from within create.js or put a video in a layer behind. This video would then control the player head time of the create.js motion tracked sequence via jquery.
worked fine - here a link to a testsetup with an image sequence.
Video Integration would be the next step.
http://www.jungeroemer.net/projekte/testpersvid/elftest01.html
(German text, sorry but it's nothing important to read there.
Just click the images and go for it)
you can download the sources from the link, if you need i can also upload the flash file to show you the motion tracking.

Creating YouTube videos in iPhone app

I'm doing a project where we want to create a video inside an iPhone app and upload it to YouTube. I've seen the you upload the video using Google's Data API (http://code.google.com/p/gdata-objectivec-client/).
However it seems that you need to upload the movie as an actual movie. Has anyone got any experience on making a movie in a format that YouTube will accept via the Data API and care to give me a few pointers on what would work?
(Just a quick note, I cannot use hidden APIs for this project)
Many thanks
Youtube accepts a broad range of formats. Just try it yourself, use any free video editing software to create a short movie and upload that movie to youtube, you're almost guaranteed that youtube would be able to process that.
The second part of your question is whether ios is able to produce a movie from still frames, then the answer is - yes - and you want to look at AVFoundation, particularly at AVAssetWriter

iPhone streaming debugging information

I'm looking for a way (doesn't need to be app-store save!!) to get ahold of video-streaming-relevant debugging information.
What I'm trying to do, is to write an application that opens a video stream and displays information like:
framerate
bitrate audio / video
etc etc.
codec information
basically i want to display as much information for any given stream.
Thanks for any information in advance,
best regards
sam
Even though you tagged your question with MPMoviePlayerController, that class probably isn't going to help you out very much. First of all, there's a limited amount of information you can access from it at a high level, certainly nothing about codecs and audio bitrate. And even if the class does store this type of information somehow, your app would be disqualified from being in the iTunes App Store if you access non-public methods or properties.
Secondly, MPMoviePlayerController only supports a limited number of codecs itself, namely the ones that can be decoded in hardware on the iPhone/iPad (H.264 baseline and MPEG-4 videos).
Anyways, a good option could be FFMpeg for the iPhone. Getting the information you need seems to be much more straightforward this way; check out this blog post for a nice tutorial for using the libraries.
I'm not sure about the potential legal issues concerning distributing such a program in the App Store, but if you statically link it with your binary that would at least satisfy Apple... you'll have to check the FFMpeg Legal Site for their end.

Can we play only audio using youtube api for iPhone

In my project i have to use youtube api and play only audio of the video. We must not show the youtube player. Is it possible to play only audio without showing video using youtube api?
Extraction may be the incorrect implied word here. From what I understand, is user133611 wants to have an audio only stream from YouTube. Unfortunately, YouTube directly forbids it. Here is a quote from Kuan Yong from the YouTube API team:
Your API Client will not, and You will not encourage or create
functionality for Your users or other third parties to:
"separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API"
-Kuan Yong, YouTube API Team
Link reference: https://groups.google.com/group/youtube-api-gdata/browse_thread/thread/7fac8e8ff913b6c4?pli=1
I don't think this is really possible only using Youtube API. The Youtube API is not intended to be used for "downloading" videos/audio from them. You should go here, to understand what the Youtube API is really about.
A small abstract:
Unless I am missing something really big, the Youtube API consists of 5 main parts:
Data API
Custom Player
YouTube Direct
Player APIs
Widgets
None of this APIs allow you to for example "download" a video. Also I think (correct me if I'm wrong), that in a youtube video, the audio is actually embedded in the flash video, making the task even less trivial.
To illustrate you, the Data API, allows you to perform and use the youtube video search capabilities, use playlist capabilities and many more of the operations available on the YouTube website.
That have being said, the Youtube API, can be used for example to upload a video from your iPhone to youtube, as this example illustrates.
My Thoughts:
I think that extracting the audio from a youtube video, is actually possible, but involves a whole different process of downloading the video in H264 and then extracting the audio... but it still involves downloading the whole video.
Is the audio only prohibition still valid? Streamus is available as a Chrome Extension. It streams audio only from YT - see website https://streamus.com/
Well, one can simply give the video a width and height of 1px, or better yet do:
.video { text-indent: -9999px; }
And then force the video to play via the API controls. But I wouldn't do it as it is against their TOS and would result in my app being blocked if they find out.
I really confused about your platform. Do you want to do it over iOS platform with writing native code? If yes, you can do it without playing video. But you have to stream both video and music. You can do it with AVAudioPlayer Class, check the reference from
https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioPlayerClassReference/
But yes, you will makes users GSM data overload and it's not fair with letting users about that situation.
Maybe you can force your view over the youtube view? Have you tried that?
If it is against TOS, the op should just drop the idea of implementing his idea.
Just imagine the free music everyone will be streaming out of the promo videos of major videos on youtube!