🐧
Linux
  • Introduction
  • 🖇️general
    • essentials
    • other commands
    • Superuser-do (sudo)
    • SUID, SGID, sticky bit
    • /dev/null
    • environment variables
    • special variables
    • shebang
  • spool
  • 🔧bash
    • overview
    • redirection
    • loop
    • .bashrc
  • text processing
    • grep
    • sed
    • awk
  • xxd/hexdump
  • text editors
    • nano
    • vi/vim
  • 📂filesystem & directories
    • Filesystem Hierachy Standard (FHS)
      • /etc
        • hosts, hosts.allow, hosts.deny
        • /cron.d
        • /httpd
        • /samba.d
        • hostname
        • crontab
        • shadow
        • passwd
        • profile
        • services
      • /dev
      • /proc
        • version
      • /mnt
      • /opt
      • /sbin
      • /lib
      • /usr
      • /tmp
      • /var
      • /bin
      • /run
    • chroot
  • find
  • locate
  • ⌚processes & jobs
    • cronjob
    • daemon
  • ⛓️system
    • systemctl
    • hostname
    • systemd
  • 🗃️media
    • ffmpeg
    • pdftk
  • 🔒Security
    • ufw
  • firejail
  • apparmor
  • 📦Package management
    • dpkg
    • apt/apt-get
  • Storage
    • lsblk
    • mount/umount
  • df/du
  • user management
    • chsh
  • Networking
    • Introduction
    • routing table/interface management
    • /etc/hosts, /etc/hosts.allow, /etc/hosts.deny
Powered by GitBook
On this page
  1. media

ffmpeg

PrevioussystemdNextpdftk

Last updated 1 month ago

Convert from .mov to .mp4

-vcodec codec

Force video codec to codec. Use the "copy" special value to tell that the raw codec data must be copied as is

-acodec codec

Force audio codec to codec. Use the "copy" special value to specify that the raw codec data must be copied as is.

$ ffmpeg -i [file_to_convert].mov -vcodec libx264 -acodec aac [output_file_name].mp4

Extract portion of video

-ss position

Seek to given time position in seconds. "hh:mm:ss[.xxx]" syntax is also supported.

-t duration

Restrict the transcoded/captured video sequence to the duration specified in seconds. "hh:mm:ss[.xxx]" syntax is also supported.

-i filename

input file name

$ ffmpeg -ss [seek_time] -t [restric_time] -i [input_file] -vcodec copy -acodec copy [output_file]

Eg. Extract video portion from 10 minutes 05 seconds to 10 minutes 20 seconds (15 seconds video length from -t flag) from test.mp4, and store to output file output.mp4.

$ ffmpeg -ss 00:10:05 -t 00:00:15 -i 'test.mp4' -vcodec copy -acodec copy output.mp4
🗃️
ffmpeg(1): FFmpeg video converter - Linux man page
Logo