Widescreen Gaming Forum

[-noun] Web community dedicated to ensuring PC games run properly on your tablet, netbook, personal computer, HDTV and multi-monitor gaming rig.
It is currently 25 Apr 2024, 12:46

All times are UTC [ DST ]




Post new topic Reply to topic  [ 107 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 11  Next
Author Message
PostPosted: 27 Jan 2009, 08:27 
Offline
Insiders
Insiders
User avatar

Joined: 14 Apr 2007, 02:13
Posts: 1514
Its command driven interface is pretty easy to use, but it only accepts .wav Not a big deal I can demux probaby anything from a video with VirtualDubMod to a .wav but to play with it I wanted to convert some of my MP3 Files over.


It's best to work with WAV anyway. If you use FRAPS to capture a game, it captures in WAV already. All you need to do is dump the audio from it.


it kicked out a 128kb/s MP4 file that sounds the same to me thats cutting the file size well over in half.

I know its not recommended to go from one lossy format to another but hey I was just playing around.


I wouldn't go and convert MP3s to AAC, though. That's converting from one lossy format (with detail already lost since it's a MP3) to another lossy format. If you're really looking to save space, then you can go for that, but otherwise I'd leave them in MP3.


Retested with a -q 0.30 setting and its still 128kb/s??


-q is just like --crf is for x264. You target a certain quality rather than a certain bitrate. It creates a variable bit-rate AAC file with -q. Whatever you're using that reports the bitrate might just be estimating, or reading only the bitrate of a single frame. If you want to target a bitrate, then use -br instead.


neroaacenc -q 0.35 -lc -if audio.wav -of audio.mp4
mp4box -raw 1 audio.mp4
del audio.mp4
ren audio_track1.aac audio.aac


Worked a treat! What would I add to make the .aac file have a target destination?


You can also use mp4box in this same manner to dump the video track, too.

As for the destination, I usually run all the commands from the directory I'm working in, so I never really have to move files around. As long as mp4box, and all the other CLI utilities, are in your PATH environment var., then you just run them from directory you want.


Also how in the world can I get it so I can run my commands like yours with just the .exe and not make them look like this.


This goes above with what I was saying about the environment variables. Make a directory somewhere and put all of your CLI utilities in that directory.

Then:
[list]
[*]Click Start[/*:m]
[*]Right click on Computer and get Properties[/*:m]
[*]In the search field type "env" without quotes and press enter[/*:m]
[*]Click the link with a shield that says "Edit the system environment variables"[/*:m]
[*]A System Properties window will open up. At the bottom of this window is a button that says Environment Variables... Click that.[/*:m]
[*]In the bottom pane, scroll until you see "Path" and double-click that[/*:m]
[*]Under Variable value, add this without quotes: ";c:pathtodirectorywithutilities"[/*:m]
[*]Press OK[/*:m]
[*]Press OK again[/*:m]
[*]Done[/*:m]
[*]Re-open the command prompt and try typing the name of the utility[/*:m][/list:u]

Make sure you don't forget the semi-colon at the front. That's the separator used for paths.



By the way, if you use --threads auto, you do not need to use --thread-input since it automatically gets enabled when you use --threads auto.



The command prompt closed before I could see how long it took to encode, but I think it was faster for sure. I guess if I add a /p command in there I can have the command prompt stay open after encode to read the stats right?


Add a "PAUSE" (without quotes) to the very end of the .cmd script and it will pause and ask you to press a key before it closes the window.


I confirmed my own theory of what you meant by path by placing a copy of all the programs needed in one folder with the .bat files like this. I am guessing you use a similar setup? Just I do not liking having everything in one folder I like it to be separated. I suppose once you make the .bat file once you can use the long paths and never have to worry about it just change file names.


Nope. See what I said above for the PATH environment variable. :)


I used VirtualDub and just used the option "Send out WAV" and it in seconds gave me the .wav file for the audio track (makes me feel dirty I used a program that has a gui instead of a command prompt lol)


I usually use mplayer to dump the WAV.

mplayer -vo null -vc null -ao pcm:fast:file=audio.wav

You could also encode directly to AC3 and other formats with mencoder (usually comes with mplayer) like so:

mencoder -of rawaudio -oac lavc -lavcopts acodec=ac3:abitrate=384 -ovc frameno -o audio.ac3


Then to mux it together I created this bat.

Code:
mp4box -add MirrorsEdgeOpening.aac -add 64test.264 -fps 29.97 FullManual.mp4


29.97? Why? 29.97 is not what you want. If you record your game at 30 FPS, use 30 FPS. 29.97 comes from 30000 / 1001. This has to do with film recording and has absolutely nothing to do with the digital world. 99.9% of anything supports 30 FPS content. This way you do not have to confuse anything with fractions or how to split frames up over a long period of time, etc. Use consistent numbers like 30 or 60. :)


The result was a file that was smaller than the one I got out of the GUI and I think the encoding was faster, but I need to find a way to have x264 export a stats file or leave the command prompt open so I can read it and compare.


You can use --stats with x264 to output a stats file. I don't know if --stats will work with CRF since the help mentions 2+ passes only. You can try it, though.

You can also always type x264 --help or x264 --longhelp to get a full list of commands.


1.) What is the - 1920x1080 tag at the end. I know its resolution but what program does it go to? I cant find it as a valid x264 command and it doesnt have the double "--" but its all the way over on the x264 command side so I do not see how avs2yuv could be picking it up and using it as a command.


The - means read in raw content from a pipe. When you call avs2yuv, you specify the output as -. Then with x264, you're specifying - as the input. It's just piping the video data between the two programs.


2.) Is -o and -output interchangable? I changed your -o on the x264 side to -output as thats what I read in the x264 codes wiki.


Yeah. If you type x264 --help or x264 --longhelp you'll see there are shorter command names for a lot of different things. I keep most all of the names in long format because they're easier to read and understand what they are at a quick glance. -o, however, is universal for output and I always know what that means off the top of my head.


3.) Looking up avs2yuv people used code like this:

Code:
avs2yuv.exe -o - | x264....


I omitted the -o on the avs2yuv side and did not notice any ill effects.


I don't use -o. You would use -o if you want to specify a specific output file rather than stdout (pipe).


4.) The best way to see encode time with your method so I can compare it to the x86 builds.


I can already tell you that it's faster than x86 builds.

If you do want to test, though, just run the same command, except omit avs2yuv entirely and feed the .avs script directly to a 32-bit x264.

(Copied from previous page):
x264 -o outputfile.264 inputfile.avs
avs2yuv -raw "inputfile.avs" - | x264 -o outputfile.264 - 1920x1080

It's similar in execution.

_________________
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie


Top
 Profile  
 


PostPosted: 27 Jan 2009, 08:37 
Offline
Editors
Editors
User avatar

Joined: 31 Jul 2006, 14:58
Posts: 1497
I wouldn't go and convert MP3s to AAC, though. That's converting from one lossy format (with detail already lost since it's a MP3) to another lossy format. If you're really looking to save space, then you can go for that, but otherwise I'd leave them in MP3.


Yeah I know I did not keep the files I was just testing.

Add a "PAUSE" (without quotes) to the very end of the .cmd script and it will pause and ask you to press a key before it closes the window.


Hmm strange I could have sworn it was /p as I run ipconfig and things at work often and thats what I used to use before I started running the command prompt window first.

I guess your directions above will give my cmd.exe a new base directory rather than the windows/system32 directory it defaults to. However having the .bat files in the same place as the .exe's did work the same.

Did you say you use .cfg files instead of .bat???

29.97? Why? 29.97 is not what you want. If you record your game at 30 FPS, use 30 FPS. 29.97 comes from 30000 / 1001. This has to do with film recording and has absolutely nothing to do with the digital world. 99.9% of anything supports 30 FPS content. This way you do not have to confuse anything with fractions or how to split frames up over a long period of time, etc. Use consistent numbers like 30 or 60. Smile


Yeah for some reason I had the 29.97 fps box checked on FRAPS for that recording so that was the native frame rate on that file, I did not change it.

_________________
ViciousXUSMC on the Web - YouTube :: FaceBook :: Website


Top
 Profile  
 
PostPosted: 27 Jan 2009, 09:42 
Offline
Insiders
Insiders
User avatar

Joined: 14 Apr 2007, 02:13
Posts: 1514
I guess your directions above will give my cmd.exe a new base directory rather than the windows/system32 directory it defaults to. However having the .bat files in the same place as the .exe's did work the same.


No, it will not give it a new base directory. All your doing is changing the PATH environment variable.

The PATH variable is where cmd.exe looks for executables. Anything found in any directory listed under PATH can be run just by typing its name.

For example, put x264.exe, avs2yuv.exe, mp4box.exe, etc. inside of c:videotools. Then edit your PATH environment and add ";c:videotools" to the very end.

Now close and reopen the command prompt (if it's already opened), or just open it if it's not, and change your directory to anywhere you want and type x264. It will work.


Did you say you use .cfg files instead of .bat???


.cmd, not .cfg. .bat goes way far back (DOS itself) and has less capabilities and runs differently than .cmd. From NT4 onwards, .cmd has been the way to go. And now, .ps (with PowerShell) is the way to go since 2008. :)


Yeah for some reason I had the 29.97 fps box checked on FRAPS for that recording so that was the native frame rate on that file, I did not change it.


I see. Use 30 next time. :D

_________________
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie


Top
 Profile  
 
PostPosted: 27 Jan 2009, 10:09 
Offline
Editors
Editors
User avatar

Joined: 31 Jul 2006, 14:58
Posts: 1497
Something is really bugging me.

I just waisted an hour of my life trying to create the .bat file (I guess now I need to make .cmd or .ps files lol) so I can learn the CLI for this script:

Code:
bepipe.exe --script "DirectShowSource(^C:UsersViciousXUSMCDesktopNeroDigitalAudiojuststop.mp3^)" | "C:UsersViciousXUSMCDesktopNeroDigitalAudiowin32neroAacEnc.exe"  -q 0.35 -lc -if - -of juststop.mp4
   
   pause


That is the final working script (also it worked if I used a .avs file instead of the mp3.

I fought with invalide parsed .wav and can not find the audio stream errors all night.

The reason was I had to use ^ ^ inside the script instead of leaving it blank or using " "

I cant for the life of me find the logical reason in that, and do not know if its general command code, bepipe specific code, or avisynth code.

I googled all over for the answer and did not find why it has to be like that, only a archived thread on doom9 saying it has to be like that.


Im gonna change my path now on my laptop for testing, sounds very useful. Any drawbacks I should know of (like windows no longer running files in the old path, like scheduled tasks or something)

_________________
ViciousXUSMC on the Web - YouTube :: FaceBook :: Website


Top
 Profile  
 
PostPosted: 27 Jan 2009, 11:09 
Offline
Insiders
Insiders
User avatar

Joined: 14 Apr 2007, 02:13
Posts: 1514
I just waisted an hour of my life trying to create the .bat file (I guess now I need to make .cmd or .ps files lol) so I can learn the CLI for this script:


Actually, .cmd and .bat are 99% similar. Anything that works as .bat will work as .cmd, but not everything you can do with .cmd you can do with .bat.


Im gonna change my path now on my laptop for testing, sounds very useful. Any drawbacks I should know of (like windows no longer running files in the old path, like scheduled tasks or something)


No drawbacks at all. You're simply adding another path on top of what is already searched. Nothing will break.

_________________
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie


Top
 Profile  
 
PostPosted: 27 Jan 2009, 11:34 
Offline
Editors
Editors
User avatar

Joined: 31 Jul 2006, 14:58
Posts: 1497
So did you have any insight on that ^ ^ issue?

Thats the first time I have seen that needed as part of the CLI script for it to work.

_________________
ViciousXUSMC on the Web - YouTube :: FaceBook :: Website


Top
 Profile  
 
PostPosted: 27 Jan 2009, 12:20 
Offline
Insiders
Insiders
User avatar

Joined: 14 Apr 2007, 02:13
Posts: 1514
Well, I don't use bepipe so I've never dealt with using the caret for anything.

_________________
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie


Top
 Profile  
 
PostPosted: 27 Jan 2009, 20:10 
Offline
Editors
Editors
User avatar

Joined: 31 Jul 2006, 14:58
Posts: 1497
Another full CLI encode done today, some Crysis Warhead gameplay. I only used one GUI and it was VirtualDubMod to demux the audio track.

I wonder what the difference is from "demux audio" and "send wav" they both produced the same file but demux audio only did not give it a file type header.

I found out the hard way what happens if you forget to change the resoltuion for the raw input from avs2yuv. I had to drop my res down to 1280x720 to have a good frame rate in Crysis while recording and while x264 knew the file was 720p it still made some kind of 1080p file and it was not pretty, not to mention took forever to encode.

I tested muxing a .M4A file for audio into the final .MP4 container instead of extracting the raw AAC track out and it seems to have worked fine.

I did try your code for mplayer to demux the audio but not sure if its working right. Instead of being a two second affair it seems like its playing the file in the background and just recording the wave at its own leisure (so its going to take 8 minutes to do instead of 2 seconds) also I got an "error"

Your computer is too slow to play this file!!!

Command I used:

Code:
mplayer -vo null -vc null -ao pcm:fast:file=audio.wav AudioSource.avs


The .avs file is just adding the two FRAPS clips together
Code:

   AVISource("C:UsersViciousXUSMCDesktopMaster CLICrysis1.avi","C:UsersViciousXUSMCDesktopMaster CLICrysis2.avi",Audio=True)


I'll take a picture of the command window here in a second when it is finished so you can see what its doing.


_________________
ViciousXUSMC on the Web - YouTube :: FaceBook :: Website


Top
 Profile  
 
PostPosted: 27 Jan 2009, 20:24 
Offline
Insiders
Insiders
User avatar

Joined: 14 Apr 2007, 02:13
Posts: 1514
Can't you dump frames with an in-game method with Crysis? I know there are a ton of Crysis videos online that are super smooth because they dump the frames in-game. I think you might have to use the editor but I'm not sure.

_________________
Widescreen Fixer - https://www.widescreenfixer.org/

Widescreen Fixer Twitter - https://twitter.com/widescreenfixer
Personal Twitter - https://twitter.com/davidrudie


Top
 Profile  
 
PostPosted: 27 Jan 2009, 20:26 
Offline
Editors
Editors
User avatar

Joined: 31 Jul 2006, 14:58
Posts: 1497
Can't you dump frames with an in-game method with Crysis? I know there are a ton of Crysis videos online that are super smooth because they dump the frames in-game. I think you might have to use the editor but I'm not sure.


Probably, but I just like FRAPS & Forget method :P

On a revisit of the game I may go take the time to find a way to dump frames of a time demo.

_________________
ViciousXUSMC on the Web - YouTube :: FaceBook :: Website


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 107 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 11  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  




Powered by phpBB® Forum Software © phpBB Group