Official BS.Player forums  

Go Back   Official BS.Player forums > Main forum > Feature Requests, Feedback And Suggestions

Feature Requests, Feedback And Suggestions Post your suggestions and feature requests here, what would you like to use in BS.Player. Any feedback is appreciated and will be reviewed by our team.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 29th June 2005
Junior Member
BS.player Regular User
 
Join Date: Jun 2005
Location: Poland
Posts: 12
Rep Power: 0
sewix is an unknown quantity at this point
Default New tag in subtitles

Letter "/" on begin of line does italics.......

{444}{494}/Example text|/Example text2

on monitor:

Example text
Example text2

I'am from poland this tag("/") is used in many subtitles.
Reply With Quote
  #2 (permalink)  
Old 30th June 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

I think that if you are able, you can write your own plugin that searches the subtitle's lines for "/" characters and then replaces them with (and appends at the end of the line the set of chars).

Take a look at the SDK folder in your BSplayer directory to have more info!

If you can't program your plugin maybe RafkeP would, but I don't know if he has time at the moment
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #3 (permalink)  
Old 30th June 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

Sorry, since it's a MicroDVD format you simply have to change the "/" character with "{y:i}" string
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #4 (permalink)  
Old 30th June 2005
Junior Member
BS.player Regular User
 
Join Date: Jun 2005
Location: Poland
Posts: 12
Rep Power: 0
sewix is an unknown quantity at this point
Default

I now. I change the "/" character with "{y:i}" string......but this is torture doing this every time. Please add this tag in new build of BSPlayer.
Reply With Quote
  #5 (permalink)  
Old 30th June 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

If (when) RafkeP read this post, please tell if you can create a plugin to convert "/" chars at the begin of MicroDVD subtitles lines to "{y:i}"...

I think that not only sewix have this problem if that type of subtitles is so popular in Poland, so if you Rafke (I don't have time at the moment and I am leeeeeess skilled than Rafke in C++ programming) can, make it a try..
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #6 (permalink)  
Old 1st July 2005
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

Somebody called me? :D

Damn you Tizio: I was going to take it easy on the creation of plugins, but now you made me curious if it's possible.
Now I just have to try this or I won't be able to sleep! :?

Sewix, I can't promise anything, but I will check what's possible with the SDK (as soon as I find some time).

Can you send me a sample subtitle file so I have something to work with?
(you see my nick and I live at hotmail.com )

I guess it will be easier for the BSplayer team to add the new tag or to do a "find/replace all" in notepad, but I like a challenge :lol:

RafkeP
Reply With Quote
  #7 (permalink)  
Old 1st July 2005
Junior Member
BS.player Regular User
 
Join Date: Jun 2005
Location: Poland
Posts: 12
Rep Power: 0
sewix is an unknown quantity at this point
Default

OK! I send you sample subtitle.

But not all "/" character must be replace... only begin on line....

example:

{1325}{1448}/sample text in italics!|/sample text in italics!
{1625}{1757}this text is not italics: 2/3 people on earth is starve!!!
{1900}{1984}sample text not italics

Sorry for me english :oops:
Reply With Quote
  #8 (permalink)  
Old 1st July 2005
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

OK, I received the files and did a few tests.
It looks like this can be accomplished by a plugin.

Unfortunately I'm very busy right now so it could take some time.
I will report back when I made some progress.

Rafke P.
Reply With Quote
  #9 (permalink)  
Old 1st July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

:D Sorry (or glad 8) ) to have called you to this task

But HEY, at the moment you are the most talented (active) plugins maker for BSplayer :)

I think it's not so hard if you have familiarity with strings manipulation in C++.

I'm busy too, but if I'll find some time, I'll return to C++ programming (3years since I last programmed something in C) :roll:
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #10 (permalink)  
Old 3rd July 2005
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

Quote:
Originally Posted by Tizio
at the moment you are the most talented (active) plugins maker
Most active ... maybe
Most talented ... certainly not :D

I finished a first beta version. It's realy realy realy dirty programming so don't go spreading this yet : it's only for test purposes.

It will only work for:

-subtitles in MicroDVD format
Example: {1325}{1448}/sample text in italics!|/sample text in italics!
-movie files with 23,976 fps
-subtitles with "rsf" as extention (rename them so I don't mess with anything else)

The plugin can be donwloaded over here
It needs to be in BSplayer's plugin directory.

Let me know if this works out.

Rafke P.
Reply With Quote
  #11 (permalink)  
Old 3rd July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

:)
Hei, you've been fast!!
Maybe I will try to test it too
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #12 (permalink)  
Old 3rd July 2005
Junior Member
BS.player Regular User
 
