Vues : 14
Table des matières
OMXplayer et raspberry PI
Omxplayer est un lecteur vidéo spécialement conçu pour le GPU du Raspberry Pi réalisé par Edgar (gimli) Hucek du projet XBMC / Kodi. Il repose sur l’API d’accélération matérielle OpenMAX, qui est l’API officiellement supportée par VideoCore de Broadcom pour le traitement vidéo / audio GPU.
Les utilisateurs du forum Raspberry Pi ont rendu des binaires précompilés disponibles sur le forum. Vois ici.
RACCOURCIS CLAVIER
1 decrease speed 2 increase speed < rewind > fast forward z show info j previous audio stream k next audio stream i previous chapter o next chapter n previous subtitle stream m next subtitle stream s toggle subtitles w show subtitles x hide subtitles d decrease subtitle delay (- 250 ms) f increase subtitle delay (+ 250 ms) q exit omxplayer p / space pause/resume - decrease volume + / = increase volume left arrow seek -30 seconds right arrow seek +30 seconds down arrow seek -600 seconds up arrow seek +600 seconds
Utilisation
omxplayer [OPTIONS] [FILE] -h --help Print this help -v --version Print version info -k --keys Print key bindings -n --aidx index Audio stream index : e.g. 1 -o --adev device Audio out device : e.g. hdmi/local/both -i --info Dump stream format and exit -I --with-info dump stream format before playback -s --stats Pts and buffer stats -p --passthrough Audio passthrough -d --deinterlace Force deinterlacing --nodeinterlace Force no deinterlacing --nativedeinterlace let display handle interlace --anaglyph type convert 3d to anaglyph --advanced Allow advanced deinterlace for HD videos -w --hw Hw audio decoding -3 --3d mode Switch tv into 3d mode (e.g. SBS/TB) -M --allow-mvc Allow decoding of both views of MVC stereo stream -y --hdmiclocksync Display refresh rate to match video (default) -z --nohdmiclocksync Do not adjust display refresh rate to match video -t --sid index Show subtitle with index -r --refresh Adjust framerate/resolution to video -g --genlog Generate log file -l --pos n Start position (hh:mm:ss) -b --blank Set background to black --loop Loop file. Ignored if file not seekable --no-boost-on-downmix Don't boost volume when downmixing --vol n set initial volume in millibels (default 0) --amp n set initial amplification in millibels (default 0) --no-osd Do not display status information on screen --no-keys Disable keyboard input (prevents hangs for certain TTYs) --subtitles path External subtitles in UTF-8 srt format --font path Default: /usr/share/fonts/truetype/freefont/FreeSans.ttf --italic-font path Default: /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf --font-size size Font size in 1/1000 screen height (default: 55) --align left/center Subtitle alignment (default: left) --no-ghost-box No semitransparent boxes behind subtitles --lines n Number of lines in the subtitle buffer (default: 3) --win 'x1 y1 x2 y2' Set position of video window --win x1,y1,x2,y2 Set position of video window --crop 'x1 y1 x2 y2' Set crop area for input video --crop x1,y1,x2,y2 Set crop area for input video --aspect-mode type Letterbox, fill, stretch. Default: stretch if win is specified, letterbox otherwise --audio_fifo n Size of audio output fifo in seconds --video_fifo n Size of video output fifo in MB --audio_queue n Size of audio input queue in MB --video_queue n Size of video input queue in MB --threshold n Amount of buffered data required to finish buffering [s] --timeout n Timeout for stalled file/network operations (default 10s) --orientation n Set orientation of video (0, 90, 180 or 270) --fps n Set fps of video where timestamps are not present --live Set for live tv or vod type stream --layout Set output speaker layout (e.g. 5.1) --dbus_name name default: org.mpris.MediaPlayer2.omxplayer --key-config <file> Uses key bindings in <file> instead of the default --alpha Set video transparency (0..255) --layer n Set video render layer number (higher numbers are on top) --display n Set display to output to --cookie 'cookie' Send specified cookie as part of HTTP requests --user-agent 'ua' Send specified User-Agent as part of HTTP requests --lavfdopts 'opts' Options passed to libavformat, e.g. 'probesize:250000,...'
Diffusion
RTMP
Vous n’avez pas besoin de télécharger un fichier MP4 pour le regarder avec Omxplayer. Si vous avez l’URL d’un flux (H.264) rtmp: //, diffusez-le simplement avec:
omxplayer rtmp: // ...
Pour diffuser une URL (H.264) rtmpt: // … avec Omxplayer, changez simplement la tête rtmp: // en rtmpt: //.
RTSP
La prise en charge de RTSP a été ajoutée en 2012 [1] (par exemple, permettant l’utilisation du lecteur multimédia VLC comme serveur de streaming).
Exemple:
omxplayer -o local rtsp: //192.168.3.100: 8554 / stream1
l’audio
Il est possible de sélectionner la sortie audio en spécifiant -o ou –adev sur la ligne de commande entre:
local: sortie analogique
hdmi: sortie hdmi (hdmi_drive = 2 est alors requis dans config.txt)
les deux: les deux sorties
Exemple:
omxplayer -o hdmi file.qt
Dépannage
Écran noir après la lecture
Si vous obtenez un écran noir sur votre bureau X11 une fois Omxplayer terminé, vous pouvez utiliser cette commande pour restaurer votre vue:
xrefresh – affichage: 0
Ou vous pouvez utiliser un petit script Bash pour la lecture vidéo pour le faire à chaque fois:
# / bin / bash omxplayer "$ @" xrefresh - affichage: 0
Sur Raspbian, xrefresh fait partie du paquet x11-xserver-utils (apt-get install x11-xserver-utils).
Aucun droit sur VCHIQ
Sur les installations nues des distributions par défaut, Omxplayer a souvent des autorisations insuffisantes pour accéder à / dev / vchiq. Une solution serait d’exécuter Omxplayer en tant que root, mais une solution plus intéressante consiste à ajouter une règle udev afin que / dev / vchiq soit également accessible depuis d’autres utilisateurs. Pour ce faire, procédez comme suit sous root:
# echo 'SUBSYSTEM == "vchiq", GROUP = "video", MODE = "0660"'> /etc/udev/rules.d/10-vchiq-permissions.rules
Maintenant, ajoutez-vous au groupe nommé «vidéo»:
# usermod -aGvideo USERNAME
Redémarrez le Raspberry Pi et vous devriez pouvoir exécuter Omxplayer sans que l’erreur vchiq n’apparaisse.
HDMI
Lorsque vous utilisez HDMI, assurez-vous de passer ‘-o hdmi’ à Omxplayer si vous souhaitez que l’audio soit lu via le câble HDMI:
omxplayer -o hdmi videofile.mp4
Liens utiles
Blog Raspberry Pi 1080p réussi, Démarrer-> Terminer
Comment installer Debian Raspberry Pi
Omxplayer Build Bot (packages binaires à jour disponibles ici)