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 :: mac terminal command suggestion history 
Shell :: nmap run scripts 
Shell :: hojarudi 
Shell :: /usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory 
Shell :: How to show date and complete time on the Ubuntu Top Panel 
Shell :: aws codedeploy logs 
Shell :: linux updates popos 
Shell :: vnc share single window 
Shell :: how to clone pull all repositories from github 
Shell :: install chco windows 
Shell :: how to add extension to all files terminal 
Shell :: fetch all from remote 
Shell :: how to generate ssh keys for git 
Shell :: npm typeahead bootstrap 
Shell :: find mtime rm 
Shell :: docker run -p port:port meaning 
Shell :: vs code wsl unable to write file 
Shell :: wait-on yarn 
Shell :: step3 pgadmin ubuntu 20.04 
Shell :: yum check package version 
Shell :: how to checkout a remote branch in git 
Shell :: laravel routes return not found after setting virtual host on localhost linux 
Shell :: how to locate a file in linux 
Shell :: linux simple scan 
Shell :: linux command to delete direcoty with specified name recursivel 
Shell :: unix timestamp bash 
Shell :: ubuntu wifi drivers realtek 
Shell :: find sort 
Shell :: how to check if virtualization is enabled in bios in manjaro 
Shell :: remote: ! You are trying to install ruby-2.7.0 on heroku-20. 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =