incrementing HH:MM:SS information: any method or datatype to save me time in .NET?

G

Guest

I'm doing some work with ffmpeg, which lets you work with audio and video.

ffmpeg's command line accepts timecode information as folllows: 00:00:23.
HH:MM.SS

I want to increment that counter, say, adding ten seconds 1000 times.

I could hack up my own string thingy to do this, but I'm betting there's a
way to do this within the .NET framework.

Is there? Can someone point the way?

-KF
 
G

Guest

Hi,

Use DateTime variable as counter and convert it to string when you need it
(it's more efficient):

// offset
DateTime date = new DateTime(1, 1, 1, 0, 0, 0);

for (int i = 1; i <= 1000; i++)
{
date = date.AddSeconds(10.0d);

string ffmpegParam = date.ToLongTimeString();
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top