4
0
I captured a video from my camera, but I don't know exactly how long it is. I want to use ffmpeg
to keep and cut only the last 7 seconds of the video. Is this possible?
I tried the command:
ffmpeg -t 00:00:07 -i input.avi -vcodec copy newfile.avi
but it only skips the first 7 seconds of the video, and displays the video flipped.
1I wonder why it shows the video flipped. But to know the duration of the video use the command
ffmpeg -i input.avi
without output file name. That will show duration. Then you can useduration - 7
to use for the-ss
flag. Provide the complete console output here. – Rajib – 2014-04-23T12:53:12.300I know that but i am trying to use ffmpeg from my C# code so i am trying to do it without know the duration of video. I just want to cut the last 7 seconds – NickName – 2014-04-23T13:22:52.553
I'm not at all learned about C# but why can't you query the duration from C#- ffmpeg/ffprobe (check the modules which provide duration in the code) and then pass the information back? – Rajib – 2014-04-23T15:51:21.763