motion: bump version

This commit is contained in:
Joo Aun Saw 2017-06-20 11:24:39 +10:00
parent 267f056e49
commit 5e4b50b8a2
3 changed files with 1 additions and 46 deletions

View File

@ -1,19 +0,0 @@
diff --git a/ffmpeg.c b/ffmpeg.c
index e7cab9f..3f48db8 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -380,7 +380,13 @@ struct ffmpeg *ffmpeg_open(const char *ffmpeg_video_codec, char *filename,
ffmpeg->video_st = NULL;
if (ffmpeg->oc->oformat->video_codec != MY_CODEC_ID_NONE) {
- codec = avcodec_find_encoder(ffmpeg->oc->oformat->video_codec);
+ codec = NULL;
+ if (ffmpeg->oc->oformat->video_codec == AV_CODEC_ID_H264)
+ codec = avcodec_find_encoder_by_name("h264_omx");
+ else if (ffmpeg->oc->oformat->video_codec == AV_CODEC_ID_MPEG4)
+ codec = avcodec_find_encoder_by_name("mpeg4_omx");
+ if (!codec)
+ codec = avcodec_find_encoder(ffmpeg->oc->oformat->video_codec);
if (!codec) {
MOTION_LOG(ERR, TYPE_ENCODER, NO_ERRNO, "%s: Codec %s not found", ffmpeg_video_codec);
ffmpeg_cleanups(ffmpeg);

View File

@ -1,25 +0,0 @@
diff --git a/ffmpeg.c b/ffmpeg.c
index 3f48db8..1819e35 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -419,6 +419,8 @@ struct ffmpeg *ffmpeg_open(const char *ffmpeg_video_codec, char *filename,
c->codec_id = ffmpeg->oc->oformat->video_codec;
c->codec_type = AVMEDIA_TYPE_VIDEO;
c->bit_rate = bps;
+ if (ffmpeg->oc->oformat->video_codec == AV_CODEC_ID_H264)
+ av_opt_set(c->priv_data, "crf", "1", AV_OPT_SEARCH_CHILDREN);
c->width = width;
c->height = height;
c->time_base.num = 1;
diff --git a/ffmpeg.h b/ffmpeg.h
index ccdc0f1..7067569 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -13,6 +13,7 @@
#include <libavformat/avformat.h>
#include <libavutil/imgutils.h>
#include <libavutil/mathematics.h>
+#include <libavutil/opt.h>
#if (LIBAVFORMAT_VERSION_MAJOR >= 56)

View File

@ -4,7 +4,7 @@
#
################################################################################
MOTION_VERSION = 37b3595
MOTION_VERSION = 9fa9d22473899f654922174db0c474e14738a833
MOTION_SITE = $(call github,motion-project,motion,$(MOTION_VERSION))
MOTION_AUTORECONF = YES
MOTION_CONF_OPTS = --without-pgsql --without-sdl --without-sqlite3 --without-mysql --with-ffmpeg=$(STAGING_DIR)/usr/lib \
@ -15,4 +15,3 @@ define MOTION_INSTALL_TARGET_CMDS
endef
$(eval $(autotools-package))