command line to convert to PS3 compatible MP4

Started by rebeltaz, June 02, 2012, 07:02:19 AM

Previous topic - Next topic


I have found that I can convert AVIs to Playstation 3 compatible MP4s using the avidemux GUI and the following codecs - video: MPEG-4 ASP (lavc) / audio: AAC (Faac) / type: MP4

I tried using the following bash script to batch convert a folder of AVI files, but the resultant MP4s were still incompatible with PS3:

for FIL in `ls *avi | sort` ; do
  avidemux --video-codec $VIDEOCODEC --audio-codec $AUDIOCODEC --force-alt-h264 --load "$FIL" --save ${FIL%.*}.mp4 --quit

I also tried VIDEOCODEC="XviD4" but that didn't work either. Can someone please tell me what the proper Video and Audio Codecs are for this? Thanks...


You didnt specify a container, the output files are probably avi renamed to mp4


So I just need to add '--output-format MP4' to the command in the script?



OK.. I'll give that a try tonight. I'll let you know how it works... Thanks.


Nope... It tells me that the Audio Codec is invalid.

I did notice something, though. Doing it with the --output-format option, the Audio Codec in the Encoding... window is set to None. When I do it without the --output-format option, like I was before, the Audio Codec is set to PCM, even though I am specifying explicitly AAC.

Any idea? Thanks again... and again... :)


It might be a better thing to do AVIdemux script and use --run since there are situations where you have to adjust x264 settings (in case you want it to play in PS3 without issues).
I am away between 15th of May - 15th of June. (yes, I am playing D3)


I am not even sure how I would do that!  ??? Could you show an example? Thanks...

Jan Gruuthuse

In avidemux GUI load your file (same type you want to convert for PS3)
Set all settings that you know/need and save the job from menu.
Edit that saved job and omit the parts loading video and setting marker: # 01 videos source  & #01 segments
This job can then be called from command in batch with switch --run (parameter the saved (path) filename.
More information can be found here: Avidemux wiki documentation: Batch processing <- click

sample this will differ with your saved project:
#PY  <- Needed to identify#
#--automatically built--

#** Video **
# 01 videos source

#01 segments

#** Postproc **

#** Video Codec conf **

#** Filters **

#** Audio **

#** Track 0 **

#** Muxer **

#End of script


I'm sorry... I just realized that this had a response. I tried your suggestion and I get the same result... :(

Jan Gruuthuse

What version of avidemux are you using and revision number? The avi(s) you want to convert, these are all of the same type?
Same video codec , same audio codec(s), amount of audio tracks?
You can replace the _cli version by the Qt version in the batch file and test how this works out?


Avidemux 2.5.2 under Ubuntu 10.04

As for the codec and formatting of the original AVIs, I'm not sure. I do know that I can do each one manually and it works fine, but when I try to do this in batch mode, I notice that both Video and Audio codecs are set to Copy.

I don't understand the _cli part....

Is there any way that I could give you the output file and the .mkv file (what I am currently trying to convert) to see if you can get it to work?

Jan Gruuthuse

Not sure that I will be able to help? I'm here on ubuntu 12.04 lts and 11.10 with avidemux 2.5.5 & 2.6. Most of the work done here is with 2.6.
this would use the GUI instead of the CLI:
for FIL in `ls *mp4 | sort` ; do
  avidemux2 --force-alt-h264 --load "$FIL" --run something.js --save ${FIL%.*}.avi --quit

Load an avi in to avidemux GUI. Make all the settings as you are used to. When you have all the settings correct save the job and attach this to your posting here.
Save job:
from Menu -> Save Project: something.js
upload this saved file in posting with Attachments and other options


I tried avidemux2, but that command isn't available on my system. avidemux does run using the GUI, though.

The attachment is the settings after I edited out the portions you indicated:

Jan Gruuthuse

Sorry, looks like you need to upgrade your OS and avidemux and take it from there.