View Full Version : Movie length created by DGIndex
sivagita
4th March 2006, 08:02
Given the d2v file, what is the best way to figure out the length of the movie? I want to do this programatically.
Siva
Guest
4th March 2006, 15:11
It's tricky because of repeat flags. You have to determine the number of *display* frames and then divide that by the frame rate. Just to illustrate, if you run DGIndex's Parse D2V option and go to the end of the log file, you can get the number of display frames. It's the last display frame number plus one.
sivagita
5th March 2006, 02:22
Thanks for the reply. Parse the text file option is great. How could I automate it? I don't mind writing some code if need be? Or there any command line tools available to do the same?
Since I produce AC3 and WAV files for the same movie. If I could get the lenght from these files it will work for me. I don't need exact length even if I could find the length accurate to a couple minutes will work for me.
Guest
5th March 2006, 03:54
OK, I made a quick mod to d2vparse.c so it prints the running time at the end of the Parse D2V log:
39977 [P]: 49956,49956,49957....3 *
39978 [B]: 49957,49958..........0 *
39979 [B]: 49958,49959,49959....1 *
39980 [P]: 49960,49960..........2 *
39981 [B]: 49961,49961,49962....3 *
39982 [B]: 49962,49963..........0 *
39983 [P]: 49963,49964,49964....1 *
[EOF]
Running time = 0 hours, 27 minutes, 47 seconds This will be in the next beta but you can get the revised file here:
http://neuron2.net/misc/d2vparse.html
Guest
5th March 2006, 18:43
Version 1.4.7 beta 3 adds this feature:
http://neuron2.net/dgmpgdec/dgmpgdec147b3.zip
Capt.Video
15th April 2006, 04:32
I would like to be able to trigger DGIndex to parse a specified D2V file and output the text to a specified filename.
(EG: dgindex -d2vparse -i myfile.d2v -o myfile.details.txt)
This would be of great help in determining the field order for handling of the file via a program generated AVS script.
Andrew
Hi.
I know there's the problem of "display" frames, but I'd like to know if is possible to extract the length of the video from the .d2v file without parsing it or directly parsing it to a string..
I'm making a tool under Visual C# and I'd like to save such info's without having to parse, extract and delete the file..
Just to know if I can do that..
Thanks for your work :)
Guest
17th May 2006, 18:54
I know there's the problem of "display" frames, but I'd like to know if is possible to extract the length of the video from the .d2v file without parsing it or directly parsing it to a string..
I'm making a tool under Visual C# and I'd like to save such info's without having to parse, extract and delete the file..
Just to know if I can do that..
I don't understand your question. It's right there at the bottom of the D2V file. What are you asking for?
Really thanks for reply :)
At this point I really think I need a little help: I'm not able to extract the length of the movie directly from the "myproject.d2v" file. I've read the docs @ homepage about d2v file structure, but I can't, I start thinking I misinterpret something.
Ok, this is the last couple of lines of my King Kong .d2v project:
900 5 4 118532096 1 51 72 72 d2 f2 f2 e2 f2 f2 e2 f2 f2 e2
900 5 4 118599680 2 1 d2 ff
FINISHED 0.00% FILM
How can I extract the n° of frames from? Thanks for your time!
Guest
17th May 2006, 22:00
Oops, my bad. :o It's in the parse D2V output, not the D2V file.
If I implemented the Captain's idea above, would that be enough? Or maybe bring back the command line version of Parse D2V (with option to print just the running time)?
If I implemented the Captain's idea above, would that be enough? Or maybe bring back the command line version of Parse D2V (with option to print just the running time)?
For me, it would be sufficient just this:
900 5 4 118532096 1 51 72 72 d2 f2 f2 e2 f2 f2 e2 f2 f2 e2
900 5 4 118599680 2 1 d2 ff
FINISHED 0.00% FILM
Displayed_frames=269425 //the simplest possible :)
//or
Running time = 2 hours, 59 minutes, 37 seconds
Of course the position of the blue strings isn't important, it's just an example, just like: ok let's (internally) auto-parse the .d2v and append/insert 2 more lines with the number of frames before saving to disc.
ie:
Field_Operation=0
Displayed_frames=269425
Frame_Rate=25000 (25/1)
This could be done also using Captain's idea, modifying the original d2v file. In this way the info on the number of frames would be with the other infos.
Thanks for the help!
Guest
18th May 2006, 00:45
I'm not going to revise the D2V file format again just for this.
Can you use the CLI solution that I proposed?
Can you use the CLI solution that I proposed?
Sure :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.