Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 10 additions & 1 deletion ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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;
}
Expand Down