Log in

View Full Version : Some issues with StaxRip and few questions, please advise!


Nazgulled
7th July 2007, 00:51
Today I found this neat tool StaxRip and decided to give it a few tests. Now, I have a few problems and questions about it that require the experts help in this forum.

Problem 1)
I am using StaxRip on Windows Vista, and so far, I everything I need installed. Almost all of my tests went fine. The problem is with sound. The profile I selected was AAC HE VBR 50-70kbps and when the job started, BeSweet crashed. At first, I though I could easily fix this making BeSweet.exe run in administrator mode or in Windows XP SP2 compatibility, but it didn't work. Then I decided to copy the command line from StaxRip log window and paste it into a command prompt, the command line was:
BeSweet v1.5b31 by DSPguru.
--------------------------
Using Shibatch.dll v0.25 by Naoki Shibata & DSPguru (shibatch.sourceforge.net).
Using bsn.dll replacement by dimzon, Build May 22 2006, 14:24:07

[00:00:00:000] +------- BeSweet -----
[00:00:00:000] | Input : C:\Users\Nazgulled\Videos\Fogo de ArtifÝcio na Ponte.wav
[00:00:00:000] | Output: C:\Users\Nazgulled\Videos\Fogo de ArtifÝcio na Ponte_AudioOutput.mp4
[00:00:00:000] | Floating-Point Process: No
*************************************************************
* *
* Nero Digital Audio Reference MPEG-4 & 3GPP Audio Encoder *
* Copyright (C) 2006 Nero AG *
* All Rights Reserved Worldwide *
* *
* Package build date: Feb 12 2007 *
* *
* See -help for a complete list of available parameters. *
* *
*************************************************************

ERROR: could not open AAC encoder
How do I fix this?

Problem 2:
I'm encoding files in x264/MP4 and the final output file (.mp4) does not get created unless I run StaxRip with admin privileges. I don't understand why because every output, every place that StaxRip needs write access, he was it. Why does the .mp4 file gets created with admin privileges and not running a normal user account?

Problem 3:
I have created a specific template with all the settings I need to convert the videos from digital camera to x264/MP4 but I'm having a little problem with the template. I selected the CE Baseline and defined a bitrate of 3000kbps than saved the profile and this calculated a file of 1931Mb for a 90minutes length video. However, when I load any file and use my profile, the value used to calculate the bitrate is the "Size" and not the "Bitrate" it self. What I want, is my profile to have a 2-pass encoding with 3000kbps bitrate for every video file that I use that profile on. How can I accomplish this? Is this a bug?

Question 1:
My encoded files in x264/MP4 are a little to brighter and less contrasted than the originals and I dislike it a bit like this. Is there a way, in StaxRip, to control the output brightness, color, contrast, things like that? How?

That's it for now, hope someone helps me out soon...

Nazgulled
7th July 2007, 17:37
Anyone? :(

foxyshadis
7th July 2007, 22:22
1. If the nero isn't downloading on its own, you should open tools->external applications, and run a check for missing tools.

2. Not sure. Maybe the mp4box you have writes to HKLM somewhere, or a temp file in a protected area. You could try to find out with process monitor.

3. Unfortunately, I don't think that's possible with stax, without manually entering a new size each time. The closest it could come is constant quality. Stax would know better though.

4. That's an output problem, not an input, and should be taken care of by the decoder or player. To do it on input, you need a levels or ColorYUV(levels="tv->pc"), but stax doesn't offer these. Beware that when you do play them on something with proper output settings, suddenly all your "fixed" files will have blown high/lowlights and be overcontrasty.

Nazgulled
8th July 2007, 00:16
1) But the thing is, Nero is already installed (not nero burning rom, but the aac encoder), I already downloaded it with "external applications" and the file neroaacenc.exe is already in the same dir as besweet.

2) Will have to check that then, but if I found something, I couldn't fix it...

3) Yeah, I know CQ would do that, but I did lots of tests and I found this one to have better quality with lower file size for my videos that's why I want it like that. But I believe this could easily be fixed, we should be allowed to choose between saving in the template the file size or the bitrate.

4) I don't believe it is because both the original video and the encoded one, were played with the same settings on the same player (GOM Player), so, if it's dark on video it should be in the other.

stax76
8th July 2007, 20:29
Fixed bitrate is rather uncommon, that's the reason why there is no first class support, there is a advanced feature called 'Event Commands' that can handle this task, please read here (http://forum.doom9.org/showthread.php?p=1007979#post1007979).

I'll boot Vista to see if I can reproduce other points.

foxyshadis
8th July 2007, 22:52
2) Will have to check that then, but if I found something, I couldn't fix it...
Sure you can, you can set permissions on every registry key, besides files and folders. Just set Process Monitor to filter for Access Denied errors, and see what comes up. If you find something, report it and it'll hopefully get fixed.

