Skip to content

Instantly share code, notes, and snippets.

View tetkuz's full-sized avatar

Shota TAMURA tetkuz

  • Arent Inc.
  • Chiba, Japan
  • X @tetkuz
View GitHub Profile
@tetkuz
tetkuz / package2csv.sh
Last active July 30, 2024 00:43
one liner for package.json to csv
find | grep package.json | xargs -I{} sh -c 'jq -r ".dependencies | to_entries | map(\"\(.key),\(.value)\") | .[]" {} > ~/$(dirname {} | xargs basename)-package.csv'
@tetkuz
tetkuz / Dockerfile
Created June 9, 2018 09:32
Dockerfile for build ARDrone SDK
FROM ubuntu:bionic
ENV REPO_CMD_DIR "/usr/local/bin"
ENV GIT_USER_NAME "Your Name"
ENV GIT_USER_EMAIL "[email protected]"
# Install packages for build Parrot SDKs
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y \
locales \
@tetkuz
tetkuz / README.md
Created March 19, 2018 13:35
Display Parrot MAMBO FPV

Display Parrot MAMBO FPV

GStremaer を使って MAMBO の rtsp ストリーミングを見る2つの方法を紹介します。

  • コマンドラインでパイプラインを作って、見る
  • アプリをビルドして、見る

どちらも GStreamer のインストールが必要です。コマンドラインを使った方法の方が簡単です。

GStreamer のインストール

@tetkuz
tetkuz / .gitignore
Created December 1, 2017 02:13
gitignore for the Android studio project using GStreamer.
# ProjectRoot/app/.gitignoe
/build
/assets/
/.externalNativeBuild
/gst-build-*/
/src/main/java/org/freedesktop/gstreamer
@tetkuz
tetkuz / dump.swift
Created October 4, 2017 02:49
Dump H.264 data of a movie file using AVAssetReader
func dumpH264(_ path:URL) -> Void {
let asset:AVURLAsset = AVURLAsset(url:path, options:nil)
let video_tracks:Array = asset.tracks(withMediaType: AVMediaTypeVideo)
var output:AVAssetReaderOutput? = nil
do {
try self.asset_reader = AVAssetReader.init(asset: asset)
} catch {
fatalError("Unable to read Asset: \(error)")
}
@tetkuz
tetkuz / main.c
Last active September 6, 2017 07:28
Basic gstreamer application
#include <gst/gst.h>
#include <glib.h>
int main(int argc, char *argv[])
{
GstElement *pipeline;
GstElement *src;
GstElement *sink;
GstBus *bus;
GstMessage *msg;
@tetkuz
tetkuz / kiroru-cast.c
Last active July 13, 2017 10:34
RTSP Server with digest auth
/*
* Kiroru-cast is derived work from gst-rtsp-server examples[1].
* Because of this nature, Kiroru-cast is licensed under LGPL v2
*
* [1]: https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples
*/
/*
* Original license
*
@tetkuz
tetkuz / headless-fpsdisplay
Created March 30, 2017 08:32
Headless FPS Display Sink
GST_DEBUG=fpsdisplaysink:6 gst-launch-1.0 videotestsrc ! fpsdisplaysink video-sink=fakesink text-overlay=false signal-fps-measurements=true
@tetkuz
tetkuz / atomic_queue.m
Last active March 31, 2017 01:37
Objective-C: AtomicQueue
#import <Foundation/Foundation.h>
@interface AtomicQueue : NSObject
- (id)init;
- (id)dequeue;
- (void)enqueue:(id)data;
@end
@implementation AtomicQueue {
NSMutableArray *queue;