Commands tagged ffmpeg (83)

  • Fix for PHP Shell Exec: ffmpeg -i input.mp4 -f null /dev/null 2>&1 shell_exec("ffmpeg -i input.mp4 -f null /dev/null 2>&1"); Show Sample Output


    0
    ffmpeg -i input.mp4 -f null /dev/null
    Dipo · 2018-11-06 13:44:46 440
  • The 30 means start extracting frames from 30 seconds into the video. The 3 means extract the next 3 seconds from that point. The fps can be adjusted based on your preferences. The 320 is the width of the gif, the height will be calculated automatically. input.mp4 is the video file, which can be any video file ffmpeg supports. The output.gif is the gif created.


    0
    ffmpeg -ss 30 -t 3 -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
    keyboardsage · 2024-03-19 00:34:23 47
  • Converts all ogg files to mp3 files in the current directory.


    -1
    for x in *.ogg; do ffmpeg -i "$x" "`basename "$x" .ogg`.mp3"; done
    Superhuman · 2009-09-04 20:23:09 7
  • mp4box is great when working with mp4s


    -1
    mp4box -info video.mp4
    alienresident · 2013-01-18 14:43:29 5
  • Transpose parameter: 0 = 90CounterCLockwise and Vertical Flip (default) 1 = 90Clockwise 2 = 90CounterClockwise 3 = 90Clockwise and Vertical Flip


    -1
    ffmpeg -i in.mov -vf "transpose=1" out.mov
    malathion · 2019-09-02 04:54:31 292
  • Downloads the frame of given YouTube video at 8 minutes 14 seconds. Requested format is "299", which 1080p only video.


    -1
    ffmpeg -ss 8:14 -i $(youtube-dl -f 299 --get-url URL) -vframes 1 -q:v 2 out.jpg
    bugmenot · 2021-07-06 10:59:49 192
  • Take a picture from your webcam and save it to a jpeg. A very slightly modified version of MarxBro's command.


    -3
    -y -r 1 -t 3 -f video4linux2 -vframes 1 -s sxga -i /dev/video0 ~/webcam-$(date +%m_%d_%Y_%H_%M).jpeg
    navyjeff · 2013-02-27 05:32:03 4

  • -5
    for x in *.ogg; do ffmpeg -i "$x" "`basename "$x" .ogg`.mp3"
    iain · 2009-03-23 10:19:12 5
  • ‹ First  < 2 3 4

What's this?

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.

Share Your Commands


Check These Out

One-liner to generate Self-Signed SSL Certificate+Key without any annoying prompts or CSRs
Handy if you want to quickly generate a self-signed certificate. Also can be used in your automated scripts for generating quick-use certificates.

find .txt files inside a directory and replace every occurrance of a word inside them via sed

Watch and cat the last file to enter a directory
Great for watching things like Maildir's or any other queue directory.

Stream your desktop to a remote machine.
This allows you to stream your desktop using vlc to another computer, in this case, 192.168.1.2 on your local network. If you have vlc installed, your all set to try this out. To view your own desktop, just run "vlc screen://" For more info, see http://nerdlogger.com/2008/01/08/stream-your-linuxwindowsmac-desktop-as-video-using-vlc/

Countdown Clock
Countdown clock - Counts down from $MIN minutes to zero. I let the date command do the maths. This version doesn't use seq.

Converts to PDF all the OpenOffice.org files in the directory
Requieres unoconv (debian package)

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Remove all old kernels
http://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot

Convert JSON to YAML

Find usb device in realtime
Using this command you can track a moment when usb device was attached.


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: