Handbrake 1.0.1 released - changes I made to Frameserving bat file

dxdy wrote on 12/31/2016, 10:04 AM

I discovered that HandBrake 1.0.1 64 bit was released on Dec. 24, 2016. Call it a Christmas present!

I had installed and was using the excellent Vegas to HandBrake system found in this forum. I realized that I was using a 32 bit version of HandBarke, so I uninstalled it, and downloaded and installed the 1.0.1 64 bit version.
Vegas to HandBrake stopped working - Windows complained it couldn't find Handbrake.exe.

I dug into start_vegas2handbrake.bat in c:frameserver\batch\  to add the path to the 64 bit version, but the START command choked on the space in the path name 

Program Files\Handbrake

Google came up with this article on START's issues:
http://stackoverflow.com/questions/18877212/trouble-running-a-batch-file-with-a-space-in-the-path-and-space-in-the-argument

So I made the following mods:
From:

:hbstart
start handbrake "C:\Volumes\vegas.avs\vegas.avi"
:waitforhandbrake
timeout /t 3 /nobreak
tasklist | findstr /i "Handbrake.exe"

to:

:hbstart
start "" CALL "C:\Program Files\HandBrake\HandBrake" "C:\Volumes\vegas.avs\vegas.avi"
:waitforhandbrake
timeout /t 3 /nobreak
tasklist | findstr /i "HandBrake.exe"

and the Vegas to Handbrake system works just fine.

Note that I changed not only the START command, but also changed "Handbrake" to "HandBrake" in the findstr function.

Comments

Red Prince wrote on 12/31/2016, 10:41 AM

Really? The original batch file still works for me, and yes, I use the 64-bit Handbrake 1.0.1.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

dxdy wrote on 12/31/2016, 11:17 AM

I think my problem was that I started off using 32 bit Handbrake, and somehow the path or file name for the 32 bit version got stuck somewhere.

Red Prince wrote on 12/31/2016, 11:40 AM

Could be. :)

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Musicvid wrote on 12/31/2016, 1:17 PM

This info should be posted on the HB forum too.

dxdy wrote on 12/31/2016, 5:53 PM

Posted to the HB Windows forum

Skywatcher wrote on 1/1/2017, 5:43 PM

dxdy,

I updated HB and have the same issue now. So . . . exactly where (and which) file do I modify? Is it in the VEGAS 14 folder of the Handbrake Folder . . . and which file am I modifying?

Skywatcher

Skywatcher wrote on 1/1/2017, 6:22 PM

Thanks Cornico!

That fixed it, it proceeds to HandBrake.

But now I have a secondary CMD window that opens (and stays open) that references C:\Program Files\Vegas\Vegas Pro 14.0>. It wont allow HB to unmount . . . see photo;

this popped up before handbrake (and the normal CMD System32 window). Handbrake rendered my file (then closed) but this is what I'm left with.

Any ideas on why?

Skywatcher

Red Prince wrote on 1/1/2017, 9:35 PM

I dug into start_vegas2handbrake.bat in c:frameserver\batch\  to add the path to the 64 bit version, but the START command choked on the space in the path name 

Program Files\Handbrake

The start command parameters consist of an optional title in quotation marks, the command/program to run, and parameters, as well as optional others but those are used with switches (as in /D path). To see it all, just type start /? from a command line.

So, chances are it did not choke on the space in the path name, but on the quotation marks surrounding the full path. Try something like this:

start "" "C:\Program Files\HandBrake\HandBrake" "C:\Volumes\vegas.avs\vegas.avi"

The empty quotes "" after the start make sure start does not think "C:\Program Files\HandBrake\HandBrake" is a title.

The original batch file does not have the "" after start because handbrake is not in quotes, so start knows it is not a title but the command.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Skywatcher wrote on 1/1/2017, 9:49 PM

BRAVO Red Prince . . . BRAVO!!!

That corrected the problem . . . .Thank you!!!

Skywatcher

dxdy wrote on 1/2/2017, 9:26 AM

I agree that inserting "" into the original command line without the CALL is simpler and works.

However, as the process is shutting down, I see a command line window open saying

"Unregistering formatter c:\frameserver\avfs.dll
Invalid inquiry"

I think it is from the Pismo component.

It doesn't seem to be hurting anything.

Red Prince wrote on 1/2/2017, 10:47 AM

I think it is from the Pismo component.

Yes, it sounds like coming from the pfm unregister c:\frameserver\avfs.dll command in unmount.bat. At least the first line.

The second line (the one that says Invalid inquiry) may be coming from the taskkill /IM stop_render.exe /F command, if somehow stop_render.exe has finished its work and exited before the command tries to kill it. Either that, or the del C:\frameserver\source\vegas.avi line if Frameserver has deleted it already. The pings after each line are presumably meant to waste a little time after each command, so it is possible either of those mentioned above may be coming too late to the party. Which should be fine.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Red Prince wrote on 1/2/2017, 10:49 AM

That corrected the problem . . . .Thank you!!!

You’re quite welcome, Skywatcher.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Skywatcher wrote on 1/2/2017, 11:19 AM

Hey Guys . . . did anyone ever come up with a solution for the 1-second cut off at the end of a HB render? The solution (at the time) was to add 1-second of dead space after your a/v file . . . and I sometimes forget to do it on longer renders.

Just curious if there is a fix for it . . .

Skywatcher

Red Prince wrote on 1/2/2017, 12:06 PM

I sometimes forget to do it on longer renders.

I always forget it. Right now I am redoing one after adding a second long empty event. And since I completely forgot about needing to do this, until now I have been puzzled why VLC cuts the final copyright notice so abruptly, when it is supposed to be fading to black. So, let’s hope this time it will fade to black.

And yes, it would be nice if someone wrote a script to just add the 1s empty event at the end and incorporated it to all of this. Unfortunately, it cannot be me, as I have never figured out how to write Vegas scripts.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Red Prince wrote on 1/2/2017, 1:54 PM

Hm… Adding an empty event was a disaster for me. The final result was completely scrambled. So I tried to add a solid black color from Media Generators, but it was ugly gray even though it said it was 0,0,0,1. So I changed the final 1 to 0 to make it fully transparent, alas after rendering that, it was still 1 second too short.

I don’t know whether that was because I did not save before rendering (I don’t want to change the veggie, though I suppose I could save it under a different name), or because Vegas decided that, since it was fully transparent, it should be ignored.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Marco. wrote on 1/2/2017, 2:04 PM

Note it isn't the HandBrake render which cuts off last second. It was added intentionally into this workflow because DebugMode FrameServer does spoil the last second of audio.

Red Prince wrote on 1/2/2017, 2:36 PM

The saga continues… This time I added the 1s empty event at the end of the sound track. I clicked on the one-click icon to start the Frameserver and Handbrake. Everything seemed to work, so I went to take a shower.

When I came back, Handbrake was finished with Pass 1 and had 0% of Pass 2 done, while Windows popped up a message that Vegas stopped working and asked me whether I wanted to debug Vegas or quit. Of course I quit, as I believe any attempt to debug Vegas would be a violation of the TOS (besides, debugging without the source code would be a hopeless exercise in futility).

Incidentally, since Handbrake had finished Pass 1, the result was playable. And it was still one second short!

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Skywatcher wrote on 1/2/2017, 2:57 PM

Yeah I fade out my videos and since audio is normally done (by the time I fade out) the 1-sec glitch created for DebugMode FrameServer wouldn't affect me at all . . . but since the they render together it cuts my fade and causes a 'jump cut' effect . . .

The best minds in the world are on this forum . . . a solution is forthcoming. . .

Skywatcher

Red Prince wrote on 1/2/2017, 3:19 PM

Note it isn't the HandBrake render which cuts off last second. It was added intentionally into this workflow because DebugMode FrameServer does spoil the last second of audio.

Yes, I am aware of this. It’s just that adding something to the end did not help me. Right now, I’m doing another try. This time, I have not added an empty event. I created a 1-second-of-silence wav, and added it to the end. I also saved the project under a new name and am rendering it now. I’ll report on the result once it is finished.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

Skywatcher wrote on 1/2/2017, 3:21 PM

Red Prince I keep it much more simple. Usually (when I remember) I just extent my 'Looped Region' by one second . . . I do not add empty events or any type of media and it renders perfectly. I rarely set markers so I forget to extend the looped region. I have VEGAS set to render looped regions only. If I could just remember to set a marker 1 second past the media I set on the timeline that would be great! Actually (?), can a marker be set to automatically drop on the timeline (and remain) 1 second past the end of the media? No matter if the media is edited down to a shorter length? Interesting . . .

Skywatcher

Red Prince wrote on 1/2/2017, 3:44 PM

OK, finally!!! Success!!! Adding my 1-second-silence.wav at the end of the project resulted in a correct length render (without the added final second, but with everything else).

I have zipped up the wav and uploaded it to TinyUpload.com, where they claim it will stay forever. So, if you want it, just click here and then click on 1-second-silence.zip to download it. The zip is 14,983 bytes, the wav (the only thing inside the zip) is 96,346 bytes.

And, or course, Vegas allows you to stretch/shrink the silence to any length you may need for any other purpose.

He who knows does not speak; he who speaks does not know.
                    — Lao Tze in Tao Te Ching

Can you imagine the silence if everyone only said what he knows?
                    — Karel Čapek (The guy who gave us the word “robot” in R.U.R.)

ddm wrote on 1/2/2017, 3:44 PM

So I'm totally hosed. The frameserver used to work (Vegas13) now, after upgrading to 1.0.1, errors. Edited the batch file, opens handbrake, but handbrake now defaults to the "source" window, waiting for me to choose a file. Went back to previous HB (.10.5, I think) and it opens properly but just sits there and waits for user input, doesn't get the frameserved video. Guess I'll reinstall the whole "Marco" build and see if that works.

Skywatcher wrote on 1/2/2017, 3:51 PM

ddm take a CLOSE look at the corrected second line of the batch file. I made the mistake and just added the "CALL" but the location of the file changed too. Once I copied the entire line . . . it worked.

Skywatcher