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 > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th June 2022, 11:53   #21  |  Link
rbauer
Registered User
 
Join Date: Sep 2010
Posts: 29
Quote:
Originally Posted by clsid View Post
That is written very clearly in the changelog of the player.
Do you mean this?
"Now supports loading chapter metadata from .xchp file. Use text file (UTF-8 encoding). Each line is a chapter defined as HH:MM:SS,ddd timecode, optionally followed by a space and chapter name."

If "yes", I had already read it but it is not at all clear:

1) Do I need to manually create the xchp file (I can't find any command to create it within Mpc)?
2) I tried to create it manually, with the same name as the video file, but it is not seen within Mpc (e.g. in "Add to Favorites...").
3) In all cases where I have tried (I'm using the default configuration of Mpc 1.9.21.38; I tried with last stable release also), "Chapter Menu" (in Navigate menu) is ALWAYS disabled.
4) Do I have to manually create a chapter entry (via text editor, "masochism mode" ) in the xcph file?

"Very clear"? Yeah, for sure.

rbauer is offline   Reply With Quote
Old 11th June 2022, 12:24   #22  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,512
Code:
00:00:10,000 chapter1
00:00:20,000 chapter2
Put in .xchp file with same name as video.
It gets loaded automatically.

You are doing something wrong, like using a dot instead of a comma.
__________________
MPC-HC 1.9.23
clsid is offline   Reply With Quote
Old 11th June 2022, 14:10   #23  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
Might be a little more friendly if chapter file parser accepted both '.' and ',' as fractional second separator.

',' separator looks quite alien to many, including myself,
So long as chapter parser code is MPC-HC native and not some other included lib, should be quite trivial to mod it,
also avoid any related confusion and having to answer posts about it.
__________________
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; 11th June 2022 at 14:30.
StainlessS is offline   Reply With Quote
Old 11th June 2022, 15:29   #24  |  Link
v0lt
Registered User
 
Join Date: Dec 2008
Posts: 1,733
Quote:
Originally Posted by StainlessS View Post
',' separator looks quite alien to many, including myself
As far as I understand, time formatting is used as in SubRip. This is the most popular format for simple subtitles.
v0lt is offline   Reply With Quote
Old 11th June 2022, 15:53   #25  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
Yes, I just checked some SubRip times and as you say, is comma separated,
interestingly, Subtitle Edit shows the same subtitles with silent conversion to period separator.
If it is an easy parser fix, then would save some confusion. EDIT: With no downside.
__________________
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; 11th June 2022 at 15:56.
StainlessS is offline   Reply With Quote
Old 11th June 2022, 17:32   #26  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,512
I am not going to allow that. The formatting is clearly defined.
__________________
MPC-HC 1.9.23
clsid is offline   Reply With Quote
Old 11th June 2022, 19:36   #27  |  Link
rbauer
Registered User
 
Join Date: Sep 2010
Posts: 29
Quote:
Originally Posted by clsid View Post
Code:
00:00:10,000 chapter1
00:00:20,000 chapter2
Put in .xchp file with same name as video.
It gets loaded automatically.

You are doing something wrong, like using a dot instead of a comma.
So It's number 4 (manually create a chapter entry in the xcph file)

Any keyboard shortcut to switch between chapters while playing the video?


Last edited by rbauer; 11th June 2022 at 19:51.
rbauer is offline   Reply With Quote
Old 11th June 2022, 20:51   #28  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
rbauer,

Perhaps of use,
This converts Chapter info extracted from eg MKV via MediaInfo and pasted into txt file ===>>> an xchp file with MediaInfo PERIOD separator changed to COMMA.
ConvMiTxtToMpcHcChap.avsi [Avisynth Script]
Code:
# ConvMiTxtToMpcHcChap.avsi
# Converts MediaInfo Chapter info in txt file, to MediaPlayerClassic-Home Cinema *.xchp style.
# Requires AVS+, and RT_Stats v2.0 Beta13+

Function ConvMiTxtToMpcHcChap(String txtfile,String "chapfile") {
    myName = "ConvMiTxtToMpcHcChap: "
    Assert(txtfile!="",RT_String("%stxtfile path required",myName))
    txtfile = txtfile.RT_GetFullPathName
    Assert(Txtfile.Exist,RT_String("%stxtfile Does not Exist",myName))
    ChapFile = Default(chapfile,txtFile.RT_FilenameSplit(7) + ".xchp")                  # Default, Change txtFile extension to ".xchp")
    RT_FileDelete(chapfile)
    SIN=RT_ReadTxtFromFile(txtfile)
    LINES = SIN.RT_TxtQueryLines
    for(i=0,LINES-1){
        S = SIN.RT_TxtGetLine(Line=i).ChrEatWhite.RevStr.ChrEatWhite.RevStr             # Get Line of text, remove EOL and Eat leading & trailing White Space.
        if(S.FindStr(".")==9) {
            S = S.LeftStr(8) + "," + S.MidStr(10)                                       # Replace 9th PERIOD char with COMMA char.
        }
        RT_WriteFile(chapfile,"%s",S,Append=True)
    }
    return 0
}

