Which is the best way to encode batch videos on server side? - video-processing

I am making a general question since I am a developer and I have no advance experience on video elaboration. I have to preparare a web application with the purpose to allow video files upload on our company server and then video elaboration by server, on user command. The purpose of the web application is to allow to the user to make some elaboration on video depending on user action launch from the web app:
(server has to ) convert video in different format(mp4, flv...)
extact keyframes from video and saves them in jpeg format
possibility to extract audio from video
automatic control of quality audio & video (black frames,silences detection)
change scene detection and keyframe extraction
.....
This what's my bosses wanted from the web based application (with the server support obviously), and I understand only the first 3 points of this list, the rest for me was arabic....
My question is: Which is the best and fastest server side application for this works, that can support multiple batch video conversions, from command line (comand line for php-soap-socket interaction or something else..)?
Is suitable Adobe Media Server for batch video conversion?
Which are adobe products that can be used for this purpose?
Note: I have experience with Indesign Server scripting programing (sending xml with php and soap call...), and I am looking to something similiar for video elaboration.
I will appreciate any answers.
THANKS ALL

I suggest you start with the open source project FFmpeg. You can call the program from the command line and via a series of arguments specify the desired output types, thumbnails, etc.
As an aside, when you start looking around at Video related projects (MediaShare for example) you will find they are all using FFmpeg for their video processing.

as Nathan suggested, FFMPEG is the first choice. Also you can check MEncoder
Just to elaborate:
1) (server has to ) convert video in different format(mp4, flv...)
both FFMPEG and mencoder do this well
2) extact keyframes from video and saves them in jpeg format
as I know it's impossible using command-line interface of FFMPEG, not sure about mencoder. However they can save all frames as separate images
3) possibility to extract audio from video
both FFMPEG and mencoder do this well
4) automatic control of quality audio & video (black frames,silences detection)
you need to code this, using FFMPEG libraries or mencoder
5) change scene detection and keyframe extraction
it's not clear what your boss imposes here

I tried lot of videos converting in server side using advance Xuggler API libraries.
Xuggler is a free open-source library for Java developers which can be used to uncompress,
manipulate, and compress recorded or live video in real time. Xuggler uses the very
powerful FFmpeg media handling libraries under the hood, essentially playing the role of a
java wrapper around them. It is the easy way to uncompress, modify, and re-compress any
media file (or stream) from Java.
WebLinks : 1) http://www.xuggle.com/ -official website
2) http://www.javacodegeeks.com/2011/02/introduction-xuggler-video-
manipulation.html - example

Related

Create a binary file extension reader for mobile

It is an ancient binary file extension, actually a video file created by Inter-Tel Web Conference software. It contains a screen recording video and voice audio, and also can capture the keyboard chat log, attendees and the document manager window during a conference. It can be played with Inter-Tel Collaboration Player, a standalone application included with the Web Conference software package.
What I am trying to do now is finding a way to play these files on mobile, although Inter-Tel Collaboration Player offers exporting the files in AVI format, I want to know how to make a command line script for that because the application have lots of problems with Windows 7,8,10 and don't have a Mac OS version.
What is the way to create a new player for that kind of extensions?
"Linktivity stopped support on this app, http://linktivity.com even disappeared from the web..."
It seems they were bought out by Mitel Software so now everything is under the Mitel brand name.
"I just want to find a way to manipulate this file extension, a new good player for mobile and computer"
To open/edit those .lrec files with modern software you'll have to look at their :
Collaboration products.
Unified Communication products.
I tried :
To contact them just to double-check facts but they expect a realtime phone conversation with a salesperson so it wasn't an option. I'd be a fake potential customer, but you can provide a real-world issue (with background details) to see if they can solve it.
Also downloaded for Android the MiCollab app but it needs login details before even starting anything (so no progress to just check if an .lrec file from PC would open within Android).
Export videos for mobile playback :
I've tried the desktop software. Unfortunately it does not accept external commands so there is no way to make a script that takes multiple lrecs and gives back multiple AVI.
The only option is to extract frames from .lrec bytes and use a tool like FFmpeg to combine the images (since appears to do image grabs as frames) into one .MP4 video. MP4 is then playable on mobile devices.
Also any of your existing AVI files should be converted with FFmpeg to MP4.
You can download FFmpeg for Windows here (just the big blue button, ignore other options).
Copy the ffmpeg.exe file to some folder like c:\ffmpeg and put your avi's there.
Now open Command prompt and do cd C:\ffmpeg to reach folder, then type : ffmpeg -i filename.avi filename.mp4 (replace filename with preferred for input and output)
If you know how, just include ffmpeg.exe path to Control Panel PATH settings so that FFmpeg can be accessed from any folder (no need to move files to its own folder).
PS:
I am still researching how to get the frames it's an akward format without the specs (bytes order is Big Endian but then entry values are filled as Little Endian, then also not sure whether to reverse every two or four bytes cos it's mixed up like that etc and the pixel bytes themselves seem to have compression but it's not JPEG more like ZIP or whatever). Only confirmed bytes so far are for video width and video height. It seems doable though if the .lrec only contains screen recordings.
After some research, I found that Media Player Classic can play .lrec files. I don't know, if this helps you a bit.
For a own video player for your company, you would need the encoding infos or a decoder directly from Inter-Tel since they own the licences, without it you can't create one.
Edit: Deprecated info see comments.

