Find the beginning of audio track in other audio track - audio

I have a long audio track that contains multiple songs in one file.
I have one song in other file.
How can I find the beginning and the ending of single song in a long file?
Can I do this with ffmpeg and how?
Thank you!

Related

Merging of two AAC files into a single file

I am trying to merge two different AAC audio files and a H264 video file to form a single TS file using C++ code. I have been successful in it. So now my TS file possess the following order. First, video part from the video file, then audio part from the first audio file and then audio part from the second audio file and then again the video part and it goes on the same way. On hearing the resulting file, I recognized the presence of the different audio files with the video.The problem is that the resulting audio ain't that much cleared. Distortions can be recognized making it unclear to hear. Also note that the resulting audio seems slow as compared to the original.Can anyone guide me in getting off those distortions and procuring the exact replica of my original files ?
Thanks,
Ashish.

How to attach new vocal in any video without removing old vocals using ffmpeg libraby

I want to create a video that have new vocals but old background music. Is it possible using ffmpeg library?
I do not have very much idea about how to do it but I assume that any video contains two layers of audio.
Background music and
Vocals or dialogues
I want to remove original vocals of video and add new vocals but I do not want to disturb the original background music of video.
Is there anyone who can help me for it. I am using ffmpeg library for it.
One way I have done this in the past is as follows:
extract audio from video using ffmpeg
merge extracted audio with the new video you want to add using sox (http://sox.sourceforge.net/sox.html)
add the merged audio track back into the video using ffmpeg
This is likely not the most efficient way to do this, but it did work reliably.

Creating preview audio clips from m4a files

Another post here answered the question of creating 30 second preview clips from WAV audio files (Create mp3 previews from wav and aiff files). My needs slightly overlap, but differing details are beyond my knowledge.
Requirements/Options: clip length; beginning & ending fade length; input filetypes: m4a/AAC/AIFF; output filetype: mp3; kbps (e.g. 192); original files unaltered; suffix new mp3 names with " (Preview)"
Limitations: no uploading of original files to a server (desktop processing); no compiling (unix/Terminal/Bash script only); recursive processing of files in sub-directories
Any/All assistance and advice is welcome.
You'll most likely get the best results with a DAW (digital audio workstation) and an audio file converter.
For a DAW, Reaper comes with a 60 day trial, and it has everything you need to cut the songs where you need and to do fade ins/fade outs, and other effects if you'd like.
www.reaper.fm
Simply use a converter to convert the m4a file to .wav, .mp3 or whatever you prefer, and then if you need it back in m4a, convert it back. I say this because some DAWs can't work with m4a files, but if which ever one you choose to work with can then no conversion is necessary,
There are many options for what DAW and what converter you use, I recommend Reaper for a DAW, and most converters essentially do the same thing, so it doesn't make much of a difference which one you choose.
Hope this helps!

mixing two audio track using mlt

Am using mlt framework for editing audio and video track. Now I have a use case like, have a audio track where one person is singing song without music and have another track where I have music for the song. Now I want to mix this, I mean with the song I want to add the music track. Please suggest me which melt command should I use?
Thanks
Sougata
if You have two audio clip in mp3 or other format try this:
melt avformat:a.mp3 out=400 -move in=0 out=400 -track avformat:b.mp3 out=400 -transition mix in=0 out=400 a_track=0 b_track=1

Multiple audio streams in a MPEG-4 file

The MPEG-4 file format allows multiple streams to be present in a file.
This is useful for videos containing audio in multiple languages. In the case of such a video, the audio streams are synchronized to the video.
Is it possible to create a MPEG-4 file the contains desynchronized audio streams, i.e. the audio track are played on after another?
I want to design a MPEG-4 file that contains a music album, so it is crucial that the tracks are played one after another by media players such as VLC.
When I use MP4Box (from the GPAC framework) the resulting file is recognised by VLC as having synchronized audio streams. Which box of the MPEG-4 file format is responsible for this? Or how can I tell VLC that these audio streams are not synchronized?
Thanks in advance!
I can think of two ways you could do that, and both would be somewhat problematic.
You could concatenate all the audio streams into one audio track in the MP4 file. This won't be ideal, for some obvious reasons. For one thing, it's not exactly what you were asking for.
You could also just store the tracks as synchronized audio streams, but set the timing information in such a way that the first sample of the second track won't start playing until the first track finished playing, etc.
I'm not aware of any tools that can do this, but the file format will support such a scheme. Since it's an unusual way to store audio in an MP4 file, I would expect players to have problems with this, too.
Concatenating all streams would work and the individual tracks can be addressed by adding chapters. It works at least with VLC.
MP4Box -new -cat track1.m4a -cat track2.m4a -chap chapters.txt album.m4a
The chapters.txt would look something like this:
CHAPTER1=00:00:00.00
CHAPTER1NAME=Track 1
CHAPTER2=00:03:40.00
CHAPTER2NAME=Track 2
But this is only a hack.
The solution I'm looking for should preserve the tracks as individual streams.

Resources