[FFmpeg-user] join two video files portions
frank10
aruForum10 at deveritate.net
Sun Feb 3 14:03:33 CET 2013
> Of course, ffprobe won't be able to get the duration of a file that is in
> the process of being created. That information can't be known, because it
> will be constantly changing. Or am I misunderstanding what you are asking
> for?
Yes, that's the point.
I must copy some frames from a file that is in recording mode. So I
think the only way is using the nb_read_frames to get the total frames
up to that moment. Subtract some frames, calculate the hh:mm:ss and
insert this start time in the -ss cut method.
But, at this point, could it work the ffmpeg -ss with a file in
recording mode?
In fact I tried this:
ffmpeg -ss 00:00:20 Blob.avi 00:00:10 -c:v copy out.avi
(with Blob.avi the file in recording mode)
I got out.avi of 30'' instead of 10'' because it starts from the
beginning of blob.avi instead of the 20°sec.
When stopped and closed blob.avi and repeated the ffmpeg -ss I got
correctly the 10'' video.
So, the problem is that also -ss doesn't work with a file being recorded...
This is due to the lack of duration tag, but it could work if -ss worked
with frames, I think:
for example it could set the beginning of video at frame 150.
I'm able to do this with opencv in c++, but it's slow and must re-encode
all frames...
I was searching for a faster method maybe at file level without
recompression.
More information about the ffmpeg-user
mailing list