How to identify the start of a song in a big video file

279 views Asked by At

I am looking for a way to tag the start and end of a song(s) in a video file.

I am targeting below video formats for now. 1) 3GPP (.3gp) 2) MPEG-4 (.mp4)

I referred to the article http://bigflake.com/mediacodec/ and Android Extract Decode Encode Mux Audio and was able to get an idea for extracting demuxed, encoded audio data, however i am not sure how to identify the start of a music (not normal audio) in this audio file.

Target OS is Marshmallow.

Please suggest if this is possible, the answer i am looking for may need audio signal processing, unless there is an easier way to do it.

1

There are 1 answers

1
AudioBubble On

A theoretical way would be to use Transloadit, a program that would turn a song into a waveform. Then create a program (I think Python would do decently well) that can identify the start of the waveform and load it into a library. Then, in that library, you place the songs and their charts together, and if a song plays, you can then also run Python, which would detect the location of the source of current music and find the chart there and get the corresponding song name.

This will take a lot of time.

Transloadit waveform generator

Using PIL (Python Image Library) to detect image on screen from StackOverflow - first answer will help you.

If you need help with the libraries, then just ask me.

I'm sorry, but I don't have any major Android knowledge cough cough none. Sorry, but you might need to search up some tutorials or try to use Python.