LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mencoder adds the extension of the original file to the output file ex: file.flv.mp4 (http://www.linuxquestions.org/questions/linux-general-1/mencoder-adds-the-extension-of-the-original-file-to-the-output-file-ex-file-flv-mp4-939865/)

linuxlicious 04-15-2012 02:17 AM

Mencoder adds the extension of the original file to the output file ex: file.flv.mp4
 
I'm trying to convert some .flv files to .mp4 with mencoder, but it keeps adding the extension of the original file to the output file, so that I end up with file.flv.mp4. Can I simply remove the .flv extension or will I have to encode it in a different way, and if yes, then how do I prevent this from happening in the first place?

jschiwal 04-15-2012 04:07 AM

Could you post the script you use?

I have a script in $HOME/bin/ that uses mencoder. If I hadn't used the third line, I would see two extensions as well. I suspect you are not removing the extension from the input file, and tacking on .mp4 after the -o option.

Code:

#!/bin/bash
videoin="$1"
videoout="${videoin%.*}.svi"
if [ -f "$videoin" ]; then
    mencoder -vf scale=480:272 -ofps 29.97 -ffourcc XVID \
            -oac mp3lame -lameopts cbr:br=128 \
            -ovc xvid \
            -xvidencopts max_bframes=0:quant_type=mpeg:bitrate=1024 \
            -af resample=44100 \
            "$videoin" \
            -o "$videoout"
fi



All times are GMT -5. The time now is 01:08 PM.