diff --git a/conf.c b/conf.c index 2da0da6..69ecb16 100644 --- a/conf.c +++ b/conf.c @@ -751,6 +751,7 @@ config_param config_params[] = { "# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )\n" "# mov - QuickTime ( testing )\n" "# ogg - Ogg/Theora ( testing )", + "# web - webm ( testing )", 0, CONF_OFFSET(ffmpeg_video_codec), copy_string, diff --git a/ffmpeg.c b/ffmpeg.c index 1c2ae47..d2f4972 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -420,6 +420,15 @@ static AVOutputFormat *get_oformat(const char *codec, char *filename) of = guess_format ("ogg", NULL, NULL); #else of = av_guess_format ("ogg", NULL, NULL); +#endif + } + else if (strcmp (codec, "web") == 0) + { + ext = ".webm"; +#ifdef GUESS_NO_DEPRECATED + of = guess_format ("webm", NULL, NULL); +#else + of = av_guess_format ("webm", NULL, NULL); #endif } else { MOTION_LOG(ERR, TYPE_ENCODER, NO_ERRNO, "%s: ffmpeg_video_codec option value" @@ -434,7 +443,7 @@ static AVOutputFormat *get_oformat(const char *codec, char *filename) } /* The 4 allows for ".avi" or ".mpg" to be appended. */ - strncat(filename, ext, 4); + strncat(filename, ext, 5); return of; }