ffmpeg upgrade 3.3.2, ffmpeg audio segv fix, faststart mp4
authorGood Guy <good1.2guy@gmail.com>
Wed, 21 Jun 2017 01:20:30 +0000 (19:20 -0600)
committerGood Guy <good1.2guy@gmail.com>
Wed, 21 Jun 2017 01:20:30 +0000 (19:20 -0600)
cinelerra-5.1/cinelerra/ffmpeg.C
cinelerra-5.1/configure.ac
cinelerra-5.1/ffmpeg/audio/faststart_h264.mp4
cinelerra-5.1/ffmpeg/audio/faststart_h264.qt [new file with mode: 0644]
cinelerra-5.1/ffmpeg/format/fmp4 [new file with mode: 0644]
cinelerra-5.1/ffmpeg/video/faststart_h264.mp4
cinelerra-5.1/ffmpeg/video/faststart_h264.qt [new file with mode: 0644]
cinelerra-5.1/thirdparty/src/ffmpeg-3.3.2.tar.xz [moved from cinelerra-5.1/thirdparty/src/ffmpeg-3.3.tar.xz with 51% similarity]

index 8e7e62eef0cca6af322fe7a9f75e40c9a1dfcde4..243c4e15cf145693d83b363096b59f982b3dd344 100644 (file)
@@ -148,10 +148,13 @@ void FFAudioStream::reset_history()
 {
        inp = outp = bfr;
        hpos = 0;
+       memset(bfr, 0, lmt-bfr);
 }
 
 void FFAudioStream::iseek(int64_t ofs)
 {
+       if( ofs > hpos ) ofs = hpos;
+       if( ofs > sz ) ofs = sz;
        outp = inp - ofs*nch;
        if( outp < bfr ) outp += sz*nch;
 }
@@ -505,6 +508,7 @@ int FFStream::seek(int64_t no, double rate)
                        npkts = MAX_RETRY;
                }
        }
+       if( pos == curr_pos ) return 0;
        if( pos > 0 && st->time_base.num > 0 ) {
                double secs = pos / rate;
                tstmp = secs * st->time_base.den / st->time_base.num;
@@ -521,7 +525,7 @@ int FFStream::seek(int64_t no, double rate)
        }
         int ret = avformat_seek_file(fmt_ctx, st->index, -INT64_MAX, seek, INT64_MAX, flags);
 #else
-        int ret = av_seek_frame(fmt_ctx, st->index, tstmp, AVSEEK_FLAG_ANY);
+       int ret = av_seek_frame(fmt_ctx, st->index, tstmp, AVSEEK_FLAG_ANY);
 #endif
        int retry = MAX_RETRY;
        while( ret >= 0 ) {
index f85285ab5099c99f87cb2ed42ffdd729d77f3ad0..3016661a7a1a5a22dc6a47e6a2cc8aa723a3f3a7 100644 (file)
@@ -125,7 +125,7 @@ PKG_3RD([fdk],[auto],
   [ libAACdec/include libAACenc/include libSYS/include ])
 
 PKG_3RD([ffmpeg],[yes],
-  [ffmpeg-3.3],
+  [ffmpeg-3.3.2],
   [ libavutil/libavutil.a \
     libavcodec/libavcodec.a \
     libpostproc/libpostproc.a \
index 5b897a5f06b8bfde62e699b036ec2578bea922f5..d5db4f8b36940dc91d8469343cc79f349d444ead 100644 (file)
@@ -1,2 +1,2 @@
-fqt libfdk_aac
+fmp4 libfdk_aac
 strict -2
diff --git a/cinelerra-5.1/ffmpeg/audio/faststart_h264.qt b/cinelerra-5.1/ffmpeg/audio/faststart_h264.qt
new file mode 100644 (file)
index 0000000..5b897a5
--- /dev/null
@@ -0,0 +1,2 @@
+fqt libfdk_aac
+strict -2
diff --git a/cinelerra-5.1/ffmpeg/format/fmp4 b/cinelerra-5.1/ffmpeg/format/fmp4
new file mode 100644 (file)
index 0000000..ea2ccf5
--- /dev/null
@@ -0,0 +1,2 @@
+mp4
+movflags=+faststart
index 53f9b438d010e900400557ea83b21bd553c3ada6..db06202b6111d0fbe40a3f800d82540a366d9be2 100644 (file)
@@ -1,4 +1,11 @@
-fqt libx264
+fmp4 libx264
+crf=28
+maxrate=20000000
+bufsize=20000000
+preset=veryslow
+profile=high
+level=41
+bf=8
+refs=4
 # use framerate for 1 keyframe/sec, needed for seeks
-keyint_min=25
-x264opts keyint=25
+x264opts cabac=1:me_range=24:bframes=8:keyint=60:keyint_min=25:qpmin=0:qpmax=69:qpstep=4
diff --git a/cinelerra-5.1/ffmpeg/video/faststart_h264.qt b/cinelerra-5.1/ffmpeg/video/faststart_h264.qt
new file mode 100644 (file)
index 0000000..53f9b43
--- /dev/null
@@ -0,0 +1,4 @@
+fqt libx264
+# use framerate for 1 keyframe/sec, needed for seeks
+keyint_min=25
+x264opts keyint=25
similarity index 51%
rename from cinelerra-5.1/thirdparty/src/ffmpeg-3.3.tar.xz
rename to cinelerra-5.1/thirdparty/src/ffmpeg-3.3.2.tar.xz
index 7856785377435546be9b9a36d8bee6b44145aa9f..4192c0aa41035f73e8935bfaed160619799446bc 100644 (file)
Binary files a/cinelerra-5.1/thirdparty/src/ffmpeg-3.3.tar.xz and b/cinelerra-5.1/thirdparty/src/ffmpeg-3.3.2.tar.xz differ