View Full Version : A small tool for Dedup when you miss the chance to use "timesin" parameter
leiming2006
31st January 2007, 13:49
If you miss the chance to use "timesin" parameter, you can use this tool.
http://files.myopera.com/leiming/files/deduptc.7z
Wilbert
31st January 2007, 22:48
Could you post a description in this thread? Thx.
leiming2006
1st February 2007, 05:14
C:\Documents and Settings\JJ>D:\tc\deduptc.exe
DEDUP VFR tool by LeiMing
For test only!
Usage:
deduptc -f [fps] -tc2 [Source's timecodes v2 file] -dedup [DEDUP's timecodes v2
file] -o [output timecodes v2 file]
Introduce:
This software can be used when trying using DEDUP on a VFR source.
After extract the video source from a VFR MKV, it becomes CFR
Then using DEDUP on it to get a DEDUP's timecodes v2 file
The parameter FPS is the fps of what you feed DEDUP.
But it doesn't adapt to the VFR MKV
So this program can combine the source's timecodes file with the DEDUP's timeco-
des v2 file to create a timecodes v2 file that can be used when muxing a new mkv
for the deduped and recompressed video.
squid_80
1st February 2007, 08:09
Isn't that what DeDup's timesin parameter is for?
leiming2006
1st February 2007, 10:48
It seems I can't make myself understood...
OK, I'll try to edit the first post
squid_80
1st February 2007, 10:55
Can you explain the difference between your util and the timesin parameter?
MeteorRain
1st February 2007, 11:07
@squid_80
well, since leiming is not so good at english so i come to post.
since dedup is designed for a cfr source, when ppl want to dedup on a vfr source the timecode would become 2, as leiming said, the timecode extracted from the mkv, and the one dumped from dedup.
to combine the 2 timecodes, simply feed the 2 timecodes to the tool and the output can be used to be muxed with the output file into mkv.
dedup on a vfr source may simply becuz fewer frames can lower the encoding time.
cheers
MR
squid_80
1st February 2007, 11:12
OK, let's say we extract a vfr stream from a mkv file, which gives a timecode file called oldvfrtimes.txt.
We run the dedup filter on this stream, with parameters timesin="oldvfrtimes.txt", times="newvfrtimes.txt".
The "newvfrtimes.txt" file will be the same as "oldvfrtimes.txt" except the timecodes for duplicate frames will have been removed. How is that different from what this tool does?
leiming2006
1st February 2007, 11:34
An example may explain the problem more.
Image you want to recompress a VFR MKV,
at first:
mkvextract timecodes_v2 1:01.tmc
mkvextract tracks 1:01.avi 2:01.mp3
then, pass through this avs script:
avisource("01.avi")
assumefps(23.976)
reduceby2()
blur(1)
dedup_dupmc(log="01.log")
encode this avs to get 01.mp4:
avisource("01.avi")
dedup_dedup(threshold=0.1,maxcopies=10,maxdrops=4,log="01.log",times="01dedup.tmc")
then run this:
deduptc -f 23.976 -dedup 01dedup.tmc -tc2 01.tmc -o 01final.tmc
Finally, pack these files:
01.mp4 with 01fianl.tmc, 01.mp3
foxyshadis
1st February 2007, 11:38
It still looks like you just replicated the timesin parameter of DeDup with an external program. ;) timesin also works with v1 or v2.
squid_80
1st February 2007, 11:44
Change the dedup line to:
dedup_dedup(threshold=0.1,maxcopies=10,maxdrops=4,log="01.log",timesin="01.tmc",times="01final.tmc")
Skip the deduptc step.
Mux 01.mp4 with 01.mp3 and 01final.tmc. Is the result any different and if so, how?
To quote from dedup's readme:
timesin:
default: none.
Read timestamps for a VFR input.
Matroska timecode formats v1 and v2 accepted.
Use this parameter to specify a timecode file which the output file should be based on, rather than just using the input stream's fps rate.
leiming2006
1st February 2007, 12:04
Change the dedup line to:
dedup_dedup(threshold=0.1,maxcopies=10,maxdrops=4,log="01.log",timesin="01.tmc",times="01final.tmc")
Skip the deduptc step.
Mux 01.mp4 with 01.mp3 and 01final.tmc. Is the result any different and if so, how?
To quote from dedup's readme:
timesin:
default: none.
Read timestamps for a VFR input.
Matroska timecode formats v1 and v2 accepted.
Use this parameter to specify a timecode file which the output file should be based on, rather than just using the input stream's fps rate.
What a terrible mistake I have made.
Now I know, in fact this tool is totally useless.
squid_80
1st February 2007, 12:11
What a terrible mistake I have made.
Now I know, in fact this tool is totally useless.
Not necessarily. I've forgotten to use the timesin parameter before... more times than I would like to admit. It's easy enough to add it to the script and re-open it so the final timecode file is created properly, but if you've already deleted the logfile from the first pass it must be run again. Your tool is a good standby option in case I'm stupid enough to do that again.
leiming2006
1st February 2007, 12:14
Not necessarily. I've forgotten to use the timesin parameter before... more times than I would like to admit. It's easy enough to add it to the script and re-open it so the final timecode file is created properly, but if you've already deleted the logfile from the first pass it must be run again. Your tool is a good standby option in case I'm stupid enough to do that again.
It seems it's not full of stupid. XD
Thanks for your support.
MeteorRain
1st February 2007, 14:03
lol ppl is growing on making mistakes ;)
amfilica
6th August 2010, 04:34
but it's still so nice to see this thread it solved my problems
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.