Μετατροπή αρχείων βίντεο σε mp3

Geor169 | Κυρ, 09/27/2009 - 19:58 | 1' | 5

Καλησπέρα

Γνωρίζετε εάν υπάρχει κάποιο πρόγραμμα που να εξάγει τον ήχο (σε mp3)

από αρχεία βίντεο (flv,avi.mpg κτλ) ;

Επιπλέον κάποια χαρακτηριστικά για επεξεργασία ήχου θα ήταν επιθυμητά

Δώσε αστέρια!
Σχόλια

υπαρχει ενα nautilus script που ειναι πολυ ωραιο και κανει τετοιες δουλειες.

[EDIT]

Υπηρχε ενα σκριπτακι καπου στο gnome look που ηταν πολυ ωραιο για τετοιες δουλειες...ομως επειδη δεν μπορω να το βρω πλεον...το ανεβαζω οπως εχει

 οποτε αμα θελεις το αντιγραφεις και μετα κανονικα το βαζεις στο ~/home/ σου και το κανεις εκτελεσιμο κτλ κτλ κτλ

<code lang="bash">

#!/bin/bash

# marc brumlik, tailored software inc, Mon Sep  8 22:50:20 CDT 2008
# marcbrumlik at tailoredsoftwareinc dot com

# convert various image, audio, and video files into other likely formats

# set -x

#####
# Watcher
#####
avwatcher() {
### this function produces "Preparing" progress window
### during conversion, this window appears until the output file exists

# exit 0

sleep 1
z="0"
while true
do
    if test -s $1
        then    break
    fi
        for a in 10 20 30 40 50 60 70 80 90 80 70 60 50 40 30 20 10 00
        do
                test -s "$1" && break 2
                echo $a; sleep 1
        z=`expr $z + 1`
        if [ "$z" = "20" ]
            then    exit 0
        fi
        done
done | zenity --progress --auto-close --auto-kill --text="Waiting for $2 to begin writing"

while true
do
        newsize=`du -a -b "$1" | awk '{print $1}'`
        progress=`echo "scale=10; $newsize / $3 * 100" | bc`
    if [ "$progress" = "$oldprogress" ]
        then    break
    fi
    oldprogress=$progress
    sleep 1
    echo $progress
done | zenity --progress --percentage=100 --auto-close --auto-kill --text="Estimate to completion..."
}
# end of watcher

#####
# Convert
#####
avconvert() {
#
# processing images or performing text-to-image conversion

# set -x

# the output types allowed for
case $it in
    image)  out=" gif jpg ico pdf png tif OTHER"
        height=500 ;;
    text)   out=" gif jpg ico pdf png tif OTHER"
        height=370 ;;
esac

# set default checkbox: all false except the original ext (except txt)
out=`echo "$out" | sed -e 's/ / FALSE /g' -e "s/FALSE \$ext/TRUE $ext/"`

# show output choices to user and loop untill selection is made
while true
do
case $prog$it in
        convertimage)   choice=`zenity --list --height=$height --title="Convert $target" --text="Source file format $show,\n$ident\n\nNOTE: Image conversion defaults to the source filetype\n   - uncheck the original format if you are switching\n\nYou can select multiple formats - avconvert will loop to create them all.\n\n\OUTPUT NAMING: names of the files created will include the proper extension,\nand if the resolution differs from the original then a \"-XXX\" before the extension.\n\nChoose OTHER for an output type not listed" --checklist --column "Select" --column "Convert to format" $out` || exit 0 ;;
        converttext)    choice=`zenity --list --height=$height --title="Convert $target" --text="Source file format $show\n\nDefault action is to convert TEXT to IMAGE\n\nChoose OTHER for an output type not listed" --checklist --column "Select" --column "Convert to format" $out` || exit 0 ;;
esac

if [ -n "$choice" ]
    then    break
fi
done

# was it OTHER?
case $choice in
        OTHER_non-image)  exec avtext ;;
        OTHER)  choice=`zenity --entry --title="Output type" --text="Supply an appropriate file extension"` || exit 0 ;;
esac

# clean up any _audio reference and any leading . in ext
choice=`echo $choice | sed -e 's/_.*//' -e 's/^\..*//'`

