Analizando y entendiendo el funcionamiento de PiPresents

En el post anterior sobre Digital Signage con Raspberry Pi de esta serie sobre como montar un sistema de cartelería digital basándonos en una Raspberry Pi, hemos visto como preparar la Raspberry instalando todo el software necesario para ello.

 

¿Cómo funciona Pipresents?

Si accedemos a la carpeta del ejemplo que hemos ejecutado, veremos que hay dos archivos con extension .json: pp_showlist.json y media.json

El primero de ellos contiene la lista de shows y las opciones generales de cada uno de los shows. En el fondo se asimila a un objeto javascript, por lo que si estás acostumbrado a trabajar con ellos, la notación te resultará fácil de comprender.

El archivo pp_showlist.json

El contenido de este archivo es el siguiente:

{
 "issue": "1.2", 
 "shows": [
  {
   "show-ref": "start", 
   "start-show": "mymediashow", 
   "title": "Start", 
   "type": "start"
  }, 
  {
   "audio-speaker": "stereo", 
   "background-colour": "black", 
   "background-image": "", 
   "controls": "", 
   "disable-controls": "no", 
   "duration": "10", 
   "has-child": "no", 
   "hint-colour": "", 
   "hint-font": "", 
   "hint-text": "", 
   "hint-x": "", 
   "hint-y": "", 
   "image-window": "shrink 100 100 950 900", 
   "medialist": "media.json", 
   "mplayer-audio": "hdmi", 
   "mplayer-other-options": "", 
   "mplayer-volume": "0", 
   "next-input": "", 
   "omx-audio": "hdmi", 
   "omx-other-options": "-t 1", 
   "omx-volume": "0", 
   "omx-window": "warp 100 100 950 900", 
   "progress": "auto", 
   "repeat": "interval", 
   "repeat-interval": "0", 
   "sequence": "ordered", 
   "show-canvas": "", 
   "show-ref": "mymediashow", 
   "show-text": "Pi Presents\nA multimedia toolkit for Museums, Visitor Centres\nand more......\n\n   http://pipresents.wordpress.com\n\nUse Up and Down Cursor to skip ", 
   "show-text-colour": "green", 
   "show-text-font": "arial 25 bold italic", 
   "show-text-x": "1000", 
   "show-text-y": "700", 
   "title": "Mediashow", 
   "transition": "cut", 
   "trigger": "start", 
   "trigger-end": "none", 
   "trigger-end-time": "", 
   "trigger-input": "", 
   "trigger-next": "continue", 
   "type": "mediashow", 
   "web-window": "warp 100 100 930 900"
  }
 ]
}

Como dijo el bueno de Jack, vamos por partes. Analicemos el primer objeto que nos encontramos:

