bilu
7th November 2003, 20:03
Hi,
Anime encoding is an unknown world to me.
My interests in video encoding lately are variable framerate encoding in Matroska and pattern detection.
Anime is the biggest challenge I've ever seen. I've downloaded some samples of problematic sources like Neo Genesis Evangelion and made some right and wrong analisys about it.
Recently I've been trying to develop a method that would help me on pattern detection for a variable framerate IVTC process.
My method so far was this: do a XVID Null encode with AVS2AVI and DBGProxy (like DebugView but command-line) and grab the output from Telecide(debug=true) to a file, then grab what matters.
In this case I wanted to grab the "in-pattern" and "out-of-pattern" statements and convert them to "1" and "0" next to the framenumber.
MOVIE.AVS
=========
Loadplugin("D:\vfr\tools\Decomb510.dll")
Loadplugin("D:\vfr\tools\MPEG2Dec3dg.dll")
#FOrder works only with MPEG-2 sources
function FOrder(clip c) {
fo= GetParity(c)? 1:0
return fo
}
mpeg2source("D:\weird_clips\eva.d2v",idct=2,cpu=0)
Telecide(FOrder(),guide=1,post=0,debug=true)
NULL.BAT
========
reg import null.reg
dbgproxy avs2avi d:\vfr\encodes\MOVIE.AVS d:\vfr\encodes\MOVIE.AVI -p 0 -c xvid 2> d:\vfr\encodes\debug1.txt
gawk -f fmatch.awk d:\vfr\encodes\debug1.txt > d:\vfr\encodes\vfr1.txt
NULL.REG
========
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\GNU\XviD]
"mode"=dword:00000006
FMATCH.AWK
==========
/Telecide/ && /using/ {gsub(/:/,"");gsub(/in-/," 1 ");gsub(/out-/," 0 ");print $3,$7}
DEBUG1.TXT OUTPUT
=================
!Telecide: frame 37: matches: 187069 209091 205427
!Telecide: frame 37: [using n] [in-pattern]
!Telecide: frame 38: matches: 205427 215163 186466
!Telecide: frame 38: [using n] [in-pattern]
VFR1.TXT OUTPUT
===============
21 1
22 1
23 0
24 0
25 1
It would help me to define ranges for VFR Matroska encodings.
Example (Star Trek TNG Hybrid output):
http://forum.doom9.org/showthread.php?s=&postid=395247#post395247
288 0
289 0
290 0
291 0
292 0
293 0
294 1
295 0
296 0
297 1
298 1
299 1
300 1
301 1
302 1
303 1
304 1
The only change that happens is this one. So it's easy.
# timecode format v1
Assume 23.976
0,297,29.97
OR
# timecode format v1
Assume 29.97
297,0,23.976 (I don't know if it accepts 0 as the end, but it's just an example)
But it's not that easy on anime. There are lots of duplicates and with problematic sources like Neo Genesis Evangelion (would like to have an Excel Saga sample myself :) ) things like this come around:
1710 0
1711 1
1712 1
1713 0
1714 0
1715 0
1716 0
1717 0
1718 0
1719 0
1720 0
1721 0
1722 0
1723 0
1724 1
1725 0
1726 1
1727 1
1728 0
1729 1
1730 1
1731 1
1732 0
1733 1
1734 1
1735 1
1736 0
1737 1
1738 1
1739 1
1740 1
1741 1
1742 1
1743 0
1744 1
1745 0
1746 0
1747 0
1748 1
1749 1
1750 1
1751 1
1752 1
1753 0
1754 1
1755 0
1756 0
1757 0
1758 0
1759 0
1760 0
1761 1
1762 1
1763 1
1764 1
1765 1
1766 1
1767 1
1768 1
1769 1
1770 1
1771 1
1772 0
1773 1
1774 1
1775 0
1776 1
1777 1
1778 1
1779 1
1780 1
1781 1
1782 1
1783 1
1784 1
1785 1
1786 1
1787 1
1788 1
1789 0
1790 0
1791 0
1792 0
1793 0
And how do you establish a pattern on that?
I was thinking about a minimum of 10 consecutive 0s or 1s to decide if a frame range belongs or not to a pattern.
Would like your opinion. Due to the nature of anime, full of duplicates and weird productions, I'm wondering about the ways of improvement (that don't require manual processing).
Sorry for the very long post.
Bilu
Anime encoding is an unknown world to me.
My interests in video encoding lately are variable framerate encoding in Matroska and pattern detection.
Anime is the biggest challenge I've ever seen. I've downloaded some samples of problematic sources like Neo Genesis Evangelion and made some right and wrong analisys about it.
Recently I've been trying to develop a method that would help me on pattern detection for a variable framerate IVTC process.
My method so far was this: do a XVID Null encode with AVS2AVI and DBGProxy (like DebugView but command-line) and grab the output from Telecide(debug=true) to a file, then grab what matters.
In this case I wanted to grab the "in-pattern" and "out-of-pattern" statements and convert them to "1" and "0" next to the framenumber.
MOVIE.AVS
=========
Loadplugin("D:\vfr\tools\Decomb510.dll")
Loadplugin("D:\vfr\tools\MPEG2Dec3dg.dll")
#FOrder works only with MPEG-2 sources
function FOrder(clip c) {
fo= GetParity(c)? 1:0
return fo
}
mpeg2source("D:\weird_clips\eva.d2v",idct=2,cpu=0)
Telecide(FOrder(),guide=1,post=0,debug=true)
NULL.BAT
========
reg import null.reg
dbgproxy avs2avi d:\vfr\encodes\MOVIE.AVS d:\vfr\encodes\MOVIE.AVI -p 0 -c xvid 2> d:\vfr\encodes\debug1.txt
gawk -f fmatch.awk d:\vfr\encodes\debug1.txt > d:\vfr\encodes\vfr1.txt
NULL.REG
========
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\GNU\XviD]
"mode"=dword:00000006
FMATCH.AWK
==========
/Telecide/ && /using/ {gsub(/:/,"");gsub(/in-/," 1 ");gsub(/out-/," 0 ");print $3,$7}
DEBUG1.TXT OUTPUT
=================
!Telecide: frame 37: matches: 187069 209091 205427
!Telecide: frame 37: [using n] [in-pattern]
!Telecide: frame 38: matches: 205427 215163 186466
!Telecide: frame 38: [using n] [in-pattern]
VFR1.TXT OUTPUT
===============
21 1
22 1
23 0
24 0
25 1
It would help me to define ranges for VFR Matroska encodings.
Example (Star Trek TNG Hybrid output):
http://forum.doom9.org/showthread.php?s=&postid=395247#post395247
288 0
289 0
290 0
291 0
292 0
293 0
294 1
295 0
296 0
297 1
298 1
299 1
300 1
301 1
302 1
303 1
304 1
The only change that happens is this one. So it's easy.
# timecode format v1
Assume 23.976
0,297,29.97
OR
# timecode format v1
Assume 29.97
297,0,23.976 (I don't know if it accepts 0 as the end, but it's just an example)
But it's not that easy on anime. There are lots of duplicates and with problematic sources like Neo Genesis Evangelion (would like to have an Excel Saga sample myself :) ) things like this come around:
1710 0
1711 1
1712 1
1713 0
1714 0
1715 0
1716 0
1717 0
1718 0
1719 0
1720 0
1721 0
1722 0
1723 0
1724 1
1725 0
1726 1
1727 1
1728 0
1729 1
1730 1
1731 1
1732 0
1733 1
1734 1
1735 1
1736 0
1737 1
1738 1
1739 1
1740 1
1741 1
1742 1
1743 0
1744 1
1745 0
1746 0
1747 0
1748 1
1749 1
1750 1
1751 1
1752 1
1753 0
1754 1
1755 0
1756 0
1757 0
1758 0
1759 0
1760 0
1761 1
1762 1
1763 1
1764 1
1765 1
1766 1
1767 1
1768 1
1769 1
1770 1
1771 1
1772 0
1773 1
1774 1
1775 0
1776 1
1777 1
1778 1
1779 1
1780 1
1781 1
1782 1
1783 1
1784 1
1785 1
1786 1
1787 1
1788 1
1789 0
1790 0
1791 0
1792 0
1793 0
And how do you establish a pattern on that?
I was thinking about a minimum of 10 consecutive 0s or 1s to decide if a frame range belongs or not to a pattern.
Would like your opinion. Due to the nature of anime, full of duplicates and weird productions, I'm wondering about the ways of improvement (that don't require manual processing).
Sorry for the very long post.
Bilu