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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st January 2007, 13:49   #1  |  Link
leiming2006
Registered User
 
leiming2006's Avatar
 
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.
leiming2006 is offline   Reply With Quote
Old 31st January 2007, 22:48   #2  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Could you post a description in this thread? Thx.
Wilbert is offline   Reply With Quote
Old 1st February 2007, 05:14   #3  |  Link
leiming2006
Registered User
 
leiming2006's Avatar
 
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.
leiming2006 is offline   Reply With Quote
Old 1st February 2007, 08:09   #4  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Isn't that what DeDup's timesin parameter is for?
squid_80 is offline   Reply With Quote
Old 1st February 2007, 10:48   #5  |  Link
leiming2006
Registered User
 
leiming2006's Avatar
 
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
It seems I can't make myself understood...
OK, I'll try to edit the first post
leiming2006 is offline   Reply With Quote
Old 1st February 2007, 10:55   #6  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Can you explain the difference between your util and the timesin parameter?
squid_80 is offline   Reply With Quote
Old 1st February 2007, 11:07   #7  |  Link
MeteorRain
結城有紀
 
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
MeteorRain is offline   Reply With Quote
Old 1st February 2007, 11:12   #8  |  Link
squid_80
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?
squid_80 is offline   Reply With Quote
Old 1st February 2007, 11:34   #9  |  Link
leiming2006
Registered User
 
leiming2006's Avatar
 
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
leiming2006 is offline   Reply With Quote
Old 1st February 2007, 11:38   #10  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
It still looks like you just replicated the timesin parameter of DeDup with an external program. timesin also works with v1 or v2.
foxyshadis is offline   Reply With Quote
Old 1st February 2007, 11:44   #11  |  Link
squid_80
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.
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.
squid_80 is offline   Reply With Quote
Old 1st February 2007, 12:04   #12  |  Link
leiming2006
Registered User
 
leiming2006's Avatar
 
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
Quote:
Originally Posted by squid_80 View Post
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.
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.
leiming2006 is offline   Reply With Quote
Old 1st February 2007, 12:11   #13  |  Link
squid_80
Registered User
 
Join Date: Dec 2004
Location: Melbourne, AU
Posts: 1,963
Quote:
Originally Posted by leiming2006 View Post
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.
squid_80 is offline   Reply With Quote
Old 1st February 2007, 12:14   #14  |  Link
leiming2006
Registered User
 
leiming2006's Avatar
 
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
Quote:
Originally Posted by squid_80 View Post
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.
leiming2006 is offline   Reply With Quote
Old 1st February 2007, 14:03   #15  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
lol ppl is growing on making mistakes
MeteorRain is offline   Reply With Quote
Old 6th August 2010, 04:34   #16  |  Link
amfilica
Registered User
 
Join Date: Nov 2009
Posts: 7
but it's still so nice to see this thread it solved my problems
amfilica is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.