[MPlayer-users] Using parameters based on file extention or codec used

Jeremy Hansen jebrhansen at gmail.com
Thu Aug 30 20:21:33 CEST 2007


> > Is there a way to apply certain parameters depending on the file
> > extension and/or the codec used?
>
> Inside mplayer? - NO!
>
> > Two examples:
>
> > - DTS audio requires me to supply mplayer the correct channel mapping
> > when playing back 6 channels, e.g. -af
> > channels=6:6:0:4:1:0:2:1:3:2:4:3:5:5. Seeing as this can be in various
> > containers, I'd like to activate this whenever ffdca is used.
>
> > - EVO files with H264 streams need the -psprobe 5000000 parameter to get
> > parsed properly, so if a filename ends in evo or EVO I'd like to have it
> > activate this.
>
> > If this isn't possible, does anyone have any alternative options?

I think a possibly easier way would be to write two shell scripts. One
for the dts with the correct command, same with the evo. Then you
would use those programs instead of the regular mplayer/gmplayer

ie

#!/bin/bash
# Plays DTS with correct channel mapping
mplayer -af channels=6:6:0:4:1:0:2:1:3:2:4:3:5:5 $1

Then do the same thing with the evo files. chmod them and give
everyone e'x'ecute then throw it in the /usr/bin

You can then set up your window manager under the filetypes to use
that program whenever playing certain files.

Good Luck
Jeremy



More information about the MPlayer-users mailing list