Skip to content

Commit 5697db1

Browse files
committed
Change old containers to defaults
1 parent 22b2461 commit 5697db1

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

event.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,10 @@ static void event_ffmpeg_newfile(struct context *cnt,
640640
* different types of movies checking for crashes, warnings, etc.
641641
*/
642642
codec = cnt->conf.ffmpeg_video_codec;
643+
if (strcmp(codec, "ogg") == 0) {
644+
MOTION_LOG(WRN, TYPE_ENCODER, NO_ERRNO, "%s The ogg container is no longer supported. Changing to mpeg4");
645+
codec = "mpeg4";
646+
}
643647
if (strcmp(codec, "test") == 0) {
644648
MOTION_LOG(NTC, TYPE_ENCODER, NO_ERRNO, "%s Running test of the various output formats.");
645649
codenbr = cnt->event_nr % 10;
@@ -780,7 +784,14 @@ static void event_ffmpeg_timelapse(struct context *cnt,
780784
v = u + (width * height) / 4;
781785
}
782786

783-
if (strcmp(cnt->conf.ffmpeg_video_codec,"mpg") == 0) {
787+
788+
if ((strcmp(cnt->conf.ffmpeg_video_codec,"mpg") == 0) ||
789+
(strcmp(cnt->conf.ffmpeg_video_codec,"swf") == 0) ){
790+
791+
if (strcmp(cnt->conf.ffmpeg_video_codec,"swf") == 0) {
792+
MOTION_LOG(WRN, TYPE_EVENTS, NO_ERRNO, "%s: The swf container for timelapse no longer supported. Using mpg container.");
793+
}
794+
784795
MOTION_LOG(NTC, TYPE_EVENTS, NO_ERRNO, "%s: Timelapse using mpg codec.");
785796
MOTION_LOG(NTC, TYPE_EVENTS, NO_ERRNO, "%s: Events will be appended to file");
786797
cnt->ffmpeg_timelapse =

0 commit comments

Comments
 (0)