Strips the audio track from a webm video. Use this in combination with clive or youtube-dl.
This *does not change the video encoding*, so it's fast (almost purely I/O-bound) and results in a file of nearly the same size. However, OSX (and possibly other programs) will more easily play/seek the file when wrapped as MOV. For example, you can QuickLook the resulting file. This basically does the same as the commercial ClipWrap program, except using the free program ffmpeg. Show Sample Output
This command is used to stream a video file as live to some streaming server like Wowza, Red5 . etc
After updating to the latest ffmpeg with homebrew
This encodes it in ogg format. Does on-the-fly encoding of the incoming stream. Great for radio streams as they're often flv format.
I needed to convert a screen capture when using Gnome's "recordmydesktop" and convert it to a .wmv for playback in Windows.
Full command: for f in input/*; do BN=$(basename "$f"); ffmpeg -i "$f" -vn "temp/$BN.flac"; sox "temp/$BN.flac" "temp/$BN-cleaned.flac" noisered profile 0.3; ffmpeg -i "$f" -vcodec copy -an "temp/$BN-na.mp4"; ffmpeg -i "temp/$BN-na.mp4" -i "temp/$BN-cleaned.flac" "output/$BN"; done This was over the 255 character limit and I didn't feel like deliberately obfuscating it. 1. Create 'input', 'output' and 'temp' directories. 2. Place the files that you want to remove the hiss/static/general noise from in the input directory. 3. Generate a noise reduction profile with sox using 'sox an_input_file.mp4 -n trim x y noiseprof profile', where x and y indicates a range in seconds that only the sound you want to eliminate is present in. 4. Run the command.
Change bitrate with option '-b'
-ss start time -t duration -i file name -vf scale=320:-1 scale 320 X auto -r fps
disharmonics between 44100 and others cleaned
This will dump a raw BGRA pixel stream and WAV which must then be converted to video:
ffmpeg -f rawvideo -c:v rawvideo -s 1280x720 -r 12 -pix_fmt bgra -i "${i%.*}".bgra -c:v libx264 -preset veryslow -qp 0 -movflags +faststart -i "${i%.*}".wav -c:a libfdk_aac -b:a 384k "${i%.*}".mp4 ; rm "${i%.*}".bgra "${i%.*}".wav
Our example generates an x264/720p/12fps/AAC best-quality MP4.
To get dump-gnash, first install the build-dependencies for gnash (this step is OS-specific). Then:
git clone http://git.savannah.gnu.org/r/gnash.git ; cd gnash ; ./autogen.sh ; ./configure --enable-renderer=agg --enable-gui=dump --disable-menus --enable-media=ffmpeg --disable-jemalloc ; make
sox's interpolator creating bitperfect big soundfiles for audiofil ears, two passes computing takes long time and creating big archives
Converts an OGG file to MP3 at desired quality, preserving the id3v2 tags.
The "map" may be different depending on the .wmv file.
run `ffprobe` to see which is the video-track in the .wmv file
usually this is "0.0".
Stream #0.0: Video:...
Stream #0.1: Audio: ..
and "1.0" corresponds to the 2nd input file - your new audio.
You may want to add "-acodec wmav2" and "-ar 128k" options for 128kbit/s
Windows Media Audio 2 or whatever audio-codec/quality your want. `ffmpeg
-codecs | grep "EA"` gives you a list of available codecs for Encoding
Audio.
Try using '-sameq' instead of '-vcodec copy' (re-encode the video with
same quality rather than a bit-exact copy - this often solves muxing
issues but will cause a small loss of either video quality or increased
bandwidth).
and also try a different output format eg. 'new_video.avi' or '..mov' instead of 'new_video.wmv'.
you may need both, this should work:
ffmpeg -i vid.wmv -i aud.wav -sameq -map 0.0 -map 1.0 output.avi
Works on *.mp4 as well. Show Sample Output
Music Library Convert Usage lc Old_Directory New_DIrectory Old_Format New_Format lc ~/Music ~/Music_ogg mp3 ogg This will convert all audio files in the old directory to the new directory from the old format to the new format. It will leave the original library alone. The converted library will retain folder structure.
to view on another box:
nc <server address> <port> | ffplay -
use -r to adjust FPS and -q to adjust compression. use on trusted network only as nc is unencrypted.
Requires ffmpeg with image2pipe filter and imagemagick Show Sample Output
Uses ffmpeg to convert all that annoying .FLAC files to MP3 files keeping all the Artist's information in them. There's not much more to it. Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: