Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i make program for video converter
and it work as normal
only i need make progress bar for show percentage for process
this my code
C#
var convert = new NReco.VideoConverter.FFMpegConverter();
convert.ConvertMedia(txtPath.Text, @"D:/Convert/ConvertedVideo.mp4", NReco.VideoConverter.Format.mp4);
MessageBox.Show("Convert Completed");


What I have tried:

i want make progress bar for make percentage convert
anyone help me how to do this?

*note: (only i need code for show percent work)
Posted
Updated 24-Feb-22 7:00am
v2
Comments
Maciej Los 24-Feb-22 13:24pm    
As is described here[^], get the number of frames in the video before starting encoding, the get the number of ecoded frames and calculate percentage.
Andre Oosthuizen 24-Feb-22 15:45pm    
And (drum roll....) HERE is a perfect search almost word for word.

1 solution

You're going to have to contact NReco for support on this.

If the component you're using, which looks like a wrapper for ffMpeg, does not report any progress information, you're not going to be able to implement a progress bar.
 
Share this answer
 
Comments
ZaYeD1 24-Feb-22 13:02pm    
no problem with code
only i need code for show percent
about video convert from (avi to Mp4) or other format
i tired search about that no result until now
-_-
Dave Kreskowiak 24-Feb-22 17:27pm    
You're not understanding.

If the library you're using to do the conversion does not report any progress, and I don't think it does, you're entire idea of implementing a progressbar is not going to happen.

You have to consult with the people that wrote the library you're using to see if it reports progress.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900