4) I don't believe it is because both the original video and the encoded one, were played with the same settings on the same player (GOM Player), so, if it's dark on video it should be in the other.

In Preferences, under Video->Video output->Colorspace, set the color to RGB32. This will force correct YUV conversion, instead of leaving it up to the video driver, which now have all sorts of convoluted rules on when to expand levels, when they should just always or never do it. If the minor speed hit of RGB conversion is too much, you can use a pixel shader (but not in GOM) or look for driver-specific workarounds (nvidia drivers have a registry flag that makes it happen always, never, or only for HD). Updating the driver can sometimes totally change the behavior. Different cards can also have different behaviors even with the same driver, but most same-generation ones are the same.

Switching to EVR is a little better than VMR9, but not for all combinations. Overlay pretty much always works correctly.

Nazgulled
8th July 2007, 23:13
@Stax
Ok, will you let me know something about your findings in this thread? I would like to know if I should just wait for you to fix the issues or just work around them for the time being...

@foxyshadis
But I don't think there's a reason at all for StaxRip try to write outside the folders I tell it too. Not even the registry because I'm just encoding some files, why does it have to write the registry for, just to mux a file into a container and save it to the disk?

About my question, already set the color space to RGB32 but haven't tested it, I'll have to reencode one of my videos again to check it. Will report later about it... I just didn't understand the thing about EVR. What is? But anyway, I tried all other videou output modes and I don't like it, VMR9 is the better one for me.

Nazgulled
9th July 2007, 21:51
About my "Problem 1":
I decided to give a try on XP and the results were the same. BeSweet didn't crash like on Vista, but the same error (ERROR: could not open AAC encoder) occurred. I also tried the mp3 cbr 128kbps profile (on Vista) and it also crashed BeSweet... I think besweet crashes no matter what on Vista. Either way, I would like to use Nero AAC encoder (even if I have to log on to XP) but I'm not able to... Any ideas?

stax76
10th July 2007, 16:45
You can try deleting the BeSweet directory and download it again using the download feature, furthermore you can try a different source file.

Nazgulled
11th July 2007, 02:34
Deleting the BeSweet directory has no effect... Can someone provide a different source?

Nazgulled
15th July 2007, 20:20
So? Any news?

stax76
23rd July 2007, 01:15
Sorry about the delay.


Deleting the BeSweet directory has no effect... Can someone provide a different source?


I meant video source, I cannot reproduce the issue with BeSweet.

Why does the .mp4 file gets created with admin privileges and not running a normal user account?

The mp4 muxing fails here using Vista even as admin, MP4Box ouputs:

Cannot open destination file C:\test.mp4: I/O Error

Since all other applications can write to this directory this looks much like a MP4Box bug.

Nazgulled
23rd July 2007, 13:50
Well, I don't mind the mp4box, I can easily run StaxRip as admin and then change the owner of the output files but the thing I need to be working is besweet/acc encoder.

I don't understand why it crashes or it doesn't encode anything. But like I said, I also don't mind log in into XP to encode some files, but the acc encoder is failing like this: "ERROR: could not open AAC encoder", it doesn't crash like on Vista, but shows up that error.

How can I fix it?

PS: I can find a different video source to test it out, but for my real encodings, the source will always be the videos from my digital camera, so, I need to fix this, cause it's the only use I'll have for StaxRip in the time being.

stax76
24th July 2007, 00:49
Deleting the BeSweet directory has no effect


It should have the effect StaxRip complaining BeSweet and NeroAACEnc are missing, StaxRip prompts then to download those two applications using StaxRip's build in download feature. Did you do that and from where did you have these application in the first place? If that still don't work I really don't have a clue.

Nazgulled
25th July 2007, 21:07
It did complain and I've redownloaded everything need from the bultin update feature. But the same thing happens. I also tried MP3 CBR 128kbps but the mp3 file created was 0bytes long... All this on XP. Everything (staxrip, applications, settings) is located at "C:\Program Files\StaxRip".

stax76
25th July 2007, 22:49
Looks like BeSweet has a problem with the audio source, either there is a problem with BeSweet or with the source. If you find a command line that can handle the source, you can configure StaxRip using it.

Nazgulled
26th July 2007, 01:09
The source, you mean, the wav file extracted by StaxRip? I don't understand much of BeSweet, I could send you the wav file if you had the time to check it out. The vid i'm currently testing StaxRip only has a 400~kb wav file...

