Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ffmpeg trim video

ffmpeg -ss 00:00:30.0 -i input.wmv -c copy -t 00:00:10.0 output.wmv
ffmpeg -ss 30 -i input.wmv -c copy -t 10 output.wmv
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg trim

ffmpeg -ss 00:00:30.0 -i input.wmv -c copy -t 00:00:10.0 output.wmv
ffmpeg -ss 30 -i input.wmv -c copy -t 10 output.wmv
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

trim video using ffmpeg

import ffmpeg
!ffmpeg -y -i '/content/drive/MyDrive/GeekloneTech/mc/Object_Detection_Tracking/custom_video/2018-03-07.17-25-06.17-30-06.school.G339.mp4' -ss 00:00:00 -to 00:10:00 -codec copy  -c:a aac '/content/drive/MyDrive/GeekloneTech/mc/Object_Detection_Tracking/custom_video/2018-03-07.17-25-06.17-30-06.school.G339_trimmed.mp4'
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

ffmpeg video trim

# from 5:20 to 15:20 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 copy (may fail when output format is diffrent)
$ ffmpeg -ss 00:05:20 -i input.mp4 -to 00:10:00 -c:v copy -c:a copy output.mp4

# from 5:20 to 10:00 re-encoding
$ ffmpeg -ss 00:05:20 -accurate_seek -i input.mp4 -to 00:10:00 -c:v libx264 -c:a aac output.mp4

# last 10:00 of video copy
$ ffmpeg -sseof -00:10:00 -i input.mp4 -c copy output.mp4
Comment

PREVIOUS NEXT
Code Example
Shell :: nx: command not found 
Shell :: bash get hour 
Shell :: connection failed blueman.bluez.errors.dbusfailederror protocol not available 
Shell :: how to get hostname on linux 
Shell :: how to check mac address in linux 
Shell :: arch code 
Shell :: apache reset default configuration 
Shell :: conda install moviepy 
Shell :: check codedeploy agent status 
Shell :: git set upstream 
Shell :: git case sensitive folder 
Shell :: git push tags 
Shell :: git reset file to master 
Shell :: unix delete file contents only 
Shell :: check ubuntu or centos 
Shell :: install sticky notes in ubuntu 
Shell :: save git username and password 
Shell :: remove netbeans linux 
Shell :: install mosquitto ubuntu 
Shell :: cleaning up your ubuntu system 
Shell :: curl without progress 
Shell :: git get current commit hash 
Shell :: ubuntu macbook camera 
Shell :: plate form ignore in laravel composer install 
Shell :: telnet windows 10 
Shell :: close port 
Shell :: how to install comtypes 
Shell :: get database url heroku 
Shell :: kill port in windows 
Shell :: zip full folder ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =