use ID3 tag to collect information - tags

I'm playing around with a .mp3 file and I'd like to imbed some code that prompts the listener for information (i was thinking a javascript popup) when the file is played. I've been reading up on ID3 tags and there seems to be some neat functionality built into the 'Audio Encryption' or possibly into the 'Generate Encapsulate Object' frames, but I cannot seem to find any good examples. I am assuming that if the tags can contain links I should be able to collect some data when the file is played.

No, ID3 in general does not support this. Only ID3v2, i.e. in versions 2.3.0 and 2.4.0 you could use
a WXXX frame, see https://id3.org/id3v2.3.0#User_defined_URL_link_frame while
a GEOB frame you might mean is more like an attachment for files, see https://id3.org/id3v2.3.0#General_encapsulated_object
How you're able to extract frames (let alone ID3v2 in general) out of an MP3 file with JavaScript is another problem.

Related

Writing MP4 tags for M4A or MP4 audio files

I have a strange problem with MP4 tagging.. I can figure out 2 styles of tags, one that works with mp3tag and tagscanner, another that works with MusicBee.. But I can't figure out one that universally works with all of those. So I write 2 sets of tags into the file...
and even this isn't enough.. Players like AIMP and Clementine still can't read MP4 files I tagged this way. I need to open mp3tag load my files and save them.. then it will write tags that those music players understand.. but I can't find good documentation anywhere.
Does anyone know what kind of tags I need to write to make all of them be able to read the tags? I tried to look mp4s that work in all of them and it is no use, I see tags like "Artist".. I already write a tag called "Artist".. I mean it looks like "Artist" in exif also, this is the tag that I wrote that MusicBee understands.
I use the AudioGenie Windows Library to write the tags. There are 2 different methods for writing a tag.. one is called an ISLT text frame (which I have no idea what that is) and requires an integer code as well as text when writing. Another is called an iTune text frame and requires a string frame ID as well as text.
I tried to shove MP3 ID3v2 tags in both of those as well, to see if that was what the third group of players that can't read my tags wanted. But that didn't work. I only tried this because I read somewhere that ID3v2 tags are widely used in MP4 files (it was only on one comment in stackoverflow that I read this, so I'm skeptical)
Could someone point me in the right direction?

Merge multiple fragments of video and mux it to normal video format

i want to ask if there is any option to just merge multiple fragments downloaded from HBO GO app and mux it to some normal format like mkv or mp4??? Because these fragments has no file type. Some script, program, guide ??? It looks like this
for video: Fragments(video=0), Fragments(video=10000000), Fragments(video=20000000), Fragments(video=30000000), Fragments(video=40000000), Fragments(video=50000000)
...for audio Fragments(audio_eng_st_dub=0), Fragments(audio_eng_st_dub=20201361), Fragments(audio_eng_st_dub=40402721), Fragments(audio_eng_st_dub=60604082)
...for text is simillar.
youtube-dl doesnt support HBO GO direct download so if anybody can help me with it ???
Thank you
They are probably fragmented mp4, You can just concat them with the init fragment and many players can play it.
However HBO use DRM, so you will never be able to play these files.

Record audio, add effects, then save result to a audio file

I am having trouble doing what the title said. My goal is to be able to add any desired effects to your recording, save the modified audio, then send that to a server.
I have searched the fourms and came across these threads:
viewtopic.php?f=7&t=13029&p=45362&hilit=saving#p45362
viewtopic.php?f=7&t=12660&p=44586&hilit=saving#p44586
viewtopic.php?f=7&t=13178&p=45746&hilit=saving#p45746
After reading those, I see it is possible to save the modified audio, but can it only be saved as a wav? Like I said after it is saved it will be sent to a server, so size is a big deal and wavs are relatively big compared to other formats. Ignoring that fact, I tried to implement FMOD_OUTPUTTYPE_WAVWRITER and I cannot get that to work; are there any good examples of using it? I looked though the examples in the library but I didn't see any..
But the basic structure of the app is to record, turn some switches off and on to see what filters you want, preview it, then press a button "Save" that will save it. What would this save function consist of?
Any help appreciated, thanks.
Using FMOD_OUTPUTTYPE_WAVWRITER is fairly straight forward, you set the type via System::setOutput, specify the output file via System::init extradriverdata. The extradriverdata should be an absolute path to a writable area of the device such as the documents directory. After you have finished playing, call System::release and the file will be complete.
The other option for recording wave data with effects is by creating a custom DSP and connecting it to the channel playing the recorded data. You will then get regular callbacks giving you float data that you must write out to disk yourself. You can find examples of DSPs and writing wav files in the dsp_custom and recordtodisk examples respectively.
Finally note that FMOD doesn't come with the facility to write compressed audio to disk, you will need another API to achieve this goal.
You can save as an AAC file via the ExtAudioFile API.

Take screenshot of audio stream

Alright, what I need is a command-line application that allows you to take a screenshot of a file's audio stream.
For example it should be run like this:
app.exe "C:/artist-title.mp3" "C:/mp3Stream.jpg"
app.exe "C:/artist-title.wav" "C:/wavStream.jpg"
It only has to be able to capture mp3 streams, other streams are a bonus.
Preferably all audio channels are listed in the image, but if all channels are combined into one mono stream it would work just as good for me.
So, is there such a application out there? So that I don't re-invent the wheel.
If not does anyone have tips on how I should go about writing such a application myself? Preferably in Java. I can handle programming pretty well but I'm not exactly an expert on the MP3/WAV formats.
Why do I need it...? Well, it's more fun to link to a file online with some sort of preview image besides the link. It gives you a hint of the audio character before you listen to it (is it loud? does it look like "bit music"? does it have any parts that are more quiet than others? etc).
Never mind, I wrote my own little application in Java.
It was a piece of cake once I found this excellent guide:
http://codeidol.com/java/swing/Audio/Build-an-Audio-Waveform-Display/
Although you can't download the source from that page (as far as I can tell, though he makes it apparent that you should be able to) he does provide some very useful key lines of code that makes it easy to puzzle together the application.
Adding a little bit of help (easy stuff). You can get a graphics object from doing so:
BufferedImage img = new BufferedImage(500, 100, BufferedImage.TYPE_INT_RGB);
Graphics2D gfx = (Graphics2D) img.getGraphics();
And once you have drawn everything you need on the gfx you can save it to disk just by one line:
ImageIO.write(img, "jpg", new File("waveform.png"));
It's hard to get it to look very good though. Doesn't look as nice as for example Audacity. Guess they have spent more time on it than a few hours though.
The biggest pain about this is however that Java don't support MP3 import. They really should get around to that.
So to get the waveform of MP3s I first convert them into WAV using "javazoom.jl.decoder.Decoder.java", it's on their website. Very easy to use, just give the input path and the output path and it's done.
javazoom dot net (couldn't post more than one "hyperlink" on this website)
The big downside of this is of course that a huuge WAV file has to be created, and woe be unto thee if the MP3 happens to be 15 minutes or so... The WAV will be over 100 MiB (maybe even 200 MiB, haven't found out since I got a Java-out-of-memory-error, even though I gave the VM 512mb).
MP3 support in Java today please. Guess the reason they don't have it is because of copyright issues. Copyright really is slowing man down.
Also take a look at http://www.jsresources.org/
It provides a pretty good FAQ section about everything Audio in Java, and some example applications.

How to embed control change commands inside of a MIDI file

I am making a simple game in order to learn a new language. I am in the process of collecting some music for the game and would like to use the MIDI format so that I can control the flow of the track (i.e., I would like to have an introduction that only plays once and does not play again when the song loops.)
I am having a tough time finding information on how to modify existing MIDI files so that they may send a control change signal to the synthesizer. Has anyone had experience with this?
I think that I should have been more clear with my original question. I am using an existing game engine which takes care of playing the music. I am under the impression that this control change value must be embedded directly in the MIDI file itself as I have no control over the synthesizer. From the manual:
MIDI files are played via the
DirectMusic Synthesizer. If a BGM MIDI
file contains the control change value
111, that value is recognized as where
the song will start repeating after it
reaches the end.
I wish I could do it programmatically. I suppose what I am after here is some sort of editor which will allow me to modify the MIDI file that I already have.
Sounds like what you really want is a midi editor
try looking in the Midi 1.0 spec
Here's a table of the control change messages though it looks like you're looking for a way to do this in software. yes?
you could try just sending it as raw midi data (ie. the messages on that table)
looking over your question again... my answer is not that useful...
what I would do if I were you is separate the introduction into it's own file and then you have a file containing just what you want to loop.
you could also look at the spec for the Standard Midi File format (SMF)
DirectMusicProducer is probably your best free option if you are playing using DirectMusic. I don't believe the MIDI record feature will include control changes, but your engine may support playing segment files which are much more flexible.
The only MIDI sequencer I use cost around $300 (USD) about 10 years ago (and no longer appears to exist), but I am not aware of any good quality free MIDI file sequencers. (Note that "MIDI editor" is probably different to "MIDI file editor" or "MIDI sequencer")