I see here http://en.wikipedia.org/wiki/MP3 that MP3 file consists of MP3 headers interchanged with MP3 data. MP3 header consist of few bytes.
But here is my MP3 file dump with ID3 tag cut. Header is highlighted with blue.
You can see that "LAME3.96" text is highlighted with green. What does it does there? Is this a part of MP3 elementary stream? Or this is the part of some headers I didn't tag?
LAME is an MP3 encoder, which is a program that takes an uncompressed audio source and outputs a compressed MP3. That piece of text there just indicates that the file was compressed using the LAME encoder. According to the LAME SourceForge page, the latest version is 3.99, pretty close to what you got inserted into the header of that file.
So don't worry, nobody tried to insult your MP3 file! :P
Related
The problem
As per this post, I use the following command to convert a flac file to mp3 while keeping all metadata:
ffmpeg -i input.flac -ab 320k -map_metadata 0 -id3v2_version 3 output.mp3
When inspecting the converted mp3 file by right-clicking it, going to properties and then details, everything looks in order. The value for "Length" is correct.
When inspecting the converted mp3 file with Mp3tag, the value for "Length" is different. From my testing, the "Length" value is consistently about 28% of what it is supposed to be.
Normally, this isn't an issue. Most music players I use, read the correct length value, same as Windows. However, I've recently discovered that Spotify Mobile for some reason ignores the length value that can be seen in the Windows panel and uses the one that can be seen in Mp3tag.
I want to figure out what command I should use so that after the flac file has been converted to mp3, Mp3tag shows the correct length, and there by, Spotify Mobile reads the correct length as well.
What I have tried
1.
After converting the file to Mp3, I've tried reencoding the mp3 file into a... mp3 file using the following command:
ffmpeg -i original.mp3 -c:v copy -c:a mp3 -vn -ar 44100 -ac 2 -b:a 320k copy.mp3
As can be seen in the image above, this fixes the issue and the length is showing correctly in Mp3tag and in Spotify Mobile.
Issues with this: Reencoding reduces quality and I don't know how to combine the previous flac conversion command and this one into one line.
2.
I tried https://cloudconvert.com/flac-to-mp3 and it worked. The length is displayed correctly in Mp3tag. (What commands did they use on the server???)
Issues with this: I don't want to rely on a cloud service for conversion, I have a lot of files to convert and I'd prefer it to be done locally.
Some demo files
Here is a folder with a flac file, a bad mp3 file (wrong length) and a good mp3 file. It looks like if you preview the music in google drive, it also plays the wrong length for the bad mp3 (39s not 2m19s), while vlc, groove player, spotify (desktop not mobile) all play the correct full length (2m19s) for the bad mp3 file.
Folder: here's the link
It seems I had an outdated version of ffmpeg... (ffmpeg version git-2020-05-23-26b4509) I updated to the latest version and the issue went away. Learned my lesson the hard way.
Would still appreciate an explanation on why this was happening. I'm curious. Why were there two values for length?
I have some .ts files as part of an hls audio stream. Can I use the cat command to append them and get the .mp3 file. I'm curious what ffmpeg does to create the mp3 from .ts or .m3u8 files so that I can implement it in a node server
No. If you just concatenate them the result is still a MPEG-TS container file, i.e. basically a sequence of 188-byte TS packets. What you need is a MPEG-TS demuxer which would turn (decapsulate) the TS into a sequence of MP3 audio frames
[1], more generally speaking the audio elementary stream.
[1] http://www.mp3-tech.org/programmer/frame_header.html
The playstation 4's browser cannot play any audio files via html5, but it can play .mp4 files. I have a server with all my music on it (all .mp3 or .m4a) and I was wondering if there was any way to, in the playstation 4 browser, convert files to .mp4. If the files could be converted as the page loads, I can point tags to the newly converted .mp4 files. Even if there's some button I have to press to convert one file at a time, it's still better than nothing. Other solutions are welcome too.
Thanks, all
Trying to find a way to covert .wav file to pcap file. I have tried a open source program wav2rtp but the pcap file generated using this program is giving errors when I try to open pcap file in wireshark.
Is there a simpler way to do this file conversion ?
I have .wav & .au formats of the sound file.
Thanks.
You can stream audio (wav in in case) via RTP using VLC easily using GUI. This video will help you. Don't forget to change your codec/encoder to wav.
In my application there are mp3 files located in the bundle (nothing from the web). Some of the mp3 files are original files and some I had edited using simple sound editing software (the ones where you insert a file, cut a slice of it and save it as a new and shorter mp3 file).
I'm using the AVAudioPlayer [initWithData] method.
All the original files (the ones that I hadn't edited and inserted to the bundle as is) are working perfectly and all the ones that were edited are not working at all.
I used 2 different editing software and the outcome is the same.
Anyone had ever encountered that or have any idea what may I done wrong?
Thanks,
Ohad
Converting the mp3 to caf worked for me
as specified here.
see the following:
How do I convert an audio file to the preferred format for iPhone OS?
The preferred full-quality audio format for iPhone OS is 16-bit, little-endian, linear PCM packaged as a CAF file. To convert an audio file to this format, use the afconvert tool at the command line in Mac OS X, as shown in Listing 5.
Listing 5 Converting an audio file to the preferred format for iPhone OS
/usr/bin/afconvert -f caff -d LEI16 {INPUT} {OUTPUT}
To see all the options available for the afconvert tool, enter afconvert -h at the command line.