How can we Customize MP4 savings in Ant Media server when ABR is enabled? - ant-media-server

When ABR is set and MP4 recording is enabled, AMS saves all the bitrates as VOD.
Is there any workaround to Limit the recordings to a specific bitrate in case of ABR!

The user-Defined script can be used to create a script that works when ABR is enabled. This bash script should delete other bitrate VODs and save only a specific Bitrate as described in the script after MP4 muxing is ended.
This a similar script that deletes other bitrates and saves only the default/Original bitrate.
Please make sure that you have defined the script path in the red5-web.properties file under application directory.

Related

Embedded jpg from remote raw file, only?

Lets say I have a RAW-image on a remote server, like this www.mydomain.com/DSC0001.ARW, and I would like to only extract the "small" preview image (jpg) from that raw file, without having to download the whole raw-file, is that possible somehow?
Let me preface this with: I am no image processing expert.
Answer to your question
You can show images resized, but this will still download the entire file. To my mind, that means the best approach would be to save a pre-processed thumbnail of that image alongside the raw image. If you use some naming convention like DSC0001.ARW.thumbnail.png, they should be easy to find.
Possible alternative solution on the AWS stack
Probably only a realistic solution if you are willing to get involved with some code and AWS. If you use AWS S3 for storing your images, you could fire an event off to AWS Lambda to run a script which processes your raw file into the thumbnail and save that to S3 for you; whenever you upload a new raw file.
Updated Again
Ok, it appears that the server on which you have the raw files is not actually yours, so you cannot extract the preview image on the server as I suggested... however, you can download just a part of the 25MB image and then extract locally. So, here I download just the first 1MB from a file on a server I don't own onto my local machine and then extract the preview locally:
curl -r 0-1000000 http://www.rawsamples.ch/raws/sony/RAW_SONY_ILCA-77M2.ARW > partial.arw
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 976k 100 976k 0 0 984k 0 --:--:-- --:--:-- --:--:-- 983k
exiftool -b -PreviewImage -W! preview.jpg partial.arw
You may need to experiment with how much of the file you need to download, depending on the camera and its settings etc.
Updated Answer
Actually, it is easier to use exiftool to extract the preview on the server as (being just a Perl script) it is miles simpler to install than ImageMagick.
Here is how to extract the Preview from a Sony ARW file at the command line:
exiftool -b -PreviewImage -W! preview.jpg sample.arw
That will extract the Preview from sample.arw into a file called preview.jpg.
So, you would put a PHP script on your server (naming it preview.php) that looks like this:
#!/usr/bin/php -f
<?php
$image=$_GET['image'];
header("Content-type: image/jpeg");
exec("exiftool -b -PreviewImage -W! preview.jpg $image");
readfile("preview.jpg");
?>
and it will extract the Preview from the parameter named image and send it back to you as a JPEG.
Depending on your server setup and file naming, the invocation will be something like:
http://yourserver/preview.php?image=sample.arw
Note that you will need to do a little more work if the server is multi-user because as it is I have fixed the name of the preview file as preview.jpg which means two simultaneous users could potentially clash.
Original Answer
That's quite easy if you can run ImageMagick on your server, you could run a little PHP script that takes the image name as a parameter, extracts the thumbnail and sends you a JPEG.
I presume you mean a Sony Alpha raw image.

SFTP polling using java

My scenario as follows:
One java program is updating some random files to a SFTP location.
My requirement is as soon as a file is uploaded by the previous java program, using java I need to download the file. The files can be of size 100MB. I am searching for some java API which is helpful in this way. Here I even don't know the name of files. But I can keep a regular expression for this. A same file can be uploaded by previous program periodically. Since file size is high I need to wait until the complete file to be uploaded.
I used Jsch to download files, but I am not getting how to poll using jsch.
Polling
All you can do is to keep listing remote directory periodically, until you find a new file. There's no better way with SFTP. For that you obviously use ChannelSftp.ls().
Regarding selecting files matching certain pattern, see:
JSch ChannelSftp.ls - pass match patterns in java
Waiting until the upload is complete
Again, there's no support for this in widespread implementations of SFTP.
For details, see my answer at:
SFTP file lock mechanism.

Uploading a file to different Unix boxes in one go

I have to upload few files from my Windows machine to different Unix boxes using WinSCP software at regular intervals.
The pain is that let's say I have 4 different Unix boxes so in WinSCP I have to open that 4 different Unix boxes individually, to upload the files.
Please advise is there any software through which I can graphically open the four Unix boxes simultaneously and upload the files to the same location?
Open 4 tabs in WinScp?
Or
Write a script to scp them from 1 on the Unix machines to the rest of the Unix machines?
Adding more info:
http://winscp.net/eng/docs/transfer_queue
http://winscp.net/eng/docs/ui_sessiontabs
Either of the two should help
Just create a batch file that connects and uploads a file to all hosts sequentially.
With WinSCP scripting the batch file can be like:
#echo off
set UPLOAD=winscp.com /command "open %%1%%" "put ""%1""" "exit" /parameter
%UPLOAD% ftp://martin:password#server1.example.com/home/martin/
%UPLOAD% sftp://user:password#server2.example.com/home/user/
Now you can call the batch file (say multiupload.bat) with a file path as an argument:
multiupload.bat c:\path\upload.txt
You can even drop/link the batch file in Explorer's "SendTo" folder to easily use it from the Explorer's "Send To" menu:
Some references:
Guide to automating file upload to SFTP server
A practical example for upload to a single host
Making the script take name of file to upload as parameter to easily reuse it.
Example for creating parametrized script to upload files:
Creating entry in Explorer's "Send To" menu.

Automated delete on SFTP server (PuTTY? WinSCP?)

I'm searching for a solution to easily delete files on a SFTP server automatically after a specific period of days.
I read something about automation via PSFTP from PuTTY and WinSCP. But there are no examples for deleting files...
With WinSCP, use the rm command with a filemask with a time constraint (to select only files with certain age, if I understand correctly, what you want to do).
E.g. to delete all files older than 5 days:
rm *<5D
For all the other instructions to assemble a script and schedule its run, see:
Automate file transfers (or synchronization) to FTP server or SFTP server
Schedule file transfers (or synchronization) to FTP/SFTP server
See also:
Documentation for the rm command;
Documentation for the file masks.
SFTP server is also a SSH server. Write a simple code in any language that you're comfortable with and schedule it with crontab.

How can i play recorded adobe connect session?

I downloaded session record by adding /output/recording.zip?download=zip at the end of the recording URL. Record folder has some .flv and .xml files. How can i play this session? Am i use flv editor?
The recording you download using /output/recording.zip?download=zip query is not the video, it contains form FLV but they will not play.
To play the recording make the recording offline, in Adobe Connect 9 there is an option on recording page "Make Flv" under Actions tab.
You will have to play complete recording to download.
Yes, I think you'll need to use an editor for that.
Usually the way to download an Adobe Connect recording is the one described in the official documentation.
You should only use flv files, not xml files
cameraVoip.flv file for microphone, camera video and screenshare.flv for shared screen (from desktop).
You can also get the start time of these files in the indexstream.xml file, if you know how to work with ffmpeg software or other software, you can combine these files.
But if you can not and only audio and video are important to you and not a text conversation, you can use the program I wrote.
It goes without saying that Adobe Connect files may be corrupted for any reason, so make sure they are safe and then work with Adobe files.
https://github.com/HosseinShams00/AdobeConnectDownloader

Resources