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: how to determine if a file is wma lossless or lossy (Read 20885 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how to determine if a file is wma lossless or lossy

Hey guys,

So, I have several wma lossless albums I have ripped over the years.  I am in the process of converting those files to flac so I can easily use them with Ampache.

The problem is, I have many regular lossy wma files mixed in as well.  So converting those to flac seems like a bad idea.  So my question is, how would I go about determining which are wmal and which are wma?  Or would converting them all to flac not hurt anything.  I'm kinda against going from a lossy format to flac, if for no other reason, than because when I see a .flac file I like knowing it is near perfect quality.

Just out of curiosity, does converting from a lossy format to flac expand the file size without changing the quality?  like going from mp3/192 to mp3/256, for example.

btw, I am running on a linux server, so only command line tools.  Also, I am using ffmpeg to do the conversion.

Thanks

how to determine if a file is wma lossless or lossy

Reply #1
foobar2000 will tell you if the file is WMA Lossless or WMA V2 (lossy).  VLC could do this as well if you have that.

Quote
Just out of curiosity, does converting from a lossy format to flac expand the file size without changing the quality? like going from mp3/192 to mp3/256, for example.


Converting to FLAC won't hurt anything, even if it is a lossy file from the start.  Expect a filesize increase but not a quality increase (you can't get back what you lost).
foobar 0.9.6.8
FLAC -5
LAME 3.98 -V3

how to determine if a file is wma lossless or lossy

Reply #2
  So my question is, how would I go about determining which are wmal and which are wma?

You could check the bitrate: a high bitrate would imply a lossy file. I don't know wma's capabilities for lossless compression but I would assume that anything above 600 KBit/sec can be assumed to be lossless.

Quote
Just out of curiosity, does converting from a lossy format to flac expand the file size without changing the quality?  like going from mp3/192 to mp3/256, for example.
[/font]

This is false: going from mp3/192 to mp3/256 does reduce the quality.

how to determine if a file is wma lossless or lossy

Reply #3
Well I don't want to use vlc or foobar, I'd rather write a script to do a batch conversion.  So I guess writing a script the converts based on the bitrate is the way to go.

Anybody know how to get ffmpeg to give me the bitrate so I can use it in a script?

how to determine if a file is wma lossless or lossy

Reply #4
File's bitrate: the amount of data you want to allocate for a certain period of time in order to encode a file.
Therefore: (file size in bits) / duration of song in seconds = used bitrate in bits/second

eg: a 3 Mbyte file holding a 2-minute song: 3 x 1024 x 8 / (2 x 60) = 204.8 Kbits/sec

You are, however, making things difficult for yourself.
eg in foobar:
1) add al your files to foobar
2) make the 'codec'-column visible in foobar
3) sort by codec
4) select all files listed as 'wma lossless'
5) right-click & convert to flac

Foobar can be installed portable, so no changes will be made to your system.


how to determine if a file is wma lossless or lossy

Reply #6
http://www.microsoft.com/windows/windowsme...extensions.aspx


Yeah, that really doesn't help the OP as WMA lossless files have the exact same extension as WMA lossy files: *.wma.

I would have to echo what a couple of people have said in that foobar2000 would be the easiest way to go.  A script would have to analyze the bitrate of a song and then decide what to do with it.  WMA lossless files will have bitrates larger than 320kbps, that is how you can differentiate between them.  That being said, foobar2000 can sort audio files by their type (it can differentiate between WMA and WMA lossless) and all you would have to do is select the lossless ones and right-click on the files.  It might just be me but that sounds easier than writing a script to analyze each and every WMA files you have on your hard drive, determining their bitrates, and then deciding if they are going to be converted or not.

how to determine if a file is wma lossless or lossy

Reply #7

http://www.microsoft.com/windows/windowsme...extensions.aspx


Yeah, that really doesn't help the OP as WMA lossless files have the exact same extension as WMA lossy files: *.wma.


Ups, wrong link.


Should be
http://www.microsoft.com/windows/windowsme...at/asfspec.aspx

ASF file specification can be downloaded from there. See section 11 and 9.
Ceterum censeo, there should be an "%is_stop_after_current%".

how to determine if a file is wma lossless or lossy

Reply #8
I second what kornchild2002 suggests.  You're trying to do much more work than you need to.
foobar 0.9.6.8
FLAC -5
LAME 3.98 -V3

how to determine if a file is wma lossless or lossy

Reply #9
Ok, foobar sounds like the way to go then.  I was hoping a script would work, because converting files on a mounted remote directory will take a while longer, and having a script would be a little more automatic in the future.  But it looks like the script would be fairly complex, so I won't bother.

Quote
http://www.microsoft.com/windows/windowsme...at/asfspec.aspx

ASF file specification can be downloaded from there. See section 11 and 9.


I just finished with Finals....  my brain hurts too much () to try to figure that one out.  Thanks though. 

'ppreciate the help guys[/font]

how to determine if a file is wma lossless or lossy

Reply #10
  So my question is, how would I go about determining which are wmal and which are wma?

You could check the bitrate: a high bitrate would imply a lossy file. I don't know wma's capabilities for lossless compression but I would assume that anything above 600 KBit/sec can be assumed to be lossless.

But not vice versa. In classical music we pretty often have Bitrates at 400-600 kbps lossless.