PROJECTOR
COMPUTER
SKY SIMULATOR
COMPENDIUM
SOFTWARE
DOME
VIDEOS
LIFE WITH
Contacts:
Yves LHOUMEAU
(Optics-Linux)

Lionel RUIZ
(Software-Videos)

Olivier NIVOIX
(Software-Linux)
More than 150
LSS-planetariums
worldwide!

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Lhoumeau Sky System
SOFTWARE
VIRTUALDUB
MEDIACODER
FFMPEG
INTERACTIVITY

Lhoumeau Sky System - Stellarium scripts
FFMPEG

COMMANDS TO CONVERT VIDEOS FOR THE DOME WITH FFMPEG.

# COMPRESSER EN MPEG4 QUALITE 2 A PARTIR IMAGES / COMPRESS IN MPEG4 FROM IMAGES
ffmpeg -r 30 -f image2 -i tun/tun%05d.jpg -s 2160x2160 -vcodec mpeg4 -q:v 2 tun30.mp4

# COMPRESSER EN MPEG4 QUALITE 2 / COMPRESS IN MPEG4 QUALITY 2
ffmpeg -i movie.avi -i audio.wav -vcodec mpeg4 -q:v 2 -acodec libvorbis movie.mp4

# SAUVER EN OGG / SAVE AS OGG
ffmpeg -i venus_transit-bays_mountain.mp4 -vn -acodec libvorbis venus_transit-bays_mountain-en.ogg

# EXTRAIRE UN BOUT DE SEQUENCE DE 30S EN COMMENCANT A 1:45
ffmpeg -i sequenceacouper.avi -ss 00:01:45.00 -t 00:00:30.00 -c:v copy -c:a copy  nouvellesequence.avi

# RECADRER UNE VIDEO POSITION X,Y ET LARGEUR W x HAUTEUR H / CROP VIDEO POSITION X,Y AND WIDTH W x HEIGHT H
ffmpeg -i in.mp4 -filter:v "crop=w:h:x:y" out.mp4

# VIRER LE SON / NO SOUND
ffmpeg -i venus_transit-bays_mountain.mp4 -vcodec copy -an venus_transit-bays_mountain-ns.mp4

# COLLER UN SON SANS RECOMPRESSER / PASTE AUDIO WITHOUT RECOMPRESSING
ffmpeg -i venus_transit-bays_mountain-ns.mp4 -i venus_transit-bays_mountain-fr.ogg -codec copy venus_transit-bays_mountain.mp4

# 3D VR Conversion
ffmpeg -i it_float-vr3D.mp4 -filter:v "crop=1920:3840:0:0" -vcodec mpeg4 -q:v 2 -acodec libvorbis it_float-90.mp4
ffmpeg -i it_float-90.mp4 -vf "transpose=1" -vcodec mpeg4 -q:v 2 -acodec copy it_float-newlinecinema-vrcub4K.mp4
ffmpeg -i it_float-newlinecinema-vrcub4K.mp4 -s 3200x1600 -vcodec mpeg4 -q:v 2 -acodec copy it_float-newlinecinema-vrcub.mp4

# ROTATION DE LA VIDEO 90° DROITE / ROTATE VIDEO 90° CLOCKWISE
ffmpeg -i ori.mp4 -vf "transpose=1" ret.mp4
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip

# REDUIRE TAILLE VIDEO / RESIZE VIDEO
ffmpeg -i movie.avi -s 1080x1080 -i audio.wav -vcodec mpeg4 -q:v 2 -acodec libvorbis movie.mp4

# SAUVER EN MP3 / SAVE AS MP3
ffmpeg -i video.mp4 -ab 256k son.mp3

# COMPRESSER DOMEMASTERS4K EN 1200x1200 EN MPEG4 QUALITE 2 / FROM DOMEMASTERS 4K TO 1200P
ffmpeg -r 30 -f image2 -i tun/tun%05d.jpg -s 1200x1200 -vcodec mpeg4 -q:v 2 tun30.mp4

# TRANSFORMER UNE SEQUENCE DE 100 FRAMES A PARTIR DE LA FRAME 2 EN H264
ffmpeg -r 30 -start_number 2 -i img%03d.png -vframes 100 -c:v libx264 -pix_fmt yuv420p out.mp4

