[FFmpeg-user] join two video files portions

frank10 aruForum10 at deveritate.net
Sat Feb 2 23:12:37 CET 2013

> c++ would probably be overkill, you could just write it up in a bash/batch
> script invoking ffprobe and ffmpeg.
> Hint:
> ffprobe input.mp4 2>&1 | sed -n '/Duration:/s/.*:
> \([0-9]*:[0-9]*:[0-9]*\.[0-9]*\).*/\1/p'
I said c++ because I must call ffprobe/ffmpeg from there. I think with 
system() or ShellExecute().
Are there some tutorials with c++ and windows?

I don't know about sed (I must use it on Windows), but I tried this line 
on the console:

ffprobe -show_streams -count_frames -pretty Blob.avi

and I got a Duration = N/A .  The problem is the file is opened and 
recording from webcam...
In fact, when recording is stopped, I get correct duration.

Anyway I get:
nb_frames =N/A
nb_read_frames = 206
maybe I could determine the minutes and seconds with frames/fps.
But I'm a bit unsure because there could be lost frames or variable fps 
due to the webcam's stream...
it's difficult having always constant fps, I think.

Is there some other way of getting directly the duration on file recording?

More information about the ffmpeg-user mailing list