PDA

View Full Version : 7 color subpicture


mpucoder
30th April 2006, 16:03
We've know all along that the spu command for doing fades and wipes could also allow more than 4 color subs, but it took this long for me to finally make one with the upcoming MuxMan 0.18
@jeanl - this should give you something to play with :D

mpucoder
30th April 2006, 21:47
Here's what it looks like:

dirio49
30th April 2006, 22:34
how come in dvdsubedit I only see red, white and blue?

I can read the text, but the colors just repeat.

gabest
30th April 2006, 22:58
mpucoder:

The size of the packet is set to 0x0A49 while it is only 0x0A48, this might make decoders which check the size reject it as invalid. My decoder cannot handle CHG_COLCON, but that was only the third obstacle. The first one was this length mismatch, and also the dvd navigator will only send that one video frame once and never again when the subpic would be shown, so it doesn't have a chance to paint it over the picture.

mpucoder
1st May 2006, 02:46
I'll fix the size and try it again (and replace the download). Yes, it can be a torture test, but changing subpictures over stills is allowed.
@dirio49 - DVDSubEdit does not process the command which makes this possible (CHG_COLCON). It's a tricky command to process. The way I do it is to map the entire subpicture into one byte per pixel, then for each rectangle in the CHG_COLCON I add the four new color/contr values to a table of 256 color/contr pairs, and add the base index (the one for the BG color) to every pixel in the area. This allows 64 rectangles maximum.

mpucoder
1st May 2006, 02:57
Thanks to Gabest for spotting the error. btw, the size should always be a multiple of 2. Now it does work in PowerDVD and Nero Showtime.
I've uploaded corrected files.

jeanl
1st May 2006, 05:19
Yes, DVDSubEdit does not process the command. It does parse it, but it does nothing with it, it won't show it the way it should and you won't be able to edit it :(...
It would be a significant rewrite to add that, and I'm reluctant to undertake such a task!
Jeanl

kumi
1st May 2006, 21:30
Very cool! Intervideo decoder doesn't play this either. I think it has a problem with CHG_COLCON + stills, because my fade/wipe tests always worked on video, but never with stills.

mpucoder: Do most standalone players correctly process CHG_COLCON commands?

mpucoder
1st May 2006, 23:49
mpucoder: Do most standalone players correctly process CHG_COLCON commands?
AFAIK they all process the command correctly.

jeanl
2nd May 2006, 01:04
Kumi, you can do wipes and fades without the CHG_COLCON command, wipes and fades require timed DCSQTs with commands to change the transparencies, or the subpic position. The CHG_COLCON isn't necessarily required for that, although it gives you a lot more freedom.

jeanl

mpucoder
2nd May 2006, 01:09
Someday I will do the ultimate test of CHG_COLCON - all 256 combinations of color and contrast. (Although one can only see 240, as it doesn't matter which of the 16 colors is used when the pixels are transparent)

jeanl
2nd May 2006, 02:09
The ultimate test of CHG_COLCON by the ultimate geek! :D :D :D
(mpucoder I'm just kidding, I hope you know that! we're all aspiring to your degree of geekness! :D)
jeanl

jeanl
2nd May 2006, 02:12
mpucoder, out of curiosity, what's the app that you showed us a screenshot of? Is it the latest muxman? You're gonig to add subpic feature to it?
Did you construct your example by hand, or did muxman come up with it automatically, figuring out how to tile the screen to distribute all 6 colors appropriately? That would be fairly smart!
jeanl

mpucoder
2nd May 2006, 03:05
mpucoder, out of curiosity, what's the app that you showed us a screenshot of? Is it the latest muxman? You're gonig to add subpic feature to it?yes, MuxMan 0.18's viewer/editor can display subs, and when finished will be able to make menus (subs and highlight) - lots of new Windowy things like rubberband rectangles, alphablending, and it is even multi-threaded.
Did you construct your example by hand yes, this one was created with a hex editor from a 4 color spu to test the decoder.
or did muxman come up with it automatically, figuring out how to tile the screen to distribute all 6 colors appropriately? That would be fairly smart!
jeanlYes it would - and maybe later when 1.0 is finished I will try something like that. But for now the most sophisticated part of creating a CHG_COLCON command will be using the mouse to draw the rectangles.

Paddington
14th March 2007, 23:00
@mpucoder
I've been playing with your example and after demuxing it with PgcDemux, can already read it properly in the current version of SC. However, I was having a problem when using muxman (v0.15Q) to recreate the DVD again - using PgcDemux's output, muxman only gives me a very small 'movie', with no subtitles and which immediately stops. My question therefore is: does muxman 0.15Q support sups with a CHG_COLCON? I can already generate them too, but have no way to test if I do it correctly (except my own routine, which works, of course :-)
Thanks in advance!

mpucoder
15th March 2007, 04:49
MuxMan does not interpret sup files other than to determine the duration. The problem you're having is the example uses a slideshow, so after demuxing all you have is a single frame m2v. Set the video duration to a longer value, 2 minutes was used in the example. Here is the script used to create the example:
Section=Settings
{
Destination Folder=D:\VIDEO_TS
Item=Palette
{
Name=DefaultPalette
Color 0=0, 0, 255
Color 1=255, 0, 0
Color 2=0, 0, 0
Color 3=255, 255, 255
Color 4=0, 255, 0
Color 5=255, 0, 255
Color 6=255, 255, 0
Color 7=0, 125, 125
Color 8=125, 125, 125
Color 9=225, 225, 225
Color 10=125, 0, 0
Color 11=0, 125, 0
Color 12=0, 0, 125
Color 13=222, 0, 255
Color 14=222, 125, 0
Color 15=125, 0, 125
}
}
Section=Content
{
Item=Segment
{
Name=Segment_1
Display Mode=Only Letterbox
Resolution=none
Force=No
Item=Video Stream
{
Coding Mode=Mpeg-2
Standard=NTSC
CC Field 1=No
CC Field 2=No
Item=Video Play
{
File=D:\MuxSources\[1]_vts_01_1.m2v
Start=00:00:10:01
Duration=00:02:00:00
}
}
Item=Sub-Picture Stream
{
Stream Number=1
Language=en
Language Extension=1
Display Mode=Wide/Letter
Item=Sub-Picture Play
{
File=D:\MuxSrc2\6colors.sup
Time Code=NTSC non-drop
Start=00:00:00:00
Display=00:00:00:00
Duration=00:00:00:00
}
}
Item=Scene List
{
Item=Scene
{
Name=Segment_1_scn1
Scene Time=00:00:00:00
Uop=00000000
}
}
}
}
Section=Navigation
{
Item=First PGC
{
Name=FP
Menu ID=No Menu
Uop=00000000
PG Playback Mode=Sequential Playback
Repeat Times=0
PGC Still Time=0
Palette=DefaultPalette
Item=Pre Commands
{
JumpTT VTS01_TTL01
}
Item=Post Commands
{
}
Item=Cell Commands
{
}
Item=Program List
{
}
}
Item=VMG
{
Item=Language
{
Name=Unspecified_0
Language=unspecified
Item=PGC
{
Name=Unspecified_title
Menu ID=Title Menu
Uop=00000000
Next PGC=
GoUp PGC=
PG Playback Mode=Sequential Playback
Repeat Times=0
PGC Still Time=0
Palette=DefaultPalette
Item=Pre Commands
{
JumpTT VTS01_TTL01
}
Item=Post Commands
{
}
Item=Cell Commands
{
}
Item=Program List
{
}
}
}
}
Item=VTS01
{
Item=Language
{
Name=Unspecified_1
Language=unspecified
Item=PGC
{
Name=Unspecified_root
Menu ID=Root Menu
Uop=00000000
Next PGC=
GoUp PGC=
PG Playback Mode=Sequential Playback
Repeat Times=0
PGC Still Time=0
Palette=DefaultPalette
Item=Pre Commands
{
JumpVTS_TT VTS01_TTL01
}
Item=Post Commands
{
}
Item=Cell Commands
{
}
Item=Program List
{
}
}
}
Item=Title
{
Name=VTS01_TTL01
Uop=0
Item=PGC
{
Name=VTS01_TTL01_PGC1
Menu ID=Title Entry
Uop=00000000
Next PGC=
Prev PGC=
GoUp PGC=
PG Playback Mode=Sequential Playback
Repeat Times=0
PGC Still Time=0
Palette=DefaultPalette
Item=Pre Commands
{
SetSTN subpicture=1:ON
}
Item=Post Commands
{
}
Item=Cell Commands
{
}
Item=Program List
{
Item=Program
{
Name=VTS01_TTL01_pg1
Item=Cell
{
Name=VTS01_TTL01_cell1
Linked Scene=Segment_1_scn1
Command=
Cell Still Time=0
VOBU Still Flag=False
Access Restriction Flag=Permitted
Cell Type=0
Seamless Flag=default
}
}
}
}
Item=Part of Title List
{
Item=VTS01_TTL01_pg1
}
}
}
}

Paddington
15th March 2007, 22:38
@mpucoder
Thanks for that, but it still doesn't quite work - although IfoEdit shows the subtitle is there, it doesn't display it. In addition, after demuxing and muxing back, the final result has become smaller.

Here is a list of my PgcDemux 1.2.0.5 demuxed files:
15/03/2007 22:32 0 Celltimes.txt
15/03/2007 22:32 1,169 LogFile.txt
15/03/2007 22:20 3,541 MyMuxManProject.mxp
15/03/2007 22:32 2,642 Subpictures_20.sup
15/03/2007 22:32 47,803 VideoFile.m2v

And the muxed files:
15/03/2007 22:20 8,192 VIDEO_TS.BUP
15/03/2007 22:20 8,192 VIDEO_TS.IFO
15/03/2007 22:20 14,336 VTS_01_0.BUP
15/03/2007 22:20 14,336 VTS_01_0.IFO
15/03/2007 22:20 542,720 VTS_01_1.VOB

Which is a bit smaller than your original (was 544.768). I've attached the final result, as well as the sup file. Do you have any idea what I am doing wrong?

r0lZ
15th March 2007, 22:44
IfoEdit has several problems when displaying the subpics. Don't trust it! Use a better software player, or burn a RW and test on a good standalone.

mpucoder
16th March 2007, 04:12
Well, that mux is not right, don't know where the subs came from. I tested 15Q using video demuxed from your vob and the sup file in your zip. Worked correctly, so maybe you have a bad download. Here's all I did:
1) open video file, set duration to 2 minutes
2) open .sup file as first subpicture file
3) mux
no chapter points are needed. All the navigation you see in the project file is default generated by MuxMan.

Paddington
18th March 2007, 19:17
@mpucoder
I've created some sup files with region (CHG_COLCON) encoding, but muxman 0.15Q does not process them well, and it crashes or hangs. This might well be due to my incorrectly formatted sups, but ReJig did handle them well, and created a DVD that played correctly in IfoEdit. The main difference with yours is that it contains a stop time. Would you please have a look at them and tell me what's wrong. Thanks a lot!!!

PS regionTest1 and regionTest5 contain 1 and 5 subpictures, respectively, with 1 and 3 regions (all in separate subpictures).

bigotti5
19th March 2007, 02:40
Offset to the next SP_DCSQ are wrong

regionTest1.sup
0x9FA should be 0xA11
regionTest5.sup
Subpicture 1: same as above
Subpicture 2: 0x16D8 should be 0x16EF
....
....

Correct it and muxman will do the job

Paddington
19th March 2007, 08:29
Thanks a lot, bigotti5 - I will try it immediately when I get home tonight!

And indeed - you were right! After I fixed, it works like a charm. I will post a beta of SubtitleCreator so others can test it too.

mpucoder
20th March 2007, 05:20
MuxMan no doubt got lost trying to find the last SP_DCSQ, a step that is needed during import to determine the duration.

btw your unusual display area showed up a bug in the 0.18 viewer/editor

Paddington
20th March 2007, 22:12
Good to hear that it helped you improve your code to, mpucoder!

BTW, for all interested parties, I've uploaded the beta release here (http://forum.doom9.org/showthread.php?p=973168#post973168) (requires .NETv2 installed).

mpucoder
21st March 2007, 16:52
Can you post the corrected sup files? I made some corrections to them here, but test5 has some overlapping and backwards movement in time, it would be nice to see what you intended the track to look like.

bigotti5
21st March 2007, 18:07
The beta at sourceforge.net is entitled as 2.2.1 but the download is 2.1.1 without karaoke...:confused:

Paddington
21st March 2007, 23:38
Can you post the corrected sup files? I made some corrections to them here, but test5 has some overlapping and backwards movement in time, it would be nice to see what you intended the track to look like.

Here you go. Using your project file, you will probably not see the first subtitles since they start before your start time of 10s. See the image for the original input.

Paddington
21st March 2007, 23:41
The beta at sourceforge.net is entitled as 2.2.1 but the download is 2.1.1 without karaoke...:confused:

The original upload went sour on SourceForge - I've uploaded it again. The filename should be Setup_SubtitleCreator_v2_1b1.exe, size 1,880,011 bytes: it will actually install SCv2.2.1 - please give it another go!

manusse
22nd February 2008, 00:48
Hi,

Using the same method, with DVDSubEdit, an hex editor plus a small SUP Analysing proggie I'm currently being developping for my support of SubtitleCreator, I've made a 13 color subpicture for the fun. I could have done more but it's already fun. There are 12 different colors used plus the background.

Compared to mpucoders'subtitle, there are 3 areas using 2 LN_CTLI in the CHG_COLCON command.

I could watch the result using WinDVD 4 but couldn't make a screen copy because of color keying.

I've remuxed mpucoders'DVD with this new SUP.

Enjoy.

Manusse