Skip to content

Instantly share code, notes, and snippets.

View namndev's full-sized avatar
🏠
Working from home

Nam D. Nguyen namndev

🏠
Working from home
View GitHub Profile
@namndev
namndev / ffmpeg.md
Created March 6, 2020 16:17 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

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,
@namndev
namndev / ffmpeg.md
Created October 25, 2019 04:51 — forked from dvlden/ffmpeg.md
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@namndev
namndev / iterm2-solarized.md
Created October 18, 2019 10:56 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@namndev
namndev / Sublime Text 3 Build 3176 License Key - CRACK
Last active July 27, 2018 04:04
Sublime Text 3 Build 3103 License Key - CRACK
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----