Skip to content

Instantly share code, notes, and snippets.

@lu-zero
lu-zero / avconv.json
Last active October 2, 2015 13:03
What if avconv grocks json?
{
"input" : [
{ "analyzeduration": 1,
"format": { "name" : "bmd",
"options" : { "video_mode": 11,
"instance": 0,
"audio_connection": 2,
"video_connection": 4,
"video_format": 1,
"wallclock": 1 }
diff --git a/avprobe.c b/avprobe.c
index 8d2ec24..848d278 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -63,6 +63,207 @@ void exit_program(int ret)
exit(ret);
}
+static int print_section_separator;
+static int print_chapter_separator;
Babel==2.1.1
Flask==0.10.1
Flask-Admin==1.0.7
Flask-Babel==0.9
Flask-Login==0.3.2
Flask-Mail==0.9.1
Flask-Migrate==0.1.4
Flask-Principal==0.4.0
Flask-SQLAlchemy==1.0
Flask-Script==0.6.2
cd ~/plaid
source .venv/bin/activate
curl https://lists.libav.org/pipermail/libav-devel/${1}.txt > /tmp/t.mbox
python manage.py import -p libav-devel.libav.org --mailbox /tmp/t.mbox
@lu-zero
lu-zero / trello-number-as-badge.js
Created October 28, 2015 23:27
Making the trello UI more useful...
// ==UserScript==
// @name Trello
// @namespace it.luminem.trello
// @include https://trello.com/*
// @include http://trello.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @grant none
// ==/UserScript==
@lu-zero
lu-zero / foo.html
Last active November 3, 2015 13:58
Beautifying posts
<p>I decided to improve Libav DTS decoder - dcadec. Here I want to explain what are its problems now and what I would like to do about them.</p>
<p>DTS encoded audio stream consists of core audio and may contain extended audio. Lavc dcadec supports <code>XCH</code> and <code>XLL</code> extensions but <code>X96</code>, <code>XXCH</code> and <code>XBR</code> extensions are waiting to be implemented - I'd like to implement them later.</p>
<p>For the DTS lossless extension - <code>XLL</code>, the decoded output audio should be a bit for <strong>bit accurate</strong> reproduction of the encoded input. However there are some problems.</p>
<ul>
<li>The main problem is that the core decoder converts integer coefficients read from the bitstream to <strong>floats</strong> just after reading them (along with dequantization). All other steps of audio reconstruction are done with floats and the output can <strong>not</strong> be bitexact reproduction of the input so it is not lossless. When the coefficients are read f
@lu-zero
lu-zero / gist:01aab7db5693655e1e45
Created November 21, 2015 17:24 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@lu-zero
lu-zero / instrument_avbuffer.diff
Last active November 26, 2015 07:33
Libav instrumentation
diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 1bc4a93..c277e94 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -22,6 +22,7 @@
#include "atomic.h"
#include "buffer_internal.h"
#include "common.h"
+#include "log.h"
#include "mem.h"
@lu-zero
lu-zero / instrument_avbuffer.diff
Created November 28, 2015 13:03
Libav Instrumentations
diff --git a/libavutil/buffer.c b/libavutil/buffer.c
index 1bc4a93..c277e94 100644
--- a/libavutil/buffer.c
+++ b/libavutil/buffer.c
@@ -22,6 +22,7 @@
#include "atomic.h"
#include "buffer_internal.h"
#include "common.h"
+#include "log.h"
#include "mem.h"
@lu-zero
lu-zero / libmpv.h
Created June 26, 2013 16:33
High level api, missing player reconfiguration on the fly. It is _really_ simple and easy to use, Ideally you create a playlist or load a playlist, with the default playlist being NULL. The items abstraction let you put in the playlist items and possibly add offsets within the file (later) the player abstraction let you seek and play within the …
typedef struct MPVPlayer;
MPVPlayer *mpv_alloc();
int mpv_parse(MPVPlayer *m, int argc, char *argv, char *envp);
int mpv_play(MPVPlayer *m);
int mpv_pause(MPVPlayer *m);