Skip to content

Commit fbba7b8

Browse files
committed
Timelapse revision of swf to mpg
1 parent 8044d3c commit fbba7b8

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

event.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ static void event_ffmpeg_timelapse(struct context *cnt,
700700
if (!cnt->ffmpeg_timelapse) {
701701
char tmp[PATH_MAX];
702702
const char *timepath;
703-
const char *codec_swf = "swf";
703+
const char *codec_mpg = "mpg";
704704
const char *codec_mpeg = "mpeg4";
705705

706706
/*
@@ -730,11 +730,11 @@ static void event_ffmpeg_timelapse(struct context *cnt,
730730
v = u + (width * height) / 4;
731731
}
732732

733-
if (strcmp(cnt->conf.ffmpeg_video_codec,"swf") == 0) {
734-
MOTION_LOG(NTC, TYPE_EVENTS, NO_ERRNO, "%s: Timelapse using swf codec.");
733+
if (strcmp(cnt->conf.ffmpeg_video_codec,"mpg") == 0) {
734+
MOTION_LOG(NTC, TYPE_EVENTS, NO_ERRNO, "%s: Timelapse using mpg codec.");
735735
MOTION_LOG(NTC, TYPE_EVENTS, NO_ERRNO, "%s: Events will be appended to file");
736736
cnt->ffmpeg_timelapse =
737-
ffmpeg_open(codec_swf,cnt->timelapsefilename, y, u, v
737+
ffmpeg_open(codec_mpg,cnt->timelapsefilename, y, u, v
738738
,cnt->imgs.width, cnt->imgs.height, 24
739739
,cnt->conf.ffmpeg_bps,cnt->conf.ffmpeg_vbr,TIMELAPSE_APPEND);
740740
} else {

ffmpeg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static AVOutputFormat *get_oformat(const char *codec, char *filename){
207207
* We also dynamically add the file extension to the filename here.
208208
*/
209209
if (strcmp(codec, "tlapse") == 0) {
210-
ext = ".swf";
210+
ext = ".mpg";
211211
of = av_guess_format ("mpeg2video", NULL, NULL);
212212
if (of) of->video_codec = MY_CODEC_ID_MPEG2VIDEO;
213213
} else if (strcmp(codec, "mpeg4") == 0) {

motion-dist.conf.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ ffmpeg_variable_bitrate 0
308308

309309
# Codec to used by ffmpeg for the video compression.
310310
# Timelapse videos have two options.
311-
# swf - Creates swf file with mpeg-2 encoding.
311+
# mpg - Creates mpg file with mpeg-2 encoding.
312312
# If motion is shutdown and restarted, new pics will be appended
313313
# to any previously created file with name indicated for timelapse.
314314
# mpeg4 - Creates avi file with the default encoding.
@@ -460,12 +460,12 @@ picture_filename %v-%Y%m%d%H%M%S-%q
460460

461461
# File path for motion triggered ffmpeg films (movies) relative to target_dir
462462
# Default: %v-%Y%m%d%H%M%S
463-
# File extensions(.swf .avi) are automatically added so do not include them
463+
# File extensions(.mpg .avi) are automatically added so do not include them
464464
movie_filename %v-%Y%m%d%H%M%S
465465

466466
# File path for timelapse movies relative to target_dir
467467
# Default: %Y%m%d-timelapse
468-
# File extensions(.swf .avi) are automatically added so do not include them
468+
# File extensions(.mpg .avi) are automatically added so do not include them
469469
timelapse_filename %Y%m%d-timelapse
470470

471471
############################################################

motion.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ Values:
952952
.RS
953953
Timelapse videos:
954954
.RS
955-
swf - Creates swf file with mpeg-2 encoding.
955+
mpg - Creates mpg file with mpeg-2 encoding.
956956
mpeg4 - Creates avi file with the default encoding.
957957
.RE
958958
Motion videos:
@@ -975,7 +975,7 @@ Description:
975975
.RS
976976
The container and codec to use when creating videos.
977977
When creating timelapse videos, there are only two options and the processing varies due to container/codec limitations.
978-
For swf timelapse videos, if motion is shutdown and restarted, new pics will be appended
978+
For mpg timelapse videos, if motion is shutdown and restarted, new pics will be appended
979979
to any previously created file with name indicated for timelapse.
980980
For mpeg4 timelapse videos, if motion is shutdown and restarted, new pics will create a
981981
new file with the name indicated for timelapse.
@@ -1255,7 +1255,7 @@ Description:
12551255
.fi
12561256
.RS
12571257
File path for timelapse movies relative to target_dir.
1258-
The file extensions(.swf .avi) are automatically added so do not include them
1258+
The file extensions(.mpg .avi) are automatically added so do not include them
12591259
This option accepts the conversion specifiers included at the end of this manual.
12601260
.RE
12611261
.RE

motion_guide.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,15 +3315,15 @@ <h3><a name="ffmpeg_video_codec"></a> ffmpeg_video_codec </h3>
33153315
<p></p>
33163316
<ul>
33173317
<li> Type: Discrete Strings</li>
3318-
<li> Range / Valid values: mpeg1, mpeg4, msmpeg4, swf, flv, ffv1</li>
3318+
<li> Range / Valid values: mpeg1, mpeg4, msmpeg4, swf, flv, ffv1, mov, ogg, mp4, mkv, hevc</li>
33193319
<li> Default: mpeg4</li>
33203320
</ul>
33213321
<p></p>
33223322
Codec to be used by ffmpeg for the video compression.
33233323
<p></p>
33243324
Timelapse videos have two options.
33253325
<ul>
3326-
<li>swf - Creates swf file with mpeg-2 encoding. If motion is shutdown and restarted, new pics will be appended
3326+
<li>mpg - Creates mpg file with mpeg-2 encoding. If motion is shutdown and restarted, new pics will be appended
33273327
to any previously created file with name indicated for timelapse.</li>
33283328
<li>mpeg4 - Creates avi file with the default encoding. If motion is shutdown and restarted, new pics will
33293329
create a new file with the name indicated for timelapse.</li>

0 commit comments

Comments
 (0)