Skip to content

Instantly share code, notes, and snippets.

ffmpeg -i DJI_0950.MOV \
-copy_unknown \
-map 0 \
-c copy \
-c:v prores_ks \
-quant_mat 0 \
-s 960x540 \
-profile:v 0 \
-vendor apl0 \
-bits_per_mb 0 \
find . -type f \( -iname \*.flac -o -iname \*.wav \) -print0 | parallel -0 "ffmpeg -nostdin -i {} -vcodec copy -acodec alac -write_id3v2 true {.}.m4a"
# This will disable all trusted CAs on Android
find /system/etc/security/cacerts -type f -exec cp -vn {} /data/misc/user/0/cacerts-removed/ \;
mount --bind /data/misc/user/0/cacerts-added /system/etc/security/cacerts
find /Volumes/AIR2 -type f -mtime -1 \( -iname \*.MP4 -o -iname \*.MOV \) -print0 | parallel -0 "[ -f {.}.SRT ] && ffmpeg -nostdin -i {} -f srt -i {.}.SRT -map_metadata 0 -c:v copy -movflags +faststart -movflags use_metadata_tags -metadata 'com.apple.quicktime.make'='DJI' -metadata 'com.apple.quicktime.model'='Mavic Air 2' -metadata 'Make'='DJI' -metadata 'Camera Model Name'='FC3170' -metadata 'F Number'='2.8' -metadata 'Max Aperture Value'='2.8' -metadata 'Max Aperture Value'='2.8' -metadata 'Flash'='No Flash' -metadata 'Unique Camera Model'='DJI FC3170' -metadata 'Aperture'='2.8' -an -c:s mov_text -tag:s:s:0 tx3g -metadata:s:s:0 language=eng /Volumes/q/Movies/Drone/{/.}.MOV"
find /Volumes/Untitled -type f \( -iname \*.MP4 -o -iname \*.MOV \) -print0 | parallel -0 "[ ! -f {.}.SRT ] && ffmpeg -nostdin -i {} -map_metadata 0 -c:v copy -movflags +faststart -movflags use_metadata_tags -metadata 'com.apple.quicktime.make'='DJI' -metadata 'com.apple.quicktime.model'='Mavic Air 2' -metadata 'Make'='DJI' -metadata
@Manouchehri
Manouchehri / sh.sh
Created November 15, 2021 17:30 — forked from scottopell/sh.sh
Embed SRT file into mp4 with ffmpeg
# got this from http://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles
ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text outfile.mp4
# confirmed working with the following ffmpeg
# (installed using `brew 'ffmpeg', args: ['with-libvorbis', 'with-libvpx']` )
ffmpeg version 3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.3.0 (clang-703.0.31)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx --disable-lzma --enable-vda
MacBook-Air:~ dave$ ffprobe "/Volumes/Seagate USB drive/Other_Videos/DJI_0909.MP4" # DJI Mavic Air 2 4k 30fps HDR h264
ffprobe version 4.4.1 Copyright (c) 2007-2021 the FFmpeg developers
built with Apple clang version 13.0.0 (clang-1300.0.29.3)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/4.4.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-lib
@Manouchehri
Manouchehri / srs.conf
Created November 8, 2021 22:41
srs for DJI Fly app RTMP stream
# main config for srs.
# @see full.conf for detail config.
listen 1935;
max_connections 1000;
#srs_log_tank file;
#srs_log_file ./objs/srs.log;
daemon on;
http_api {
enabled on;
MacBook-Air-M1-2020:Movies dave$ mediainfo IMG_150* 10092021_172626.mov # The first three are from the native iOS camera, and the last one is from Filmic Pro
General
Complete name : IMG_1505.MOV
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt 0000.00 (qt )
File size : 455 MiB
Duration : 5 s 232 ms
Overall bit rate mode : Variable
Overall bit rate : 730 Mb/s
@Manouchehri
Manouchehri / 8K HDR UTAH Dolby Vision-ELrXGw2jJek.337.webm.txt
Created September 25, 2021 17:54
Samples of HDR footage metadata from YouTube
MacBook-Air-M1-2020:Movies dave$ mediainfo 8K\ HDR\ UTAH\ Dolby\ Vision-ELrXGw2jJek.337.webm
General
Complete name : 8K HDR UTAH Dolby Vision-ELrXGw2jJek.337.webm
Format : WebM
Format version : Version 4
File size : 705 MiB
Duration : 4 min 15 s
Overall bit rate : 23.2 Mb/s
Writing application : google/video-file
Writing library : google/video-file
[Unit]
Description=DHCP Client Daemon with namespace
Wants=network.target
Documentation=man:dhcpcd(8)
[Service]
Type=forking
PrivateNetwork=yes
ExecStartPre=-/usr/sbin/ip netns delete %i-ns
ExecStartPre=/usr/sbin/ip netns add %i-ns