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

Generate a Random MAC address
Use the following variation for FreeBSD: $ openssl rand 6 | xxd -p | sed 's/\(..\)/\1:/g; s/:$//'

Delete leading whitespace from the start of each line

Rename all images in current directory to filename based on year, month, day and time based on exif information

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

Password Generation
Produces secure passwords that satisfy most rules for secure passwords and can be customized for correct output as needed. See "man pwgen" for details.

clear current line

Print out a man page
man -t manpagename gives a postscript version of said man page. You then pipe it to ls, and assuming you have cups set up, it prints in your default printer.

Print nic name of current connection

Netstat Connection Check
This command does a tally of concurrent active connections from single IPs and prints out those IPs that have the most active concurrent connections. VERY useful in determining the source of a DoS or DDoS attack.

Find and copy scattered mp3 files into one directory
No problem with word splitting. That should works on many Unix likes.


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: