LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-13-2013, 09:05 PM   #1
faizlo
Member
 
Registered: Sep 2008
Location: USA
Distribution: Linux Mint Qiana
Posts: 190

Rep: Reputation: Disabled
Problem with start and end time when editing a video with ffmpeg


Hi all,

This is my first time to edit a video, or want to edit a video.
I just downloaded a video from YT and I wanted to have only a specific portion of this video so I googled for few min and I found this command which I used:
Code:
ffmpeg -ss 00:10:01 -t 00:20:15 -i "video1.flv" -acodec copy -vcodec copy "edited-video1.flv"
After I am done I found that the newly created edited video "edited-video1.flv" starts from 00:10:01 but goes on to the end of the file.
I have then to use the command again like this
Code:
ffmpeg -ss 00:00:01 -t 00:10:15 -i "edited_video1.flv" -acodec copy -vcodec copy "edited-video2.flv"
to be able to cut the video at the time I want.

So my questions are:
1- What's wrong with the first command and why it does not stop at the designated time I specified?
2- I there an alternative command (or an option) that would set the starting time and time duration, instead?

Thanks in advance
 
Old 08-14-2013, 01:32 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
1- What's wrong with the first command and why it does not stop at the designated time I specified?
If I look at both ffmpeg commands it looks like you want to cut out the part that starts at 00:10.01 and ends at 00:20:15. The -t flags takes the duration, not the elapsed time from the beginning of the movie (end-time - start-time = duration = -t).

I do believe you are looking for something like this:
Code:
ffmpeg -ss 00:10:01 -t 00:10:14 -i "video1.flv" -acodec copy -vcodec copy "edited-video1.flv"
Start recording at 00:10.01 and end recording 00:10.14 later.

Quote:
2- I there an alternative command (or an option) that would set the starting time and time duration, instead?
mencoder can do the same thing, but it also works with a start-time and a duration and not a start-time and end-time.
 
1 members found this post helpful.
Old 08-14-2013, 04:34 AM   #3
PeterSullivan
LQ Newbie
 
Registered: Aug 2013
Posts: 29

Rep: Reputation: Disabled
[QUOTE=faizlo;5008867]

Code:
ffmpeg -ss 00:10:01 -t 00:20:15 -i "video1.flv" -acodec copy -vcodec copy "edited-video1.flv"
I think the time you are using 20:15 is the total time of the video capturing. Just add the time duration for cutting that is 10:14.
I think this will work.

Code:
 I there an alternative command (or an option) that would set the starting time and time duration, instead?
you can use Video Cutter instead to that, you can set the time by both from mouse or by adding time duration
 
1 members found this post helpful.
Old 08-14-2013, 06:33 AM   #4
faizlo
Member
 
Registered: Sep 2008
Location: USA
Distribution: Linux Mint Qiana
Posts: 190

Original Poster
Rep: Reputation: Disabled
Thank you so much "druuna" and PeterSullivan
I really appreciate your help.

I will check these "new" commands and come back to mark my post as "Solved".
 
Old 08-14-2013, 07:01 PM   #5
faizlo
Member
 
Registered: Sep 2008
Location: USA
Distribution: Linux Mint Qiana
Posts: 190

Original Poster
Rep: Reputation: Disabled
Yes!
This command worked flawlessly
Code:
ffmpeg -ss 00:10:01 -t 00:10:14 -i "video1.flv" -acodec copy -vcodec copy "edited-video1.flv"
Where the number (time) after the -t flag is the "duration" not the end time.

Thank you both so much

Last edited by faizlo; 08-14-2013 at 08:03 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg mixing audio/video - trying to end vid after video stream completes joejoe99 Linux - Software 2 06-21-2012 11:44 PM
[SOLVED] [makefile] Add start/end time? littlebigman Linux - Software 3 05-23-2011 10:10 AM
LXer: End-to-end video podcast production with Kino and FFmpeg LXer Syndicated Linux News 0 03-25-2008 09:40 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 10:17 AM
mplayer takes time to start video logicalfuzz Linux - Software 2 08-30-2005 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration