Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
gg#######
#
# E-scripts on ffmpeg and avconv.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/ffmpeg.e>
#           or at <http://angg.twu.net/e/ffmpeg.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.mailing-lists»		(to "mailing-lists")
# «.ffmpeg»			(to "ffmpeg")
# «.screencasts»		(to "screencasts")
# «.script-2012oct»		(to "script-2012oct")
# «.adding-audio»		(to "adding-audio")
# «.avconv-wheezy»		(to "avconv-wheezy")
# «.avconv»			(to "avconv")
# «.avconv-grab»		(to "avconv-grab")
# «.x11grab-problem-erasal»	(to "x11grab-problem-erasal")
# «.recordmydesktop»		(to "recordmydesktop")
# «.audio-quality»		(to "audio-quality")
# «.extract-audio»		(to "extract-audio")
# «.libav-deb-src»		(to "libav-deb-src")
# «.key-frames»			(to "key-frames")
# «.dvd-subtitles»		(to "dvd-subtitles")
# «.audio-plus-photos-to-video»	(to "audio-plus-photos-to-video")
# «.mono»			(to "mono")
# «.extract-part-of-mp3»	(to "extract-part-of-mp3")
# «.raising-volume»		(to "raising-volume")
# «.libav-git»			(to "libav-git")
# «.cover-picture»		(to "cover-picture")
# «.rotate»			(to "rotate")
# «.rotate-avconv»		(to "rotate-avconv")




#####
#
# mailing lists
# 2012nov10
#
#####

# «mailing-lists» (to ".mailing-lists")
# http://ffmpeg.org/pipermail/ffmpeg-user/2012-February/004824.html
# http://ffmpeg.org/pipermail/ffmpeg-user/




#####
#
# ffmpeg
# 2012feb04
#
#####

# «ffmpeg»  (to ".ffmpeg")
# (find-angg "VIDEOS/Makefile")

# (find-status   "ffmpeg")
# (find-vldifile "ffmpeg.list")
# (find-udfile   "ffmpeg/")
# (find-status   "ffmpeg-doc")
# (find-vldifile "ffmpeg-doc.list")
# (find-udfile   "ffmpeg-doc/")
# (find-udfile   "ffmpeg-doc/html/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
ffmpeg -i DSC_0141.MOV DSC_0141.flv
ffmpeg -i DSC_0142.MOV DSC_0142.flv
ffmpeg -i DSC_0142.MOV -ar 44100 DSC_0142.flv
ffmpeg -i DSC_0142.MOV -ar 44100 -r 6 DSC_0142_6.mov
ffmpeg -i DSC_0142.MOV           -r 6 DSC_0142_6b.mov

cd /tmp/
mplayer DSC_0142.MOV
mplayer DSC_0142_6.MOV

# http://ffmpeg-users.933282.n4.nabble.com/Error-message-video-frame-size-changed-td3314555.html
# (find-fline "/etc/ffserver.conf")

http://ffmpeg.org/faq.html
http://sourceforge.net/projects/ffmpeg-gui/
http://ffmpeg-gui.sourceforge.net/

# (find-man "1 ffmpeg")
# (find-man "1 ffmpeg" "extract images from a video")
# (find-man "1 ffmpeg" "-r fps")
# (find-man "1 ffmpeg" "-f fmt")
# (find-man "1 ffmpeg" "-vsync parameter")
# (find-man "1 ffmpeg" "ffmpeg -f x11grab")
# (find-man "1 ffmpeg" "seek_point, sp")
# (find-man "1 ffmpeg" "-ss position")
# (find-man "1 ffmpeg" "-t duration")
# (find-man "1 ffmpeg" "-b bitrate")
# (find-man "1 ffplay")
# (find-man "1 ffprobe")
# (find-man "1 ffserver")

# (find-sh "ffmpeg -h")
# (find-sh "ffmpeg -formats")
# (find-sh "ffmpeg -formats" "MOV")
# (find-sh "ffmpeg -formats" "h264" "H.264")


ffmpeg-doc

http://www.rumourisnews.com/install_ffmpeg_on_debian.html
http://linuxers.org/tutorial/how-slowdown-or-speed-video-using-ffmpeg-and-yuvfps
http://howto-pages.org/ffmpeg/
http://stackoverflow.com/questions/1555771/which-frame-does-ffmpeg-get-when-reducing-the-frame-rate
http://www.linuxquestions.org/questions/linux-general-1/ffmpeg-dramatic-decrease-in-size-from-camera-videos-660241/
http://answers.yahoo.com/question/index?qid=20080405224044AAq2015
http://canerblt.wordpress.com/2011/07/10/changing-fps-rate-of-a-video-with-ffmpeg/

<edrx> hello - how do I reduce the number of frames of a video? it's
       for recording a conference with few slides and a speaker who
       does not move too much... the camera produced a .mov with 24
       fps, and I'd like to reduce that to 8 fps by keeping only 1 in
       each 3 frames...
<edrx> (btw, I am on debian, and using the command line)
<rypervenche> Hi all. My screencasting script broke a while back,
              apparently due to an update in ffmpeg. It uses x264,
              however at first I record lossless data. I have since
              fixed my script using "-vcodec libx264 -preset
              ultrafast", but is this lossless data? Should I be
              using somethign else?
<rypervenche> Before I was using -vpre lossless_ultrafast. Is there
              still a lossless option or should I only use the
              ultrafast option?



#####
#
# Creating screencasts
# 2012oct27
#
#####

# «screencasts»  (to ".screencasts")
# http://ubuntuguide.org/wiki/Screencasts
# http://wiki.nosdigitais.teia.org.br/Screencast

# (find-man "1 ffmpeg")
# (find-man "1 ffmpeg" "X11 grabbing")
# (find-man "1 ffmpeg" "-s size" "  cif")

ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
ffmpeg -f x11grab -s cif -r 25 -i $DISPLAY /tmp/out.mpg
laf   /tmp/out.mpg
rm -v /tmp/out.mpg
ffmpeg -f x11grab        -r 25 -i $DISPLAY /tmp/out.mpg
laf   /tmp/out.mpg
# (find-video "/tmp/out.mpg")


# (find-angg ".fvwm/.fvwm2rc" "moving-the-cursor")
# (find-man "1 ffmpeg")

* (eepitch-shell12)
* (eepitch-shell)
rm -v /tmp/out.mp*
# sleep 3 &&
ffmpeg -loglevel quiet -f x11grab -s 540x600+0+0 -r 5 -i $DISPLAY /tmp/out.mp4 >& /dev/null
*
* (eepitch-shell)
*  (find-fvwm0 "CursorMove -1000p -1000p")
*  (find-fvwm0 "CursorMove +0 +100")

* (eepitch-shell2)
# (find-angg "eev-videos/video1.sh")
~/eev-videos/video1.sh xterm

* (eepitch-shell2)
killall ffmpeg
killall -9 ffmpeg

