Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: MP3 - CRC setting (turn off or on) via command line (Read 3477 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

MP3 - CRC setting (turn off or on) via command line

Hello everyone... I desperately need a command line utility that checks if an mp3 file has CRC on and sets it to off
Is there anything like that?!
Thanx in advance

Re: MP3 - CRC setting (turn off or on) via command line

Reply #1
You can use mp3guessenc for CRC verification, and mp3packer to rewrite the stream without error detection.

Re: MP3 - CRC setting (turn off or on) via command line

Reply #2
You can use mp3guessenc for CRC verification, and mp3packer to rewrite the stream without error detection.

Hello j7n, thank you for the reply, really appreciated...
Listen, I'm trying and trying and keep trying with this mp3packer which does look promising, but I can't even get it to convert 320K mp3 down to 192K... I 'm using the -b 192 switch and it does absolutely nothing, giving me a converted file (in a different output folder) same at 320K...
Am I missing something?!

Re: MP3 - CRC setting (turn off or on) via command line

Reply #3
Also... I don't see anywhere a switch to remove the CRC from the mp3!

Re: MP3 - CRC setting (turn off or on) via command line

Reply #4
Mp3packer will recode the data without loss of quality. It will always omit CRC to save 2 bytes per frame. You can't use it to reduce the bitrate of most streams significantly. The -b parameter constrains the bitrate to a certain minimum, which is useful in certain situations. If you can tolerate loss of fidelity, use any regular encoder instead.

Re: MP3 - CRC setting (turn off or on) via command line

Reply #5
I tried it without the -b... it seems to me that the CRC after the conversion was still there... Unfortunately I can't run mp3guessenc since this is a Windows machine...
What do you think?

Re: MP3 - CRC setting (turn off or on) via command line

Reply #6
I checked version 2.04-268 on a new encode made with Lame and CRC was stripped. How are you verifying it? There is a Windows compile of mp3guessenc in the .tar.gz.

Re: MP3 - CRC setting (turn off or on) via command line

Reply #7
Thank you j7n... You're right there was a Windows command line...
Ok, it seems that CRC is off in the file... So thats not it, I still cannot convert the mp3...
Let me tell you the whole story, in order for you to grasp my problem! (if you have the extra time to spare :) )

I have a small internet radio and I have some producers that send me their set in a single mp3 file. One hour set.
Now my on air software is called Ots made by OtsLabs in Australia. They don't use mp3 files but instead they use their own proprietary format container .ots, they have a conversion utility that converts the mp3 files into ots files and it works great with no mp3 constraints of any type/shape or form, BUT it's not command line....
So I've been using their command line converter which dates back to 1999 if I m not mistaken and that little program works fine BUT it doesn't convert when it sees the mp3 with CRC ON.
So I need a command line utility to include prior and within my conversion batch from mp3 to ots, to REMOVE CRC (or set it to OFF, whatever you prefer), and if possible (as well), if the set is at 256 or 320 etc to downsample it to 192 since I'm streaming at 192 and there is no point... Not that if I leave it at the original samplerate it would hurt of course.

MP3OTS  v1.1  Copyright 1999 Ots Corporation
*** Processing source file 1 of 1, TestProducer_Radio Set ...
Skipping... Error reading source file.
0 OTS files created!

Not sure what else is wrong with the converted file and doesn't want to work...

Re: MP3 - CRC setting (turn off or on) via command line

Reply #8
This is the original file before the conversion:

Reading `alkalino_radioactive set_org.mp3'...
ID3tag v1.0 found (offset 0x08DE1915).
  Title   : RadioActive Set...............
  Artist  : Alkalino......................
  Album   : ..............................
  Year    : ....
  Comment : ..............................
  Genre   : unknown

ID3tag v2.4.0 found (offset 0x00000000).
ID3tag v2 is 1053 bytes long, skipping...

First frame found at 1053 (0x0000041D).

Detected MPEG stream version 1 layer III, details follow.
  File size               : 148773269 bytes
  Audio stream size       : 148772088 bytes
  Length                  : 1:02:02.501 (3722.501 seconds)
  Data rate               : 319.7 kbps
  Number of frames        : 142502
  Blocks per frame        : 4 (granules per frame 2, channels per granule 2)
  Audio samples per frame : 1152
  Audio frequency         : 44100 Hz
  Encoding mode           : joint stereo
  Min global gain         : l=120  r=121
  Max global gain         : l=187  r=187
Flags
  Error protection : no
  Copyrighted      : no
  Original         : no
  Emphasis         : none

Mode extension: stereo mode frame count
  Simple stereo                 : 142502 (100.0%)
  -----------------------------
  sum                           : 142502

Block usage
  Long block granules   :  457320 (80.2%)
  Switch block granules :   67952 (11.9%)
  Short block granules  :   44736 ( 7.8%)
  ---------------------
  sum                   :  570008

Ancillary data
  Total amount   : 0 bytes (0.0%)
  Bitrate        : 0.0 kbps
Max reservoir                          : 0 bytes
Scalefactor scaling used               : yes
Scalefactor selection information used : no
Padding used                           : no

Frame histogram
 320 kbps : 142502 (100.0%), size distr: [142502 x1044 B]

 0 header errors.

Maybe this file is encoded by FhG (ACM or producer pro)


and this is after conversion:
Reading `alkalino_radioactive set_freac.mp3'...
ID3tag v2.3.0 found (offset 0x00000000).
ID3tag v2 is 2048 bytes long, skipping...

Xing tag detected into the first frame (626 bytes long).
  Tag offset       : 2048 (0x00000800)
  File size        : 89341282 bytes
  Number of frames : 142503
  Quality          : 57
  TOC              : 100 bytes (100 entries, 1 byte each)
  Lame tag         : yes
Lame tag details...
  Lame short string     : LAME3.100
  Tag revision          : 0
  Bitrate strategy      : CBR, 192 kbps
  Lowpass value         : 18600
  nspsytune             : yes
  nssafejoint           : yes
  nogap continued       : no
  nogap continuation    : no
  ATH type              : 4
  Encoder delay (start) : 576 samples
  Encoder padding (end) : 1105 samples
  [ Length of original audio : 164161775 samples ]
  Encoding mode         : joint stereo
  Unwise settings       : not used
  Source frequency      : 44.1 kHz
  Preset                : 192 kbps
  Originally encoded    : 89341282 bytes
  Tag verification      : passed

First frame found at 2674 (0x00000A72).

Detected MPEG stream version 1 layer III, details follow.
  File size               : 89343330 bytes
  Audio stream size       : 89340656 bytes (including tag: 89341282)
  Length                  : 1:02:02.527 (3722.527 seconds)
  Data rate               : 192.0 kbps
  Number of frames        : 142503
  Blocks per frame        : 4 (granules per frame 2, channels per granule 2)
  Audio samples per frame : 1152
  Audio frequency         : 44100 Hz
  Encoding mode           : joint stereo
  Min global gain         : l= 64  r=  0
  Max global gain         : l=210  r=210
Flags
  Error protection : no
  Copyrighted      : no
  Original         : yes
  Emphasis         : none

Mode extension: stereo mode frame count
  Simple stereo                 :  46343 (32.5%)
  Mid-side stereo               :  96160 (67.5%)
  -----------------------------
  sum                           : 142503

Block usage
  Long block granules   :  491458 (86.2%)
  Switch block granules :   43756 ( 7.7%)
  Short block granules  :   34798 ( 6.1%)
  ---------------------
  sum                   :  570012

Ancillary data
  Total amount   : 247351 bytes (0.3%)
  Bitrate        : 0.5 kbps
  Min packet     : 1 bytes
  Max packet     : 591 bytes
Max reservoir                          : 511 bytes
Scalefactor scaling used               : yes
Scalefactor selection information used : yes
Padding used                           : yes

Frame histogram
 192 kbps : 142503 (100.0%), size distr: [  8725 x 626 B, 133778 x 627 B]

 0 header errors.

Encoder string : LAME3.100

Maybe this file is encoded by Lame

Re: MP3 - CRC setting (turn off or on) via command line

Reply #9
I don't know this software. If it is old, maybe it requires constant bitrate input without an ID3v2 tag. If that is so, you could pad all input files to 320 kbit/s constant bitrate with mp3packer using: -b 320 -t. Could be that a 1 hour file is too large for the converter. If you want to transcode to a lower bitrate anyway, then just use lame.exe. Keeping the original would avoid generation loss though.

 

Re: MP3 - CRC setting (turn off or on) via command line

Reply #10
Indeed, that application surely can't read the ID3v2 tag. Either use a tagger to remove it, or even you can use foobar2000 to specifically remove the id3v2 while leaving the id3v1 one.

Also, if you reencode it, the new file might not include the tag anyway.