Designing a media player protocol

172 views
Skip to first unread message

Nicholas Humfrey

unread,
May 4, 2014, 4:55:51 PM5/4/14
to mq...@googlegroups.com
Hello,

I am looking at building an MQTT based control interface for VLC. I have started outlining the protocol on this Wiki page:

Does anyone have an experience or suggestions for designing such a protocol?

What about the documentation style - are there any public examples of documenting protocols built on top of MQTT?


Thanks,

nick.

Paul Fremantle

unread,
May 4, 2014, 7:47:06 PM5/4/14
to mq...@googlegroups.com
Nick

It looks pretty good. I'm wondering how you plan to address multiple VLC players (and clients) per broker. I'm guessing you will just change the prefix. That might be ok, but it might be nice to give your player a name.

Paul


--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at http://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.



--
Paul Fremantle
Part-time PhD student - School of Computing
twitter: pzfreo / skype: paulfremantle / blog: http://pzf.fremantle.org
CTO and Co-Founder, WSO2
OASIS WS-RX TC Co-chair, Apache Member
07740 199 729

Stefano Costa

unread,
May 5, 2014, 2:50:40 AM5/5/14
to mq...@googlegroups.com
Nick,
looks fine.

I would send commands into separate topics:

Topic                Payload
vlc/command/add      <uri>
vlc/command/del      <pos>
vlc/command/clear    any
vlc/command/play     <pos>
etc etc

Makes it simple to create applications and interactions in my opinion.

S

x13dev

