Update ffmpeg supported encoders list

* Add FLAC, which works
* Remove raw audio, ogg and AC3, as they are crashing the current ffmpeg
version.

Now it's possible to use MediaConvert to convert to FLAC, at least. For
other formats we will need to either fix ffmpeg, or write encoders using
the respective libraries (musepack, libvorbis, ...) for each format we
want to support.

Note that there are also some problems at the reading side, so using
MediaConvert, the output will be truncated and about 2 seconds of audio
will be missing at the end of the file in several cases. When this
happens, the input file is not removed from the list. Watch out for this
and don't delete the source files until you're very sure the output is
correct!
This commit is contained in:
Adrien Destugues
2014-10-18 18:27:29 +02:00
parent 3c5f0e6b53
commit 37daf9367a
@@ -8,6 +8,7 @@
const EncoderDescription gEncoderTable[] = {
// Video codecs
{
{
"MPEG-4 video",
@@ -86,6 +87,127 @@ const EncoderDescription gEncoderTable[] = {
B_MEDIA_ENCODED_VIDEO,
5
},
// Audio codecs
{
{
"Free Lossless Audio Codec (FLAC)",
"flac",
0,
CODEC_ID_FLAC,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
// All of those crash ffmpeg in one way or another...
#if 0
{
{
"Advanced Audio Coding (AAC)",
"aac",
0,
CODEC_ID_AAC,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Dolby AC-3",
"ac3",
0,
CODEC_ID_AC3,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Apple Lossless Audio Codec",
"alac",
0,
CODEC_ID_ALAC,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Adaptive Transform Acoustic Coding",
"atrac",
0,
CODEC_ID_ATRAC3,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"MPEG Layer III (MP3)",
"mp3",
0,
CODEC_ID_MP3,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Monkey's Audio",
"ape",
0,
CODEC_ID_APE,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Musepack",
"mpc",
0,
CODEC_ID_MUSEPACK8,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Windows Media Audio (WMA)",
"wma",
0,
CODEC_ID_WMAV2,
{ 0 }
},
B_ANY_FORMAT_FAMILY,
B_MEDIA_RAW_AUDIO,
B_MEDIA_ENCODED_AUDIO,
10
},
{
{
"Raw audio",
@@ -125,6 +247,7 @@ const EncoderDescription gEncoderTable[] = {
B_MEDIA_ENCODED_AUDIO,
10
}
#endif
};
const size_t gEncoderCount = sizeof(gEncoderTable) / sizeof(EncoderDescription);