Video recording script for FFmpeg

Post anything about MX Simulator here. Please. I'm begging you.
KTM57
Posts: 13863
Joined: Wed Jul 07, 2010 2:42 am
Location: TX
Contact:

Re: Video recording script for FFmpeg

Post by KTM57 »

Do you still suggest using huffyuv/libx264, and ac3? I have trouble with playback and can't find the fix that I used on my last installation of windows.
This is a block of text that can be added to posts you make. There is a 255 character limit.
jlv
Site Admin
Posts: 15121
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Video recording script for FFmpeg

Post by jlv »

Those codecs work well for me, but if your software has trouble with it there are lots of other codecs to choose from. "ffmpeg -codecs" will list them.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
kreate
Posts: 149
Joined: Fri Aug 24, 2012 1:38 am

Re: Video recording script for FFmpeg

Post by kreate »

when I open the mxavi from the ffmpeg4mxsim folder, it instantly quits, and yes I followed all the steps correctly, then when I try and open it with the command prompt, this is the error I get. [img]1olz4y[/img] http://prntscr.com/1olz4y
Image
jlv
Site Admin
Posts: 15121
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Video recording script for FFmpeg

Post by jlv »

Looks like you dragged mxavi onto ffmpeg.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
kreate
Posts: 149
Joined: Fri Aug 24, 2012 1:38 am

Re: Video recording script for FFmpeg

Post by kreate »

jlv wrote:Looks like you dragged mxavi onto ffmpeg.



I dragged in ffpmeg then typed ``mxavi``
Image
jlv
Site Admin
Posts: 15121
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Video recording script for FFmpeg

Post by jlv »

OK. Not sure where it says to do that in the instructions...
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
kreate
Posts: 149
Joined: Fri Aug 24, 2012 1:38 am

Re: Video recording script for FFmpeg

Post by kreate »

jlv wrote:OK. Not sure where it says to do that in the instructions...

Im just troubleshooting, Nothing is working. Idk how to right the path for it, so I drag it in to auto do it for me
Image
kreate
Posts: 149
Joined: Fri Aug 24, 2012 1:38 am

Re: Video recording script for FFmpeg

Post by kreate »

Nevermind I got it to open, I can open mxavi and play the demo, but when I close mx sim and then close mxavi, no videos are there... Any help?
Image
kreate
Posts: 149
Joined: Fri Aug 24, 2012 1:38 am

Re: Video recording script for FFmpeg

Post by kreate »

SMR 510RR wrote:I am getting an error when I quit the game. Sometimes it works and sometimes it doesnt, when it doesnt I dont end up with the video afterwards...

Screenshot:
Image

sorry for tripple post, this is my error though
Image
mx750
Posts: 80
Joined: Tue Aug 20, 2013 1:54 pm
Team: Privateer

Re: Video recording script for FFmpeg

Post by mx750 »

Im having the same issue as above. I can get the demo to record but when finished I have no video or audio file. Any help would be appreciated.
jlv
Site Admin
Posts: 15121
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Video recording script for FFmpeg

Post by jlv »

If you go back to that post and read the responses, you'll find that screenshot turned out to be from a successful encoding.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
kreate
Posts: 149
Joined: Fri Aug 24, 2012 1:38 am

Re: Video recording script for FFmpeg

Post by kreate »

jlv wrote:If you go back to that post and read the responses, you'll find that screenshot turned out to be from a successful encoding.
still not seeing a fix. I run the playback I want to, no video file at all shows up after... sorry for my stupidity on coding :P
Image
mx750
Posts: 80
Joined: Tue Aug 20, 2013 1:54 pm
Team: Privateer

Re: Video recording script for FFmpeg

Post by mx750 »

JLV I appreciate you trying to help me and the other fellow trying to get this to work. I have tried getting this to work with command prompt as well as just clicking the mxavi file to run it. Neither seem to be working for me. I can get the batch file to run and open the game and view my playback but when im done i receive no video or audio file.
I will try to give as much info as i can to help you help me lol
Here is what my mxavi file looks like if i click edit. Just to make surre it all looks correct to you.

