Log in

View Full Version : Bitmap to VOB


Pages : 1 [2]

Joe Justa
26th March 2010, 03:09
That's great to hear! Thanks!

mpucoder
30th March 2010, 11:55
I've got some finishing touches to do before releasing MuxMan, but the test files checked out OK on my Sony.

For the first attempt there will be no GUI support, only CLI. The command line arguments are here (http://mpucoder.com/Muxman/preview/cli.shtml)
-js and -jf are the jacket arguments, others are optional, -run should be there unless you want the GUI to come up.

typical bat file(OK, weird syntax to test the parser)start /w c:\Winshop\MuxMan_0_16_7_u\Debug\MuxMan.exe -js NTSCS_4_3.bmp,"NTSCL_4_3.bmp",NTSCM_4_3.bmp -jf F -l c:\muxmantest.log -d D:\DVD_VIDEO -run
type c:\muxmantest.log

And finally, the test files themselves ready for you guys to burn and test are here (http://mpucoder.com/Muxman/jacket_test.zip)

Ghitulescu
30th March 2010, 12:46
1) It seems there exists NO "universal standard" for the JACKET_P .mpg files :( :mad:

The standard exists. If a particular player decides to implement it, ok, good, but the vast majority simply choose to put their logo instead of Jacket (brainwashing :p). And if the manufacturer decides to implement it, it might implement it wrong.

Joe Justa
31st March 2010, 01:29
I've got some finishing touches to do before releasing MuxMan, but the test files checked out OK on my Sony.

For the first attempt there will be no GUI support, only CLI. The command line arguments are here (http://mpucoder.com/Muxman/preview/cli.shtml)
-js and -jf are the jacket arguments, others are optional, -run should be there unless you want the GUI to come up.

typical bat file(OK, weird syntax to test the parser)start /w c:\Winshop\MuxMan_0_16_7_u\Debug\MuxMan.exe -js NTSCS_4_3.bmp,"NTSCL_4_3.bmp",NTSCM_4_3.bmp -jf F -l c:\muxmantest.log -d D:\DVD_VIDEO -run
type c:\muxmantest.log

And finally, the test files themselves ready for you guys to burn and test are here (http://mpucoder.com/Muxman/jacket_test.zip)
Great pic, mpucoder!

The zip file contains only the three jacket picture files, though, not the muxman.exe needed to create them (0.16.7?). Ah... you would like us to burn them to see if they display properly? Okay will do.

A couple things I noticed looking at the files in XnView:

1. The three appear to have the correct canvas size, i.e. they get progressively smaller. XnView won't show me the exact sizes, though, but from your batch file I assume they are NTSC sizes rather than PAL? If so, that will work for me, so I can test them. I don't have any DVD changers, though, so I can only seen the Large picture on-screen (but supposedly all three need to be formatted properly for the player to display even the large image).

However, while the L file and the S file contain the picture properly formatted on the canvas (picture extends from left edge to right edge, with black bars across top and bottom [rather like a letterbox movie]), the M file has the picture squashed horizontally with large black bars on left/right sides, and is positioned at the top of the canvas with black bar at the bottom. This shouldn't affect testing, though (I think).

2. When I click the 'Play' button in XnView, it immediately reverts to the normal, unclicked position for the L and M files, which I think is correct, since the file should be a single frame. On the S file, however, clicking 'Play' causes the button to change to a 'Pause' button for a half-second before reverting to the 'Play' button. This may indicate that the file has more than one frame?

Midzuki
31st March 2010, 02:43
@ Joe Justa:

The three JACKET_Ps are @ 29.97fps, and have only one frame.

Don't open them in XnView --- instead,
use VirtualDub + the MPEG-2 input plugin.

mpucoder
31st March 2010, 02:59
Yes, I would like some feedback before releasing the program, no sense releasing it if this doesn't work properly.

I just updated the zip file to also include PAL jacket pictures.

Joe Justa
31st March 2010, 04:21
Okay, burned these files and they (the Large one, anyway) look great on my Sony single-disc upconverting DVD player--way to go, mpucoder!

r0lZ
31st March 2010, 11:53
Can't wait for the new muxman! Unfortunately, as I don't have players that can display the jackets, I cannot test your files. But I will try to write a PgcEdit plugin to call muxman to automatically convert the frame currently displayed in the PgcEdit preview to the jacket files. :-)

BTW, someone knows a good, lite and free CLI tool to resize a BMP? (I can use the resize of the PgcEdit preview, but it is not very good.)

mpucoder
31st March 2010, 14:56
I'm in the process of modifying the newest MuxMan to import these files and discovered a bug in the encoding. The attribute byte that controls the encoder gets determined by the first file, but then gets overwritten when importing the second (and third). Net result - only the first file gets encoded properly, the others end up being 4:3 29.976 P/S
I've uploaded a corrected zip (here (http://mpucoder.com/Muxman/jacket_test.zip))

r0lZ
31st March 2010, 21:20
BTW, someone knows a good, lite and free CLI tool to resize a BMP? (I can use the resize of the PgcEdit preview, but it is not very good.)Forget it! I will use ImageMagick's convert.exe. It does very well what I need!

But I wonder something. I understand that the full size image can be 16:9 anamorphic. Normal, as any player is able to display anamorphic VOBs. But without IFOs, what will be the display mode on a 4:3 TV? Letterbox or pan&scan? Is it specified in the VOB?

Also, if the low resolution pictures are used by the disc changers, I suppose that the player displays several thumbnails at the same time. If it's the case, how can it mix 4:3 and 16:9 images, without resizing them? In other words, are you sure that the small images can be 16:9? Mpucoder, do you take the -jf argument into account for all resolutions, or should I resize the thumbnail image to 4:3 "already letterboxed" and add the black borders myself, even if the full size image is 16:9?

mpucoder
31st March 2010, 22:29
There is precious little authoritative information available, and most of it is contradicting. I believe this (http://www.bellunevideo.com/jeff/jacketpicturesguide.pdf) is a good source of info.
It implies all three images should be the same AR, that of the DVD (presumbably the main movie), therefore -jf is applied to all images.
It also states that letterboxing is used to display 16:9 on 4:3 displays.
The 16:9 files I'm creating do not have P/S information in them.

r0lZ
31st March 2010, 22:41
Thanks. That's fine for me, as it's what my beta plugin does. I just have to check it with the new muxman, and it will be ready... :-)

mpucoder
31st March 2010, 22:46
The MuxMan pro in development can import these files now, and they all look good. I think if no one has any problems by this time tomorrow I'll release 0.16.7

mpucoder
31st March 2010, 23:09
about the plugin - I hope you caught the twist in the -d parameter, MuxMan now wants this to be the common root to JACKET_P and (if a DVD is compiled) VIDEO_TS. It will append '\JACKET_P' to the string and create the folder if it is missing.

r0lZ
1st April 2010, 08:23
That's what I've understood, yes. Thanks for the precision.

mpucoder
1st April 2010, 15:53
If anyone wants to test widescreen jacket pictures they are here (http://mpucoder.com/Muxman/jacket_wide.zip).

If anyone is curious, this is frame 10200 of Big Buck Bunny. The full size images were composited (to add text, crop for 4:3, and resample from 1920x1080 to DVD resolution) using MuxMan pro, the smaller images were made by resampling using Paint Shop Pro (a step I want to eliminate soon).

mpucoder
3rd April 2010, 07:46
MuxMan version 0.16.7 is now available here (http://mpucoder.com/Muxman/muxman_0_16_7.zip).
I added the ability to create JACKET_P pictures from mpeg-2 elementary video streams in addition to .bmp files in case anyone wants to externally encode the images.
This version also adds access to online help tailored to the version from the menu bar "Help". There isn't much material at present that is relevant to this version, but it should grow soon.

r0lZ
3rd April 2010, 09:55
Thanks!

Muxman Premium and Pro have not changed. Does it mean that the owners of the payware versions must download the demo version to create the jackets?

mpucoder
3rd April 2010, 14:33
The other MuxMan versions will include the ability to create JACKET_P on their next update. That will be ASAP for premium. Pro version 1.3 was just released, so it is not due for an update for a few months. But 1.3.1 will add more abilities such as compositing jacket pictures, including jacket creation in project files, internally resizing all three jacket pictures from one image of any resolution, and accepting PES files (the kind that jacket pictures are) as source. The last feature will let you modify an existing jacket picture.

r0lZ
4th April 2010, 09:05
OK, so I'm right if the help of my plugin says:
You need muxman demo v0.16.7, muxman premium 0.17.9 or muxman pro 1.3.1 or newer!

mpucoder
4th April 2010, 14:10
correct

Joe Justa
5th April 2010, 23:51
MuxMan version 0.16.7 is now available here (http://mpucoder.com/Muxman/muxman_0_16_7.zip).
I added the ability to create JACKET_P pictures from mpeg-2 elementary video streams in addition to .bmp files in case anyone wants to externally encode the images.
Oh lovely, lovely. This works very nicely! For the first time, there is a completely free way to create proper jacket pictures! Thanks so very much for this, mpucoder!

For the first attempt there will be no GUI support, only CLI. The command line arguments are here (http://mpucoder.com/Muxman/preview/cli.shtml)
-js and -jf are the jacket arguments, others are optional, -run should be there unless you want the GUI to come up.

typical bat file(OK, weird syntax to test the parser)start /w c:\Winshop\MuxMan_0_16_7_u\Debug\MuxMan.exe -js NTSCS_4_3.bmp,"NTSCL_4_3.bmp",NTSCM_4_3.bmp -jf F -l c:\muxmantest.log -d D:\DVD_VIDEO -run
type c:\muxmantest.log

Is the order of parameters important? So that I can quickly type the command with my usual parameters, I created an alias something like this:
"C:\...\muxman.exe -run -l d:\muxman.log -d d:\ -jf w -js "so after triggering the alias, I simply need enter the three file names. [On a side note, this ran and generated the JACKET_P folder, although the GUI did still appear, even though -run was used.]

This produced a lovely jacket folder which displayed well, however it appeared to be 4:3 even though I specified W[ide]. [I just noticed my 'w' was lower case--are the parameters case significant?] The input files should be the same size (720x480 for NTSC large) regardless of standard-frame or wide, correct?

So how does MuxMan treat the '-jf W' parameter? Does it stretch the 720x480 image to 16:9, or does it place black borders on the left/right sides? My DVD player automatically switches its output display between full 16:9 width (for anamorphic input) and for 4:3 input a 16:9 output width with the 4:3 image centred and black bars on the sides (on my 16:9 TV). So, I'm not sure whether the player put the bars there, or MuxMan?

Finally, what tool do you guys use to grab a single frame from a DVD and save it as a .bmp?

mpucoder
6th April 2010, 01:58
Case does not matter, neither does order. Take a look at the log file to see if all the parameters were interpretted, it should look similar to this:

MuxMan version 0.16.7
Jacket source file: D:\MuxSources\jackets\J00___5S.m2v.
Jacket source file: D:\MuxSources\jackets\NTSCL_4_3.m2v.
Jacket source file: D:\MuxSources\jackets\NTSCM_4_3.bmp.
Jacket encoding for 16:9.
processing file D:\MuxSources\jackets\J00___5S.m2v, width 96, height 64, encoding to J00___5S.MP2.
SeqEnd at 12B0.
processing file D:\MuxSources\jackets\NTSCL_4_3.m2v, width 720, height 480, encoding to J00___5L.MP2.
SeqEnd at 13419.
processing file D:\MuxSources\jackets\NTSCM_4_3.bmp, width 176, height 112, encoding to J00___5M.MP2.
new graphics buffer size 59136.
SeqEnd at 2757.

If not I suspect something went wrong with the aliasing.
MuxMan does not alter the image, it merely sets the aspect ratio value in the Sequence_Header (http://mpucoder.com/DVD/mpeghdrs.html#seq)

As for the tool I use for grabbing a frame, it is usually MuxMan pro.

Joe Justa
6th April 2010, 02:29
Yes, the log looks just like yours (other than order, names, etc.). It says 16:9. So, what would cause the jacket to be displayed as 4:3 on my 16:9 TV? Perhaps the DVD player is using some other criteria than the aspect ratio in the sequence header in order to determine how to output the display?

P.S. My DVD player is a Sony, which I believe is the same brand you mentioned. Both this current player, and an earlier Sony player, have the ability to automatically adjust the output (this can be disabled). So, unless there is some difference between players made for NTSC and those made for PAL, perhaps your player also has this ability?

mpucoder
6th April 2010, 08:48
On my player no matter what the image's aspect ratio is or mode the player is in (wide, pan/scan, or letterbox) the image is displayed full width and height. I've been doing more research, and the majority of articles on JACKET_P say the images MUST be 4:3. This agrees with your experience and, to a lesser degree, mine.
It seems -jf should be removed.

r0lZ
6th April 2010, 08:59
Bad news! I have to fix my plugin too!

BTW, I have much trouble to pass the 3 filenames arguments from Tcl, due to the comas and the quotes. Currently, I have to use a batch file, but that causes other difficulties.
If you need to do a new version any way, would it be possible to accept also a similar syntax, but with 3 totally separated arguments (ie with spaces instead of the comas)?
-js NTSCS_4_3.bmp "NTSCL_4_3.bmp" NTSCM_4_3.bmp

mpucoder
6th April 2010, 09:51
That is a simple enough change, and, actually, was supposed to work.
BTW the quotes in my example are just for testing, quoting a filename is useful if it contains spaces.

r0lZ
6th April 2010, 10:12
Do you mean that I can remove the comas with v0.16.7 ?

I know that the quotes are not always necessary. The problem is that Tcl adds quotes any way, around each argument. So, I end up with two double quotes at the beginning and end of the -js argument, or, if I do not add the quotes, with only quotes surrounding the whole argument. I've tried to set the quotes only around the comas, and let Tcl add the starting and ending quotes, but in that case, it escapes my quotes automatically. I haven't been able to launch muxman correctly with the syntax with comas, except by writing a batch file from Tcl, but that's also difficult due to the foreign characters in the filenames of some users and the complex character encoding that is necessary, as DOS does not use the same encoding than Windows and Tcl. Aaargh!

r0lZ
6th April 2010, 11:31
I've tried to launch the command without the comas, and it works fine when there are no quotes at all. If I enclose some BMP file names in quotes, the J00___6S.MP2 file is not created. The two other files are correctly created. :confused:

Correct:

MuxMan.exe -js jacket_3172_fullsize_final.bmp jacket_3172_smallsize_final.bmp jacket_3172_thumbnail_final.bmp -jf F -l test.log -d . -run

MuxMan version 0.16.7
Jacket source file: jacket_3172_fullsize_final.bmp.
Jacket source file: jacket_3172_smallsize_final.bmp.
Jacket source file: jacket_3172_thumbnail_final.bmp.
Jacket encoding for 4:3.
processing file jacket_3172_fullsize_final.bmp, width 720, height 576, encoding to J00___6L.MP2.
new graphics buffer size 1244160.
SeqEnd at 1253D.
processing file jacket_3172_smallsize_final.bmp, width 176, height 144, encoding to J00___6M.MP2.
SeqEnd at 24F7.
processing file jacket_3172_thumbnail_final.bmp, width 96, height 80, encoding to J00___6S.MP2.
SeqEnd at EA2.


Bug:

MuxMan.exe -js "jacket_3172_fullsize_final.bmp" "jacket_3172_smallsize_final.bmp" "jacket_3172_thumbnail_final.bmp" -jf F -l test.log -d . -run

MuxMan version 0.16.7
Jacket source file: jacket_3172_fullsize_final.bmp.
Jacket source file: .
Jacket source file: jacket_3172_smallsize_final.bmp.
Jacket encoding for 4:3.
processing file jacket_3172_fullsize_final.bmp, width 720, height 576, encoding to J00___6L.MP2.
new graphics buffer size 1244160.
SeqEnd at 1253D.
Rejected OERR
processing file jacket_3172_smallsize_final.bmp, width 176, height 144, encoding to J00___6M.MP2.
SeqEnd at 24F7.

r0lZ
6th April 2010, 14:34
Here is the first public release of my Jacket plugin. It's still a beta, so use it with care, but it seems to work relatively well. There is still much to do, in particular with the label editor, but you can already test it.

Remember that you need muxman demo v0.16.7.

This is a relatively big archive, as several ImageMagick files are included, as well as ffmpeg.exe. If you have already those packages, you don't need to extract them from the archive. You will have to specify the paths to convert.exe and ffmpeg.exe manually, either via the Setup menu, or when the plugin will need them.

Of course, let me know if you find a bug, or if you have a suggestion.

Thanks to mpucoder, and to the ImageMagick and ffmpeg teams!

Download: http://download.videohelp.com/r0lZ/pgcedit/plugins/jacket_plugin_v06.zip

mpucoder
6th April 2010, 17:02
The bug will also show its face if there is more than one space between file names. I re-released version 0.16.7 with the bug fixed. -jf is still there and required, other version lines (0.17.x and later) will ignore -jf

r0lZ
6th April 2010, 17:52
Thanks for the fix!

Joe Justa
6th April 2010, 21:41
On my player no matter what the image's aspect ratio is or mode the player is in (wide, pan/scan, or letterbox) the image is displayed full width and height. I've been doing more research, and the majority of articles on JACKET_P say the images MUST be 4:3. This agrees with your experience and, to a lesser degree, mine.
It seems -jf should be removed.
Hi mpucoder,

My player has a setting called TV Type which has the settings you mentioned: 16:9, 4:3 Letterbox, and 4:3 Pan and Scan. On the same page, it has another setting called 4:3 Output which has the settings Normal and Full. My older player (same brand) has the same features, though if I recall correctly the names may be different (it's not connected right now), so yours may also have both those settings.

When this setting is Full, all jackets display across the full height/width of my 16:9 TV. I've checked and this is true of both the jacket I made with 16:9 setting, and the jacket you originally posted with 4:3 setting. In this mode, it's up to the TV's settings to determine display, i.e. I can use the TV's menus to set it Wide, Letterbox, Pan/Scan, etc. On my TV, when the Pan/Scan setting is selected, the bars that the TV places on the left/right sides are gray rather than black, so it's very obvious.

Now when the setting is Normal, then both the 16:9 jacket and the 4:3 jacket display in a full-height, 4:3 ratio with black bars on the sides (these black bars are put there by the player). In this mode, the player automatically switches the aspect ratio of the output based on the source material, which I suppose it uses that value in the sequence_header as you surmised. So, a standard-frame TV show will display as 4:3, while an anamorphic movie will display 16:9.

However, when in this mode, the jackets always display 4:3. So it appears that the player agrees with your findings that jackets should always be 4:3. The only way to have them display the full size of the 16:9 screen is to set this setting to Full. If this is done, then a 16:9 .bmp which is resampled to 4:3 and used to make the jacket, when displayed 16:9, will have the proper aspect ratio (i.e. circles will be round).

So, I think you are correct that -jf could be removed.