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

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd March 2011, 14:48   #21  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Vfr.py 0.8.4

Bug fix:
- Last commit wasn't doing anything (thanks, Daemon404)

New feature:
- Use --identify-for-mmg to get SBR AAC and first Track ID information
This suppresses both the "lack of --aac-is-sbr" and "wrong track ID for --sync if the first track of the file was 1" warnings.

In case mkvmerge doesn't detect SBR automatically I also left --sbr so this option can be manually activated.

Last edited by RiCON; 2nd March 2011 at 15:42.
RiCON is offline   Reply With Quote
Old 2nd March 2011, 16:16   #22  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Vfr.py 0.8.4.1

New feature:
- Add --delay so it can be manually set (also suggested by Daemon404)
RiCON is offline   Reply With Quote
Old 30th May 2011, 13:53   #23  |  Link
mastrboy
Registered User
 
Join Date: Sep 2008
Posts: 365
How do i use the template system for chapters? (I'm trying to create ordered chapters with Prologue,OP,Main,ED where OP and ED is in separate files)
mastrboy is offline   Reply With Quote
Old 25th June 2011, 16:08   #24  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
The syntax is based on Daiz's AutoMKVChapters.

For the added features, you have an example file in the git repo.
RiCON is offline   Reply With Quote
Old 22nd July 2011, 23:36   #25  |  Link
AzraelNewtype
Registered User
 
AzraelNewtype's Avatar
 
Join Date: Oct 2007
Posts: 135
For some reason, I can't get this to work with two linked files.

Template is as follows:

Code:
[edition1]
default=1
ordered=1
chapters=5
1name=Opening
1start=00:00:00.000000000
1end=00:00:59.518
1suid=231527a5c7449f62e6c231154fdcf487
2name=Part A
2chapter=1
3name=Part B
3chapter=2
4name=Credits
4start=00:00:00.000000000
4end=00:01:29.965000000
4suid=8bceb5a7ecdfa7914e03fcc30316fc6
5name=Preview
5chapter=3
If I don't explicitly give 4start and 4end, it takes the values from the opening video. Even with 4suid explicitly given, it uses 1suid. I tried it at first by linking to the files, and it was the same behavior, leading to this method. Copying the SUIDs with the 0xs intact (as it works in AutoMKVchapters) causes the output to just not link to external files at all, though this is obviously super easy to work around.

Any ideas?
AzraelNewtype is offline   Reply With Quote
Old 26th July 2011, 03:17   #26  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
I'll look into it tomorrow.
RiCON is offline   Reply With Quote
Old 26th July 2011, 16:59   #27  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Vfr.py 0.8.4.3

- Fix a couple regressions
- Updated readme
- Fix bug if chapter SUID was uppercase
- Omit a few tags if they're default in Matroska Chapter Spec (EditionFlag[Hidden,Default,Ordered]=0, ChapterLanguage=eng)
- Fixed a bug where vfr.py would override the template's inputfps option; templates.py and vfr.py -t output should be identical now.

@Azrael
Not sure about that bug. Couldn't reproduce it exactly like you said except with uppercase SUID. Try with this latest version and let me know if it's fixed or not.

I tried with the following syntax:
0xa0 0xef 0xdb 0xaa 0x2e 0x38 0x4d 0x8f 0x81 0x29 0xc8 0x17 0x4a 0x32 0x89 0x33
0XA0 0XEF 0XDB 0XAA 0X2E 0X38 0X4D 0X8F 0X81 0X29 0XC8 0X17 0X4A 0X32 0X89 0X33
0XA0EFDBAA2E384D8F8129C8174A328933
A0EFDBAA2E384D8F8129C8174A328933
0xa0efdbaa2e384d8f8129c8174a328933
a0efdbaa2e384d8f8129c8174a328933

And they all workedforme(tm)

Last edited by RiCON; 26th July 2011 at 17:04.
RiCON is offline   Reply With Quote
Old 30th July 2011, 12:10   #28  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Vfr.py 0.8.4.4

- Fix bug in programming logic
If templates.py couldn't find an MKV with the same SUID in the template, it would use the last SUID it looked for in the current directory.
- Improve SUID handling performance
Only scan the current directory for SUIDs *once* instead of every time there was an SUID in the template.
- Fix regression

@Azrael
Your problem should be fixed now.

Last edited by RiCON; 30th July 2011 at 12:19. Reason: Quick fix
RiCON is offline   Reply With Quote
Old 21st December 2011, 01:47   #29  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Thanks for this tool. I've recently started to use it and found some issues, mostly related to templates, so I've made a few fixes:
  • Fixed broken code related to specifying a path as the SUID.
  • Don't normalize SUID value before checking if it's in fact a path.
  • If a custom path is set for mkvmerge, mkvinfo is now expected to be in the same directory.
  • Include the input Avisynth script directory when searching for the given hex SUID in files.
  • Fixed using mkvinfo in a non-english locale.
  • Small change in the mkvinfo regular expression due to a bug in mkvtoolnix v5.1.0 (already fixed).
  • FPS/timecode CLI parameter now overrides template FPS/timecode (useful for VFR videos).
  • Decode the output of 'mkvmerge --identify audio_file' with the system encoding, as mkvmerge uses that.
  • Allow the option to parse the avs from bottom to top (flag in the first lines of vfr.py).
[Fix removed, changes incorporated in Vfr.py 0.8.6.1]

Last edited by vdcrim; 27th January 2012 at 20:18. Reason: fix removed
vdcrim is offline   Reply With Quote
Old 30th December 2011, 01:02   #30  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
One more fix: Ordered Chapters were one frame short.

[Fix removed, changes incorporated in Vfr.py 0.8.6.1]

Also, I've made a AvsP macro for vfr.py:
http://forum.doom9.org/showthread.php?t=163653

Last edited by vdcrim; 27th January 2012 at 20:18. Reason: fix removed
vdcrim is offline   Reply With Quote
Old 9th January 2012, 01:09   #31  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Another fix, hopefully the last one:
· Last chapter's end time wasn't always accurate when using ordered chapters + timecode.

[Fix removed, changes incorporated in Vfr.py 0.8.6.1]

Last edited by vdcrim; 27th January 2012 at 20:18. Reason: fix removed
vdcrim is offline   Reply With Quote
Old 26th January 2012, 19:06   #32  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Vfr.py 0.8.6.1
Fixes by lachs0r:
- Fix shebangs
- Remove deprecated use of % operator, fix incorrect use of subprocess.call and subprocess.check_output
- Fix mergeCmd and some string formatting

- Working --label support when using templates

Fixes and features by vdcrim:
- Add -b/--reverse to enable bottom to top parsing of .avs
- Decode the output of 'mkvmerge --identify audio_file' with the system encoding
- Fixed broken code related to specifying a path as the SUID
- Don't normalize SUID value before checking if it's in fact a path
- If a custom path is set for mkvmerge, mkvinfo is now expected to be in the same directory
- Small change in the mkvinfo regular expression due to a bug in mkvtoolnix v5.1.0
- Allow vfr.py -f to override template's inputfps
- Last chapter's end time wasn't always accurate when using ordered chapters + timecode
- Ordered Chapters were one frame short (ChapterEndTime is now equivalent to the next chapter's ChapterStartTime)

Coming next: Support for non-positive trims.

Many thanks to lachs0r and vdcrim <3
RiCON is offline   Reply With Quote
Old 26th January 2012, 23:56   #33  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Quote:
Originally Posted by RiCON View Post
Coming next: Support for non-positive trims.

Many thanks to lachs0r and vdcrim <3
Thanks to you. Glad to see that you keep updating this script. It seems you missed the ifps parameter in this call though (vfr.py):
Code:
chaps = amkvc(o.template,output=output,avs=a[0],trims=Trims2ts,kframes=Trims2,uid=o.uid,label=o.label,ifps=ifps)
Also, I noticed a bug affecting the default name of chapters and editions:
Code:
self.name = 'Default'
self.name = 'Chapter'
should be:
Code:
self.name = ['Default']
self.name = ['Chapter']
I have a feature request. Currently the label functionality is based on the case of "trim" (Avisynth is case-insensitive). It would be more useful that "label" were a comment at the end of the line. I made it this way in this script, so take a look if you want, if you decide to implement this.

It could be like this:
Code:
if label.lower() == 'trim'  =>  old label behaviour
else                        =>  new label behaviour
vdcrim is offline   Reply With Quote
Old 27th January 2012, 05:12   #34  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
vfr.py 0.8.7

- Added missing ifps argument to vfr.py
- Correct minor bug in templates.py default names

- Add support for non-positive trims
Trim(100,-100) should be equivalent to Trim(100,199) and Trim(100,0) is understood as "no more need for ChapterEndTime and more audio cuts".
- Add support for matching lines with a comment succeeding the trims matching LABEL instead of just a specific-cased Trim

Again, many thanks, vdcrim.

I'm not adding as much stuff as I used to because I've been busy playing LoL and not been very busy working with video that much. And I feel that, other than the code being very ugly and maybe not very efficient, it works good enough.

But patches are, of course, very welcome.

Last edited by RiCON; 27th January 2012 at 05:18.
RiCON is offline   Reply With Quote
Old 28th May 2012, 05:47   #35  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
vfr.py 0.9

- Correct bug with templates and trims ending in 0
- Fix writing output timecodes if --test is enabled
- Fix a random bug with --ofps
Might remove this feature altogether in the future since no one seems to be using it.
- Fix bug creating a useless split if trims started at frame 0

- Prefer --split parts if mkvmerge v5.6.0 is available
Result is binary identical to --split timecodes with the added bonus of temporary files not being created. -m and -r options are not needed anymore in this case, but vfr.py won't complain if they're used anyway.
RiCON is offline   Reply With Quote
Old 13th January 2013, 08:31   #36  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
first, thank you so much for vfr.py

Anyone who is interested, I found GUI for vfr.py and trimsubs here
real.finder is offline   Reply With Quote
Old 17th March 2014, 10:24   #37  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
hi

I have an edition to add --IDR option to make qp file with I (IDR) instead of k, here

it useful for open-gop, more details here
real.finder is offline   Reply With Quote
Old 10th February 2015, 02:44   #38  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Just saw the post today, sorry for the delay. Added the change now.
RiCON is offline   Reply With Quote
Old 12th February 2018, 23:11   #39  |  Link
FortMax
Registered User
 
Join Date: Oct 2011
Posts: 10
vfr.py no longer works as of mkvtoolnix 20.0.0, due to several commands used by vfr.py being removed. Any plans to get it updated?
FortMax is offline   Reply With Quote
Old 13th February 2018, 00:21   #40  |  Link
RiCON
Registered User
 
RiCON's Avatar
 
Join Date: Jan 2004
Posts: 69
Probably fixed, if it was just --identify-for-mmg being missing.
RiCON is offline   Reply With Quote
Reply

Tags
chapters, helper script, python, vfr

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 15:29.


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