@echo off
path %PATH%;c:\Program Files\MX Simulator

set xres=640
set yres=480

rem For slow motion, raise inputfps (max is 128)
set inputfps=30
set outputfps=30

rem For lossless recording try huffyuv instead of libx264
set vcodec=libx264
set acodec=ac3

mx --record-audio a-stereo-88320.ub --record-video --lock-fps %inputfps% --width %xres% --height %yres% | ffmpeg -y -r %outputfps% -f image2pipe -vcodec ppm -i - -vcodec %vcodec% noaudio.avi

ffmpeg -y -i noaudio.avi -acodec pcm_u8 -ac 2 -ar 88320 -i a-stereo-88320.ub -vcodec copy -acodec %acodec% -ar 44100 -ab 384k video.avi

pause

And here is what i believe to be the errors I keep getting. In command prompt these are the lines that show up highlighted in Yellow and red.
[avi@ 0039EA80] max_analze_duration 5000000 reached at 5000000

[u8 @ 045AC500] Estimating duration from bitrate, this may be inaccurate

Incompatible sample format 'u8' for coded 'ac3' , auto-selecting format 'FLT'
[ac3 @ 01B37AC0] channel_layout not specified
[ac3 @ 01B37AC0] No channel layout specified. The encoder will guess the layout , but it might be incorrect.

Truncating packet of size 2048 to 1137
Truncating packet of size 2048 to 1


Big thanks in advance for anyone who takes the time to read this in hopes of being able to lend some advice
mx750
Posts: 80
Joined: Tue Aug 20, 2013 1:54 pm
Team: Privateer

Re: Video recording script for FFmpeg

Post by mx750 »

JLV I appreciate you trying to help me and the other fellow trying to get this to work. I have tried getting this to work with command prompt as well as just clicking the mxavi file to run it. Neither seem to be working for me. I can get the batch file to run and open the game and view my playback but when im done i receive no video or audio file.
I will try to give as much info as i can to help you help me lol
Here is what my mxavi file looks like if i click edit. Just to make surre it all looks correct to you.

@echo off
path %PATH%;c:\Program Files\MX Simulator

set xres=640
set yres=480

rem For slow motion, raise inputfps (max is 128)
set inputfps=30
set outputfps=30

rem For lossless recording try huffyuv instead of libx264
set vcodec=libx264
set acodec=ac3

mx --record-audio a-stereo-88320.ub --record-video --lock-fps %inputfps% --width %xres% --height %yres% | ffmpeg -y -r %outputfps% -f image2pipe -vcodec ppm -i - -vcodec %vcodec% noaudio.avi

ffmpeg -y -i noaudio.avi -acodec pcm_u8 -ac 2 -ar 88320 -i a-stereo-88320.ub -vcodec copy -acodec %acodec% -ar 44100 -ab 384k video.avi

pause

And here is what i believe to be the errors I keep getting. In command prompt these are the lines that show up highlighted in Yellow and red.
[avi@ 0039EA80] max_analze_duration 5000000 reached at 5000000

[u8 @ 045AC500] Estimating duration from bitrate, this may be inaccurate

Incompatible sample format 'u8' for coded 'ac3' , auto-selecting format 'FLT'
[ac3 @ 01B37AC0] channel_layout not specified
[ac3 @ 01B37AC0] No channel layout specified. The encoder will guess the layout , but it might be incorrect.

Truncating packet of size 2048 to 1137
Truncating packet of size 2048 to 1


Big thanks in advance for anyone who takes the time to read this in hopes of being able to lend some advice
dmack111
Posts: 38
Joined: Mon May 21, 2012 11:49 pm
Team: Privateer
Location: Avondale, Arizona
Contact:

Re: Video recording script for FFmpeg

Post by dmack111 »

I actually just downloaded this today and it worked perfect.
XBL:DJMackRacer315
R.I.P. Kurt Caselli #66
Post Reply