Question ffmpeg progress

shawnplr

Active member
Joined
May 17, 2007
Messages
44
Programming Experience
Beginner
I am using a backgroundworker to start ffmpeg and trying to use a progressbar.
ProgressBar1.Value = e.ProgressPercentage
does not seem to work probably because the way ffmpeg uses standard error to report progress. I think i could use the output text to do the trick. the output

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.92 (359/12)
Input #0, flv, from 'C:\Documents\Video\2.flv':
Duration: 00:03:14.02, start: 0.000000, bitrate: 56 kb/s

and

frame= 21 fps= 0 q=2.0 size= 180kB time=0.67 bitrate=2209.6kbits/s
frame= 44 fps= 42 q=2.0 size= 388kB time=1.41 bitrate=2257.5kbits/s
frame= 68 fps= 44 q=2.0 size= 612kB time=2.24 bitrate=2242.6kbits/s

if I could compare

Duration: 00:03:14.02
to
time=0.67

so far I can get the total duration and the current frame by using
VB.NET:
        Dim Duration As String = "Duration: 00:03:14.02, start: 0.000000, bitrate: 56 kb/s"
        Dim split2 As String() = Duration.Split(New [Char]() {" "c, ","c})
        Dim String2 = split2(1)
        If split2(0) = "Duration:" Then
            MessageBox.Show(String2)
        End If
        Dim Time As String = "frame=   21 fps=  0 q=2.0 size=     180kB time=0.67 bitrate=2209.6kbits/s"
        Dim split1 As String() = Time.Split(New [Char]() {" "c, ","c, "="c})
        Dim String1 = split1(19)
        If split1(0) = "frame" Then
            MessageBox.Show(String1)
        End If

Any help would be greatly appreciated.
 
Last edited:
Back
Top