View Single Post
Old 03-22-2007   #7 (permalink)
Member shookie is on a distinguished road
 
Join Date: Mar 2007
Posts: 108
The following is some new code i put together that should be for more advance users. It will allow you to specify simple settings like FPS and Audio/Video bitrates.

Code:
#!/bin/bash
#This script uses mencoder to convert movies to a playable AVI format for the MEIZU M6
 
# Path to the mencoder executable
mencoder=/usr/bin/mencoder
 
# Path for the output file
outputpath=/media/DataStorage/meizuvid/
 
 
echo "->        The following are prompts user-specific input."
echo "->        Meizu M6 supports up to 20 FPS so this should be the max"
echo "->        Video Bitrate and Audio Bitrate shouldn't be to high since"
echo "  it will cause problems rendering video/audio."
echo "->        My current working videos are set to 20 FPS/256 Video Bitrate/96 Audio Bitrate"
echo
echo
 
echo -n "Specify frames per second [20 max]: "
read fps
 
echo -n "Specify video bitrate: "
read vbr
 
echo -n "Specify audio bitrate: "
read abr
 
        $mencoder $1 -idx -noodml -ofps $fps \
        -vf scale=320:-2,expand=:240:::1,crop=320:240,rotate=1 \
        -ovc lavc -ffourcc XVID -lavcopts vcodec=mpeg4:vbitrate=$vbr:vmax_b_frames=0:vhq \
        -sws 9 -oac mp3lame -lameopts cbr:mode=2:br=$abr -af resample=44100 -srate 44100 -o $outputpath[M6]$2
 
exit 0
This particular script will encode with black bars to maintain aspect ratio of wide screen. To make it crop the black bars find and replace the following:

Code:
Find:
-vf scale=320:-2,expand=:240:::1,crop=320:240,rotate=1
 
Replace with:
-vf scale=427:240,expand=:240:::1,crop=320:240,rotate=1
This file I had renamed to m6-conv and made it executable using chmod +x. This is the output:

Code:
shookie@shookie-core:~$ m6-conv 
->      The following are prompts user-specific input.
->      Meizu M6 supports up to 20 FPS so this should be the max
->      Video Bitrate and Audio Bitrate shouldn't be to high since
        it will cause problems rendering video/audio.
->      My current working videos are set to 20 FPS/256 Video Bitrate/96 Audio Bitrate
 
 
Specify frames per second [20 max]:
My working recommendations are not 100%. Still get some sync issues there fore im still trying to find the perfect setup for mencoder parameters.

Last edited by shookie : 04-04-2007 at 03:40 AM.
shookie is offline   Reply With Quote