View Single Post
Old 12th June 2022, 15:26   #33  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Here see VD_EdChap - Make Chapter list using VDub2:- https://forum.doom9.org/showthread.php?t=184191

Quote:
Originally Posted by StainlessS View Post
VD_EdChap - Make Chapter list using VDub2

Code:
VD_EdChap v0.01 for VirtualDub2.  By StainlessS @ Doom9:- https://forum.doom9.org/showthread.php?t=184191

VD_EdChap, intended to assist in creating Chapter/BookMark time files.

Requirements:
    VirtualDub2 x86 or x64, build 44282 or higher. [VirtualDub Standard or VirtualDubMod are non suitable].
    Windows NotePad [will not work where windows system NotePad replaced with some other editor via some registry hack].

On running VD_EdChap, it will present a GUI dialog box with options,
    FractionSeparatorIsPeriod: Unticked=0=COMMA : Ticked=1=PERIOD (Default non exisitng ini=0)  # Written Time fractional seconds separator.
    WriteChapterTitles:        Unticked=0=No    : Ticked=1=Yes    (Default non exisitng ini=0)  # 1 will ask user to input title for each Chapter.

    After clicking OK on above mentioned GUI dialog, it will become invisible but watching and waiting for key presses when VDub2 is in the foreground.
    You can call up the Hot GUI again later(CTRL/PAUSE or CTRL/HOME), if you eg maybe later decide to write chapter titles [Affects only chapters written AFTERWARDS].
    If a VD_EdChap.Ini file does not exist in same directory as VD_EdChap.exe then it will be created, and will be updated whenever the GUI is closed.

    After Initial closure of the VD_Edkey GUI, if NotePad is not running, it will be started up for you, you can save to a filename then, Or, will be prompted
    for a filename when writing the first chapter. VirtualDub2 is not auto started.

Usage,
  You can scroll through a video clip in VDub2, and press CTRL/INSERT to insert the current frame time into the NotePad window at current NotePad cursor position,
  if opted for in GUI will also prompt user for a chapter title, which will also be written, and then a NewLine will also be written moving the cursor down 1 line,
  and the NotePad file will be flushed to disk [Asking for Filename if not previously named/saved].
  You can use the CTRL/PAUSE (or alternative CTRL/HOME) key combo at anytime to bring up the Hot GUi, but VDub2 must be the foreground window when using the CTRL/INSERT combo to insert
  the current VDub2 time into the NotePad window.


VD_EdChap Keyboard commands:-
    CTRL/INSERT          ::: Insert Chapter into NotePad window using current Vdub2 time. (NotePad must be visible, and VDub2 the active window)
    CTRL/PAUSE           ::: Hot GUi
    CTRL/HOME            :::   Alternative Hot GUI {Some keyboards may not have both sets of Hot GUI keys}
    CTRL+SHIFT+ALT+PAUSE ::: Terminate VD_EdChap Program (or close via System Tray icon). PAUSE is also known as BREAK, usually next to Scroll Lock.
    CTRL+END             :::   Alternative VD_EdChap Terminate Program.

###########################################################################################

NOTES::

VDub2 opens most video files just fine, does not have to be *.AVI.

VDub2 must be stopped when you press CTRL/INSERT, else it will not be able to write a chapter into NotePad file [SPACE bar both starts and stops VDub2 play].

It is important to NOT do any VirtualDub2 clip editing, if you eg delete a frame in VirtualDub2, then all frames after that frame will
be off by 1, and so all VD_EdChap times inserted later into NotePad file will be also off by 1 frame.

MPC-HC, auto loads *.xchp files of same base name as movie file, so perhaps create empty MovieName.txt or MovieName.xchp in NotePad, and VD_EdChap will use that
instance of Notepad instead of auto running the NotePad app.

It is easy to see what is happening as the NotePad window will be visible and after each insertion into NotePad, an ENTER key
will also be sent to move the cursor down one line, each chapter is on its own line. If you make a mistake, it is easy to
just switch to NotePad window and delete the erroneous line.

Chapters are inserted at the current NotePad position, so you can go back and insert chapters earlier in the notepad file.

Its lovely to have a 2nd monitor for the NotePad window (if your graphics card supports), my Number 1 machine has a 19" 4:3 HP monitor that cost me £1.50 2nd hand (used) but in perfect
condition, nobody wants them anymore, HeHeHe!. My No 2 m/c has similar 19" but cost a bit more some time ago.
[2nd monitor is 'the dogs bollocks' for showing Debug Info via DebugView (google)] [EDIT: 'The Dogs Bollocks', Taste so good, you can't stop licking them :) ]

MPC-HC does order *.xchp chapters when loading, so they do not have to be in exact order already.
MPC-HC, PageUp, and PageDown, jump through the chapters.

If your system is configured to open txt files via some other text editor (Open With), thats OK [We though MUST still use Windows STANDARD NotePad], only is problem when it is NOT possible to
to execute system NotePad at all because of registry hack where opens some other editor [we need original NotePad.Exe name and also must have exact same control names and instances used inside of the executable].

NotePad2 (well one of the editors called NotePad2) is one of those that can be installed to totally replace system NotePad, if you do a few edits  (4 lines) near beginning of the source, you can re-compile and it should work
OK with that hacked editor.

###########################################################################################

VD_EdChap.Ini file format (Defaults as set when creating New ini file :: Comments following '#' exist in this readme file only, not in the ini file.)
    >>>>>------------------->>>
    [Default]
    FractionSeparatorIsPeriod=0      # Time format for Fractional Seconds, 0=COMMA(,) 1=PERIOD(.)
    WriteChapterTitles=0             # Prompt user for, and write Chapter title, 0=No, 1=Yes.
    <<<-------------------<<<<<
###########################################################################################

AutoiIt compiled executable with source provided, just click Menu Tools/build to create executable (In Scite4AutoIt3 editor).
Requires AutoIt3 and  Scite4AutoIt3 editor to re-build executable. 

ssS
Only produces time list, no chapter title.
You can load your MP4 into VDub2, scan though, stop and press CTRL/INSERT to write frame time to a NotePad file.

EDIT: Thread at above link updated, now supports optional chapter title. Above quoted text updated.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 13th June 2022 at 20:33. Reason: Updated
StainlessS is offline   Reply With Quote