[FFmpeg-cvslog] matroskaenc: saner default codecs.

Anton Khirnov git at videolan.org
Mon Aug 22 15:32:48 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Aug 20 16:02:22 2011 +0200| [3436c4a368aca1bdcbf28bdfc996903460263de0] | committer: Anton Khirnov

matroskaenc: saner default codecs.

libvorbis/libx264 for video if available, otherwise ac3/mpeg4.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3436c4a368aca1bdcbf28bdfc996903460263de0
---

 libavformat/matroskaenc.c |   16 ++++++++++++++--
 tests/lavf-regression.sh  |    2 +-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index aa767f3..ce1a7d1 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1214,8 +1214,16 @@ AVOutputFormat ff_matroska_muxer = {
     .mime_type         = "video/x-matroska",
     .extensions        = "mkv",
     .priv_data_size    = sizeof(MatroskaMuxContext),
-    .audio_codec       = CODEC_ID_MP2,
+#if CONFIG_LIBVORBIS_ENCODER
+    .audio_codec       = CODEC_ID_VORBIS,
+#else
+    .audio_codec       = CODEC_ID_AC3,
+#endif
+#if CONFIG_LIBX264_ENCODER
+    .video_codec       = CODEC_ID_H264,
+#else
     .video_codec       = CODEC_ID_MPEG4,
+#endif
     .write_header      = mkv_write_header,
     .write_packet      = mkv_write_packet,
     .write_trailer     = mkv_write_trailer,
@@ -1249,7 +1257,11 @@ AVOutputFormat ff_matroska_audio_muxer = {
     .mime_type         = "audio/x-matroska",
     .extensions        = "mka",
     .priv_data_size    = sizeof(MatroskaMuxContext),
-    .audio_codec       = CODEC_ID_MP2,
+#if CONFIG_LIBVORBIS_ENCODER
+    .audio_codec       = CODEC_ID_VORBIS,
+#else
+    .audio_codec       = CODEC_ID_AC3,
+#endif
     .video_codec       = CODEC_ID_NONE,
     .write_header      = mkv_write_header,
     .write_packet      = mkv_write_packet,
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 859ccb9..a3a0b86 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -103,7 +103,7 @@ do_lavf nut "-acodec mp2"
 fi
 
 if [ -n "$do_mkv" ] ; then
-do_lavf mkv
+do_lavf mkv "-c:a mp2 -c:v mpeg4"
 fi
 
 



More information about the ffmpeg-cvslog mailing list