Autor Tema: mod_vlc  (Leído 15725 veces)

0 Usuarios y 2 Visitantes están viendo este tema.

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
mod_vlc
« en: Marzo 17, 2010, 09:58:15 am »
As the title says, I've created a BennuGD module which wraps around libvlc, so it's now possible to use basically any video format in BennuGD.
Windows download (much bigger, but contains everything you need).
Linux download (very small, but you need to have a recent version of VLC installed through your system's native package management software. Also, rename the .zip file to .tar.bz2).

The module will play videos with subtitles, if available.

Both contain a sample video player app. The hotkeys for the app are:

  • Space bar: Pauses/unpauses the video.
  • Right: Seek the video to the right.
  • Left: Seek left.
  • m: Mute/Unmute the video.
  • up: Volume Up.
  • down: Volume down.
  • enter: Switch audio track.
  • escape: Stop+quit.

And the list of functions this module includes is:
[code language="bennu"]
/* Plays a video file with the given width/height
 * Will play the video with subtitles, if found */
int video_play(string filename, int width, int height);

/* Stop a currently playing video.*/
int video_stop();

/* Pause/unpause the currently playing video*/
int video_pause();

/* Check if the video is currently playing */
int video_is_playing();

/* Get total length of the currentyl playing video, in centisecs */
int video_get_length();

/* Get current seeking position in the video, in centiseconds */
int video_get_time();

/* Seek through the video, must be given a time
 * in centiseconds (what the bennu timer's use) */
int video_set_time(int time);

/* Get the width of the currently playing video */
int video_get_width();

/* Get the height of the currently playing video */
int video_get_height();

/* Get the muted/unmuted status */
int video_get_mute();

/* Mute/unmute the currently being played video */
int video_mute();

/* Get the volume of the currently playing video
 * Will be 0<=volume<=200 */
int video_get_volume();

/* Set the volume of the currently playing video
 * Must be 0<=volume<=200 */
int video_set_volume(int volume);

/* Get the number of available tracks in the video
 * The first track (track number 0) is used for disabling audio */
int video_get_tracks();

/* Get the number of the currently being played track */
int video_get_track();

/* Set the audio track for a currently being played video */
int video_set_track(int track);

/* Get the description for an audio track.
 * Not sure if it works correctly, must test it. */
string video_get_track_description();
[/code]

Hope you find it useful :)

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #1 en: Marzo 17, 2010, 10:00:44 am »
PS: the aspect ratio in the sample player will most probably be wrong. To know a video's aspect ratio you must use video_get_width() and video_get_height() once the video is playing.

The module will play just one video at a time right now. That might change in the future, depending on feedback.

Desconectado Imerion

  • Jr. Member
  • **
  • Mensajes: 69
  • Karma: 3
    • Ver Perfil
Re: mod_vlc
« Respuesta #2 en: Marzo 21, 2010, 03:53:41 pm »
Nice! This could sure be useful. The built-in .flv player is quite limited.
Try my games : Neotron Games

Desconectado Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
  • Sexo: Masculino
    • Ver Perfil
    • TRINIT Asociación de Informáticos de Zaragoza
Re: mod_vlc
« Respuesta #3 en: Marzo 22, 2010, 04:13:41 am »
It sounds good, so we can play any video format like divx???

Im downloading now, karma up and thanks a lot!
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #4 en: Marzo 22, 2010, 06:35:25 am »
Yeah, you can play anything vlc can (basically every format).
I've not tested it but it should even support webcams, dvds, internet live streams...

Desconectado Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
  • Sexo: Masculino
    • Ver Perfil
    • TRINIT Asociación de Informáticos de Zaragoza
Re: mod_vlc
« Respuesta #5 en: Marzo 23, 2010, 01:32:49 pm »
Yeah, you can play anything vlc can (basically every format).
I've not tested it but it should even support webcams, dvds, internet live streams...

lol then it could play from Youtube with the URL or something? Without the needing of have the video on disk? :O
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #6 en: Marzo 23, 2010, 03:32:22 pm »
You should be able to. For some reason, Bennu crashes when you try to open an url not corresponding to a local file, I'll have to look deeper into that.

Desconectado Windgate

  • Hero Member
  • *****
  • Mensajes: 2930
  • Karma: 124
  • Sexo: Masculino
    • Ver Perfil
    • TRINIT Asociación de Informáticos de Zaragoza
Re: mod_vlc
« Respuesta #7 en: Marzo 24, 2010, 12:36:23 am »
Ouch... Bennu and sockets again... I have to work with it...

Welll, I hope you can solve it :D

I owe you a karma xD
Iván García Subero. Programador, profesor de informática, monitor de actividades culturales y presidente de TRINIT Asociación de Informáticos de Zaragoza. http://trinit.es

Conectado FreeYourMind

  • Hero Member
  • *****
  • Mensajes: 5554
  • Karma: 125
  • Sexo: Masculino
    • Ver Perfil
    • GECA soft
Re: mod_vlc
« Respuesta #8 en: Marzo 24, 2010, 01:55:22 am »
It's posible a Wiz Port ?

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #9 en: Marzo 24, 2010, 05:24:13 am »
It's certainly possible, given it's a linux system.
The "only" thing I need is a working VLC port for the Wiz.

Desconectado DCelso

  • Hero Member
  • *****
  • Mensajes: 3708
  • Karma: 180
  • Sexo: Masculino
    • Ver Perfil
Re: mod_vlc
« Respuesta #10 en: Marzo 24, 2010, 05:28:15 am »
Only. As if this task was easy.
Monstruos Diabólicos

"A PAck of classic GAMEs For BennuGD" en desarrollo
http://code.google.com/p/apagame4be/

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #11 en: Marzo 24, 2010, 05:49:37 am »
Well, you asked if such a port was possible, not easy :)
I'll try to have a look at it, though.

Still, as the Wiz is a low power device, videos would have to be downscaled in order to be able to play them in the console smoothly.

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #12 en: Marzo 24, 2010, 05:58:14 am »
Aquí hay un port para maemo (linux sobre un ARM desarrollado por Nokia, creo que el kernel es parecido) de VLC. Quizás con eso se pueda implementarl.

Conectado FreeYourMind

  • Hero Member
  • *****
  • Mensajes: 5554
  • Karma: 125
  • Sexo: Masculino
    • Ver Perfil
    • GECA soft
Re: mod_vlc
« Respuesta #13 en: Marzo 24, 2010, 06:35:34 am »
Let's start the port friends!  ;D

Desconectado josebita

  • Administrator
  • Hero Member
  • *****
  • Mensajes: 4039
  • Karma: 257
  • Sexo: Masculino
    • Ver Perfil
    • BennuGD Mobile Worklog
Re: mod_vlc
« Respuesta #14 en: Marzo 24, 2010, 08:29:17 am »
Sorry, my mind exploded and I wrote in Spanish/without the link. I'll have a look at those files.