fragmented mp4 javascript converting - ffmpeg

I wanted to know if there is a way to convert regular mp4 to a fragmented mp4 via javascript. (like mp4box does) Is it efficient enough (not suppose to be a complicated task)? did anyone write something like this?
to make it harder, can it be on the fly? meaning I will not download the whole mp4 from the server but download in parts and convert it into fragments compatible with fragmented mp4 and mpeg-dash - I'm trying to overcome to problem to not have to use 2 different file types to play a video or do mp4box on all my library in advance.
Regardless, is it possible to convert from h.264 compatible files with different containers (mov, flv etc.) to fragmented without a server? meaning do it in the browser with javascript somehow?
appreciate the help,
Yug

I am working on something similar (which lead me to here) but no clue so far. However, below is my finding:
Broadway:
https://github.com/mbebenita/Broadway
The idea is you may write a C/C++ using FFMPEG source library, then use Emscripten to compile your C/C++ coding into Javascript. I yet start working with this method, not sure this will work or not. If you did do let me know.

Related

merge/mix multiple audio using ffmpeg

I need to merge/mix multiple audio file into one single audio file using ffmpeg api, I googled a lot but didn't find any useful code samples, could anyone help to provide some guide on how to do this with ffmpeg apis?
You can use SOX for this task. Check documentation http://sox.sourceforge.net/sox.html. FFMPEG is widely used for audio conversions from one format to another. SOX is the best library which is widely used for mixing or concatenating audios.

Is it possible to retrieve the "profile" of one file, and use it to convert another file?

So we have an ancient compiled program that has been converting AVI files to MPEG for television broadcast. The program is pure sorcery, as the original programmer is long gone, but it has created 10's of thousands of MPEG files of a very particular format that our (also ancient) broadcast server uses.
So...the question is whether or not, we can use FFMPEG to initially "get the details" of one of those MPEG files, and use THAT to convert future MP4 files to that legacy MPEG format?
In short, we don't know all the intricacies of everything that the program is or may be doing, and want to replace it with FFMPEG, being confident that we're getting exactly the same output that works without a hitch in the fussy broadcast server.
FFmpeg cannot automatically retrieve and store all information from an existing file which is salient to reproducing those features in a new instance.
ffprobe or ffmpeg will show you basic stream and metadata information but that information has to be parsed outside of ffmpeg and then a conversion command manually crafted to reproduce those properties. However, this is only a start. There may be many aspects, like those related to flags, headers and packetization that ffprobe won't show, and which a fussy consumer expects in a certain way.
FFmpeg should be able to produce a standard vanilla file. You mention 'MPEG' but that could refer to MPEG-1/2 Program Stream (ISO 11172) or Transport Stream (ISO 13818). The latter is still widely produced & used and you should be able to find multiple software, FLOSS or otherwise, that produce it.
You can use ffprobe to get information about any AV media file and retain this information for later use:
https://www.ffmpeg.org/ffprobe.html
https://trac.ffmpeg.org/wiki/FFprobeTips
If you have ffmpeg installed on your system than ffprobe should already be installed ...

FFMPEG command to combine a WAV file and a video file?

I use Qt & OpenCV to record video and QAudioInput to record audio into wav format. I want to combine them into one video file. How can I accomplish this? I have researched so much but I can't seem to find a command to accomplish this.
I use both Windows and Mac.
FYI, this operation seems to be accomplished through the cmd-line in this thread. This approach may turn into an easy hack since you can call this command using system().
But if you still want to do it programatically, I suggest you take a look at Dranger's FFmpeg tutorials. It provides 8 interesting tutorials that shows how to do simple stuff, from taking snapshots of a video to more complex stuffs like writing a simple video player with audio/video sync.
These tutorials teach how to work independently with audio and video streams, which is what you need to do: read the audio stream from the WAV file and then insert it as the audio stream of a video file.
Maybe not directly related to what you are aim for, but this answer demonstrates how to use FFmpeg to retrieve the audio stream of one file and play it with SDL, while simultaneously using OpenCV to retrieve video frames and display them in a SDL window.

Ruby for video encoding and convertion backend?

i am working in a project which target it to convert the video formats, audio formats .. encoding stuffs, where sequential images and sound are mixed up and converted as video. Is this possible via ruby back-end ? I am really looking forward to work with ruby for this so i want to know before starting that is this even possible with ruby or even better if there is already library or framwork for this task ?

Convert a sound file from one audio codec to another when file called

I am not sure that this is the correct place for this question, so tell me if so and I will repost elsewhere.
I have a rather large collection of music, most of which is encoded in FLAC format. Unfortunately the DJ software I use (Serato) does not support FLAC (I cannot for the life of me understand this, and I have spent years lobbying to add this feature, as have a significant part of their userbase, to no avail).
Would it be possible to create a program that would sit between Serato and windows and when you dropped a FLAC file into Serato (or File-Load or whatever) it would convert that to mp3, store it in the temp folder and load that mp3 into Serato?
EDIT: Converting to WAV would probably be simpler and quicker
There is a filesystem that converts FLAC to mp3 behind the scenes. So even if the files are actually stored as FLAC, they look like mp3 to the applications. It's called MP3FS, and should be exactly what you're looking for.
Unfortunately, it's for Linux only as far as I know. You could try running a Linux system as a virtual machine and share the MP3FS files so the Windows system can access it.

Resources