{
 "issue": "1.2", 
 "shows": [
  {
   "show-ref": "start", 
   "start-show": "mymediashow", 
   "title": "Start", 
   "type": "start"
  },

La propiedad “issue” hace referencia a la versión de PiPresents que estamos ejecutando, en este caso la 1.2

Luego nos encontramos con un array de shows. Cada show, se compone a la vez de dos objetos anónimos. El primero hace referencia a “Start Show”, los valores de show-ref y type deben ser siempre start. El title es bastante descriptivo. Por último la propiedad “start-show” contiene una lista de los shows que se van a ejecutar separados por espacios.

El segundo hace referencia a las opciones del show. Todas ellas se pueden consultar en el manual de PiPresents que acompaña a la descarga.

Tipos de pistas

Luego nos toca analizar que encontraremos en el archivo media.json. Esto no es sino la lista de pistas que componen nuestra presentación. En el caso del archivo de ejemplo este es su contenido

{
 "issue": "1.2", 
 "tracks": [
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "background-colour": "", 
   "background-image": "+/media/space.jpg", 
   "display-show-background": "yes", 
   "display-show-text": "yes", 
   "duration": "", 
   "image-window": "", 
   "links": "", 
   "location": "+/media/mountain.jpg", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "thumbnail": "", 
   "title": "Windowed Image", 
   "track-ref": "", 
   "track-text": "IMAGES\n\nGive your displays a professional look with\nbackground and titles.\n\nMany image formats are supported.\n\nOr display the image full screen..........", 
   "track-text-colour": "black", 
   "track-text-font": "arial 30 bold italic", 
   "track-text-x": "1000", 
   "track-text-y": "200", 
   "transition": "cut", 
   "type": "image"
  }, 
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "background-colour": "", 
   "background-image": "", 
   "display-show-background": "no", 
   "display-show-text": "no", 
   "duration": "", 
   "image-window": "original", 
   "links": "", 
   "location": "+/media/mountain.jpg", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "thumbnail": "", 
   "title": "Fullscreen Image", 
   "track-ref": "", 
   "track-text": "Text can overlay the images\n\nShow text can be selectively removed", 
   "track-text-colour": "blue", 
   "track-text-font": "arial 35 bold italic", 
   "track-text-x": "1000", 
   "track-text-y": "200", 
   "transition": "cut", 
   "type": "image"
  }, 
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "audio-speaker": "", 
   "background-colour": "", 
   "background-image": "+/media/space.jpg", 
   "clear-screen": "no", 
   "display-show-background": "no", 
   "display-show-text": "yes", 
   "duration": "", 
   "links": "", 
   "location": "+/media/dragon.mp3", 
   "mplayer-audio": "", 
   "mplayer-other-options": "", 
   "mplayer-volume": "", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "thumbnail": "", 
   "title": "Audio Track with background", 
   "track-ref": "", 
   "track-text": "AUDIO\n\nPlay mp3 or other audio formats\n\nUse HDMI or analogue ports\n\nAdd text and images to your audio tracks", 
   "track-text-colour": "#000000", 
   "track-text-font": "arial 30 bold italic", 
   "track-text-x": "1000", 
   "track-text-y": "200", 
   "type": "audio"
  }, 
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "background-colour": "", 
   "background-image": "+/media/river.jpg", 
   "browser-commands": "wait 10\nload www.museumoftechnology.org.uk\nwait 10", 
   "display-show-background": "yes", 
   "display-show-text": "yes", 
   "duration": "20", 
   "links": "", 
   "location": "+/media/hello_world.html", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "thumbnail": "", 
   "title": "Web Page", 
   "track-ref": "", 
   "track-text": "WEB PAGES\n\nDisplay web pages in a window\nwith a background\n\nStore the pages locally\nor pull them from the internet\n\nDisplay a sequence of pages", 
   "track-text-colour": "#000000", 
   "track-text-font": "arial 30 bold italic", 
   "track-text-x": "1000", 
   "track-text-y": "200", 
   "type": "web", 
   "web-window": ""
  }, 
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "background-colour": "", 
   "background-image": "+/media/space.jpg", 
   "display-show-background": "yes", 
   "display-show-text": "yes", 
   "links": "", 
   "location": "+/media/xthresh.mp4", 
   "omx-audio": "hdmi", 
   "omx-volume": "", 
   "omx-window": "", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "thumbnail": "", 
   "title": "Video Track in a Window", 
   "track-ref": "", 
   "track-text": "VIDEO\n\nDisplay videos in a window with\nbackground and titles.\n\nRaspberry Pi video formats are supported.\n\nOr display the video full screen..........", 
   "track-text-colour": "white", 
   "track-text-font": "arial 30 bold italic", 
   "track-text-x": "1000", 
   "track-text-y": "200", 
   "type": "video"
  }, 
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "background-colour": "", 
   "background-image": "", 
   "display-show-background": "no", 
   "display-show-text": "no", 
   "links": "", 
   "location": "+/media/suits-short.mkv", 
   "omx-audio": "hdmi", 
   "omx-volume": "", 
   "omx-window": "original", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "thumbnail": "", 
   "title": "Full screen video, should show sub-titles", 
   "track-ref": "", 
   "track-text": "", 
   "track-text-colour": "", 
   "track-text-font": "", 
   "track-text-x": "0", 
   "track-text-y": "0", 
   "type": "video"
  }, 
  {
   "animate-begin": "", 
   "animate-clear": "no", 
   "animate-end": "", 
   "background-colour": "", 
   "background-image": "", 
   "display-show-background": "no", 
   "display-show-text": "no", 
   "duration": "10", 
   "links": "", 
   "message-colour": "red", 
   "message-font": "Helvetica 30 bold", 
   "message-justify": "center", 
   "message-x": "", 
   "message-y": "", 
   "plugin": "", 
   "show-control-begin": "", 
   "show-control-end": "", 
   "text": "MESSAGE\n\nA message track is a quick way to display text\nwithout the need to prepare a media file\n\nThe show will be repeating soon....", 
   "thumbnail": "", 
   "title": "Repeating soon", 
   "track-ref": "", 
   "track-text": "", 
   "track-text-colour": "", 
   "track-text-font": "", 
   "track-text-x": "0", 
   "track-text-y": "0", 
   "type": "message"
  }
 ]
}

Aquí vemos los distintos tipos de pistas que soporta PiPresents. Siguiendo el orden del archivo tenemos los siguientes tipos de pistas:

  • Imagen sobrepuesta a una imagen de fondo
  • Imagen con texto sobrepuesto
  • Archivo de audio con imagen de fondo
  • Vídeo en ventana con imagen de fondo y texto
  • Vídeo a pantalla completa
  • Texto a pantalla completa

En el siguiente artículo os enseñaré como aprovecho yo el potencial de la Raspberry para crear las piezas de cartelería digital.

 

Deja un comentario

Cerrar menú