Converting DASHhigh to FLAC with ffmpeg

RS richard22j at zoho.com
Mon Jan 23 15:24:07 PST 2017


I wanted to know how to convert the M4A/AAC created by get_iplayer after 
downloading DASHhigh radio.  I was going to ask this as a question but I 
have now partially answered it myself.  I thought I would post it here in 
case it is of use to anyone else.  Since I started looking at it Budge has 
asked about creating a preset.  I'll leave others more knowledgeable than I 
to answer his question.

The first parameter I looked at was compression.  The parameter 
is -compression_level and it can be between 1 and 8, where 1 is the least 
compression.  For compatibility it is not recommended to go beyond 5.  A 
compression level of 8 does not increase the compression much, but I found 
it halved the speed of conversion compared with a level of 5.

The command I used was
ffmpeg -i <infile>.m4a -f flac -compression_level 5 <outfile>.flac

I found that by default ffmpeg was creating files with 24 bit encoding, 
which I did not want.  The parameter for 16 bit encoding is
-sample_fmt s16

I found that ffmpeg created files with identical sizes if I 
specified -compression_level 5 and if I did not specify 
a -compression_level.  It may be that 5 is the default, but curiously 
specifying -compression_level 5 decreased the conversion speed by 12% with 
24 bit encoding and increased it by 7% for 16 bit encoding.  I decided to 
use the default compression level.

My command then became
ffmpeg -i <infile>.m4a -f flac -sample_fmt s16 <outfile>.flac

The conversion took about 1% of real time which is faster than converting to 
MP3 (7% of realtime at 128 kbit/s).  The file size of an opera from Radio 3 
downloaded as DASHhigh (320 kbit/s) increased by 54%.  For speech the 
increase in size is greater.  The News Quiz Extra programme mentioned by 
Budge was downloaded at 320 kbit/s and it doubled in size when converted to 
FLAC.  The increase would have been even greater if it had been converted 
from 128 kbit/s.

While searching I found this
http://lists.infradead.org/pipermail/get_iplayer/2015-September/008221.html
which I think was a response to a question I had asked.  My belated thanks 
to Jim for suggesting FLAC as an option.





More information about the get_iplayer mailing list