HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: Yuna on 2010-01-06 21:22:07

Title: Old flac version to last version
Post by: Yuna on 2010-01-06 21:22:07
Hi,


Again the search box never give me results but always give me the first page of subforums. 

Then i  will ask my question here.

I use foobar2k v.9.6.9 as audio player (default)

My music library contains mostly flac files and some lossy files.

My flac files are mostly to latest version (libFLAC 1.2.1 20070917) because they are ripped of my own cds.

But some are in the oldest version such as (libFLAC 1.1.2 20050205) or (libFLAC 1.1.4 20070213).

I want them to last version. What is the procedure I do?

I tried of convert back in wav theses flac files but for each tracks i keep receive this message : "Corrupted flac stream" (with foobar2k). what that means ?

thx for help a novice.
Title: Old flac version to last version
Post by: Tony T on 2010-01-06 21:40:17
My flac files are mostly to latest version (libFLAC 1.2.1 20070917) because they are ripped of my own cds.
But some are in the oldest version such as (libFLAC 1.1.2 20050205) or (libFLAC 1.1.4 20070213).
I want them to last version. What is the procedure I do?

on the old FLAC files, just "flac filename.flac --force"

http://flac.sourceforge.net/documentation_tools_flac.html (http://flac.sourceforge.net/documentation_tools_flac.html)
"flac abc.flac --force
This one's a little tricky: notice that flac is in encode mode by default (you have to specify -d to decode) so this command actually recompresses abc.flac back to abc.flac. --force is needed to make sure you really want to overwrite abc.flac with a new version. Why would you want to do this? It allows you to recompress an existing FLAC file with (usually) higher compression options or a newer version of FLAC and preserve all the metadata like tags too."


Here's a 4dos batch file that will skip flac files that are already the latest version:

Code: [Select]
@echo off
for /R %f in (*.flac) gosub UPDATEFLAC
exit

:UPDATEFLAC
"C:\Program Files\FLAC\metaflac" "%f" --show-vendor-tag > temp.txt
set /p libFLAC= < temp.txt
if "%@instr[18,5,%libFLAC%]" != "1.2.1" gosub UPDATETO121
del /q temp.txt
set libFLAC=
return

:UPDATETO121
"C:\Program Files\FLAC\flac" "%f" --force
if ERRORLEVEL 1 pause
return
Title: Old flac version to last version
Post by: Rain on 2010-01-06 22:03:10
Sorry, how can I do this in WavPack as well? Check for WavPack versions in my "C:\Music" folder (which contain subfolders such as "C:\Music\Group\Queen\Albums\1999 - Greatest Hits III\Queen - Greatest Hits III.wv"

If it's not the latest WavPack version, then encode it to use the latest one, and append "OLD" to the original old WavPack version file.

Is there a similar batch file that could do that? I'm not familiar with the commands or parameters.
Title: Old flac version to last version
Post by: Stereodude on 2010-01-06 23:08:23
Can I ask why you want to convert from an old version of FLAC to a new version of FLAC?  They're both lossless, so what's gained?
Title: Old flac version to last version
Post by: Tony T on 2010-01-06 23:16:08
Can I ask why you want to convert from an old version of FLAC to a new version of FLAC?  They're both lossless, so what's gained?


See:  http://flac.sourceforge.net/changelog.html (http://flac.sourceforge.net/changelog.html)
Title: Old flac version to last version
Post by: JunkieXL on 2010-01-07 00:54:40
By that he means they've added alot of new features... metadata support being the high point for me.

I also remember reading that the newer versions can output a slightly smaller file size with faster encoding and decoding speeds.  I have most of my FLAC in v1.1.2 and plan on keeping them that way. 

JXL - "If it ain't broke, then why fix it?"
Title: Old flac version to last version
Post by: greynol on 2010-01-07 01:14:49
Of this metadata support, how much of this can't be added to an already existing flac file encoded with an older version?

Next question, how useful is the metadata that can't be added (assuming there is some that can't) for a transcode?  I mean the data wasn't in the older version of the file to begin with, right?

Encoding speed changes buy you nothing since the files are already encoded.  I don't believe that files encoded with newer versions decode any faster (but I could be wrong).

Compression gains really aren't going to be all that worthwhile, IMO; certainly nothing like switching over to another format, like TAK, for instance.

Seems like the computing cycles, hard drive usage and the carbon released in the environment as a result would be better spent on other tasks.
Title: Old flac version to last version
Post by: Yuna on 2010-01-07 03:13:13
Can I ask why you want to convert from an old version of FLAC to a new version of FLAC?  They're both lossless, so what's gained?


Because i want have them all in FLAC 1.2.1 
But if have none advantage to go of flac 1.1.2 to 1.2.1 then ... I'll think

on the old FLAC files, just "flac filename.flac --force"

http://flac.sourceforge.net/documentation_tools_flac.html (http://flac.sourceforge.net/documentation_tools_flac.html)
"flac abc.flac --force
This one's a little tricky: notice that flac is in encode mode by default (you have to specify -d to decode) so this command actually recompresses abc.flac back to abc.flac. --force is needed to make sure you really want to overwrite abc.flac with a new version. Why would you want to do this? It allows you to recompress an existing FLAC file with (usually) higher compression options or a newer version of FLAC and preserve all the metadata like tags too."


I nothing understood here.  What is "flac filename.flac --force" and with what programs you do that?

Also i mentionned in my first post that when i convert back the flac files (v.1.1.2) in wav I keep get for each track the error message "Corrupted Flac Stream". it is because the decoder/encoder flac is v1.2.1 now ? The error is for corrupted metadata or ?

thx for our response



Title: Old flac version to last version
Post by: Tony T on 2010-01-07 14:27:30
Are you using FLAC?
Title: Old flac version to last version
Post by: Yuna on 2010-01-07 23:36:00
Are you using FLAC?

Most of my music library is in FLAC 1.2.1, than I converted myself with foobar2K (some with EAC) of my own cds (BoA, Ayumi Hamasaki, soundtracks games, etc).

But I have some musics fles in Flac 1.1.2 or 1.1.4 downloaded of torrent : Yoshioka Yui -Albums & Singles because too hard to found in cd shop at Canada. Some files are in flac 1.1.2 and other in 1.1.4 and are those that I find it difficult to convert in flac 1.2.1.

I tried that : flac 1.1.2 -> wav -> flac 1.2.1 (with foobar2k), but i keep getting the error message : "Corrupted Flac stream".

I downloaded the flac 1.2.1 (encoder/decoder) of sourceforge.

I wonder if the error message is due to metadata in the files.

EDIT:

There is a example of converting process with foobar2K v.9.6.9 of flac 1.1.2 -> flac 1.2.1.

Quote
4 out of 4 tracks converted with major problems.

Source: "E:\Ma musique\Lossless\FLAC\J-Pop\Yoshioka Yui (吉岡唯)\Singles\[2005-02-23] Feel My Soul\01 - Feel my soul.flac"
  Corrupted FLAC stream
  Track converted with major problems.
Source: "E:\Ma musique\Lossless\FLAC\J-Pop\Yoshioka Yui (吉岡唯)\Singles\[2005-02-23] Feel My Soul\02 - Free Bird.flac"
  Corrupted FLAC stream
  Track converted with major problems.
Source: "E:\Ma musique\Lossless\FLAC\J-Pop\Yoshioka Yui (吉岡唯)\Singles\[2005-02-23] Feel My Soul\03 - Why me.flac"
  Corrupted FLAC stream
  Track converted with major problems.
Source: "E:\Ma musique\Lossless\FLAC\J-Pop\Yoshioka Yui (吉岡唯)\Singles\[2005-02-23] Feel My Soul\04 - Feel my soul (Instrumental).flac"
  Corrupted FLAC stream
  Track converted with major problems.
Title: Old flac version to last version
Post by: Tony T on 2010-01-08 01:13:47
What happens if you decode with FLAC from the command line?
Title: Old flac version to last version
Post by: Porcus on 2011-08-07 17:00:00
Seems to be a suitable thread to necromance, rather than starting a new one.

Q: will
flac  abc.flac --force
preserve *all* metadata (except those technical info tags which tell which version used etc) -- including embedded album art, cuesheets, bla bla bla?

Reason why I ask is that foobar2000 does not transfer album art upon encoding, and dBpoweramp does not transfer embedded cuesheets.
Title: Old flac version to last version
Post by: Porcus on 2011-08-08 16:24:31
Testing libFLAC 1.2.1, it seems to transfer album art.

Oh, and if someone would still wonder about the OP's question: The Japanese (?) signs in the filenames will break a FOR /r %F IN (*.flac) DO command given in cmd.
Title: Old flac version to last version
Post by: Phixion on 2011-10-17 21:20:57
I update all of my old FLAC files to the latest version.

