Multimedia

# enable SPDIF
amixer set IEC958 100 unmute
 
# create caver
DIR=/media/Volume
IFS=$(echo -en "\n\b")
 
for i in $(find $DIR -name "*.avi"); do
	echo $i
	ffmpeg -y -itsoffset -60 -i $i -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 ${i//.avi/.jpg} 2&1> /dev/null
done
 
# cut part from a video
ffmpeg -ss 00:30:00 -t 00:10:00 -i file_in.avi file_out.avi
 
# split m4a to mp3 files
IFS=$(echo -en "\n\b")
for INPUT in $(ls *.m4a); do
    LENGTH=300
    for i in {0..150}; do
        START=$((i*LENGTH))
        ffmpeg -ss ${START} -t ${LENGTH} -i ${INPUT} -vn -c:a mp3 ${INPUT%.*}_$((i+1)).mp3
    done
done
 
# rip dvd audio to mp3
for((x=1; x<=18; x++)) do
	transcode -i /dev/dvd -x dvd -T ${x},1,1 -a 0 -y wav -m track${x}.wav
	lame --abr 320 track${x}.wav track${x}.mp3
	rm track${x}.wav
done
 
# extract audio from video file
sudo apt-get install -y libav-tools
avconv -i FILE_IN.mp4 -vn -c:a copy FILE_OUT.mp3
 
# convert flv to mpeg2
ffmpeg -i input.flv -target pal-dvd output.mpg
 
 
# stream with vlc 1.1
vlc Sintel.2010.2K.SURROUND.x264-VODO.mp4 --sout '#standard{access=http,mux=ts,dst=:9070}'
 
to play:
vlc http://STREAM_PC_IP:9070

Convert stream to DVD
http://wiki.ubuntuusers.de/DVD-Authoring

sudo apt-get install dvdauthor
mencoder VIDEO_IN.m2t -oac copy -ovc copy -of mpeg -mpegopts format=dvd -o VIDEO_OUT.mpg
dvdauthor -o /tmp/dvd -t VIDEO_OUT.mpg
dvdauthor -o /tmp/dvd -T 

Joystick
https://html5gamepad.com/ - HTML5 gamepad tester

apt install -y jstest-gtk

Convert MP4 to MP3

ffmpeg -i file.mp4 file.mp3

Links
http://www.free-hotspot.com/german/de_index.htm - list of all free hotspots
http://www.mtvmusic.com/
http://www.putpat.tv/
http://www.networkmultimedia.org/
http://www.xtreamer.net/ - Xtreamer (Media Player & Streamer)
http://linuxoniphone.blogspot.com/ - Android on iPhone
http://www.iconfinder.com/
http://www.bigbuckbunny.org/index.php/trailer-page/ - Big Buck Bunny Trailer
http://unicode.org/Public/emoji/5.0/emoji-data.txt - emoji