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 > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st July 2013, 03:35   #21  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Quote:
Originally Posted by real.finder View Post
hi, first thank you for wonderful macros

I wonder if you could made macro that create x264 qpfile from the mkv chapters with support v1 & v2 timecodes and cfr too
Here's a demo (actually just a quickly modified 'Insert Trims from Matroska chapter file'). Not really what you ask for, because:
  • Only CFR
  • May not work properly for some ordered chapters or editions
Is it worth to make a better version? I'm sure you already know that vfr.py can create a qpfile at the same time as the chapter file.

Last edited by vdcrim; 3rd July 2013 at 12:56. Reason: updated link to the final version
vdcrim is offline   Reply With Quote
Old 1st July 2013, 05:18   #22  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
thank you for demo

Quote:
I'm sure you already know that vfr.py can create a qpfile at the same time as the chapter file.
yes, I know that, but the vfr.py create it from trims only.

And the author said: "Conversion from a different input fps to output fps is not accurate"

and I'm working on a lot of sources, most of them have output fps =\= input fps (Whether vfr or cfr)

So I think I can create the chapter by vfr.py and then convert the chapter to qpfile

Because whatever the input fps different from the output fps, the chapter is Time Stats

So when I convert it to qpfile, I can choose the new fps for new video as I want


Thank you in advance

Last edited by real.finder; 1st July 2013 at 05:20.
real.finder is offline   Reply With Quote
Old 2nd July 2013, 03:25   #23  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
From what I see the frame numbers are corrected before writing them to the qpfile when the output fps is different from the input. That means that vfr.py and the macro above should produce the same result if all is correct.

To avoid that possible inaccuracy the readme talks about you can instead add a new line of contiguous Trims at the bottom of the script, and then use the --ofps value as --fps and drop the former from the command line, and add --reverse as well.

Last edited by vdcrim; 2nd July 2013 at 03:28.
vdcrim is offline   Reply With Quote
Old 2nd July 2013, 09:00   #24  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I see, so I have to write new trims line after the new fps

In this case it will not differentiate much than I wrote qpfile manually

Also, vfr.py work from the trims only, it is not convert chapter to qpfile

anyway, thank you
real.finder is offline   Reply With Quote
Old 2nd July 2013, 13:13   #25  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Quote:
Originally Posted by real.finder View Post
I see, so I have to write new trims line after the new fps

In this case it will not differentiate much than I wrote qpfile manually

Also, vfr.py work from the trims only, it is not convert chapter to qpfile

anyway, thank you
I've never used vfr.py's fps convertion option and can't really talk about its possible inaccuracy, but anyway as the chapter file and the qpfile are created from the same corrected frames/times the frames in the qpfile should match the chapter starting times. If I understand well the thing that could be not completely exact is those starting times. So you would still have to write new trims anyway. Better try asking RiCON/wiiaboo about this.
vdcrim is offline   Reply With Quote
Old 2nd July 2013, 14:39   #26  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
thank you, I'll try to edit your demo myself
real.finder is offline   Reply With Quote
Old 2nd July 2013, 14:46   #27  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Quote:
Originally Posted by real.finder View Post
thank you, I'll try to edit your demo myself
What I'm saying is that a macro may not be more accurate that vfr.py's qpfile. Again, ask wiiaboo what he means by 'conversion from a different input fps to output fps is not accurate'.
vdcrim is offline   Reply With Quote
Old 2nd July 2013, 14:58   #28  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
from vfr.py Thread

"Can output a qpfile with converted frames meant to be used for an ivtc'd encode using non-ivtc'd frames (feature inspired by automkvchapters) (not completely accurate, obviously);"

and like I say, I need a chapter to qpfile converter

Because I work on sources not need to trim and have a chapter already

thank you again
real.finder is offline   Reply With Quote
Old 2nd July 2013, 15:18   #29  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Quote:
Originally Posted by real.finder View Post
from vfr.py Thread