* (setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "0"))
* (find-mplayer "/tmp/out.mp4")
* (find-mplayer0 "/tmp/out.mp4")
* (setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2"))

* (setq ee-mplayer-options '("-fs" "-osdlevel" "2"))


# (find-angg ".emacs" "mplayer-options")




#####
#
# Header for screencast scripts, oct/2012
# 2012oct28
#
#####

# «script-2012oct» (to ".script-2012oct")
# (find-angg "eev-videos/1.sh")
# (find-bashnode "Top")
# (find-bashnode "Bourne Shell Builtins" "`shift'")
# (find-bashnode "Bash Builtins" "`read'" "`-s'")
# (find-es "console" "tput")
# (find-man "5 terminfo" "setaf")
# (find-man "5 terminfo" "setab")
# (find-man "5 terminfo" "COLOR_YELLOW")
# (find-man "5 terminfo" "COLOR_BLUE")
# (find-man "5 terminfo" "COLOR_GREEN")
# (find-man "5 terminfo" "bold")

# Command-line arguments for screencasts
fvwmdown   () { FvwmCommand "CursorMove +0 +100"; }
ffmpeggrab () {
  rm -f /tmp/out.mp4
  nohup ffmpeg -loglevel quiet -f x11grab -i $DISPLAY $* /tmp/out.mp4 \
    > /dev/null 2>&1 &
}
if [[ "$1" == "down"   ]]; then fvwmdown; shift; fi
if [[ "$1" == "ffmpeg" ]]; then ffmpeggrab -r 5 -s $2; shift 2; fi
if [[ "$1" == "xterm"  ]]; then
  G=$2; shift 2; exec xterm -T xterm -geometry $G -e $0 $*
fi

# Colors
C0=$(tput sgr0)
C1=$(tput setaf 3; tput setab 1; tput bold;)
CB=$(tput bold; tput setaf 4)
CG=$(tput setaf 2)

# Sleep, sleep-then-echo, display-prompt-and-command, display-and-eval
slep () { sleep $1; }
slep () { stty -echo; read; stty echo; }
slep () { read -s; }
se   () { read; echo "$2"; }
se   () { echo; slep $1; echo "$2"; }
dpc  () {
  echo -n "${CG}$PWD(edrx)\$${C0} "; slep 1;
  echo -n "$*"; slep 1;
  echo;
}
function de () { dpc "$*"; eval $*; }


* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
makeR1C e/ffmpeg.e.html

# http://angg.twu.net/e/ffmpeg.e.html
buffer-file-name
buffer-name





#####
#
# Adding audio to a video
# 2012oct28
#
#####

# «adding-audio» (to ".adding-audio")
# (find-fline "~/eev-videos/")
# (find-man "1 ffmpeg" "-acodec")
# (find-man "1 ffmpeg" "-newaudio")

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
cd ~/eev-videos/
ffmpeg -i 2012oct28-intro-pt.mp4 \
       -i 2012oct28-intro-pt.mp3 \
       -vcodec copy \
       -acodec copy \
       -acodec copy \
       eev-video.mp4 \
       -newaudio




#####
#
# avconv on wheezy
# 2013jun30
#
#####

# «avconv-wheezy» (to ".avconv-wheezy")

# (find-man "1 avconv")
# (find-man "1 avprobe")
# (find-man "1 avserver")
# (find-man "1 avplay")
# (find-man "1 qt-faststart")
# (find-man "1 ffprobe")
# (find-man "1 ffserver")
# (find-man "1 ffplay")






#####
#
# avconv / libav-tools
# 2012nov10
#
#####

# «avconv» (to ".avconv")
# http://packages.debian.org/squeeze-backports/ffmpeg
# http://packages.debian.org/squeeze-backports/libav-tools
# (find-status   "libav-tools")
# (find-vldifile "libav-tools.list")
# (find-udfile   "libav-tools/")
# (find-man "1 avconv")
# (find-man "1 avconv" "X11 grabbing")
# (find-man "1 avconv" "qxga")

# (find-angg "eev-videos/0.sh")
# (find-angg "eev-videos/2.sh")

* (eepitch-bash)
* (eepitch-kill)
* (eepitch-bash)
rm -v /tmp/out.log
rm -v /tmp/out.mp4
source ~/eev-videos/0.sh
ffmpeg-kill
# ffmpeg-grab -s qxga
ffmpeg-grab -s 1024x600
# sleep 10
ffmpeg-kill
# (find-fline "/tmp/")
# (find-fline "/tmp/out.log")
# (find-mplayer "/tmp/out.mp4")

http://backports.debian.org/debian-backports/pool/main/liba/libav/libav_0.8.3-1~bpo60+1.dsc
http://backports.debian.org/debian-backports/pool/main/liba/libav/libav_0.8.3-1~bpo60+1.debian.tar.gz
http://backports.debian.org/debian-backports/pool/main/liba/libav/libav_0.8.3.orig.tar.gz




#####
#
# avconv grab
# 2016oct07
#
#####

# «avconv-grab» (to ".avconv-grab")
# (find-es "x" "screen-dimensions")
# (find-sh0 "xdpyinfo | grep 'dimensions:' | awk '{print $2}'")
# (find-man "1 avconv")
# (find-man "1 avconv" "X11 grabbing")
# (find-man "1 avconv" "qxga" "2048x1536")
# (find-man "1 avconv" "xga 1024x768")
# (find-es "emacs" "adjust-geometry")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
avconv -f x11grab -s 1280x800 -r 5 -i :1.0 /tmp/out.mpg
avconv -f x11grab -i :1.0 /tmp/out.mpg
avconv -f x11grab -s 1280x800 -i :1.0 /tmp/out.mpg
avconv -f x11grab -s 1280x800 -i :1.0 -y /tmp/out.mpg
avconv -f x11grab -s 1280x800 -i :1.0 -y /tmp/out.mp4
# (find-video "/tmp/out.mpg")
# (find-video "/tmp/out.mp4")

* (set-frame-width  nil 167)
* (set-frame-height nil 59)
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
avconv -f x11grab -s xga -i :1.0 -y /tmp/out.mp4
* (message "bcdefg")

# (find-video "/tmp/out.mp4")




#####
#
# x11grab problem with erasals
# 2016oct18
#
#####

# «x11grab-problem-erasal» (to ".x11grab-problem-erasal")
# http://angg.twu.net/eev-videos/x11grab-problem-2016oct18.mp4
# (find-fline "/home/edrx/LOGS/2016oct18.emacs")
# (find-fline "/home/edrx/LOGS/2016oct18.emacs" "<wgreenhouse> edrx:")
# (find-fline "/home/edrx/LOGS/2016oct18.libav")
# (find-fline "/home/edrx/LOGS/2016oct18.libav" "XShmGetImage")
# (find-es "x" "xserver-log")

# (find-zsh "dmissing -i XShmGetImage")
# (find-man "3 XShmGetImage")





#####
#
# recordmydesktop
# 2016oct23
#
#####

# «recordmydesktop» (to ".recordmydesktop")
# http://unix.stackexchange.com/questions/73622/how-to-get-near-perfect-screen-recording-quality

# (find-es "flash" "recordmydesktop")
# (find-es "video" "recordmydesktop")
# (find-man "1 recordmydesktop")

(/ 768 640.0)
(/ 59 1.2)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
* (size 167 59)
recordmydesktop --display :1.0 -x 0 -y 0 --width 1024 --height 768 --full-shots --fps 5 \
  -o /tmp/out.ogv &

file:///tmp/out.mp4.ogv

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
* (size 167 49)
recordmydesktop --display :1.0 -x 0 -y 0 --width 1024 --height 640 \
  --full-shots --fps 5 \
  -o /tmp/out.ogv &
killall recordmydesktop

# file:///tmp/out.ogv


hello


killall recordmydesktop


Hello






#####
#
# Reducing audio quality with avconv
# 2012nov15
#
#####

# «audio-quality» (to ".audio-quality")
# (find-man "1 avconv" "-b:a 128k")
# (find-man "1 avconv" "-codec copy")
# (find-man "1 avconv" "avconv -i /tmp/a.wav -ar 22050")
# (find-eev-video-links "2pt")
# (find-fline "~/eev-videos/" "video2pt-")

# (find-fline "~/NICOTINE/Atras_do_porto/" "menino_bonito.mp3")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v ~/NICOTINE/Atras_do_porto/menino_bonito.mp3 /tmp/a1.mp3
cd /tmp/
avconv -i a1.mp3 -b 64k a2.mp3
avconv -i a2.mp3 -b 32k a3.mp3
# (find-fline "/tmp/")
# (find-TH "html5-audio")
cp -v a3.mp3 ~/TH/L/html5-audio.mp3
Scp-np a3.mp3 $TWUS/html5-audio.mp3



#####
#
# Extracting the audio from a video
# 2017mar12
#
#####

# «extract-audio» (to ".extract-audio")

# (find-fline "/sda5/videos/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /sda5/videos/
avconv -i David_Bowie_-_Amsterdam-153Abqg7_3I.mp4 -codec copy \
          David_Bowie_-_Amsterdam-153Abqg7_3I.mp3







#####
#
# libav (from the debian sources)
# 2012nov10
#
#####

# «libav-deb-src» (to ".libav-deb-src")
# http://backports.debian.org/debian-backports/pool/main/liba/libav/
# http://backports.debian.org/debian-backports/pool/main/liba/libav/libav_0.8.3-1~bpo60+1.dsc
# http://backports.debian.org/debian-backports/pool/main/liba/libav/libav_0.8.3-1~bpo60+1.diff.gz
# http://backports.debian.org/debian-backports/pool/main/liba/libav/libav_0.8.3.orig.tar.gz
#*
rm -Rv ~/usrc/libav/
mkdir  ~/usrc/libav/
cd $S/http/backports.debian.org/debian-backports/pool/main/liba/libav/
cp -v libav_0.8.3* ~/usrc/libav/
cd     ~/usrc/libav/
dpkg-source -sn -x libav_0.8.3-1~bpo60+1.dsc
cd     ~/usrc/libav/libav-0.8.3/
dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
# (find-fline "~/usrc/libav/")
* (eepitch-shell)
cd ~/usrc/libav/
sudo dpkg -i *.deb

#*
# (code-c-d "libav" "~/usrc/libav/libav-0.8.3/")
# (find-libavfile "")
# (find-libavfile "Changelog")
# (find-libavfile "Changelog" "version 0.8_beta1:")

# (find-libavfile "doc/")
# (find-libavgrep "grep -nH -e grab doc/*")




#####
#
# Key frames
# 2012nov17
#
#####

# «key-frames» (to ".key-frames")
# http://en.wikipedia.org/wiki/Key_frame
# http://en.wikipedia.org/wiki/Video_compression_picture_types
# http://libav.org/avconv.html
# http://libav.org/css/bootstrap.css
# http://libav.org/css/libav.css
# http://libav.org/css/alert.css

# (find-man "1 avconv" "-g gop_size" "group of pictures")
# (find-man "1 avconv" "-c:a copy")

# (find-zsh "dmissing avconv.html")

# (find-fline "~/LOGS/2013jan10.libav")
# (defun eejump-9 () (find-2b '(find-es "ffmpeg") '(find-ebuffer "#libav@irc.freenode.net")))

# (find-angg "eev-videos/" "video4-eepitch.mp4")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -fv ~/eev-videos/video4-eepitch.mp4 /tmp/a.mp4
cd /tmp/
nice avconv -i /tmp/a.mp4 -g  5 -c:a copy -y /tmp/a-g05.mp4  |& tee a-g05.log
nice avconv -i /tmp/a.mp4 -g 10 -c:a copy -y /tmp/a-g10.mp4  |& tee a-g10.log
laf /tmp/*.mp4

# (find-fline "/tmp/")
# (find-video "/tmp/b.mp4")





#####
#
# dvd subtitles
# 2013feb14
#
#####

# «dvd-subtitles» (to ".dvd-subtitles")
# http://ffmpeg-users.933282.n4.nabble.com/extract-subtiles-td939612.html

# (find-man "1 ffmpeg")
# (find-man "1 avconv")
# (find-man "1 avconv" "-sbsf mov2textsub")
  avconv -i file.mov -an -vn -sbsf mov2textsub -c:s copy -f rawvideo sub.txt

# (find-man "1 avconv" "BITSTREAM FILTERS\n")





#####
#
# Converting audio+photos to video
# 2013jun30
#
#####

# «audio-plus-photos-to-video» (to ".audio-plus-photos-to-video")
# (find-freenode "#libav")
# (find-fline "~/LOGS/2013jun30.libav")
# (find-fline "~/LOGS/2013jun30.libav" "image2pipe")
# http://stackoverflow.com/questions/16315192/avconv-make-a-video-from-a-subset-on-images

# (find-man "1 avconv" "image2pipe")
# Where's avconv in wheezy? =(

# (find-zsh "installeddebs | sort | grep libav")
# (find-zsh "availabledebs | sort | grep libav")

# (find-status   "libav-tools")
# (find-vldifile "libav-tools.list")
# (find-udfile   "libav-tools/")




#####
#
# Creating mono .mp3 files
# 2013aug11
#
#####

# «mono» (to ".mono")
# (find-man "1 ffmpeg" "AUDIO ENCODERS")
# (find-man "1 ffmpeg" "-ac channels")






#####
#
# Extracting a part of an mp3 file
# 2013aug12
#
#####

# «extract-part-of-mp3» (to ".extract-part-of-mp3")
# (find-es "mplayer" "extract-part-of-mp3")
# (find-man "1 ffmpeg" "-ss position")
# (find-man "1 ffmpeg" "-t duration")
# (find-man "1 avconv")
# (find-sh "avconv -formats")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v ~/TH/L/html5-audio.mp3     /tmp/in.mp3
cp -v ~/audios/2013ago01-ict.3ga /tmp/in.3ga
cp -v ~/audios/2013ago01-ict.mp3 /tmp/in2.mp3

cd /tmp/
avconv    -i in.mp3 -ss 0:30 -t 0:35 -y out.mp3
avconv -y -i in.mp3 out.mp3
avconv -y -i in.mp3 -acodec copy out.mp3
avconv -y -i in.mp3 -acodec copy out.mp3
avconv -y -i in.mp3 -acodec copy -ss 30 out.mp3
avconv -y -i in.mp3 -acodec copy -ss 30 -t 5 out.mp3
avconv -y -i in.3ga -acodec copy -ss 1:24:57 -t 7:10 out.3ga
avconv -y -i in.3ga              -ss 1:24:57 -t 430 out.mp3
avconv -y -i in.3ga              -ss 1:24:57 -t 430 -b:a 128k -ac 1 out2.mp3


# «raising-volume» (to ".raising-volume")
avconv -y -i out2.mp3 -b:a 128k -t 20 -ac 1 -filter volume=volume=10dB out3.mp3
avconv -y -i out2.mp3 -b:a 128k -t 20 -ac 1 -vol 80dB out3.mp3
avconv -y -i out2.mp3 -b:a 128k -t 20 -ac 1 -vol 512 out3.mp3
cd /tmp/
avconv -y -i out2.mp3 -b:a 128k -t 20 -ac 1 -vol 1024 out3.mp3
avconv -y -i out2.mp3 -b:a 128k       -ac 1 -vol 1024 out3.mp3
# (find-audio "/tmp/out3.mp3")

# (find-audio "/tmp/out2.mp3")
# (find-audio "/tmp/out3.mp3")

# (find-fline "~/LOGS/2013aug12.libav")
<elenril> anyway, https://libav.org/avconv.html#volume
<edrx> trying...
<edrx> "-filter volume=volume=10dB" ?


cp -v out2.mp3 out3.mp3




#####
#
# libav from git
# 2013aug12
#
#####

# «libav-git» (to ".libav-git")
# http://www.libav.org/download.html
# git://git.libav.org/libav.git

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
# (find-fline "~/bigsrc/")
cd ~/bigsrc/
git clone --depth 1 git://git.libav.org/libav.git

cd ~/bigsrc/libav/
./configure   |& tee oc
make          |& tee om

(code-c-d "libav" "~/bigsrc/libav/")
;; (find-libavfile "")
# (find-fline "~/bigsrc/libav/")




#####
#
# Cover picture
# 2014may13
#
#####

# «cover-picture» (to ".cover-picture")
# http://stackoverflow.com/questions/14423647/ffmpeg-remove-cover-picture-from-mp3-convert-to-ogg-without-cover
# (find-man "1 ffmpeg")




#####
#
# rotate
# 2015jan30
#
#####

# «rotate» (to ".rotate")
# http://stackoverflow.com/questions/3937387/rotating-videos-with-ffmpeg
# (find-man "1 ffmpeg")
# (find-man "1 ffmpeg" "transpose")
# (find-man "1 ffmpeg" "hflip")
# (find-man "1 ffmpeg" "vflip")
# (find-man "1 ffmpeg" "  vflip")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
rm -v output.mp4
# ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4
# ffmpeg -vfilters "rotate=90" -i input.mp4 output.mp4
# ffmpeg -vf "rotate=90" -i input.mp4 output.mp4
# ffmpeg -i input.mp4 -vf "transpose=1" output.mp4
# rm -v output.mp4
ffmpeg -i input.mp4 -vf "transpose=1" output.mp4; # 90 degrees clockwise
ffmpeg -i input.mp4 -vf "transpose=2" output.mp4; # 90 degrees counterclockwise

ffmpeg -i input.mp4 -vf "hflip,vflip" output.mp4; # 180 degrees

# (find-video "/tmp/input.mp4")
# (find-video "/tmp/output.mp4")

# (find-sh "ffmpeg -filters")
# (find-man "ffmpeg")
# (find-man "ffmpeg" "  transpose")



# (find-video "/tmp/output.mp4")
# (find-man "mplayer2")





#####
#
# rotate a video with avconv
# 2016sep07
#
#####

# «rotate-avconv» (to ".rotate-avconv")
# http://stackoverflow.com/questions/25031557/rotate-mp4-videos-without-re-encoding
# (find-sh "ls /tmp/*.mp4")
# (to "avconv-wheezy")
# (to "avconv")
# (find-man "1 avconv")
# (find-man "1 avprobe")
# https://libav.org/avconv.html
# https://libav.org/avconv.html#transpose
# https://wiki.libav.org/Encoding/aac

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
STEM=20160907_casa_e_lana
avprobe -v quiet $STEM.mp4 -show_streams
avprobe -v quiet $STEM.mp4 -show_streams | grep rot
avconv -i $STEM.mp4 -c copy -metadata:s:v:0 rotate=0  ${STEM}_0.mp4
avconv -i $STEM.mp4 -c copy -metadata:s:v:0 rotate=90 ${STEM}_90.mp4
avconv -i $STEM.mp4 -vf "transpose=clock" ${STEM}_90.mp4

for i in $STEM*.mp4 do
  echo $i:
  avprobe -v quiet $STEM.mp4 -show_streams | grep rot
done

# ^ Not working... how can I play a video in a different orientation?

# (find-man "1 mplayer2")
# (find-man "1 mplayer2" "rotate[=<0-7>]")

(defvar     ee-mplayer-options '("-fs" "-osdlevel" "2" "-zoom"))

(let ((ee-mplayer-options `("-vf" "rotate=1" ,@ee-mplayer-options)))
  ee-mplayer-options)

(let ((ee-mplayer-options `("-vf" "rotate=1" ,@ee-mplayer-options)))
  (find-video "/tmp/20160907_casa_e_lana.mp4"))

cd /tmp/
mplayer /tmp/20160907_casa_e_lana.mp4
mplayer -vf rotate=1 /tmp/20160907_casa_e_lana.mp4






http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html

# (find-fline "/tmp/" "in.mp3")

(ee-to-seconds "7:10")

# (find-status   "mp3gain")
# (find-vldifile "mp3gain.list")
# (find-udfile   "mp3gain/")
# (find-udfile   "mp3gain/README.method")
# (find-status   "normalize-audio")
# (find-vldifile "normalize-audio.list")
# (find-udfile   "normalize-audio/")

# (find-udfile "normalize-audio/changelog.gz")
# (find-udfile "normalize-audio/README.gz")
# (find-udfile "normalize-audio/TODO")
# (find-udfile "normalize-audio/changelog.Debian.gz")
# (find-udfile "normalize-audio/copyright")
# (find-udfile "normalize-audio/README.Debian")
# (find-man "1 normalize-mp3")
# (find-man "1 normalize-audio")
# (find-fline "/usr/bin/normalize-ogg")
# (find-man "1 normalize-ogg")


normalize-audio

# (find-udfile "mp3gain/changelog.Debian.gz")
# (find-udfile "mp3gain/copyright")
# (find-udfile "mp3gain/README.Debian")
# (find-man "1 mp3gain")

normalize






# (find-fline "~/audios/")
cd ~/audios/
avconv -i 2013ago01-ict.3ga 2013ago01-ict.mp3






#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: