I am trying to display the preview thumbnail when user move his finger over video scrubber.
The only solution I m finding is to extract thumbnails using some 3rd party tool and save it to server or pass it to app via some JSON.
What I m trying to do is something similar to JwPlayer (http://jwplayer.electroteque.org/controls-preview)
Any idea where to start?
Or is here any standard protocol that support manual generated thumbnails? Or i need to go with my own feed format.
I don't quite know what the configuration of your project is, but one possibility is too actually instantiate a mini player and display the progress of the video as the user the slides. So essentially this "mini player" would appear when the user begins drag, and skip to whatever time is specified, and pause. It is similar to a project I am working on now. This is a great reference as well: http://www.autodeskresearch.com/pdf/p1159-matejka.pdf. This technique is much different then the one I suggested, but is another alternative depending on your scenario.
Related
In my application, we are capturing a video and uploading it to YouTube. But the requirement is, we need to display one image for 2 seconds before the video and after the video (similar to ads in Youtube videos)
And also we need to display a logo at bottom right corner of the video.
I searched for YouTube API for this and couldn't find any clue. Is there any way to do this?
Thanks in advance.
As far as the logo goes, your best bet would probably be to extend the YouTubePlayerView and add the logo on top of the video.
For displaying the image, I would create a layout that can hold either the video or the image. You could then use a FragmentManager to switch between the image and the video. Use a Timer to display the image for 2 seconds and then use the FragmentManager to switch to the YouTubePlayerView (or whatever your extended class is).
Then you will have to extend the YouTubePlayer.PlaybackEventListener to work with your new view. Call the onStopped() method of this listener to switch back to the image after the video is done playing.
EDIT
What it appears you want to do is some video editing. This is definitely not something that you will be able to do through the YouTube API, so you have no choice but to do it natively though the app.
First, you will have to convert the image to an mp4 file. This is no easy task, but this code seems to provide a solution. Make sure that the video from the image has the same encoding as the original video. This makes it possible to combine the videos using MP4Parser (although I have never actually used this library, it claims to work for this).
Finally, to make the video upload to YouTube with the logo, you will need to decode the video, embed the image onto every frame, and encode again. Doing this manually would be difficult, so I recommend using something like ffmpeg. FFmpeg contains a bunch of useful libraries and functions for multimedia data handling like this. Here is a link to an Android wrapper for FFmpeg. I have used ffmpeg alot in the past and the man page is pretty helpful, but I have not tried it on Android.
I've been working on this videos thing in android and I thought to make it more functional. I have a question that, is there any way we can insert or remove frames from some video, like edit videos the same way we edit images, give them effects and all. I think, I am clear. Any links, sample codes, hints or books would be useful to start with this.
thanks :)
Here are multiple things you can look for video editing.
The more efficient in FFMpeg android sample for processing video (so that effects on video applied and saved on device as new video with applied effects) FFmpeg android java
For run time effects, just to show the user effect on video while running in your app, can use Vitamio
I have gone through all the samples of wikitude. Is it possible to overlay live camera feed image which has been saved as screenshot and create augmenetd image? If it is possible then what tracker image should I use? Because tracker image is the one which I know presently that which image I am going for track. Then if the image will be taken in future how can I create a .wtc file for that and how can I augment my camera feed? Is it possible in wikitude?
I have to create one application using wikitude. I like the sdk of wikitude.
If I understand you correctly you are looking for a way to create target images (that are used for recognition) on the device. This is currently not supported. However if you have a valid business case we are able to provide you with a server based tool to create target images. For more information please contact sales#wikitude.com.
Disclaimer: As you probably already guessed, I'm working for Wikitude.
I want to know how a default media player works.Like how it scans all songs in sd card,how it displays them,so overall entire working on default media player.
I want this information so that I can compare it with my custom media player and check how fast my media player is working as compared to default one.I have tried searching internet but was not able to find some relevant information related to this.
Your question is very broad in perspective and hence, I will refer you to corresponding paths to get an understanding of the overall system.
First, the overall processing of media files starts from the Gallery application. Though not the entry point, ImageCacheRequest could be a good reference point to start the study, which shows how a cached image is read and rendered onto the screen.
Next, to understand how this thumbnail is generated, you will have to refer to ThumbnailManager.java which is invoked from camera, mms etc.
Thumbnail class internally employs MediaMetadataRetriever which is the main class for retrieving the thumbnail data.
MediaMetadataRetriever has a corresponding JNI implementation as shown here. The main function of interest is getFrameAtTime.
The most common implementation is StagefrightMetadataRetriever, which works on a simple principle. First, a MediaExtractor i.e. a parser is created which will sniff out the media-file type and create a corresponding parser entity as shown here. Next, the parser will then invoke a codec to decode the corresponding key frame at the requested time stamp and provide the image back as can be observed in extractVideoFramewithFlags.
Inside this function, a codec is created, frame is decoded, color converted and returned back to the caller which will transfer the same to the higher application.
In a nutshell, I feel your player will not come into picture and as long as the corresponding parsers and codecs are registered with the system, the thumbnails will be generated .
I want to know how a default media player works
There are dozens of "default media player" applications, as different Android devices ship with different "media player" applications, frequently written by their device manufacturers.
You are welcome to take a look at the implementation of the AOSP Music app, and there may be other open source media players that you can examine as well.
Hey guys, I'm looking into creating an application that requires a video file taken on the mobile phone, open it and allow the user to cut the video using two sliders, one for IN(the beginning) and the other for out(end of the clip you want), this will then create a new file and my app will use it then.
Does this sound feasible? Where should I start looking in order to do this quite simple concept? Does anyone have any ideas?
Thanks
Android SDK has no video-editing (not even cropping) capabilities. So you'd need to write your own.
To do this you'd need to know 3gpp video/audio file format and also a way to decode the file (for showing in the UI).
This is by no means a trivial task.