I have to create a website of vod (films), and the problem is that i have to convert my video to different formats to be supported by all browsers (mp4,ogg and webm), the problem is that when someone will add a film with a size >1Gb, the conversion to the other formats will take a lot of time (I tested ffmpeg and xuggler api on java ), is there any other library faster than ffmpeg or an onother approach to manage my large videos?
Thank you
Related
I have been searching on this. I Need to build an independent utility that should:
Convert image sequence to .mov format
Take input from user and display it inside the mov.
I plan to do this using Java since this is a cross platform language.
How to do it?
See JpegImagesToMovie.java it requires the x-plat version of the JMF (or more importantly jmf.jar).
For a more modern alternative, look to JFFMPEG (JMF with more formats & encodings).
I have earlier used XUGGLER for making videos from image frames. It is easy to use XUGGLER with the help of the comprehensive tutorials available here. You can also add audio to the video generated from the image frames.
Xuggler supports a large number of video codecs and video container formats so you will have the option of creating the video in different formats, leave alone .mov. Hope this helps. I can post my own code for this utility if required.
I'm looking for an Java API able to convert various audio formats, especially WMA and AAC, to MP3. Any clue?
I doubt that you will find native code for that, but you can take a look at one of the Java wrappers from ffmpeg like FMJ or Jffmpeg.
I want to play an MP4 videon streamed over rtmp protocol in java.
I found a few rtmp libraries (yuv, red5), but nothing on mp4 display.
Is there a (possibly simple and maybe platform-indenpendent) solution to do it in java?
Most rtmp streams in my experience tend not to be MP4. There's nothing particularly clever about rtmp streaming though, and if you really can't find anything to fit your needs the way to go is to get hold of a copy of rtmpdump, rip the stream to file and play it.
BTW I'm playing with the IBM MP4 sdk toolkit at the moment, downloadable from http://www.alphaworks.ibm.com/tech/tk4mpeg4 . Seems straightforward enough, dled, unzipped and had the Swing demo app playing MP4s in NetBeans in under 5 minutes. If the stream you're talking to is genuinely MP4 you could probably figure out how to hotwire it to the stream fairly quickly from what I'm seeing of the IBM MP4 API.
I am looking for a 100% Java solution for encoding software generated images into an AVI stream together with an uncompressed audio track.
At the moment I am using JMF, but its size and installation problems make it a bad solution for my purpose.
While it does not support audio, I created an MJPEG AVI Java class some years ago. You basically just tell it the resolution of your output video, along with the frame rate, then you just keep adding images to it. When you are done, you tell it to finish and it'll close out the AVI. It is based off of the Microsoft documentation on AVI, RIFF, and BITMAP file formats.
Other than not supporting audio, the only real problem is it implements the version of the AVI format limited to 2GB per file. While the class will write out a much larger file, I am uncertain that any players or video editors would be able to read it.
The way I've used this code in the past, is to generate an MJPEG AVI for processing in a video editor (adding audio, etc. in the editor). It helped me with automating some tedious slide show generation. Not sure if this code will help you, as is, but it might help if you are trying to roll your own solution. MJPEGGenerator.java is available if you are interested!
You can use JMF, see this nice example.
There is a nice blog entry here:
http://www.randelshofer.ch/blog/2008/08/writing-avi-videos-in-pure-java/
By Werner Randelshofer
I am looking for an media conversion library that can convert and compress various media i.e both audio and video files to various formats.
FFMPEG-PHP is a popular choice for extracting information. It doesn't re-encode files, though. http://ffmpeg-php.sourceforge.net/
But if you have an instance of FFMPEG installed on the machine, you can call FFMPEG via the exec function in php.
Eg: exec(’ffmpeg -i ‘.$SourcePath.’ ‘.$Destination);
I think your best bet is ffmpeg-php (can be used for both audio and video conversions). Imagemagick has a few basic video conversion options as well.
A second option would be to use mencoder from the MPlayer project (again, you'll have to call this as a command line tool). The main difference between ffmpeg and MPlayer is that the former comes with open source codecs while the latter comes with a host of codecs from all kinds of sources plus it uses ffmpeg.
So ffmpeg is a little more simple to use, MPlayer can convert between many more formats but the command line gets pretty complex.