unread,
May 5, 2014, 3:35:35 AM5/5/14
to mq...@googlegroups.com
It would be nice to make a topics: vlc/status/state, vlc/status/playing(# or uri) and vlc/status/time writable.

Nicholas Humfrey

unread,
May 5, 2014, 4:43:22 AM5/5/14
to mq...@googlegroups.com
Hello,

Yes, it will be possible to define a different prefix for multiple vlc
instances, using the --mqtt-prefix= option.

By default this will be mqtt-prefix=vlc/ but could be set to
mqtt-prefix=livingroom/player/

I am hoping that this protocol is generic enough that other players
could also implement it (or a subset).


nick.



On 2014-05-05 00:47, Paul Fremantle wrote:
> Nick
>
> It looks pretty good. Im wondering how you plan to address multiple
> VLC players (and clients) per broker. Im guessing you will just
> change
> the prefix. That might be ok, but it might be nice to give your
> player
> a name.
>
> Paul
>
> On 4 May 2014 21:55, Nicholas Humfrey <n...@aelius.com [7]> wrote:
>
>> Hello,
>>
>> I am looking at building an MQTT based control interface for VLC. I
>> have started outlining the protocol on this Wiki page:
>> https://wiki.videolan.org/Documentation:Modules/mqtt/ [1]
>>
>> Does anyone have an experience or suggestions for designing such a
>> protocol?
>>
>> What about the documentation style - are there any public examples
>> of documenting protocols built on top of MQTT?
>>
>> Thanks,
>>
>> nick.
>>
>> --
>> To learn more about MQTT please visit http://mqtt.org [2]
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "MQTT" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to mqtt+uns...@googlegroups.com [3].
>> To post to this group, send email to mq...@googlegroups.com [4].
>> Visit this group at http://groups.google.com/group/mqtt [5].
>> For more options, visit https://groups.google.com/d/optout [6].
>
> --
>
> Paul Fremantle
> Part-time PhD student - School of Computing
> email: paul.fr...@port.ac.uk [8], pa...@fremantle.org [9]
> twitter: pzfreo / skype: paulfremantle / blog:
> http://pzf.fremantle.org [10]
> CTO and Co-Founder, WSO2
> OASIS WS-RX TC Co-chair, Apache Member
> 07740 199 729
>
> --
> To learn more about MQTT please visit http://mqtt.org [11]
> ---
> You received this message because you are subscribed to the Google
> Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to mqtt+uns...@googlegroups.com [12].
> To post to this group, send email to mq...@googlegroups.com [13].
> Visit this group at http://groups.google.com/group/mqtt [14].
> For more options, visit https://groups.google.com/d/optout [15].
>
>
> Links:
> ------
> [1] https://wiki.videolan.org/Documentation:Modules/mqtt/
> [2] http://mqtt.org
> [3] mailto:mqtt+uns...@googlegroups.com
> [4] mailto:mq...@googlegroups.com
> [5] http://groups.google.com/group/mqtt
> [6] https://groups.google.com/d/optout
> [7] mailto:n...@aelius.com
> [8] mailto:paul.fr...@port.ac.uk
> [9] mailto:pa...@fremantle.org
> [10] http://pzf.fremantle.org
> [11] http://mqtt.org
> [12] mailto:mqtt+uns...@googlegroups.com
> [13] mailto:mq...@googlegroups.com
> [14] http://groups.google.com/group/mqtt
> [15] https://groups.google.com/d/optout

Nicholas Humfrey

unread,
May 5, 2014, 4:46:31 AM5/5/14
to mq...@googlegroups.com
Hello Stfano,

Yes, I agree, that it is good to make use of the topic space, where
possible, as it is makes it easier to parse.
I was actually thinking that I would allow either syntax.

Thanks!

nick.


On 2014-05-05 07:50, Stefano Costa wrote:
> Nick,
> looks fine.
>
> I would send commands into separate topics:
>
> Topic                Payload
> vlc/command/add      <uri>
> vlc/command/del      <pos>
> vlc/command/clear    any
> vlc/command/play     <pos>
> etc etc
>
> Makes it simple to create applications and interactions in my
> opinion.
>
> S
>
> On 05/04/2014 10:55 PM, Nicholas Humfrey wrote:
>
>> Hello,
>>
>> I am looking at building an MQTT based control interface for VLC. I
>> have started outlining the protocol on this Wiki page:
>> https://wiki.videolan.org/Documentation:Modules/mqtt/ [1]
>>
>> Does anyone have an experience or suggestions for designing such a
>> protocol?
>>
>> What about the documentation style - are there any public examples
>> of documenting protocols built on top of MQTT?
>>
>> Thanks,
>>
>> nick.
>>
>> --
>> To learn more about MQTT please visit http://mqtt.org [2]
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "MQTT" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to mqtt+uns...@googlegroups.com [3].
>> To post to this group, send email to mq...@googlegroups.com [4].
>> Visit this group at http://groups.google.com/group/mqtt [5].
>> For more options, visit https://groups.google.com/d/optout [6].
>
> --
> To learn more about MQTT please visit http://mqtt.org [7]
> ---
> You received this message because you are subscribed to the Google
> Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to mqtt+uns...@googlegroups.com [8].
> To post to this group, send email to mq...@googlegroups.com [9].
> Visit this group at http://groups.google.com/group/mqtt [10].
> For more options, visit https://groups.google.com/d/optout [11].
> [7] http://mqtt.org
> [8] mailto:mqtt+uns...@googlegroups.com
> [9] mailto:mq...@googlegroups.com
> [10] http://groups.google.com/group/mqtt
> [11] https://groups.google.com/d/optout

Nicholas Humfrey

unread,
May 5, 2014, 4:53:17 AM5/5/14
to mq...@googlegroups.com
Hello,

It can get pretty messy using topics as both inputs and outputs; it
becomes very difficult for a client to distinguish between a status and
commands.

This was the reason for separating out into the vlc/command and
vlc/status topic trees.

nick.


On 2014-05-05 08:35, x13dev wrote:
> It would be nice to make a topics: vlc/status/state,
> vlc/status/playing(# or uri) and vlc/status/time writable.
>
> --
> To learn more about MQTT please visit http://mqtt.org [1]
> ---
> You received this message because you are subscribed to the Google
> Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to mqtt+uns...@googlegroups.com [2].
> To post to this group, send email to mq...@googlegroups.com [3].
> Visit this group at http://groups.google.com/group/mqtt [4].
> For more options, visit https://groups.google.com/d/optout [5].
>
>
> Links:
> ------
> [1] http://mqtt.org
> [2] mailto:mqtt+uns...@googlegroups.com
> [3] mailto:mq...@googlegroups.com
> [4] http://groups.google.com/group/mqtt
> [5] https://groups.google.com/d/optout

x13dev

unread,
May 6, 2014, 10:16:37 AM5/6/14
to mq...@googlegroups.com
Hello Nicholas,

Imho concept of commands is more match for requst-response protocols.
I like the method to set "desired state", to achieve which may require multiple commands. 

понедельник, 5 мая 2014 г., 10:53:17 UTC+2 пользователь Nicholas Humfrey написал:

Nicholas Humfrey

unread,
May 7, 2014, 11:32:27 AM5/7/14
to mq...@googlegroups.com
Hello,

I started using trying this approach but was advised against it:
https://groups.google.com/d/msg/mqtt/rIp1uJsT9Nk/QbtumQmSI1EJ

How can a third-party client, observing a message going to the topic
know if player has successfully entered the desired state, or if it was
just a command requesting that it was in that state?


nick.



On 2014-05-06 15:16, x13dev wrote:
> Hello Nicholas,
>
> Imho concept of commands is more match for request-response
> protocols.
> I like the method to set "desired state", to achieve which may
> require
> multiple commands.
>
> понедельник, 5 мая 2014 г., 10:53:17 UTC+2
> пользователь Nicholas Humfrey написал:
>
>> Hello,
>>
>> It can get pretty messy using topics as both inputs and outputs; it
>> becomes very difficult for a client to distinguish between a status
>> and
>> commands.
>>
>> This was the reason for separating out into the vlc/command and
>> vlc/status topic trees.
>>
>> nick.
>

Jan-Piet Mens

unread,
May 7, 2014, 3:19:02 PM5/7/14
to mq...@googlegroups.com
Nick,

> I am looking at building an MQTT based control interface for VLC.

I've been telling a few people about this, and I hear a fair bit of
interest for your undertaking. :-)

This evening Peter suggested [1]

(Android) app idea: an AVRCP<>MQTT bridge (makes sense in either
direction). Would go well with the VLC MQTT remote control draft
spec.

so for any Android hackers out there reading this, it might make a nice
weekend project. ;-)

