Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
31st January 2007, 13:49 | #1 | Link |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
A small tool for Dedup when you miss the chance to use "timesin" parameter
If you miss the chance to use "timesin" parameter, you can use this tool.
http://files.myopera.com/leiming/files/deduptc.7z Last edited by leiming2006; 1st February 2007 at 12:18. |
1st February 2007, 05:14 | #3 | Link |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
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. |
1st February 2007, 11:07 | #7 | Link |
結城有紀
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
|
@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 |
1st February 2007, 11:12 | #8 | Link |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
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? |
1st February 2007, 11:34 | #9 | Link |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
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 |
1st February 2007, 11:44 | #11 | Link |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
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: Code:
timesin: default: none. Read timestamps for a VFR input. Matroska timecode formats v1 and v2 accepted. |
1st February 2007, 12:04 | #12 | Link | |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
Quote:
Now I know, in fact this tool is totally useless. |
|
1st February 2007, 12:11 | #13 | Link |
Registered User
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
|
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.
|
1st February 2007, 12:14 | #14 | Link | |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
Quote:
Thanks for your support. |
|
|
|