#       loop over (possibly multiple) choice(s)
# (THE OUTER LOOP)
for each in `echo $choice | sed 's/|/ /g'`
do

#       what will the destination filename be?
new=`echo $target | sed "s/$ext$/$each/"`

# results into $dim, will look like "jpg|gif|pdf"
dim=`zenity --list --height=480 --title="Resolution" --text="Output resolution for \"$new\"\n\nThis will be the dimension along the longer edge\n(depending on portrait or landscape mode)\n\nChoose one or more, or none for resolution of $target\n$textdims" --checklist --column "Select" --column "Choose Resolution" FALSE 1280 FALSE 1024 FALSE 800 FALSE 640 FALSE 480 FALSE 320 FALSE 250 FALSE 200 FALSE 150 FALSE 100` || exit 0

# if $safedims is set and $dim is empty
# then set it to what we used last time
if [ -z "$dim" -a -n "$safedims" ]
    then    dims="$safedims"
fi
# parse $dim into $dims
case $dim in
    '')    dims=" " ;;
    *)    dims=`echo $dim | sed 's/|/ /g'` ;;
esac

# and save these $dims for next time
safedims="$dims"
textdims="Previously selected resolutions: $safedims"

# if this is a jpeg, ask for quality
case "$new" in
    *jpg)    qual=`zenity --list --height=290 --title="JPEG Quality" --text="Choose JPEG quality for \"$new\"\n(default is 70)" --radiolist --column "Select" --column "Choose Quality" FALSE 100 FALSE 90 FALSE 80 FALSE 70 FALSE 60 FALSE 50` || exit 0 ;;
esac

# create arg to convert for quality
case "$new" in
    *jpg)    case $qual in
            '')    qual="-quality 70" ;;
            *)    qual="-quality $qual" ;;
        esac ;;
esac

# loop through all the $dims.
for rez in " "$dims
do
# THE INNER LOOP

case "$rez" in
    " ")    geom="" ;;
    *)    rez=`echo $rez`; geom="-geometry $rez"x"$rez"
        new=`echo $target | sed "s/$ext$/$rez.$each/"` ;;
esac
if test -s "$new"
    then     zenity --question --text "$new exists - Overwrite?" || new=`zenity --file-selection --save --confirm-overwrite --title="Choose a new file/folder"` || exit 0
fi