Just select the tracks in foobar and convert to FLAC... you can do FLAC > FLAC.
Title: Old flac version to last version
Post by: Heemlock on 2011-10-18 12:30:27
Hello!
Should i re-encode a libFLAC 1.1.3 encoded FLAC file to libFLAC 1.2.1 (the latest) with foobar2k?
Is there any benefit of doing this or should i leave it as it is?
Title: Old flac version to last version
Post by: mjb2006 on 2011-10-18 13:05:12
I don't see anything of note in the changelog (http://flac.sourceforge.net/changelog.html) between those versions. It's not like a lossy codec where the sound can change from version to version. The output is always the same, even if there are internal changes to the FLAC file's structure. There were improvements in the compression algorithms, but it's all backward compatible. And there was a security issue, but it only applies to decoding specially crafted FLACs. Nothing is wrong with the ones you created with 1.1.x. Recompressing would just be a waste of time.
Title: Old flac version to last version
Post by: Heemlock on 2011-10-18 17:54:14
Thank You!
Well, only 6-7 albums are encoded with 1.1.3 and i can't re-rip because i don't have the CDs anymore so time is not an issue.
By the way recompressing a FLAC file of older version to a newer version is safe or can i damage the FLAC? I have tried it and all i saw was smaller file size which seems good to me.
Sorry for the questions, this is the first time i have heard about this kind of stuff.
Title: Old flac version to last version
Post by: greynol on 2011-10-18 19:22:12
If there's a problem with your computer then your files can be corrupted upon converting, so the safe bet is to leave them be.  For those who would suggest using -V, it is not 100% fool-proof.
Title: Old flac version to last version
Post by: Heemlock on 2011-10-19 23:09:15
Thanks greynol!
When i tried to re-encode one of my older FLAC album from 1.1.3 to 1.2.1 the re-encoded FLAC sounded/looked the same as the original to me, but it's size was 2-3MB smaller.
I don't think that there is a problem with my computer, but i think i will Archive my older FLAC albums as they are, i don't know how to spot corrupted files and i want to be safe.
Do you guys worry about older FLAC versions in your own files too, or am i overreacting?
Title: Old flac version to last version
Post by: Wombat on 2011-10-19 23:36:29
I only can think of one reason to worry about different versions of flac files.
There is flake, a compressor that creates flac files that can be used with a compression level up to 12. There are the recent GPU encoders from Gregory Chudov that use some of these features. From compression level 9 on it uses parameters that may create harder to decompress files as standard flac at its maximum of 8. I never liked that idea to much.
If you buy yourself a hardware player that natively decompresses flac you may run in problems with them.

I remember when playing with flake my old Squeezebox was not able to decompress flake encoded files compressed with level 10 and up. I don´t know of any older official flac version that created any trouble with this.
Title: Old flac version to last version
Post by: Porcus on 2011-10-20 13:14:21
When i tried to re-encode one of my older FLAC album from 1.1.3 to 1.2.1 the re-encoded FLAC sounded/looked the same as the original to me, but it's size was 2-3MB smaller.


It need not be due to the upgrade from 1.1.3 -- it could also be due to the files having been compressed in a faster mode, like -5 or -0. That is, it could have been a similar improvement for converting from 1.2.1 to 1.2.1 where you reencoded with -8 or --best.

According to the changelog, 1.2.x encodes like 1.1.4, which encodes better than 1.1.3, which is like 1.1.1.


I don't think that there is a problem with my computer, but i think i will Archive my older FLAC albums as they are, i don't know how to spot corrupted files and i want to be safe.
Do you guys worry about older FLAC versions in your own files too, or am i overreacting?


I recently converted my 1.1.x FLACs to 1.2.1 because the way my foobar2000 layout would list my codecs.  For a selection there would be a long list of FLAC versions before starting on the MP*s and WMA's, and I was bored with scrolling. I am still left with FLAC 1.2.1 and 1.2.0, but now I can actually select an artist and see if I have other formats, without allocating large screen space to file info.

What I did, was
(1) Make a foobar2000 playlist of the files-to-be-converted
(2) Backup (I have an offsite backup, so it was rather: ensure backup was current).
(3) Convert with overwrite and verify
(4) From playlist in (1) and backup in (2), use foo_bitcompare to verify that the new files contained precisely the same audio.

Title: Old flac version to last version
Post by: Porcus on 2011-10-20 14:34:41
I only can think of one reason to worry about different versions of flac files.
There is flake, a compressor that creates flac files that can be used with a compression level up to 12. There are the recent GPU encoders from Gregory Chudov that use some of these features. From compression level 9 on it uses parameters that may create harder to decompress files as standard flac at its maximum of 8. I never liked that idea to much.


Noncompliant with the subset, right.

Now according to the changelog, the update to FLAC format 1.1.3 made a restriction to the subset. It seems to me (I could certainly be wrong) that you could manually set the FLAC 1.1.2 reference encoder to produce a file compliant with the old subset, and which is now non-subset and where a «subset only»-decoder could fail. I have never dealt with such settings, nor have I dealt with squeezeboxen, and I have no idea whether anyone has ever encountered such a decoding failure though.


