Skip to content

Instantly share code, notes, and snippets.

Aman Gupta tmm1

Block or report user

Report or block tmm1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tmm1
tmm1 / h264bsf.patch
Last active Oct 9, 2019
ffmpeg h264_metadata_bsf issue
View h264bsf.patch
$ wget https://tmm1.s3.amazonaws.com/h264-metadata.mpg
$ ffmpeg -i h264-metadata.mpg -c copy -map v -f h264 -y /dev/stdout | h264_analyze /dev/stdin > /tmp/a.out
$ ffmpeg -i h264-metadata.mpg -bsf:v h264_metadata -c copy -map v -f h264 -y /dev/stdout | h264_analyze /dev/stdin > /tmp/b.out
$ diff -uNdr /tmp/a.out /tmp/b.out | head -20
--- /tmp/a.out 2019-10-09 14:33:07.000000000 -0700
+++ /tmp/b.out 2019-10-09 14:33:01.000000000 -0700
@@ -144,8 +144,8 @@
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
View vaapi-a53cc.diff
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index 9152af4fb3..896a945470 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -64,6 +64,7 @@ typedef struct VAAPIEncodeH264Context {
H264RawSEIPicTiming pic_timing;
H264RawSEIRecoveryPoint recovery_point;
H264RawSEIUserDataUnregistered identifier;
+ H264RawSEIUserDataRegistered a53_cc;
char *identifier_string;
@tmm1
tmm1 / aes_reader.go
Last active Apr 30, 2019
Golang AES CBC PKCS7 io.Reader
View aes_reader.go
package hls
import (
"crypto/aes"
"crypto/cipher"
"io"
"github.com/Sonelli/gojuice/crypto/pkcs7"
)
View io-read-seek.patch
From db6f249e3d95b124c388f26e39f95b855b15dcdf Mon Sep 17 00:00:00 2001
From: Aman Gupta <aman@tmm1.net>
Date: Fri, 22 Mar 2019 17:54:38 -0700
Subject: [PATCH] avformat/utils: add hack to allow read seeks via io context
Signed-off-by: Aman Gupta <aman@tmm1.net>
---
libavformat/utils.c | 3 +++
1 file changed, 3 insertions(+)
View ffmpeg-timestamps.md

I have a sample.mpg mpegts file with a video keyframe starting at 65738.512389

$ ffprobe -hide_banner -loglevel fatal sample.mpg -select_streams v -print_format json -show_packets -read_intervals "%+#1"
{
    "packets": [
        {
            "codec_type": "video",
            "stream_index": 0,
            "pts": 5916466115,
View ffmpeg-synology-2.7.1.patch
diff --git a/SynoBuildConf/abiconfig b/SynoBuildConf/abiconfig
new file mode 100644
index 0000000000..70e02a72b5
--- /dev/null
+++ b/SynoBuildConf/abiconfig
@@ -0,0 +1,4 @@
+{
+ "skip_including": ["d3d11va.h", "dxva2.h", "qsv.h", "vda.h", "vdpau.h", "xvmc.h"],
+ "defines": "#define __STDC_CONSTANT_MACROS"
+}
View golang-objchacks.diff
diff --git a/src/cmd/cgo/gcc.go b/src/cmd/cgo/gcc.go
index c104067a93..d9d6d7c7bf 100644
--- a/src/cmd/cgo/gcc.go
+++ b/src/cmd/cgo/gcc.go
@@ -64,6 +64,9 @@ func cname(s string) string {
if strings.HasPrefix(s, "sizeof_") {
return "sizeof(" + cname(s[len("sizeof_"):]) + ")"
}
+ if strings.HasPrefix(s, "objc_class_") {
+ return s[len("objc_class_"):]
@tmm1
tmm1 / mpv-opengl-android.patch
Last active Oct 9, 2017
mpv --vo=opengl --opengl-backend=android --wid=(int64_t)(intptr_t)(android.view.Surface *)surface
View mpv-opengl-android.patch
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index 72311e11fa..dab32d122a 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -46,10 +46,14 @@ extern const struct mpgl_driver mpgl_driver_angle;
extern const struct mpgl_driver mpgl_driver_angle_es2;
extern const struct mpgl_driver mpgl_driver_dxinterop;
extern const struct mpgl_driver mpgl_driver_rpi;
+extern const struct mpgl_driver mpgl_driver_android;
extern const struct mpgl_driver mpgl_driver_mali;
View mpv-android-vo-android.patch
diff --git a/app/src/main/java/is/xyz/mpv/MPVLib.java b/app/src/main/java/is/xyz/mpv/MPVLib.java
index 686b6a6..47bd989 100644
--- a/app/src/main/java/is/xyz/mpv/MPVLib.java
+++ b/app/src/main/java/is/xyz/mpv/MPVLib.java
@@ -6,6 +6,7 @@ import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.opengl.GLSurfaceView;
+import android.view.Surface;
View vo_android.patch
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index a0ac7017dc..5a8f23424e 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -2458,6 +2458,10 @@ Window
support window embedding of foreign processes, this works only with libmpv,
and will crash when used from the command line.
+ On Android, the ID is interpreted as ``android.view.Surface``. Pass it as a
+ value cast to ``intptr_t``. Use with ``--vo=android`` and
You can’t perform that action at this time.