- Download MP4:
https://github.com/alfg/mp4/blob/master/test/tears-of-steel.mp4?raw=true
- Run
go run mp4_example.go tears-of-steel.mp4
go run mp4_example_2.go tears-of-steel.mp4
#!/usr/bin/env python3 | |
import sys | |
import struct | |
if len(sys.argv) < 2: | |
print("Usage: aac_parer.py <target.aac>") | |
exit() | |
aacfile = open(sys.argv[1], 'rb') | |
frame_no = 1 |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
Getting help: | |
-h — print basic options | |
-h long — print more options | |
-h full — print all options (including all format and codec specific options, very long) |
// NullString is an alias for sql.NullString data type | |
type NullString struct { | |
sql.NullString | |
} | |
// MarshalJSON for NullString | |
func (ns *NullString) MarshalJSON() ([]byte, error) { | |
if !ns.Valid { | |
return []byte("null"), nil |
language: bash | |
before_install: | |
- echo $super_secret_password | gpg --passphrase-fd 0 .travis/deploy.key.gpg | |
- eval "$(ssh-agent -s)" | |
- chmod 600 .travis/deploy.key | |
- ssh-add .travis/deploy.key | |
- ssh-keyscan git.host.com >> ~/.ssh/known_hosts | |
after_success: | |
- git remote add deploy [email protected]:app | |
- git config --global push.default simple |
## extract audio from .avi as .aac (conversion from another audio codec) | |
ffmpeg -i foo.avi -acodec aac -ab 128k -strict experimental bar.aac | |
## extract audio from .avi as .mp3 (no conversion, just copy) | |
ffmpeg -i foo.avi -acodec copy bar.mp3 | |
## convert .mp3 to .aac | |
ffmpeg -i foo.mp3 -acodec aac -ab 128k -strict experimental bar.aac | |
## extract single frame as image from .mp4 |
A running example of the code from:
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.