On a different note, there are format differences not related to compression. Only from 1.1.3 did the FLAC format support the PICTURE metadata block.  However, it appears to me that taggers nowadays would introduce pictures nevertheless, and I can only guess that you would then have a metadata block noncompliant with the 1.1.2 format but compliant with the later (and that your favourite media player, if supporting pictures at all, would work just fine, but I might be wrong).
Title: Old flac version to last version
Post by: Heemlock on 2011-10-21 03:58:37
I recently converted my 1.1.x FLACs to 1.2.1 because the way my foobar2000 layout would list my codecs.  For a selection there would be a long list of FLAC versions before starting on the MP*s and WMA's, and I was bored with scrolling. I am still left with FLAC 1.2.1 and 1.2.0, but now I can actually select an artist and see if I have other formats, without allocating large screen space to file info.

What I did, was
(1) Make a foobar2000 playlist of the files-to-be-converted
(2) Backup (I have an offsite backup, so it was rather: ensure backup was current).
(3) Convert with overwrite and verify
(4) From playlist in (1) and backup in (2), use foo_bitcompare to verify that the new files contained precisely the same audio.

Thanks Porcus!
I have followed your instructions but i don't really know how to make a playlist in foobar2000.
I simply put the Older version FLAC in it -> Convert it to FLAC 1.2.1 -> then i put them into foobar2000 again with the backed up older version FLAC -> highlight them and i click on Bit-Compare Tracks... (All tracks decoded fine, no differences found.)
Am i doing it right?
Title: Old flac version to last version
Post by: Porcus on 2011-10-22 11:53:51
highlight them and i click on Bit-Compare Tracks... (All tracks decoded fine, no differences found.)


Yep.
Title: Old flac version to last version
Post by: SamDeRe81 on 2011-10-23 19:02:31
What you need is called Traders Little Helper and it's a highly unique and fun program to use for verifying/re-encoding your audio content. Have a look for it with Google.

PS It's entirely freeware
Title: Old flac version to last version
Post by: Porcus on 2011-10-23 20:47:48
Traders Little Helper


Interesting. However, one problem here is that flac.exe seems not safe to use to reencode-and-overwrite (right?), and this program describes itself as a front-end, so ... unless it does additional verification, it does not seem to solve the problem.
Title: Old flac version to last version
Post by: SamDeRe81 on 2011-10-23 22:46:02
Traders Little Helper


Interesting. However, one problem here is that flac.exe seems not safe to use to reencode-and-overwrite (right?), and this program describes itself as a front-end, so ... unless it does additional verification, it does not seem to solve the problem.


I might use it to re-encode my FLAC library, it can just delete the damn original FLAC when it's done. But I am not sure the gain would be even noticable, I mean it doesn't seem there'd be much difference honestly in file sizes or performance idk
Title: Old flac version to last version
Post by: Heemlock on 2011-11-06 20:46:57
Hi again!
Finally i have time to convert my remaining 1.1.3 FLAC files to the latest version, but before that i have some more question about this.:
Is there a drawback in updating older FLAC files to newer versions?
Can i encode FLAC to FLAC or any other Lossless format as many times as i want without any loss?
Is foo_bitcompare can be trusted for reporting any error in the newly encoded file if there is one?
Thanks
Title: Old flac version to last version
Post by: Porcus on 2011-11-06 21:59:41
Is there a drawback in updating older FLAC files to newer versions?


You have been warned that you might have to check that it actually works.


Can i encode FLAC to FLAC or any other Lossless format as many times as i want without any loss?

Yes, provided target format (and the converter) supports every feature of the source file.

(For example, not all lossless formats support all resolutions or multichannel sound, and not all lossless formats support every piece of metadata.)
Title: Old flac version to last version
Post by: db1989 on 2011-11-06 22:22:23
Although metadata, of course, would not affect the audio content. Generally, we can rely on the trusted maxim that lossless is lossless. Barring, that is, the possibility of encoders that would discard or otherwise do as they wish with unsupported data without informing the user—something that would be best avoided in any case.
Title: Old flac version to last version
Post by: Heemlock on 2011-11-09 18:55:57
Thanks Porcus and db1989
I'm finished the converting, all of my FLAC is now v1.2.1, i have compared every of them with the old files and Bit-Compare Tracks didn't show any error, does this means that the newly converted FLAC file is safe to Archive and i can delete the old?
Also I have noticed the FLAC compression levels, i have most of my Archive in FLAC level 2, can i re-convert them too to level 8?
Sorry for the silly questions, i want to do this "safe".

Edit.:
Oh, i have one more question: If a newer version of FLAC.exe will be released, should i update my FLAC files again?
Title: Old flac version to last version
Post by: db1989 on 2011-11-09 19:10:30
Bit-Compare Tracks didn't show any error, does this means that the newly converted FLAC file is safe to Archive and i can delete the old?
Also I have noticed the FLAC compression levels, i have most of my Archive in FLAC level 2, can i re-convert them too to level 8?
Yes to both. But you may want to ask yourself if the latter is really worth it.

Quote
If a newer version of FLAC.exe will be released, should i update my FLAC files again?
As above, I question whether the benefit would be proportional to the logistics, especially if the new version were a relatively minor update.