Showing posts with label ffmpeg. Show all posts
Showing posts with label ffmpeg. Show all posts

Friday, 2 November 2018

How to cut mp4 using ffmpeg

Tested on Ubuntu 16.04

-ss is the starting time
-t is the duration

ffmpeg -i input.mp4 -ss 00:12:20 -t 00:2:00 -async 1 -strict -2  cut.mp4

Wednesday, 20 June 2018

How to concatenate mp4 videos using ffmpeg on Ubuntu

for f in $(ls *.mp4); do
    ffmpeg -i $f -c copy -bsf:v h264_mp4toannexb -f mpegts $f.ts
done

CONCAT=$(echo $(ls *.ts) | sed -e "s/ /|/g")

ffmpeg -i "concat:$CONCAT" -c copy -bsf:a aac_adtstoasc output.mp4

rm *.ts


Source

Tuesday, 28 March 2017

How to install ffmpeg on Debian 8

is now available for Jessy as a backport: https://packages.debian.org/jessie-backports/ffmpeg
Add something like this to /etc/apt/sources.list (with your preferred mirror):
deb http://ftp.uk.debian.org/debian jessie-backports main
Then
apt-get update
apt-get install ffmpeg

Source: https://superuser.com/a/1082860