# Import(".\ConvMiTxtToMpcHcChap.avsi")
# Client Script

textFile  = ".\Test.txt"

ConvMiTxtToMpcHcChap(textfile)

Return MessageClip("DONE")
aint nuttin special, just changes 9th character of each line to COMMA.

Test.txt, [source (copy/Paste) from MediaInfo]
Code:
00:00:00.000                             : en:Chapter 01
00:03:22.285                             : en:Chapter 02
00:10:15.156                             : en:Chapter 03
00:15:24.214                             : en:Chapter 04
00:18:25.187                             : en:Chapter 05
00:21:58.817                             : en:Chapter 06
00:24:52.157                             : en:Chapter 07
00:29:17.130                             : en:Chapter 08
00:32:01.085                             : en:Chapter 09
00:34:45.541                             : en:Chapter 10
00:40:08.030                             : en:Chapter 11
00:42:48.232                             : en:Chapter 12
00:47:50.075                             : en:Chapter 13
00:51:12.736                             : en:Chapter 14
00:58:03.104                             : en:Chapter 15
01:01:41.614                             : en:Chapter 16
01:04:24.944                             : en:Chapter 17
01:08:54.255                             : en:Chapter 18
01:11:53.726                             : en:Chapter 19
01:16:33.505                             : en:Chapter 20
01:22:05.503                             : en:Chapter 21
01:26:19.716                             : en:Chapter 22
01:37:47.653                             : en:Chapter 23
01:44:36.270                             : en:Chapter 24
01:50:38.048                             : en:Chapter 25
01:53:22.670                             : en:Chapter 26
01:59:17.441                             : en:Chapter 27
02:03:50.756                             : en:Chapter 28
02:07:32.353                             : en:Chapter 29
02:14:24.389                             : en:Chapter 30
02:20:48.565                             : en:Chapter 31
02:23:11.833                             : en:Chapter 32
Test.xchp [output for Mpc-hc OR Mpc-Be]
Code:
00:00:00,000                             : en:Chapter 01
00:03:22,285                             : en:Chapter 02
00:10:15,156                             : en:Chapter 03
00:15:24,214                             : en:Chapter 04
00:18:25,187                             : en:Chapter 05
00:21:58,817                             : en:Chapter 06
00:24:52,157                             : en:Chapter 07
00:29:17,130                             : en:Chapter 08
00:32:01,085                             : en:Chapter 09
00:34:45,541                             : en:Chapter 10
00:40:08,030                             : en:Chapter 11
00:42:48,232                             : en:Chapter 12
00:47:50,075                             : en:Chapter 13
00:51:12,736                             : en:Chapter 14
00:58:03,104                             : en:Chapter 15
01:01:41,614                             : en:Chapter 16
01:04:24,944                             : en:Chapter 17
01:08:54,255                             : en:Chapter 18
01:11:53,726                             : en:Chapter 19
01:16:33,505                             : en:Chapter 20
01:22:05,503                             : en:Chapter 21
01:26:19,716                             : en:Chapter 22
01:37:47,653                             : en:Chapter 23
01:44:36,270                             : en:Chapter 24
01:50:38,048                             : en:Chapter 25
01:53:22,670                             : en:Chapter 26
01:59:17,441                             : en:Chapter 27
02:03:50,756                             : en:Chapter 28
02:07:32,353                             : en:Chapter 29
02:14:24,389                             : en:Chapter 30
02:20:48,565                             : en:Chapter 31
02:23:11,833                             : en:Chapter 32
EDIT: Mpc-Hc, Page Up and Page Down go to Previous and Next chapters.
EDIT: 1st Chapter at 00:00:00 [does not seem to show fractional seconds]


EDIT: Does NOT seem to cause problems if you just use the PERIOD separated text copy/pasted from MediaInfo,
MPC-HC Probably just ignores Period separated fractional seconds.
So, Maybe just Copy/Paste from MediaInfo and use that text file, WITHOUT using this script, I doubt that fractional seconds are that important anyway.
__________________
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; 11th June 2022 at 21:24.
StainlessS is offline   Reply With Quote
Old 12th June 2022, 05:55   #29  |  Link
v0lt
Registered User
 
Join Date: Dec 2008
Posts: 1,733
Is the .xcph file format documented somewhere? Is this a well-known format or a special format of the MPC-HC project?
v0lt is offline   Reply With Quote
Old 12th June 2022, 06:53   #30  |  Link
rbauer
Registered User
 
