Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#1 | Link |
|
Registered User
Join Date: Apr 2007
Posts: 4
|
Better quality with ffmpeg and flash video
Hi, if you would like to incerase quality (at same bitrate) of encoding videos to ffmpeg flv format, you can.
Original article (czech): http://www.abclinuxu.cz/blog/mirek/2007/4/21/177482 Script to convert video to three different quality settings. Code:
#!/bin/bash
AUDIO_LOW="-acodec mp3 -ab 32k -ac 1 -ar 22050"
VIDEO_LOW="-f flv -deinterlace -nr 500 -croptop 4 -cropbottom 4 -cropleft 8 -cropright 8 -s 160x120 -aspect 4:3 -r 25 -b 100k"
AUDIO_MIDDLE="-acodec mp3 -ab 48k -ac 1 -ar 44100"
VIDEO_MIDDLE="-f flv -deinterlace -nr 500 -croptop 4 -cropbottom 4 -cropleft 8 -cropright 8 -s 320x240 -aspect 4:3 -r 25 -b 270k"
AUDIO_HIGH="-acodec mp3 -ab 64k -ac 2 -ar 44100"
VIDEO_HIGH="-f flv -deinterlace -nr 500 -croptop 4 -cropbottom 4 -cropleft 8 -cropright 8 -s 640x480 -aspect 4:3 -r 25 -b 650k"
PARAM="-me_range 25 -i_qfactor 0.71 -g 500"
if [ -f "$1" ]; then
ffmpeg -i "$1" $AUDIO_LOW $VIDEO_LOW $PARAM -pass 1 -y "low_`echo $1 | cut -d. -f1`.flv"
ffmpeg -i "$1" $AUDIO_LOW $VIDEO_LOW $PARAM -pass 2 -y "low_`echo $1 | cut -d. -f1`.flv"
ffmpeg -i "$1" $AUDIO_MIDDLE $VIDEO_MIDDLE $PARAM -pass 1 -y "middle_`echo $1 | cut -d. -f1`.flv"
ffmpeg -i "$1" $AUDIO_MIDDLE $VIDEO_MIDDLE $PARAM -pass 2 -y "middle_`echo $1 | cut -d. -f1`.flv"
ffmpeg -i "$1" $AUDIO_HIGH $VIDEO_HIGH $PARAM -pass 1 -y "high_`echo $1 | cut -d. -f1`.flv"
ffmpeg -i "$1" $AUDIO_HIGH $VIDEO_HIGH $PARAM -pass 2 -y "high_`echo $1 | cut -d. -f1`.flv"
fi
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|