Hope you all be fine and doing great.
I am currently working on a Java Web Application. I am getting Streaming video using RTSP URL. This URL is like:
rtsp://---.---.---./6ca714ae28e52f31
I have been able to capture video, diplay/listen it and store it in .mp4 file using FFMPEG with the following command:
fmpeg -i rtsp://username:password#---.---.---.---/6ca714ae28e52f31 -f mov e:/bay.mov (with authentication)
Now, I want to achieve the same in my Java application using ffmped library. I am sure if all this possible through commands then It will also be possible using its library. But unfortunately couldn't get any working useful material regarding this on web.
So, I simply want to ask that:
1. How can I fetch Streams using this RTSP URL in my Java Application with FFMPEG library
2. How can I Manipulate this fetched streaming such as start, stop, end etc.
3. How can I store this streaming in media file in playable form in any specified format.
I have found a FFMPEG's Java Rapper JJMPEG. Now I have two options either to issue FFMPEG command to CMD using Java Application or use JJMPEG library directly. Don't know which one will be better choice.
Thanks for your time and considerations.
Related
I'm trying to inject Spacial meta data into 360 video so it runs on Youtube/Facebook etc - using video that is cut on a Java server with FFMPEG and will run on a Linux AWS EC2 Instance.
I've tried to use this library
https://github.com/pedroSG94/metadata-spherical-injector
Which is for Android and seems to wrap this .so library
https://github.com/pedroSG94/metadata-spherical-injector/tree/master/metadatavideo/src/main/libs/x86
with this script
https://github.com/pedroSG94/metadata-spherical-injector/blob/master/metadatavideo/src/main/java/com/pedro/metadatavideo/VideoInjector.java
I have no idea how to get this running on a Java server, or if it's possible. Can anyone let me know if this is going to work or if I need to find another way of injecting the meta data?
Can FFMPEG do it?
Gave up on FFMPEG and used Exiftools. This works really well.
I have two files - audio(mp3 or wav) and video(mp4 or avi) with the same duration. I want to merge them and send to the front.
Which java library will help me to implement that?
If you mean you want to merge the audio and the video on the server side, so that the merged video can then be streamed to the client, then using ffmpeg via a wrapper may be the easiest approach.
The ffmpeg command line is well used and it is quite easy to ask and receive answers to any particular syntax. Using a Java wrapper approach allows you leverage this syntax and give you the flexablity to use other ffmpeg functionality in the future if you need it.
A popular up to date Java Wrapper is available here:
https://github.com/bramp/ffmpeg-cli-wrapper
If you actually want to stream the audio and the video to the browser separately and do the merging there, then, if you are not worried about an exact match (e.g. needing to synch audio to speech to keep it in lip synch), you can actually just start the audio player and video player simultaneously and the browser will play both together. This worked on all major browsers I tested it on for a project several years ago and I am not aware of anything changing to stop this working.
I am trying to create an application where you are able to convert video's to different formats where the video is saved on a web server so that the user can access it once the conversion is complete. What would you recommend as the best way of approaching this?
Example:
-Download a video from a particular website.
-Be able to convert it to MP4 and save the file on a web server.
-Send a notification to the user with the link of the MP4 video.
-Access and download the MP4 video from the link.
So basically the user downloads a video (in ARF format). My program should take that ARF video and convert it to MP4. Once converted, the mp4 saved on a web server and the user informed (i.e. by email) that the conversion has been completed. The user should then be able to view the link and download the MP4 video. I also want to make sure that the program works on Windows, Linux and Mac.
Users can manually specify the file to be converted. I am most confident with Java so is there a way this can be achieved using some of Java's API Libraries & Web Applications?
I was thinking of using JAVE libraries to do the conversion but am not too sure how to then save the video on a web server.
There are several Java libraries for working with various media formats. A prominent one is JFFMPG:
http://jffmpeg.sourceforge.net/
There is also JAVE, which you may find easier to user, depending on your needs:
http://www.sauronsoftware.it/projects/jave/index.php
We have a java web application where users can upload all kinds of files including any kind of video files. Now we want to allow them to stream these video files they own. So I need to make sure that they are the owner and then stream video. Also possibly stream a preview.
Do I need to convert these video files before streaming and where should I look to get started?
The best video playback/encoding library I have ever seen is ffmpeg. It plays everything you throw at it. (It is used by MPlayer.) It is written in C but I found some Java wrappers.
FFMPEG-Java: A Java wrapper around ffmpeg using JNA.
jffmpeg: This one integrates to JMF.
I know that there is Vuze API and jBitTorrent library but I can't use Vuze because of I have server without GUI and jBitTorrent is too old and too buggy. Can you tell me that bittorrent library for Java is good now? I need to download files through torrent file only. Thanks.
It seems you need to run Vuze headless through it's console ui.
When I tried it with the apt-gettable Vuze on Ubuntu, I didn't need to 'grab a few support jars' as the wiki linked above specified - it just ran straight away.
You can use Transmission or µTorrent, or just run Vuze headless. With sending files to Transmission, you need to encode the binary data as base 64, with sending them to µTorrent, you need to use a multipart form via HTTP POST.
Here are their API pages:
https://trac.transmissionbt.com/browser/trunk/extras/rpc-spec.txt
http://www.utorrent.com/community/developers/webapi