Join Date: Sep 2010
Posts: 29
Quote:
Originally Posted by StainlessS View Post
rbauer,

Perhaps of use,
This converts Chapter info extracted from eg MKV via MediaInfo and pasted into txt file ===>>> an xchp file with MediaInfo PERIOD separator changed to COMMA.
Thanks StainlessS but my need is different.

I study on video lessons, so my need is to tag the various most important points; example using potplayer:

1) Open video file "videolesson1.mp4"
2) During its playback, when I find an important point I press "p" ("Add bookmark") to mark its time and this will automatically create the pbf file (with the same name as the video file, so videolesson1.pbf) with its time information inside it.
3) Ctrl+PgUp and Ctrl+PgDown to move from chapter/bookmark to chapter/bookmark while the video is playing.

Done!

I would like to stop using potpl, but this need of mine makes the task very difficult for me.

rbauer is offline   Reply With Quote
Old 12th June 2022, 10:43   #31  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
rB,
Does something like this sound OK:- https://forum.doom9.org/showthread.php?t=173010

Assuming I can get it working OK, would use VirtualDub2 + Windows NotePad to create a BookMark File.
Load mp4 into VD2, scan though clip using VD2 controls, hit CTRL/INSERT to Insert Chapter into the NotePad text file.

EDIT: As it currently stands, it inserts frame numbers, should (I hope) be easy to insert time instead.
It's your job to think of a name for it
__________________
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; 12th June 2022 at 10:48.
StainlessS is offline   Reply With Quote
Old 12th June 2022, 11:31   #32  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
Yo Dude !,

See Here [ MPC-HC EDL Editor ] :- https://forum.doom9.org/showthread.php?t=173964

Might be what you want [EDL keys are in MPC...Options/Player/Keys/ and right at the end of the listbox].

I think it might be of interest [but I aint tried it].
Say if you want me to continue with the VD_Edkey clone thingy

EDIT: Alternative:- https://forum.videohelp.com/threads/...n-in-clipboard
Macro to copy Frame number from VirtualDub to notepad, maybe could be hacked for time instead.
Written by RaffRiff42 as AutoHotKey Macro [I dont speak autohotkey, and RR42 dont visit D9 for some time]
EDIT: Dont seem to be a way to copy current time to clipboard in VDub/VDub2, so above autohotkey script may not be hackable.
__________________
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; 12th June 2022 at 12:34.
StainlessS is offline   Reply With Quote
Old 12th June 2022, 15:26   #33  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
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
Old 12th June 2022, 16:26   #34  |  Link
rbauer
Registered User
 
Join Date: Sep 2010
Posts: 29
Quote:
Originally Posted by StainlessS View Post
Yo Dude !,

See Here [ MPC-HC EDL Editor ] :- https://forum.doom9.org/showthread.php?t=173964

Might be what you want [EDL keys are in MPC...Options/Player/Keys/ and right at the end of the listbox].

I think it might be of interest [but I aint tried it].
I'll try with that (or unfortunately I will have to stay with potplayer) 'cause I'm too noob to venture with more complicated/tortuous solutions (but maybe I'll try when I have more time, now I have to study for exams).

Many thanks.

Last edited by rbauer; 12th June 2022 at 16:30.
rbauer is offline   Reply With Quote
Old 13th June 2022, 19:42   #35  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,262
Thread linked in post #33 updated, to v0.01, supports optional chapter title.

Optionally with Chapter title. [below eg, user prompted for title "Minute 6"]
Code:
00:00:00,000 Minute 0
00:01:00,000 Minute 1
00:02:00,000 Minute 2
00:03:00,000 Minute 3
00:04:00,000 Minute 4
00:05:00,000 Minute 5
00:06:00,000 Minute 6
00:07:00,000 Minute 7
00:08:00,000 Minute 8
00:09:00,000 Minute 9
00:10:00,000 Minute 10
00:34:38,000 Sometime
01:33:46,000 somewhere

EDIT:
Quote:
I'm too noob to venture with more complicated/tortuous solutions
Is real easy, in same directory as eg MovieName.mp4, create MovieName.xchp and open it in NotePad (OpenWith),
Open MovieName.mp4 in VirtualDub2, run VD_EdChap.Exe.
NotePad needs a little screen space to view a couple of lines of text, VDub2 can have the rest, and you are good to go.
30 seconds of preparation at most really.

When you're done, just play the MovieName.mp4 in MPC-HC, will auto load the MovieName.xchp and you can skip back and forth
as much as you like with PageUp/PageDwn.

In MPC-HC, both time and title are shown for a few seconds when joyfully skipping about.
__________________
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:32.
StainlessS is offline   Reply With Quote
Reply

Tags
pause, paused, potplayer

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 13:58.


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