Join Date: Jun 2005
Location: Poland
Posts: 12
Rep Power: 0
sewix is an unknown quantity at this point
Default

WOW...you are the most talented, active and...fast plugins maker :)

OK! This work properly with movie with 23,976 fps (and 25 fps!) :) but only with subtitles in MicroDVD format and as extention *.rsf :(....when i use subtitles in TMPlayer format BSPlayer show error :?.

Please do that be work with subtitles in TMPlayer format (i send you in sample2.txt) and with extention *.txt or any other.
Reply With Quote
  #13 (permalink)  
Old 4th July 2005
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

Glad to hear it's working more or less :)

I have a new theory : it works for movies both in 23,976fps as 25fps as long as the subtitles are synced to a 23,976fps version (if that makes sense).

The reason why TMPlayer isn't working, is because I haven't written a single line of code for TMPlayer format.
Before I do that I need to know how the player should know how long to display the subtitles.
According to the sample you sent me, the format looks like this :

Code:
0:00:03:/sample text in italics!|sample text not italics
0:00:10:sample text not italics
How long does the first (or any other) line need to be displayed?

Another question : can someone point me to a description of the different subtitle formats? For now I only take into account the "/" as a tag, but I guess that there are other tags too.
Reply With Quote
  #14 (permalink)  
Old 4th July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

Hi Rafke!
I think TMPlayer's subtitles don't have an End time.
In this case BSplayer assumes as max subtitle duration the value setted in Subtitles section in Preferences window.

The problem is that with a plugin you have to tell BSplayer the Start time, and also the End time...

What does appen when you put 0 as End time, or the same time for both Start and End??

For a description of the different subtitles format I think you have to search the web for every single subtitle format (unless someone will post here a link to all the tags), I used SubRip to convert .srt format to MicroDVD format to know which is the italic tag for it ({y:i}), since I knew that SubRip has as italic tag.
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #15 (permalink)  
Old 4th July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

If my suggestion to use 0 as End time or the same time for both Start and End doesn't work, I think you can use 6000 ms, since sewix has this value setted in his options: Bug in subtitles

As an alternative, you can put in your plugin a Configuration window with a textbox in which the user can set the preferred value

P.S. Maybe if you do this way, also sewix's problem will be fixed with your plugin :)
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #16 (permalink)  
Old 4th July 2005
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

Thanks for the tips Tizio.

I'm going to try it with a value of 0 and if it doesn't work out I will put the endtime on starttime + 60 seconds. In that way the max subtitle duration should kick in.

I already did a few searches for subtitle formats, but they always lead me to tools. Almost never to descriptions :?
Checking with Subrip sounds like a good idea.
Reply With Quote
  #17 (permalink)  
Old 4th July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

I made some search too before posting you that, but to me too the results were "useless"...

Quote:
Originally Posted by RafkeP
I'm going to try it with a value of 0 and if it doesn't work out I will put the endtime on starttime + 60 seconds. In that way the max subtitle duration should kick in.
Yes, this way all the problems should be handled by BSplayer :D

Another suggestion...
I tried your plugin with a 20fps movie, and the subtitles didn't appear at the right time.
I think it's pretty simple to retrieve the fps rate also in C++.
I've tried in VisualBasic and the code I wrote is this:
Code:
Private Const OF_SHARE_DENY_WRITE As Long = &H20
Private Type AVIFileInfo
    dwMaxBytesPerSec As Long
    dwFlags As Long
    dwCaps As Long
    dwStreams As Long
    dwSuggestedBufferSize As Long
    dwWidth As Long
    dwHeight As Long
    dwScale As Long
    dwRate As Long
    dwLength As Long
    dwEditCount As Long
    szFileType As String * 64
End Type
Private Declare Function AVIFileOpen Lib "avifil32" Alias "AVIFileOpenA" (ppfile As Long, ByVal szFile As String, ByVal mode As Long, pclsidHandler As Any) As Long
Private Declare Function AVIFileRelease Lib "avifil32" (ByVal pfile As Long) As Long
Private Declare Function AVIFileInfo Lib "avifil32" Alias "AVIFileInfoA" (ByVal pfile As Long, pfi As AVIFileInfo, ByVal lSize As Long) As Long
Private Declare Sub AVIFileInit Lib "avifil32" ()
Private Declare Sub AVIFileExit Lib "avifil32" ()

Private Sub Form_Load()
    Dim hFile As Long
    Dim AviInfo As AVIFileInfo
    Dim buf As String
    Dim ReturnCode As Long
    
    'Here below you have to put the routine to retrieve the current played AVI file from BSplayer [ I know that you know how to do this :P ]
    '.....
    '.....
    '.....
    
    'In C++ is something like this:
    'COPYDATASTRUCT cds;
    'char buf[MAX_PATH];
    'void *adr;
    '
    'adr=&buf;
    'cds.dwData=BSP_GetFileName;
    'cds.lpData=&adr;
    'cds.cbData=4;
    'SendMessage(bsp_hand,WM_COPYDATA,appHWND,(LPARAM)&cds);

    'NOT NEEDED IN YOUR CODE (since you have retrieved the file name directly from BSplayer)
    buf = "C:\TEST\TestFPS.avi"
    
    'Initialize the AVIFile library
    AVIFileInit
    'Create a handle to the AVI file (which path and file name is stored in "buf")
    ReturnCode = AVIFileOpen(hFile, buf, OF_SHARE_DENY_WRITE, ByVal 0&)
    'If the AVI file has been opened correctly
    If ReturnCode = 0 Then
        'Retrieve the AVI information
        If AVIFileInfo(hFile, AviInfo, Len(AviInfo)) = 0 Then
            'Shows a Message Box with the AVI's FramePerSecond rate (rounded at the first 2 decimals)
            MsgBox "AVI info: " & Round(AviInfo.dwRate / AviInfo.dwScale, 2) & "fps"
        Else
            MsgBox "Error while retrieving AVI information..."
        End If
        'Release the file handle
        AVIFileRelease hFile
    Else
        MsgBox "Error while opening the AVI file..."
    End If
    'Exit the AVIFile library and decrement the reference count for the library
    AVIFileExit
End Sub
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #18 (permalink)  
Old 4th July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

Quote:
Originally Posted by Tizio
I made some search too before posting you that, but to me too the results were "useless"...

Quote:
Originally Posted by RafkeP
I'm going to try it with a value of 0 and if it doesn't work out I will put the endtime on starttime + 60 seconds. In that way the max subtitle duration should kick in.
Yes, this way all the problems should be handled by BSplayer :D
I'm sorry to report you that Max subtitles duration applies only to subtitles that don't have an End time, so if you specify 1min duration, the subtitle's line stays on screen for 1 minute!!

I remembered that there was an option to set the MaxSubtitle's time duration also for given end times, but I remembered wrong :(

So (I think) you need to set it to 6secs or to put a configuration window :?
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #19 (permalink)  
Old 4th July 2005
Moderator
BS.Player Master
 
Join Date: Nov 2003
Location: Italy
Posts: 3,037
Rep Power: 27
Tizio will become famous soon enough
Default

One more thing:

I think you put this line in your plugin into the loadSubtitles function:
Code:
  //Create new subtitles
  subID=pInfo->createSubs("Rafke P's enhanced subtitles");
This way the list of available subtitles given by BSplayer in subtitles Menu is filled by Rafke P's enhanced subtitles sentences...
Instead of this, there should be the name of the subtitle's file subName (maybe without path and extension).
__________________
BSP SkinMaker (v1.07) the one and only Skin Editor for BSplayer
BSP Definitions Manager (v1.02)
BS.Player's FAQ (by BSPeter) | Italian language file (v2.57 build 1051)
Reply With Quote
  #20 (permalink)  
Old 5th July 2005
Senior Member
BS.Player Power User
 
Join Date: Feb 2004
Posts: 126
Rep Power: 0
RafkeP is an unknown quantity at this point
Default

Yesterday I took a day off from coding :D

Thanks for all the tips Tizio.
I also had the code for the getting the FPS, but I want to address the subtitle tags first. It turns out I also have to take into account the "real"tags like {y:uib} (I was hoping that since they are standard they would be parsed by BSplayer, but it turned out I was wrong).

Concerning the endtime : I'm not sure what will happen in what cases.
All I know is that I need to specify an endtime. The rest I need to try.
(after I finish the MicroDVD format)

Indeed I put the "Rafke P's enhanced subtitles" line in the code.
It's my way of tagging the testversion. The final release will not have this.
It's also a way of telling the user that the subs have been violated by Rafke P and anything can happen :D
Reply With Quote
Reply

Tags
subtitles, tag

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules


All times are GMT +1. The time now is 12:18 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
Ad Management plugin by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20