How to receive H264 stream via RTP and store to file?

I'm trying to make a server that receives RTP/H264 video streams from android clients and stores these to file.
Currently I'm using VLC in the server, which works well. However, I am worried that VLC is a heavyweight solution that may not scale well. As I'm not actually playing the video, only saving it to file, I thought there must a be a more efficient solution.
Currently I'm planning on using an Amazon ec2 instances, so the goal is to serve as many clients as possible per instance.
I'm flexible (willing to learn) on the language side, I'd like to choose the right language for the job.
So, does anyone know of a good, scalable way to store these streams to files?
Thanks in advance!
EDIT
FFmpeg or libav look promising. Looking into them now.
Basically you need an library that supports rtp stack server side, so you can extract the payload and just append to a file as it comes. ffmpeg is a great choice, and it does have rtp stack and it also it can generate containers(MP4,...) for you as well; if needed. Actually VLC uses ffmpeg's libav library under the hood.

How to play MP4 video from System.IO.Stream in WPF App?

I'm developing a WPF based app in C# and I want to play an h.264/aac encoded mp4 file from a stream source that derives from System.IO.Stream.
I can play videos directly from local files, and from a URL source, but I also need to playback video from a data source that derives from System.IO.Stream. Specifically, I'm using a product from Eldos called Solid File System (http://eldos.com/solfs/) which allows you to create virtual file systems inside a single file. To access data stored inside a SolidFS file they offer SolFSStream which derives from System.IO.Stream.
Does anyone know of a .Net Framework API, or third party API that will allow me to play the video by passing in the stream reference?
My preference would be to copy the files to a temp directory that the application can access, then use a simple to use and robust library to play the file e.g http://msdn.microsoft.com/en-us/library/system.windows.media.mediaplayer.aspx
My reasoning would be that supporting stream may not be the best criterea to choose a third party library to play mp4 files. You need to ensure that the library is robust and easy to integrate with your existing application.
Please note, by referring to the MediaPlayer class I am not saying that this is the most robust library, but it has met my use cases in the past and was easy to integrate with the application.
DirectX had some methods to play custom streams, but I don't know details. Also, we offer OS edition of SolFS for usage scenarios like yours - you can have a virtual disk with OS edition and play from there (and disk access can be restricted to only your application and the player for security).

how to take video and audio from a stream and output to a video file as well as images

I am currently trying to make a program that will take a stream coming in, like a webcam and a microphone, and I am trying to save both the video and audio into an AVI file and be able to save out the information out to images. I've tried to do this with DirectShow and OpenCV, but I've had some trouble since I have audio that I would like to include in the AVI file, but cannot see a way to use OpenCV to save Audio information.
I've also looked into FFMPEG, but I don't see much online about working with streams coming in from Windows.
Any information or documentation would be great.
I am trying to develop this on a Windows compatible machine.
Thanks
We have a cross platform vision system framework that may solve your needs:
http://www.simplecv.org
Here is how you do it in our code:
from SimpleCV import *
import time
cam = Camera()
visstream = VideoStream("foo.avi")
while(True):
image = cam.getImage()
image.save("c:/blah.png")
image.save(visstream)
time.sleep(0.05)

Encoding Audio (to AAC) in Silverlight 4 (on the client)?

OK so Silverlight 4 is adding support for capturing from microphones (and webcams), however for this facility to be useful (in my case at least) I'd need to upload this captured data to a server to save.
The AudioCaptureDevice will record PCM audio on the client, and as we all know PCM is not the most efficient encoding... the data would be too large to upload uncompressed.
Ideally, I could encode this PCM stream to AAC right on the client, then upload that compressed stream to the server.
Something like this library, may be useful. However it doesn't support AAC.
(I'm choosing AAC because (unlike MP3) it is royalty-free to encode, and is supported by popular PMP devices.)
Any thoughts out there on the best way to accomplish this? All options are on the table: full-trust, Google Gears, etc...
Thanks for any help!
There's an audio codec out there called Speex AND Alden Torres ported the SPEEX algorithm to C#. So you have a full managed audio encoder. Here's the relevant blog post where he shows how to encode the audio from the mic with SPEEX. Read also the comments.
As the answer mentioned above Speex is a voice codec which is not really appropriate if you want to use it for music.
However, if you are still interested in Speex on Silverlight than you should take a look at NSpeex which is a port of an earlier version of Speex to C# and it also offers a Silverlight library.
I need to record a music in Silverlight (e.g. from the line-in) and save it on the server. It must be in a good quality (not like SPEEX). I will try to use a lame encoder on the client. It needs the lame_enc.dll that can be accessed by p-invoke. I will test if it is possible from the silverlight.
Do you know some alternatives? Maybe a good stream server (is it possible with wowza)?
You should know that AAC encoding is patent restricted as well. Check out the Wikipeadia article on it. If you want a free format, you should look into Vorbis or FLAC (or Speex).
If you're on a Windows 7 or Server 2008 R2 box, you might be able to use the SDK to encode AAC (http://msdn.microsoft.com/en-us/library/dd742785(v=VS.85).aspx).
Also, since you're forcing the client to do a bunch of work anyway, why not just zip it before you upload it -- I'm not a Silverlight person, so maybe that's not possible?

Resources