command line to convert to PS3 compatible MP4

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

Previous topic - Next topic

rebeltaz

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:


#!/bin/bash
VIDEOCODEC="FFmpeg4"
AUDIOCODEC="AAC"
for FIL in `ls *avi | sort` ; do
  avidemux --video-codec $VIDEOCODEC --audio-codec $AUDIOCODEC --force-alt-h264 --load "$FIL" --save ${FIL%.*}.mp4 --quit
done


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...

mean

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

rebeltaz

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

mean


rebeltaz

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

rebeltaz

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... :)

Agent_007

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)

rebeltaz

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

Jan Gruuthuse

#8
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 somejob.py (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--
#--Project: somejob.py

adm=Avidemux()
#** Video **
# 01 videos source

#01 segments
adm.clearSegments()

#** Postproc **
adm.setPostProc(0,0,0)

#** Video Codec conf **
adm.videoCodec("x264","general.params=2PASSBITRATE=1500","general.threads=99","general.fast_first_pass=True","level=31","vui.sar_height=1","vui.sar_width=1","MaxRefFrames=2","MinIdr=100","MaxIdr=500","MaxBFrame=2","i_bframe_adaptive=0","i_bframe_bias=0","i_bframe_pyramid=0","b_deblocking_filter=False","i_deblocking_filter_alphac0=0","i_deblocking_filter_beta=0","cabac=True","interlaced=False","analyze.b_8x8=True","analyze.b_i4x4=False","analyze.b_i8x8=False"\
,"analyze.b_p8x8=False","analyze.b_p16x16=False","analyze.b_b16x16=False","analyze.weighted_pred=0","analyze.weighted_bipred=False","analyze.direct_mv_pred=0","analyze.chroma_offset=0","analyze.me_method=0","analyze.subpel_refine=7","analyze.chroma_me=False","analyze.mixed_references=False","analyze.trellis=1","analyze.fast_pskip=True","analyze.dct_decimate=False","analyze.noise_reduction=0","analyze.psy=True","ratecontrol.rc_method=0","ratecontrol.qp_constant=0","ratecontrol.qp_min=0","ratecontrol.qp_max=0"\
,"ratecontrol.qp_step=0","ratecontrol.bitrate=0","ratecontrol.vbv_max_bitrate=0","ratecontrol.vbv_buffer_size=0","ratecontrol.vbv_buffer_init=0","ratecontrol.ip_factor=0.000000","ratecontrol.pb_factor=0.000000","ratecontrol.aq_mode=0","ratecontrol.aq_strength=0.000000","ratecontrol.mb_tree=False","ratecontrol.lookahead=0")

#** Filters **

#** Audio **
adm.audioClearTracks()

#** Track 0 **
adm.audioAddTrack(0)
adm.audioCodec(0,"copy");
adm.audioSetPal2Film(0,0)
adm.audioSetFilm2Pal(0,0)
adm.audioSetNormalize(0,0,0)

#** Muxer **
adm.setContainer("MKV","forceDisplayWidth=False","displayWidth=1280")

#End of script

rebeltaz

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?

rebeltaz

#11
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

#12
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:
#!/bin/bash
for FIL in `ls *mp4 | sort` ; do
  avidemux2 --force-alt-h264 --load "$FIL" --run something.js --save ${FIL%.*}.avi --quit
done

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

rebeltaz

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.