Regards,

-JP

[1] https://twitter.com/Habbie/status/464114564318392320

Nicholas Humfrey

unread,
May 8, 2014, 4:04:23 AM5/8/14
to mq...@googlegroups.com

> On 7 May 2014, at 20:19, Jan-Piet Mens <jpm...@gmail.com> wrote:
>
> Nick,
>
>> I am looking at building an MQTT based control interface for VLC.
>
> I've been telling a few people about this, and I hear a fair bit of
> interest for your undertaking. :-)

I had better get on with it then!

nick.

Jan-Piet Mens

unread,
May 8, 2014, 4:11:33 AM5/8/14
to mq...@googlegroups.com
> I had better get on with it then!

I was planning on testing this on the weekend ... ! ;)

-JP

Andy Stanford-Clark

unread,
May 8, 2014, 12:55:03 PM5/8/14
to mq...@googlegroups.com
I totally agree with this point :)

Andy S-C

Rick Bullotta

unread,
May 29, 2014, 11:29:02 AM5/29/14
to mq...@googlegroups.com
This is a GREAT example of where a discoverability and metadata layer in MQTT would help immensely...

Marek Kail

unread,
Mar 18, 2016, 5:33:58 AM3/18/16
to MQTT
Nicholas,
You continue with this development?

Thanks,
Marek



Dne neděle 4. května 2014 22:55:51 UTC+2 Nicholas Humfrey napsal(a):

Nicholas J Humfrey

unread,
Mar 22, 2016, 6:07:17 AM3/22/16
to mq...@googlegroups.com, Marek Kail
Hello Marek,

Yes, I hope to spend some time working on this soon.

nick.


On 2016-03-18 09:33, Marek Kail wrote:
> Nicholas,
> You continue with this development?
>
> Thanks,
> Marek
>
> Dne neděle 4. května 2014 22:55:51 UTC+2 Nicholas Humfrey napsal(a):
>
>> Hello,
>>
>> I am looking at building an MQTT based control interface for VLC. I
>> have started outlining the protocol on this Wiki page:
>> https://wiki.videolan.org/Documentation:Modules/mqtt/ [1]
>>
>> Does anyone have an experience or suggestions for designing such a
>> protocol?
>>
>> What about the documentation style - are there any public examples
>> of documenting protocols built on top of MQTT?
>>
>> Thanks,
>>
>> nick.
>
> --
> To learn more about MQTT please visit http://mqtt.org
> ---
> You received this message because you are subscribed to the Google
> Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mqtt+uns...@googlegroups.com.
> To post to this group, send email to mq...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mqtt.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages