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 > (HD) DVD, Blu-ray & (S)VCD > (HD) DVD & Blu-ray authoring

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th February 2016, 13:51   #801  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 126
Quote:
Originally Posted by r0lZ View Post
Right. I did a test, and my method doesn't work.

[EDIT] Just tested with your method and it doesn't work either. The computer goes to sleep when it is encoding. I'm puzzled.

[EDIT2] Tried again today, because yesterday Windows Update was working in the background, and it may have influenced the result, but I have the same result now. The computer goes to sleep anyway. So, it appears that either BlockSleep doesn't work, or there is something special with cmd.exe. Could it be because cmd.exe is loaded from system32 and is therefore a 64-bit program, but the main x264 process is 32-bit? Anyway, the CMD window is not closed, so I assume that its process remains active, and BlockSleep should work. I don't understand.
Well, let's figure that out. I guess, this info will be useful to other users that's why I post in in the thread instead PMing you.

Please, run "powercfg -requests" under administrator 2 times (when blocksleep is running and when it's not) and post its output or PM it to me. "powercfg -requests" shows what processes/drivers/etc. blocks computer to go sleep. Moreover, if you're using a notebook, then go to "Explorer -> right click Computer -> Manager -> expand Event Viewer -> Windows Logs -> System" and see if there're recent messages with source UserModePowerService coming and what process generates them. Note, when this message appears, then sleep timer resets, so your computer may never go to sleep or go to sleep by explicit external call (which still logs in Event Log). Usually, some third-party notebook related programs can influence Windows power settings behavior.

[ADDED] I have this output (first is for running blocksleep, second if it's not running). Btw, don't forget to check your selected power plan settings.
P.S. Here's a thread @ sevenforums that shows how to deal with issue when auto sleep does not work.


Last edited by slavanap; 4th February 2016 at 14:08.
slavanap is offline   Reply With Quote
Old 4th February 2016, 16:22   #802  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
To do my tests, I use the "Power saver" plan, modified with the "Turn off the display" and "Put the computer to sleep" options both set to 1 minute. The power plan itself works fine. The display turns black after exactly 1 minute, and the computer goes to sleep between 10 and 50 seconds later. (I don't know why there is an additional variable delay, but that's acceptable.)

I have also noticed that Foobar2000 blocks the computer from going to sleep during the playback of a song. That works fine, and it's reported by powercfg -requests, so it's not something wrong with the way my computer sleeps. Of course, for my tests, I have to stop Foobar2000.

Before and after launching the __ENCODE_3D.cmd batch with BlockSleep, powercfg -requests displays this:
Code:
DISPLAY:
None.

SYSTEM:
None.

AWAYMODE:
None.
Also, the result is identical with or without the c:\windows\system32\cmd.exe /c trick.

I have also used BlockSleep with a simple DOS command:
Code:
D:\BD3D2MK3D\toolset\BlockSleep.exe c:\windows\system32\cmd.exe /c pause
And in that precise case, powercfg -requests reports correctly this:
Code:
DISPLAY:
None.

SYSTEM:
[PROCESS] \Device\HarddiskVolume6\BD3D2MK3D\toolset\BlockSleep.exe

AWAYMODE:
None.
Obviously, BlockSleep doesn't block the computer from going to sleep, but apparently only when __ENCODE_3D.cmd is launched. Now, the question is: why?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 4th February 2016 at 16:58.
r0lZ is offline   Reply With Quote
Old 4th February 2016, 16:47   #803  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 126
How do you launch blocksleep with __ENCODE_3D.cmd ?
I hope you launch it like this:
Code:
blocksleep.exe c:\windows\System32\cmd.exe /c call __ENCODE_3D.cmd
slavanap is offline   Reply With Quote
Old 4th February 2016, 16:59   #804  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
No, no "call". But I've found why it doesn't work. And you will not believe me! It's really totally immensely strange! So Microsoft!

This command doesn't work:
start /low "D:\BD3D2MK3D\toolset\BlockSleep.exe" c:\windows\system32\cmd.exe /c __ENCODE_3D.cmd
But this one works fine:
start /low D:\BD3D2MK3D\toolset\BlockSleep.exe c:\windows\system32\cmd.exe /c __ENCODE_3D.cmd

The ONLY difference are the quotes around "D:\BD3D2MK3D\toolset\BlockSleep.exe" !
How is it possible!

Anyway, even if removing the quotes works in this case because there is no space in the path, I can't assume that it will work everywhere. So, currently, it is not possible to use BlockSleep with BD3D2MK3D. Or is it another trick to avoid the problems inherent to the bad programming of windows and CMD.exe?

[EDIT] BTW, the cmd.exe /c trick is not necessary. Same for the "call" command. As long as there are no quotes around the BlockSleep command, it works. This one works fine:
start /low D:\BD3D2MK3D\toolset\BlockSleep.exe __ENCODE_3D.cmd
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 4th February 2016 at 17:21.
r0lZ is offline   Reply With Quote
Old 4th February 2016, 17:27   #805  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
Yeah! I've found a solution to avoid the problem of the quotes. This script works fine:
Code:
set path=%PATH%;D:\BD3D2MK3D\toolset
start /low BlockSleep.exe __ENCODE_3D.cmd
It's strange anyway. Perhaps you can find a solution to avoid the quotes bug from within BlockSleep itself, although I don't need imperatively a fix to use it with BD3D2MK3D.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 4th February 2016, 19:40   #806  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 126
There's easier way to do the same thing. After reading "help start" documentation I got this working:
Code:
blocksleep.exe c:\windows\System32\cmd.exe /c start /low /b /wait __ENCODE_3D.cmd
although I advice to use this code snippet to guarantee that cmd.exe will be picked up from current Windows installation (defaults to c:\Windows\System32\cmd.exe)
Code:
for %%i in (cmd.exe) do set "cmd=%%~$PATH:i"
blocksleep.exe %cmd% /c start /low /b /wait __ENCODE_3D.cmd
P.S. blocksleep does not consume any CPU time anyway.
slavanap is offline   Reply With Quote
Old 4th February 2016, 20:23   #807  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
Indeed, that work with or without quotes. But I prefer my method, because Control-C doesn't work with yours (due to the /B argument). And anyway, adding the path to the toolset in the %PATH% variable doesn't hurt. I need it anyway.

I still don't understand why the quotes make it fail, especially because it's only a problem with my syntax and not with yours!

And to determine the cmd.exe path, I will probably use another method. I can retrieve it with BD3D2MK3D with the command
where cmd.exe
It is probably also possible to use the ComSpec environment variable. On my machine, %ComSpec% is exactly C:\Windows\system32\cmd.exe
However, I don't know if it can point to another exe on some systems.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 4th February 2016 at 20:29.
r0lZ is offline   Reply With Quote
Old 4th February 2016, 21:17   #808  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 126
Yes, %ComSpec% is good way to call cmd.exe. Please use it instead my method. Also, this one
Code:
start /low "D:\BD3D2MK3D\toolset\BlockSleep.exe" %COMSPEC% /c __ENCODE_3D.cmd
works on my PC if I put it in .bat file. Maybe you need to escape " quotes in TCL?

[ADDED] I advise to add your path at the beginning of PATH variable,
Code:
set PATH=D:\BD3D2MK3D\toolset;%PATH%
because scanning for executables in PATH starts from the beginning, e.g. if you have
Code:
set PATH=%PATH%;D:\BD3D2MK3D\toolset
and there's blocksleep.exe in folder, that is in %PATH% then that first executable will be started (i.e. not one from D:\BD3D2MK3D\toolset).

Last edited by slavanap; 4th February 2016 at 21:23.
slavanap is offline   Reply With Quote
Old 5th February 2016, 00:32   #809  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
Yep, but AFAIK I don't need cmd.exe at all (and %ComSpec%). This works perfectly: start /low BlockSleep.exe __ENCODE_3D.cmd
It's very simple, and sleep mode is correctly disabled. I don't see a good reason to launch cmd.exe a second time, since launching a .cmd file with start calls it anyway.

Your order of the %PATH% is better, that's right.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 6th February 2016, 14:46   #810  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
BD3D2MK3D v0.84

This version implements BlockSleep (as discussed just above), and a dialog to explain why a crop option will never be implemented (as discussed above above!).

It has also 4 new "From DB" buttons in the Cover Art tab, enabled only when the program can find some JPEG images in the metadata of the current BD. It is therefore much easier to associate a cover with your MKV now, since you have just to click a button. (Some BDs do not have cover art, and of course in that case that doesn't work.)

The latest DGMVCSource is included with this version, and since its black frame bug has been fixed, it is now the default MVC decoder again. The latest FRIMSource is NOT included, because it crashes when it is used with Avisynth v2.58. It works fine with Avisynth 3, but most peoples continue to use v2.58 (including me), and therefore I think it is too dangerous to update it.

The new x264 arguments --range tv --colormatrix bt709 are not really necessary, and should not change the final result at all. These arguments are simply added in the video header, to help the players to determine the correct luma range and color matrix. When they are not specified, a good player should use TV and bt709 for HD video anyway.

Quote:
v0.84 (February 6, 2016)
- Added the arguments "--range tv --colormatrix bt709" in the x264 command line.
- Added Help -> Why no Crop option?
- Implemented the BlockSleep method to prevent the computer from going to sleep during an encoding. Thanks Slavanap!
- Since BlockSleep will remain active as long as the command prompt window is open, the \"When encoding is finished\" option in tab 5 is now saved with the settings.
- Added 4 "From BD" buttons in tab 4 to get the cover art images from the metadata of the current BD.
- Since the black frames bug with DGMVCSource has been fixed, DGMVCSource is now the default MVC decoder again.
- Updated DGMVCDecode.dll to the latest version 1.0.0.24. Thanks Donald!
- Updated the Intel library libmfxsw32.dll to the latest version 7.15.10.28 (from INDE 2016)
Download: BD3D2MK3D.7z
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 6th February 2016 at 14:49.
r0lZ is offline   Reply With Quote
Old 20th February 2016, 13:12   #811  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
BD3D2MK3D v0.85

A lot of small changes and improvements in this version, and two bug fixes. Not a fundamental release, but you should download it anyway.

Quote:
v0.85 (February 20, 2016)
- Added Search Wikipedia for Title and Search Google Images for Title in the Web menu of tab 3.
- Added the possibility to define a custom search engine for the Web menu of tab 3.
- Added Settings -> Chapters -> Include Dummy Chapter Near End of Movie to remove the last chapter at less than 5 seconds before the end of the movie.
- Added Help -> Version History to consult the BD3D2MK3D version history online.
- The tools menu has been split, with the subtitle tools in their own menu.
- Small cosmetic changes.
- It is now possible to encode the AVS script with any GUI thanks to the LoadHelper plugin. Thanks Slavanap!
- Bug introduced in v0.84: _ENCODE_2D_LAUNCHER.cmd launched __ENCODE_3D.cmd instead of the 2D version.
- Little bug: The palette analysis was skipped when converting XML/PNG subtitles not generated with BDSup2Sub to VobSub.
- Changed the web address to download x265 (because Snowfag doesn't compile 32-bit versions any more).
- Updated x264 to v0.148.2665 and x265 to v1.9+3
Download: BD3D2MK3D.7z

The full version history has been removed from this thread and is now available online here: Version history
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 24th February 2016, 12:01   #812  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 371
Quote:
Originally Posted by r0lZ View Post
A lot of small changes and improvements in this version, and two bug fixes. Not a fundamental release, but you should download it anyway.
Thanks for continuing to develop your great software r0lZ!

I'm sure it's been discussed in depth in the past but I'll take a chance and ask again.. Is DGMVCSource the better choice compared to Frim? I used Frim during while DGMV was being fixed and it seemed quite a bit faster. Encoding time is not really a bg conern, just wondering if it there are substantial benefits to using DGMV over Frim.
mini-moose is offline   Reply With Quote
Old 24th February 2016, 12:52   #813  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
Normally, the two decoders should give the same result since they use the same decoder library (unless there is a bug in one of them of course). Slightly different speeds are of course possible, but I have never really tried to compare them.

However, I remember that someone (I think it's Frank, but I'm not sure) has reported decoding problems with FRIM in the past. It's why I have considered DGMVCSource as better, but honestly, I have never noticed that problems personally. And the last bug was in DGMVCDecode (or more precisely, in DGMVCDecode when used with the latest Intel libs), while FRIM worked fine, as you know. That bug is fixed now, so currently I think we can consider the two plugins as equivalent.

I keep the two decoders anyway, because each time Intel releases a new version of the decoder, new bugs can appear, and it is better to leave the possibility to the user to try if the other decoder plugin gives better results.

If you are sure that FRIM is faster, I think you can safely use FRIM by default. Of course, let me know if you find a bug or a problem with a specific BD.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 24th February 2016, 12:58   #814  |  Link
mini-moose
Registered User
 
Join Date: Oct 2007
Posts: 371
Quote:
Originally Posted by r0lZ View Post
Normally, the two decoders should give the same result since they use the same decoder library (unless there is a bug in one of them of course). Slightly different speeds are of course possible, but I have never really tried to compare them.
Thanks r0lZ. I'm not even 100% sure anymore Frim is faster as I never encoded the same movie with both. I remember thinking last time I tried, that I Frim seems faster than what I remembered DGMVC to be. I may just test it out to be sure.
mini-moose is offline   Reply With Quote
Old 24th February 2016, 13:12   #815  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
OK, if you do benchmarks tests, please let us know the results. I'm curious. But IMO, on the whole encoding process, the decoding part is small anyway, and it's x264 that requires most time.
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 28th February 2016, 14:34   #816  |  Link
konikpolny
Registered User
 
Join Date: Feb 2016
Posts: 45
Full SBS aspect ratio

I have just started using BD3D2MK3D. Many thanks for this excellent tool.
I just tried to make a full SBS movie and noticed that --sar 1:2 is enforced. Can I disable it or overwrite this with --sar 1:1? I know the implications of having 2 full frames with original ratio.
konikpolny is offline   Reply With Quote
Old 28th February 2016, 15:26   #817  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
Welcome to the Doom9 forums, konikpolny, and thanks for your positive appreciation.

Currently, there is no way to change the SAR in the GUI, but you can edit __ENCODE_3D.cmd before launching the encoding. It is however possible to change the DAR with Settings -> Full SBS/T&B Aspect Ratio. In most cases, you should not need to change the SAR, and changing the DAR should be sufficient.

I may add an option to change the SAR as well, if you can explain the interest to change it. What's wrong with the current values? (I may have made an error, because the correct aspect ratio values to use are difficult to determine for SBS or T&B, and it seems that different players need different settings.)
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV
r0lZ is offline   Reply With Quote
Old 29th February 2016, 00:59   #818  |  Link
konikpolny
Registered User
 
Join Date: Feb 2016
Posts: 45
Full SBS aspect ratio

To be honest I'm not sure what I should be asking for then. To make myself clear - what I wanted to get was to have 2 'visually' full frames side by side. I tried changing the DAR setting from default to "Use 16:9 for both (not recommended)" but I didn't see any difference so not really sure what it does.

Now I also have just tested modifying sar in the __ENCODE_3D.cmd by:
1) removing sar completely --> this didn't do any change at all (Good question is WHY?)
2) changing the value to --sar 1:1 --> this finally DID make the output video display 2 full frames side by side in their original ratio

Can you also please explain what the DAR setting (Settings -> Full SBS/T&B aspect ratio) does as it doesn't seem to do any change to me.

The reason why I am asking for keeping original aspect ratio of each frame is to be able to immediately see that the movie is full-SBS. Then I can watch it as 2D -- by zooming to the left frame, or 3D - in which case I would change the aspect ratio of it to 16:9 on the player to make it visually half-SBS.
konikpolny is offline   Reply With Quote
Old 29th February 2016, 09:44   #819  |  Link
r0lZ
PgcEdit daemon
 
r0lZ's Avatar
 
Join Date: Jul 2003
Posts: 7,242
There are two AR stored in the final MKV. The Sample Aspect Ratio (SAR, stored in the h264 video stream) and the Picture Aspect Ratio (called above DAR, because I don't like PAR, meaning Pixel Aspect Ratio, but DAR stricto sensu is the aspect ratio of the display device.) The Picture AR is stored in the header of the MKV container. The player can use the SAR or the Picture AR, in conjunction with the PAR or DAR of the device to compute the way it should display (stretch) the picture.

Furthermore, some players use another information to deduce the correct aspect ratio: the Stereoscopy method (SBS, T&B...), itself stored in the h264 stream (the --frame-packing argument of the x264 command) and in the MKV header (the stereoscopy field), and even in the file name (if you have selected one of the Output File Name -> 3D Format Extension setting and your player recognises it.) Again, the player can use any information it can handle, and unfortunately, most players are not 3D-aware at all, and ignore the SBS or T&B format. And some players, notably most 3D TVs, assume that a 3D movie is always in 16:9, regardless of the width, height and aspect ratios.

As you can see, the subject is complex, and I have never found a reliable doc on the correct aspect ratios to use for SBS and T&B combined frame. I don't know if it's the aspect ratio of the combined 3D source, or the aspect ratio of the target 3D frames that matters. Originally, the AR used by BD3D2MK3D was always 16:9, even in Full-SBS/T&B, but after a discussion with zaphodalive, I have decided to add the option in the Settings menu. (That discussions starts in the last paragraph of this post.) At that time, I was almost sure that 16:9 was correct, and I have only implemented an hidden option to change it. But later, when I did more tests, I have noticed that indeed, most players need 32:9 for Full-SBS and 16:18 for Full-T&B, and therefore that it's the source AR that must be specified. Unfortunately, it's not the case of all players. And I'm still not sure for the SAR. Anyway, I have added the option to control the Picture AR in the Settings menu in v0.60, but there is still no option to control the SAR.

So, if changing the Picture AR in the Settings does not change anything for you, that means probably that your player does not takes it into account, and uses the SAR only. May I know what player you use? Personally, I use PotPlayer to watch the movie in 2D on PC, and the player of my Samsung TV to watch it in 3D. PotPlayer recognises the "3D-LRQ" extension of the file names to know that the movie is in Half-SBS (and "3D-LR" for full SBS), and you can configure it easily to show either the left or right frame only, with the correct output aspect ratio, and optionally the correct half of the 3D subtitles or the 2D subtitles in 2D. My TV, as most 3D TVs, stretches the decoded image to occupy the whole 16:9 screen anyway, and ignores absolutely everything else, including the subtitles.

As far as I know, the SAR used by BD3D2MK3D is correct, and I don't think I'll change it. Your way to watch the movie in 2D by zooming on a single frame is very specific, and I don't think it should determine the SAR. But again, I may be wrong, and if someone can prove that 1:1 is the correct SAR for Full-SBS and Full-T&B, I'll change it, or I'll add a new option to control it. In the meantime, is it sufficient for you to edit __ENCODE_3D.cmd?
__________________
r0lZ
PgcEdit homepage (hosted by VideoHelp)
BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV

Last edited by r0lZ; 29th February 2016 at 09:55.
r0lZ is offline   Reply With Quote
Old 29th February 2016, 10:56   #820  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 3,459
Maybe I am wrong, but I think the confusion comes because full-SBS/T&B is not specified in any standard. It is just a custom format AFAIK. Therefore players will handle this format as per manufacturers' gusto. Standalone Blu-ray players will normally reject anything which is larger than 1920x1080 anyway.
Personally I think that the SAR for full SBS/T&B should be signaled 1:1 because neither the left nor the right eye picture is squeezed in any respect. The DAR is 16:9 assuming that the player recognizes the file as 3D, and hence should display the picture as 16:9. In the same sense a half-SBS should be signalled as SAR 1:2. In practice it may be best NOT so signal the SAR at all, considering that half-SBS/T&B are standard formats and smartTVs will recognize and display these formats correctly as 16:9.

Encoding to formats outside of standards has its issues. At least we cannot expect "correct" playback on various devices and must be prepared to find out which tweaks will eventually succeed with a specific playback infrastructure. Trial and error, unfortunately.
Sharc is offline   Reply With Quote
Reply

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 08:09.


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