case $it in
text)    # EXTRA stuff for TEXT to IMAGE
    colorlist=`convert -list color | sed -n '/,/s/  .*//p' | sort -u`
    colorlist=`echo " "$colorlist | sed 's/ / FALSE /g'`
    if whereis kcolorchooser | grep / >/dev/null
        then    colorlist="FALSE GUI-\"kcolorchooser\" $colorlist"
        else    colorlist="--- Install_\"kdegraphics\"_for_GUI $colorlist"
    fi
    colorlist="FALSE Key-in_RGB-value $colorlist"
    fontlist=`convert -list font | sed -n '/0$/s/ .*//p'`
    fontlist=`echo " "$fontlist | sed 's/ / FALSE /g'`
    sizelist=" 8 10 12 15 20 25 30 35 40 50 60 80 100 120 150 200 250 300"
    sizelist=`echo "$sizelist" | sed 's/ / FALSE /g'`

    back=`zenity --list --height=500 --title="Background" --text="Choose Background Color\n\nNOTE: If you use GUI chooser, the RGB values\nwill be shown in subsequent windows\nfor your reference.\n\nALSO NOTE: for some unknown reason\nthere is a long delay when GUI closes." --radiolist --column "Select" --column "Choose Color" $colorlist` || exit 0
    case $back in
        GUI-*)    back=`kcolorchooser --print` ;;
        _GUI*)    zenity --info --title="kcolorchooser" --text="To choose colors with a GUI\ninterface, install the \"kdegraphics\" package"; exit 0 ;;
        Key-*)    back=`zenity --entry --title="Key-in Color" --text="Enter the RGB color as:  #RGB  #RRGGBB  #RRRGGGBBB  #RRRRGGGGBBBB  rgb(rrr,ggg,bbb)"` || exit 0 ;;
    esac
    fill=`zenity --list --height=500 --title="Foreground" --text="[Background is $back]\n\nChoose Foreground Color" --radiolist --column "Select" --column "Choose Color" $colorlist` || exit 0
    case $fill in
        GUI-*)    fill=`kcolorchooser --print` ;;
        _GUI*)    zenity --info --title="kcolorchooser" --text="To choose colors with a GUI\ninterface, install the \"kdegraphics\" package"; exit 0 ;;
        Key-*)    fill=`zenity --entry --title="Key-in Color" --text="Enter the RGB color as:  #RGB  #RRGGBB  #RRRGGGBBB  #RRRRGGGGBBBB  rgb(rrr,ggg,bbb)"` || exit 0 ;;
    esac
    borw=`zenity --list --height=340 --title="Border Width" --text="[Background is $back]\n[Foregeround color is $fill]\n\nChoose Border Width" --radiolist --column "Select" --column "Choose Width" FALSE 0 FALSE 5 FALSE 10 FALSE 20 FALSE 30 FALSE 50` || exit 0
    case $borw in
        0)    borc="transparent" ;;
        *)    borc=`zenity --list --height=500 --title="Border Color" --text="[Background is $back]\n[Foreground color is $fill]\n[Border width is $borw]\n\nChoose Border Color" --radiolist --column "Select" --column "Choose Color" $colorlist` || exit 0 ;;
    esac
    case $borc in
        GUI-*)    borc=`kcolorchooser --print` ;;
        _GUI*)    zenity --info --title="kcolorchooser" --text="To choose colors with a GUI\ninterface, install the \"kdegraphics\" package"; exit 0 ;;
        Key-*)    borc=`zenity --entry --title="Key-in Color" --text="Enter the RGB color as:  #RGB  #RRGGBB  #RRRGGGBBB  #RRRRGGGGBBBB  rgb(rrr,ggg,bbb)"` || exit 0 ;;
    esac
    font=`zenity --list --height=500 --title="Font" --text="[Background is $back]\n[Foregeround color is $fill]\n[Border width is $borw]\n[Border color is $borc]\n\nChoose Text Font and Style" --radiolist --column "Select" --column "Choose Font" $fontlist` || exit 0
    size=`zenity --list --height=500 --title="Font Size" --text="[Background is $back]\n[Foregeround color is $fill]\n[Border width is $borw]\n[Border color is $borc]\n[Font style is $font]\n\nChoose Text Font Size" --radiolist --column "Select" --column "Choose Size" $sizelist` || exit 0
    textoptions="-background $back -fill $fill -border $borw -bordercolor $borc -font $font -pointsize $size label:@"
    longestline=`cat "$target" | awk 'BEGIN {max=0}
                        (length >= max) {max = length}
                        END {printf "%s\n", max}'`
    horizrez=`echo -e "scale=0\n$rez * 8 / 11\nquit\n" | bc`
    maxpossible=`echo -e "scale=0\n$horizrez / $size\nquit\n" | bc`
    # splitpieces=`echo -e "scale=0\n$longestline / $maxpossible\nquit\n" | bc`
    newlength=`echo -e "scale=2\n$maxpossible * .9\nquit\n" | bc`
    newlength=`echo "$newlength" | sed 's/\..*//'`
    if [ "$longestline" -ge "$maxpossible" ]
        then    newtarget=`echo "$target" | sed "s/$ext$/wrap$newlength/"`
            zenity --info --title="Adjusting input file" --text="The source file \"$target\" contains long lines.\n\nThe longest line is $longestline but the max possible\nwith a width of $horizrez and a size of $size is $maxpossible.\n\nCreating an intermediate text file with a word wrap at\nthe first space after character position $newlength.\n\nThis will get you APPROXIMATELY the\ncharacter size you asked for.\nThe intermediate file will contain the full text of $target.\n\nIntermediate file name is: $newtarget.txt"
            sed "s/.\{$newlength\} /&\n/g" < "$target" > "$newtarget"
            target="$newtarget"
    fi

    linecount=`wc $target | awk '{print $1}'`
    maxpossible=`echo -e "scale=2\n$rez / $size\nquit\n" | bc`
    maxpossible=`echo -e "scale=2\n$maxpossible * 2 / 3\nquit\n" | bc`
    maxpossible=`echo "$maxpossible" | sed 's/\..*//'`

    if [ "$linecount" -ge "$maxpossible" ]
        then    shorttarget=`echo $target | sed 's/$ext$//'`
            zenity --info --title="Adjusting input file" --text="The source file \"$target.txt\" contains too many lines.\nAdjusting for a more normal aspect ratio.\n\nThere are $linecount lines, but the max possible\nwith a length of $rez and a size of $size is $maxpossible.\n\nSplitting $target.txt into a set of files with $maxpossible\nlines in each.  The resulting files will be processed.\n\nThis will get you APPROXIMATELY the\ncharacter size you asked for.\n\nIntermediate files will be named as $shorttarget"aa.txt", $shorttarget"ab.txt", $shorttarget"ac.txt", etc."
            cat "$target" | split -$maxpossible - "$shorttarget"
            targets=`ls $shorttarget??`
            multiple=y
            for each in `ls $shorttarget??`
            do
                mv "$each" "$each.txt"
            done
    fi
    ;;
esac
#End of extra stuff for text to image

# Now, do the actual conversion

# usually just one target
targets="$target"

# in a text->image that needed splitting will be multiple $targets
case $multiple in
    y)    count=1
        targets=`ls $shorttarget??*`
        basenew="$new" ;;
esac

echo "$targets" | \
while read target
do
case $multiple in
    y)    case $count in
            ?)    count="00"$count ;;
            ??)    count="0"$count ;;
        esac
        new=`echo "$basenew" | sed "s/\....$/.$count&/"`
        ;;
esac
oldsize=`du -a -b "$target" | awk '{print $1}'`
avwatcher "$new" "$prog" "$oldsize" &
convert -verbose $geom $qual $textoptions"$target" "$new" 2>/tmp/$$.$count | zenity --progress --text="Working on $new" --auto-close --auto-kill --pulsate
if test -s /tmp/$$.$count
    then    message=`cat /tmp/$$.$count`
        zenity --info --text="An error occured during the conversion\n\nThe message was: $message" &
        rm -f /tmp/$$.$count
fi
case $multiple in
    y)    count=`expr $count + 1` ;;
esac
# end of multiple $targets loop
done

# end of inside loop for $rez
done
# end of outside loop for $dims
done
}
# end of avconvert

#####
# ffmpeg
#####
avffmpeg() {
#
# processing audio and video

# set -x

# set up output extensions
case $av in
    video)  out=" asf avi flv m4p mov mpg wmv m4a_audio_only mp3_audio_only wav_audio_only wma_audio_only OTHER"
        height=540 ;;
    audio)  out=" m4a mp3 wav wma OTHER"
        height=360 ;;
esac

out=`echo "$out" | sed -e 's/ $ext //' -e "s/ / FALSE /g"`

# loop for output conversion type
while true
do
choice=`zenity --list --height=$height --title="Convert $target" --text="Source file format $show\n$ffident\n\nChoose OTHER for an output type not listed\n" --radiolist --column "Select" --column "Convert to format" $out` || exit 0

if [ -n "$choice" ]
        then      break
fi
done
choice=`echo $choice | sed 's/_.*//'`
# have the output type

# audio bitrate
bits=""
case $av in
        audio)  bits=`zenity --list --height=270 --title="Select" --text="Change bitrate? (select nothing to leave as-is):" --radiolist --column "Select" --column "Bitrate" FALSE 32k FALSE 64k FALSE 96k FALSE 128k FALSE 192k FALSE 256k` || exit 0 ;;
esac
case $bits in
        '')     ;;
        *)      bits="-ab $bits" ;;
esac

new=`echo $target | sed "s/$ext$/$choice/"`

if test -s "$new"
    then     zenity --question --text "$new exists - Overwrite?" || new=`zenity --file-selection --save --confirm-overwrite --title="Choose a new file/folder"` || exit 0
fi

oldsize=`du -a -b "$target" | awk '{print $1}'`
avwatcher "$new" "$prog" "$oldsize" &
ffmpeg -y $bits -i "$target" "$new" 2>&1 | tr '=' '\012' > /tmp/ffmpeg.$$