"Can output a qpfile with converted frames meant to be used for an ivtc'd encode using non-ivtc'd frames (feature inspired by automkvchapters) (not completely accurate, obviously);"
That doesn't say from where the inaccuracy comes from. And anyway a macro would have exactly the same input data to produce a qpfile, so there's not reason to think it would be better. Again, as I don't use --ofps I can't say if vfr.py works as expected.
Quote:
and like I say, I need a chapter to qpfile converter

Because I work on sources not need to trim and have a chapter already
OK then, I'll work on it.
vdcrim is offline   Reply With Quote
Old 3rd July 2013, 01:25   #30  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Timecode support added. Try this (raw link).
vdcrim is offline   Reply With Quote
Old 3rd July 2013, 06:54   #31  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
thank you very much I'll try it
real.finder is offline   Reply With Quote
Old 3rd July 2013, 10:25   #32  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
it work great

thank you, you are life saver
real.finder is offline   Reply With Quote
Old 17th March 2014, 10:19   #33  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
hi, I have two mod

Insert Trims from bookmarks MOD (single-line).py

to make a full trims line from 1 bookmark or more

---------


QP file from Matroska chapter file (IDR).py

same as "QP file from Matroska chapter file" but the qp file will be I (IDR) instead of k, useful for open-gop, more details here

----

edit: another mod macros https://forum.doom9.org/showthread.p...49#post1770449

Last edited by real.finder; 2nd July 2017 at 04:58.
real.finder is offline   Reply With Quote
Old 18th March 2014, 00:39   #34  |  Link
vdcrim
Registered User
 
Join Date: Dec 2011
Posts: 192
Quote:
QP file from Matroska chapter file (IDR).py

same as "QP file from Matroska chapter file" but the qp file will be I (IDR) instead of k, useful for open-gop, more details here
i-frames with recovery point SEI (that your link shows that K uses for open-gop) should be seekable as well. Did you misread somewhere or did you really notice artifacts when using K instead of I?
vdcrim is offline   Reply With Quote
Old 20th March 2014, 00:48   #35  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by vdcrim View Post
i-frames with recovery point SEI (that your link shows that K uses for open-gop) should be seekable as well. Did you misread somewhere or did you really notice artifacts when using K instead of I?
I did't notice anything, but for more safety, and good place to cut without re-encoding
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 15th June 2016, 03:59   #36  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
hi

I did some edit, in "time2ms" and make "QP file from Matroska chapter file" work with mp4 chapters too, I change the name to "QP file from chapter file"

edit: added .ogm too

mod 3 for fix some float cases

github https://github.com/realfinder/AvsP-macros
Attached Files
File Type: rar mod macros.rar (7.8 KB, 144 views)
File Type: rar macros mod 2.rar (7.8 KB, 133 views)
File Type: rar macros mod 3.rar (7.8 KB, 126 views)
__________________
See My Avisynth Stuff

Last edited by real.finder; 5th March 2020 at 00:36.
real.finder is offline   Reply With Quote
Old 20th May 2018, 16:54   #37  |  Link
JudgeDredd
Registered User
 
Join Date: Apr 2018
Posts: 6
what exactly are my options for -c switch ? I tried utf-8 etc but non works
JudgeDredd is offline   Reply With Quote
Old 27th May 2021, 12:18   #38  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I did try to make this https://github.com/realfinder/AvsP-m...%20Subtitle.py

it work but sometimes it not accurate, I already try random fix but I think there are something missing, maybe peoples who has knowledge in vsfilter or libass can explain how to correctly convert subtitle time to frames

edit: I get an answer in irc.libera.chat/#libass, ceil(start timestamp in seconds * frames per second)
__________________
See My Avisynth Stuff

Last edited by real.finder; 28th May 2021 at 17:40.
real.finder is offline   Reply With Quote
Old 8th July 2023, 19:56   #39  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Matroska chapters from Trims.py update https://github.com/realfinder/AvsP-m...rom%20Trims.py

there are also some other updates in https://github.com/realfinder/AvsP-macros I didn't mention here
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 9th July 2023, 02:58   #40  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
Quote:
avsp.MsgBox(stdout, _('vfr.py rrror'))
Intentional ?
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Reply

Tags
avisynth, avsp, ordered chapters, subtitles

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 16:24.


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