Log in

View Full Version : Combining multiple FLACs without re-encoding


Atak_Snajpera
13th June 2013, 14:42
I'm looking for commandline tool which can merge multiple flac files (all have the same frequency,channels,bitdepth) without re-encoding process.

Kurtnoise
13th June 2013, 14:54
flac -o output.flac input1.flac input2.flac input3.flac input4.flac

or

shntool join -n -o flac *.flac

Atak_Snajpera
13th June 2013, 15:29
flac -o output.flac input1.flac input2.flac input3.flac input4.flac

ERROR: -o/--output-name cannot be used with multiple files

Kurtnoise
14th June 2013, 05:17
http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20concatenate%20(join%2C%20merge)%20media%20files#samecodec

Atak_Snajpera
14th June 2013, 13:34
if streams are in pure flac container I get this
http://s15.postimg.org/3nqdjon8b/Untitled_1.png

however if I enable --ogg switch in FLAC encoder and then try to combine them in ffmpeg everything seems to be ok . No errors.

Final file has correct file size but duration is wrong. Instead of 2h:41min I get only duration of first chunk. Ofcourse all players see the same.

General
Complete name : E:\Avatar.2009.BluRay.REMUX.5.1\combined.flac
Format : FLAC
Format/Info : Free Lossless Audio Codec
File size : 1.34 GiB
Duration : 40mn 25s
Overall bit rate mode : Variable
Overall bit rate : 4 760 Kbps
Writing application : Lavf55.8.102

Audio
Format : FLAC
Format/Info : Free Lossless Audio Codec
Duration : 40mn 25s
Bit rate mode : Variable
Bit rate : 4 760 Kbps
Channel(s) : 6 channels
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Stream size : 1.34 GiB (100%)
Writing library : Lavf55.8.102

ozok
14th June 2013, 15:35
I was going to suggest shntool but IIRC it does re-encoding. Command line was something like:
shntool.exe join *.flac