dschaeffer
1st August 2007, 03:21
I had the same problem with the movies from my camera. They were 8-bit audio. BeSweet documentation says it only takes 16-bit. Besweet is also apparently limited to particular sampling rates. My camera audio was 11024 samples/sec, and I had to convert to 11025. A nice utility I found wav converision was SoX (http://sox.sourceforge.net/).

I configured StaxRip to use it for my projects, but StaxRip would probabably be easier to use if it automatically converted unusable wav formats using Sox(or another application)

Great job putting together StaxRip by the way.
:thanks:

Nazgulled
1st August 2007, 18:00
You're right... My camera also creates wav files with 11024 samples but if it's 8bit or 16bit, I don't know, but probably is 8bit.

I was trying to mess around with the Event commands and added one to run after the source was loaded and if it matched a specific template name, run some command line.

However, I have no clue what the command line would be. I placed sox.exe (and all the files that came with the package) in a SoX directory in the same place StaxRip places all the other applications.

Now, I just need that command line to work with sox.exe and create a valid wav file that StaxRip can and will use for the final outputted audio file.

Help needed!

PS: I tried some video I had here that some friend did, it's in wmv format. I used it with the template I created for my camera videos and there were no problems at all with besweet crashing on Vista or whatsoever. So I guess the problem is the audio file from my camera as the above user stated. MP4box still doesn't create the final mp4 file in Vista if StaxRip isn't running with admin privileges though.

stax76
1st August 2007, 19:28
Instead of using event commands you could make templates and audio profiles for this source. Generally cmdl features in StaxRip are multiline so you just have to put a sox cmdl on top of the BeSweet cmdl.

Nazgulled
2nd August 2007, 01:11
But I don't have a clue on how to do that...

dschaeffer
2nd August 2007, 02:28
I extracted the files for sox in the StaxRip applications directory
The command line I used for sox was:
sox.exe in.wav -r 11025 -w out.wav
-w converts to 16 bit
-r changes sample rate
Refer to the sox documentation for more details

I would recommend creating an audio profile like stax suggested. I think event commands apply to all projects. To create an audio profile I click on the arrow to the right of Track 1 selection and choose profiles and click add. You can create it based off another profile if you want. You can then edit the command line it uses. I used the following command lines to convert the wav with sox, then encode mono 32kbps mp3:

"%install_dir%\sox12181\sox.exe" "%input%" -r 11025 -w "%input%_temp.wav"
"%application:BeSweet%" -core( -input "%input%_temp.wav" -output "%output%" ) -ota( -d %delay% ) -lame( --alt-preset cbr 32 -m m )

Look through the StaxRip and BeSweet documentation for details on the command lines used.

Nazgulled
2nd August 2007, 16:53
Well, I tried to look in the StaxRip documentation but I must be stupid, cause I can't find anythong that helps me. For instance, where can I get a list of all supported macros like %install_dir%? I understand correctly what you've just posted above but I don't want to have SoX on StaxRip install dir, but in the same place StaxRip stores it's applications. How can I get that path? Where is the documentation for that? Sorry, but I can't find it...

Ideally is this: %application:SoX". Can I do this or something like this is hard-coded? If not, what's the macro to access the applications folder?

Nazgulled
2nd August 2007, 18:09
Well, actually, %install_dir% points to the applications folder, so, this is my multi command line profile for the audio:

"%install_dir%\SoX\sox.exe" "%input%" -r 11025 -w "%input%_soxed.wav"
"%application:BeSweet%" -core( -input "%input%_soxed.wav" -output "%output%" ) -azid( -c normal -L -3db ) -ota( -d %delay% -g max ) -bsn( -vbr 0.3 -2ch )

Based on AAC/HE VBR 50-70 kbps.

The wav file from my camera was converted successfully to another wav file and I tried to play in WMP and it was nice. However, the final audio mp4 created by the above besweet command was weird. Like it was in a very slow slow motion...

What's wrong? I though that I was going to convert all my camera videos, but I'm still with this weird problem...

Any ideas?

dschaeffer
3rd August 2007, 04:02
I'm not sure what BeSweet is doing. The same thing happened to me, and I was too lazy to figure it out, so I just used MP3 instead since I didn't have a problem with it. Plus the AAC encoder didn't seem to have a way to specify mono audio.

StaxRip really does need an easier way to find the list of macros. I stumbled across it once in the automatic help, and have not been able to find it since.

dschaeffer
3rd August 2007, 04:34
I found the list of macros again. When you are editing the command line for the audio settings, press F1 and a help page will come up that has them listed.

Nazgulled
3rd August 2007, 15:00
So the problem is with converting the WAV file to AAC...

OK, these is making me nuts, now I have another problem... Here's the command line from the profile I created using dschaeffer's help:

"%install_dir%\SoX\sox.exe" "%input%" -r 11025 -w "%input%_soxed.wav"
"%application:BeSweet%" -core( -input "%input%_soxed.wav" -output "%output%" ) -ota( -d %delay% ) -lame( --alt-preset cbr 32 -m m )

I have 3 audio files:
- The actual wav file from the avi. (xxxxx.wav)
- The wav file convrted to 11025 and mono. (xxxxx.wav_soxed.wav)
- The final mp3 file. (xxxxx_AudioOutput.mp3)

Now, I can play all of those files in my media player (GOM Player) and the all play just fine. Also, the video file, xxxxx_EncoderOutput.264, also plays fine in GOM Player.

Now, the final .mp4 file is only playving the video and not the audio. I checked the file size and it's the size of xxxxx_EncoderOutput.264 plus the size of xxxxx_AudioOutput.mp3.

However, I checked the command line for the container configuration and it's the following:
"C:\Users\Nazgulled\AppData\Local\StaxRip\Applications\MP4Box\MP4Box.exe" -fps 30.000 -add "C:\Users\Nazgulled\Videos\Fogo de Artifício na Ponte_EncoderOutput.264:name=Video" -add "C:\Users\Nazgulled\Videos\Fogo de Artifício na Ponte.wav:lang=por:name=Portuguese (MP3)" -new "C:\Users\Nazgulled\Videos\Fogo de Artifício na Ponte.mp4"

I don't have a clue if it's really the xxxxx_AudioOutput.mp3 file that is being added to the final mp4 or if it's the original wav file. Either way, the sound does not play in the final mp4 file.

What's wrong now? :confused:

EDIT:
Actually, just checked the log file and the command line executed was this:

"C:\Users\Nazgulled\AppData\Local\StaxRip\Applications\MP4Box\MP4Box.exe" -fps 30.000 -add "C:\Users\Nazgulled\Videos\Fogo de Artifício na Ponte_EncoderOutput.264:name=Video" -add "C:\Users\Nazgulled\Videos\Fogo de Artifício na Ponte_AudioOutput.mp3:lang=por:name=Portuguese (MP3)" -new "C:\Users\Nazgulled\Videos\Fogo de Artifício na Ponte.mp4"

The result being:
AVC-H264 import - frame size 640 x 480 at 30.0000 FPS
Import results: 1154 samples - Slices: 8 I 1146 P 0 B - 1 SEI - 8 IDR
MP3 import - sample rate 11025 - MPEG-2 audio - 1 channel
Saving C:\Users\Nazgulled\Videos\Fogo de ArtifÝcio na Ponte.mp4: 0.500 secs Interleaving

The conclusion is that the correct file (the mp3 one) is muxed, I just don't understand why I don't hear any sound when playing the final mp4 file.

EDIT 2:
Just tried the latest version of MP4Box (0.4.4 and 0.4.5-dev), but the result was the same... Is there something wrong with the preset used for the mp3 file? If it is, what's the best one for all this to finally work? (my camera creates 80kbps audio files btw, just so you know)

EDIT 3 (FIXED?):
I fixed it somehow... I had to use the following command line for audio encoding:
"%install_dir%\SoX\sox.exe" "%input%" -r 44100 -w "%input%_soxed.wav"
"%application:BeSweet%" -core( -input "%input%_soxed.wav" -output "%output%" ) -azid( -c normal -L -3db ) -ota( -d %delay% -hybridgain ) -shibatch( --rate 44100 ) -lame( --alt-preset cbr 32 -m m --resample 44.1)

Do you think this is ok?

dschaeffer
4th August 2007, 01:11
My guess would be that the program you are using for playback could not handle an mp3 with 11025 samples per second. The command line you used in edit 3 resampled it to 44100 which is much more common. Looks like it should work fine to me.

Nazgulled
5th August 2007, 19:14
I'll just leave it like this then... Thanks for all the help guys!

videoslicker
8th September 2009, 20:48
i apologize for bringing up an old old old thread but some may find this useful when encoding video from their digital cameras.

i had the same issues mentioned in this thread. working off the suggestions in this thread i was able to successfully encode to x264/aac from the original digital camera 8-bit mono audio stream.

the key is to use an older version of sox that supports the "-w" option which will convert the 8-bit stream to 16-bit. i am using sox 13.0.0 (http://sourceforge.net/projects/sox/files/). you must also use the "-c 2" option to convert from mono to stereo. otherwise the resulting mp4 file will be a double-long slow motion sound.

the audio encoding profile i've created looks like:
"%install_dir%\SoX\sox.exe" "%input%" -c 2 -w "%install_dir%\SoX\sox.exe" "%input%" -c 2 -r 44100 -w "%input%_soxed.wav"
"%application:BeSweet%" -core( -input "%input%_soxed.wav" -output "%output%" ) -azid( -c normal -L -3db ) -ota( -d %delay% -g max ) -bsn( -vbr 0.3 -2ch )


as a side note, to convert digital camera MOV files to avi for staxrip encoding i use mp4cam2avi.
http://sourceforge.net/projects/mp4cam2avi/

good luck.