result=`tail -5 /tmp/ffmpeg.$$`
newsize=`du -a -b "$target" | sed 's/   .*//'`
# show results summary
zenity --info --title="Results" --text="Completed $new\nFile size $newsize\n\n$prog last message was:\n\n$result"
# rm -f /tmp/ffmpeg.$$
}
# end of ffmpeg

#####
# Text conversions
#####
avtext() {
#
# processing text between formats and into other things

# set -x

case $it in
    text)    # image->avconvert sound->espeak html->txt2tags
        out=" image sound html"; height=300 ;;
    doc)    # text->antiword
        out=" text"; height=300 ;;
    rtf)    # text->unrtf html->unrtf
        out=" text html"; height=300 ;;
    odt)    # text->odt2txt xml->odt2txt
        out=" text xml"; height=300 ;;
esac

out=`echo "$out" | sed -e 's/ $ext //' -e "s/ / FALSE /g"`

# loop for output conversion type
while true
do
choice=`zenity --list --height=$height --title="Convert $target" --text="Source file format $show\n$ffident\n" --radiolist --column "Select" --column "Convert to format" $out` || exit 0

if [ -n "$choice" ]
        then      break
fi
done

case $it$choice in
    textimage)    prog=convert; sh -x avconvert 2>/tmp/avconvert.debug ;;
    textsound)    lang=`zenity --list --height=500 --title="Language" --text="Choose language for pronunciation" --radiolist --column "Select" --column "Language" FALSE af_afrikaans FALSE bs_bosnian FALSE cs_czech FALSE cy_welsh FALSE de_german FALSE el_greek TRUE en_english FALSE es_spanish FALSE fi_finnish FALSE fr_french FALSE hi_hindi FALSE hr_croatian FALSE hu_hungarian FALSE is_icelandic FALSE it_italian FALSE la_latin FALSE mk_macedonian FALSE nl_dutch FALSE no_norwegian FALSE pl_polish FALSE pt_brazil FALSE ro_romanian FALSE ru_russian FALSE sk_slovak FALSE sr_serbian FALSE sv_swedish FALSE sw_swahihi FALSE vi_vietnam FALSE zh_Mandarin` || exit 0
            lang=`echo $lang | sed 's/_.*//'`
            voice=`zenity --list --height=400 --title="Voice" --text="Choose voice to use" --radiolist --column "Select" --column "Voice" FALSE m1_male-1 FALSE m2_male-2 FALSE m3_male-3 FALSE m4_male-4 FALSE f1_female-1 TRUE f2_female-2 FALSE f3_female-3 FALSE f4_female-4 FALSE croak FALSE whisper` || exit 0
            voice=`echo $voice | sed 's/_.*//'`
            pitch=`zenity --scale --text="Pitch" --min-value=0 --max-value=99 --value=50` || exit 0
            speed=`zenity --scale --text="Speed" --min-value=0 --max-value=99 --value=43` || exit 0
            speed=`expr $speed \* 4`
            new=`echo "$target" | sed 's/.txt$/.wav/'`
            oldsize=`du -a -b "$target" | awk '{print $1}'`
            avwatcher "$new" "$prog" "$oldsize" &
            cat "$target" | espeak --stdin -v$lang+$voice -p $pitch -s $speed -w "$new" >/dev/null 2>&1
            ;;
    texthtml)    new=`echo "$target" | sed 's/.txt$/.html/'`
            oldsize=`du -a -b "$target" | awk '{print $1}'`
            avwatcher "$new" "$prog" "$oldsize" &
            txt2tags --infile="$target" --outfile="$new" -t xhtml >> /tmp/txt2tags.$$ 2>&1
            if test -s /tmp/txt2tags.$$
            then    zenity --info --title="txt2tags output" --text=`cat /tmp/txt2tags.$$`
            fi
            rm -f /tmp/txt2tags.$$
            ;;
    doctext)    new=`echo "$target" | sed 's/.doc$/.txt/'`
            incl=`zenity --list --height=300 --title="Options" --text="Include either of these?\n\nr = \"revisioning text\"\ns = \"hidden text\"" --checklist --column "Select" --column "Text type" FALSE r FALSE s ` || exit 0
            case $incl in
                '')    ;;
                *)    opts=`echo "$incl" | sed 's/|/ /g' | \
                    sed 's/^/ /' | sed 's/ / -/g'` ;;
            esac
            oldsize=`du -a -b "$target" | awk '{print $1}'`
            avwatcher "$new" "$prog" "$oldsize" &
            antiword $opts "$target" > "$new" 2>>/tmp/antiword.$$
            if test -s /tmp/antiword.$$
            then    zenity --info --title="antiword output" --text=`cat /tmp/antiword.$$`
            fi
            rm -f /tmp/antiword.$$
            ;;
    *)    zenity --info --title="OOPS!" --text="Not ready yet"; exit 0 ;;