# CHANGER LE FRAMERATE
ffmpeg -i sts135-slecedtomato.mp4 -an -vcodec mpeg4 -q:v 1 -framerate 24 sts135-slicedtomato2.mp4

# DECOMPOSER EN IMAGE PAR IMAGE ET AUDIO
ffmpeg -i sts135-slicedtomato.avi i%03d.jpg
ffmpeg -i sts135-slicedtomato.avi -vn -acodec libvorbis sts135-slicedtomato-en.ogg

# GENERER VIDEO COMPATIBLE DIGITARIUM ALPHA
ffmpeg -i myvideo.avi -vcodec mpeg2video -q:v 2 -acodec libmp3lame output.mpg
ffmpeg -i myvideo.avi -c:v mpeg2video -qscale:v 2 -c:a libmp3lame output.mpg

# GENERER UN VRAI MPEG2
ffmpeg -i myvideo.avi -codec:v mpeg2video -qscale:v 2 -codec:a mp2 -b:a 192k output.mpg

# FRAMES -> VIDEO X264
ffmpeg -framerate 30 -i inputframename%04d.png -c:v libx264 -profile:v high -crf 18 -pix_fmt yuv420p outputmoviename.mp4

# VIDEO -> FRAMES
ffmpeg -i inputmoviename -q:v 1 directoryname/outputframename%04d.tga

# EXTRACT ONE FRAME
ffmpeg -ss 00:01:00 -i inputmoviename -vframes 1 -q:v 1 outputimagename

# EXTRACT A TIME RANGE FROM A MOVIE
ffmpeg -i sequenceacouper.avi -ss 00:39:45.00 -t 00:00:30.00 -c:v copy -c:a copy  nouvellesequence.avi

# FRAMES -> MOVIE MPEG2VIDEO HQ
ffmpeg -threads auto -r 30 -i "inputframedirectory/inputframename%04d.png" -f vob -vcodec mpeg2video -b:v 30000k -minrate 30000k -maxrate 30000k -g 15 -bf 2 -an -trellis 2 "outputmoviename.m2v"

# MOVIE INFORMATION
ffmpeg -i moviename

# Extract 16 bit from greater than 8 bit movies, eg: GH5
ffmpeg -i inputmoviename -vf "format=pix_fmts=rgb48" directoryname/outputframename%04d.png

# Convert and apply remap filter
ffmpeg -i inputmoviename -i 0001_x.pgm -i 0001_y.pgm -lavfi remap outputmoviename

# Scale a movie.
ffmpeg -i inputmoviename -filter:v scale=640:480 -c:a copy outputmoviename

# Append two movies side by side
ffmpeg -i inputmovie1 -i inputmovie2 -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w" -c:v libx264 outputmoviename

# Append two movies side by side or top and bottom
ffmpeg -i inputmovie1 -i inputmovie2 -filter_complex vstack outputmoviename
ffmpeg -i inputmovie1 -i inputmovie2 -filter_complex hstack outputmoviename

# SAVE JPEG IMAGES
ffmpeg -i stonehenge-english_heritage-orig.mp4 -r 25 -qscale:v 2 sh/sh%04d.jpg

# OGG TO WAV
ffmpeg -i sound.ogg -acodec pcm_s16le -ar 44100 -ac 2 sound.wav

# AC3 TO 6WAV
ffmpeg -i  sound.ac3 sound6wav.wav

# FRAMES -> X264
ffmpeg -r 60 -f image2 -s 1920x1080 -i pic%04d.png -vcodec libx264 -crf 25  -pix_fmt yuv420p test.mp4
-r is the framerate (fps)
-crf is the quality; lower means better quality; 15-25 is usually good
-s is the resolution
-pix_fmt yuv420p specifies the pixel format; change this as needed

# SAUVE FRAMES A 25 FPS DIVISE PAR 2 EN TAILLE
ffmpeg -i video.mp4 -r 25 -qscale:v 2 output_%04d.jpg

# SOME USAGE ?
ffmpeg -r 60 -f image2 -s 1280x720 -i pic%05d.png -i MP3FILE.mp3 -vcodec libx264 -b 4M -vpre normal -acodec copy OUTPUT.mp4

Lionel RUIZ
© 2009 - 2018 LSS Group - Yves LHOUMEAU & Lionel RUIZ