esac
}
# end of text

#####
# Initial script
#####
PATH=$PATH:.; export PATH

# check some stuff first...
# if zenity is not installed, use xterm to display a warning
whereis zenity | grep / >/dev/null || exec xterm -hold -geometry 50x2 -bg red -T "OOPS! Must install zenity first!" -e true
# if imagemagick is not installed, display warning
whereis convert | grep / >/dev/null || exec zenity --warning --text="Must install \"imagemagick\" package first!"
# if ffmpeg is not installed, display warning
whereis ffmpeg | grep / >/dev/null || exec zenity --warning --text="Must install \"ffmpeg\" package first!"

targetpath=$1

while true
do
case $targetpath in
    '')    targetpath=`zenity --file-selection --title="Select source file for conversion"` || exit 0 ;;
    *)    break ;;
esac
done

target=`basename "$targetpath"`
dir=`echo "$targetpath" | sed "s/\/\$target//"`

test -d "$dir" && cd "$dir"
if test -f "$target"
    then    if test -s "$target"
            then    : OK
            else    exec zenity --warning --text="Source file is EMPTY!"
        fi
    else    exec zenity --warning --text="Source file NOT FOUND!"
fi

case "$target" in
    *.*)    ;;
    *)    zenity --info --text="It would be nice if file had an extension\nbut will try to work around that" ;;
esac

type=`file "$target" | tr '[A-Z]' '[a-z]'`
mtype=`file -i "$target" | tr '[A-Z]' '[a-z]'`
show=`file "$target" | awk -F: '{print $2}'`
case "$target" in
    *.???|*.????)    ext=`echo "$target" | sed 's/^.*\.//'` ;;
    *)        ext="" ;;
esac
ident=`identify "$target" 2>/dev/null | sed "s/^.*$ext //"`
ffident=`ffmpeg -i "$target" 2>&1 | tail -4 | head -3`
if echo "$ffident" | grep Unable >/dev/null
    then    ffident=""
fi

#    based on source file, what might the destinations be?
#     what application will we use to create them?
#    the case wildcards are things we know how to convert FROM
#    "prog" is the actual conversion program
#    "out" is a list of formats we can choose to convert TO
it=""; av=""    # for "image/text" and "audio/video"
# strings from file, and extensions, which imply input file type
case "$type$mtype$ext" in
    *text/plain*|*ASCII*)
        prog="text"; it="text" ;;
    *image*|*pdf|*ico)
        # output formats recognized by $prog, and which we want on menu
        prog="convert"; it="image" ;;
    *video*|*wmv|*asf|*m4p)
        # recognized multimedia formats, output to multi or audio
        prog="ffmpeg"; av="video" ;;
    *audio*|*mp3|*wav|*m4a|*wma)
        # recognized audio-only formats, output to audio
        prog="ffmpeg"; av="audio" ;;
    *msword*)
        # micro$oft office word document, v2 / v6 or newer
        prog=text; it="doc" ;;
    text/html)
        prog=text; it="html" ;;
    *text/rtf*)
        prog=text; it="rtf" ;;
    *Unicode*)
        prog=text; it="uni" ;;
    *opendocument*|*openoffice*)
        prog=text; it="odt" ;;
    *openoffice*)
        prog=text; it="oo" ;;
    *)    prog=`zenity --list --title="Unknown!" --text="Not sure what to do with this file!\n\nTarget file: \"$target\"\n\nInformation found:\n$type\n$mtype\n$ffident$ident\n\n\nBut, it is likely that though this file type was not\nexplicitly recognized by avconvert, it can be handled\nby convert (Images) or ffmpeg (Audio/Video).\n\nIf you would like to TRY, choose the utility you feel\nwould be appropriate and avconvert will do its best.\n\n" --radiolist --column "Select" --column "Utility to use" FALSE convert FALSE ffmpeg` || exit 0
        case $prog in
            ffmpeg)    av=`zenity --list --title="Select" --text="Tell ffmpeg whether this file is:" --radiolist --column "Select" --column "Content type" FALSE audio FALSE video` || exit 0 ;;
        esac
        ;;
       
esac

export dir target ext type mtype show ident ffident it av prog
av$prog

exit 0

#####
# READ ME
#####
avconvert

marc brumlik, tailored software inc, Thu Nov 13 18:50:35 CST 2008
tsi-inc at comcast dot net

#######
# IF YOU READ NO FURTHER THAN THIS, please note that when using
# "kcolorchooser" in text-to-image, there is a delay after choosing your
# color before the next window from avconvert comes up.  I have no idea why
# kcolorchooser is behaving this way.
#######

This project started out because I needed to create jpg files of numerous
resolutions from a number of source files and wanted an automatic way to
generate them more quickly.  Then my daughter asked for a way to convert
"unplugged" YouTube files into formats her friends could view.
Combining these two short scripts is where avconvert began.

Upon completion of each use of avconvert, a file /tmp/avconvert.debug
is written to, with lots of output showing exactly what the script
has done.  This can help a lot if you are getting unexpected results.

Things you might want to customize (starting from the top of the script):

Too much verbage that gives information about source files?
    comment out the "ident=" and "ffident=" lines

Too much window activity and want to eliminate "progress" window?
    uncomment the "exit 0" at the top of "avconvert-watch"

To add more extensions to recognized file types for image/video/audio:
    the script uses two different forms of output from the
    "file" command plus the source file extension, to decide
    what type of file it has to work with.  "file" isn't
    always useful, which is why extensions are needed at all.
    find the comment "# strings from file".  Below that are
    four cases.  Each contains first something that may have
    been output by "file", followed by a set of extensions.
    Just follow the example to add more extensions.

To add more extensions to the default list of output file types:
    Find the comment line beginning "Show appropriate output".
    Below that are four entries - two for "convert" and two
    for "ffmpeg".  These are each divided into two more.
    Just add any extension you like into that space-separated
    list (do NOT remove the leading space in the list).

To prevent a "default" output type for images:
    Currently the default output for images is the same as
    the source file type.  To prevent this, find the comment
    "This line sets default" and, on the line for "convert",
    and comment out the "out=" line below that.

To change the list of image resolutions presented:
    Find the comment "# if doing image convert".  Add or
    remove any resolutions from the list.  Also, setting
    one or more from FALSE to TRUE will cause them to be
    checkboxed when the window appears.

To change the list of jpg quality settings:
    Find the comment "# if this is a jpeg".  Add or remove.

To change the list of font sizes:
    Modify the line beginning "sizelist=".

To change bitrate choices for ffmpeg audio conversion:
    Find the comment line "# audio bitrate".
    To set a default bitrate, change one of the FALSE to TRUE.

To prevent the final window showing summary after completion:
    (Not recomment, since this is ALSO where you might see
    diagnostic output after a failure)
    Find the comment " Show results summary" and comment out the
    "zenity" line that follows it.

COMMENTS WELCOME!

</code>

Υπάρχει και το DownloadHelper το οποίο ειναι ενα add-on του firefox και αν για παραδειγμα βλεπεις ενα βιντεο στο youtube σου εμφανιζει κ την επιλογη να κατεβασει μονο τον ηχο σε μορφη mp3!!

Παρε το flv αρχειο και χρησιμοποιησε αυτη την εντολη στον φακελο που βρισκεται....ffmpeg -i /fakelos/poueinai/onoma /fakelos/pou8apaei/onoma.mp3