An ad-hoc decoder to consume es

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

An ad-hoc decoder to consume es

Postby angelo.difino » 06 Jul 2007 16:01

Hi all,
first of all thanks very much to the vlc-guys for their great job.

i'm looking for some info i've not found in your website.

i'd like to write an ad hoc decoder/encoder that just consume an
es. it has just to pass the data on, p.ex. for watermarking
purpose. this is just my first approach to vlc, to get
familiar with it.

does i have to write a module that support encoding-decoding
functionalities? have i to point the dummy-modules as
'hello world example'? where can i find some more info to write an ad hoc
module to be integrated in vlc as, i suppose, a plug-in?

please excuse me if my questions are too newbie,
(just started some weeks ago')

cheers, angelo

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: An ad-hoc decoder to consume es

Postby dionoea » 06 Jul 2007 16:06

If i understand correcly you basically want to create a video filter to overlay stuff on top of the video? (kind of like what the "logo" filter does?)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

Re: An ad-hoc decoder to consume es

Postby angelo.difino » 06 Jul 2007 16:22

If i understand correcly you basically want to create a video filter to overlay stuff on top of the video? (kind of like what the "logo" filter does?)
yes, something like that, but the first step is just not to manage at all the buffer data... just to see the data stream passing
trough my ad-hoc decoder/videofilter

maybe have i to look documentation for video filter in vlc? and how can i 'connect' this module to the vlc-chain :
demux-decoder-render that has to became demux-decoder-mymodule-renderer? is there a way to force this
configuration?

thanks

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: An ad-hoc decoder to consume es

Postby dionoea » 06 Jul 2007 16:28

I'll start with an example using the logo filter:

Code: Select all

vlc <input> --sub-filter logo --logo-file <some image file>
will put an image on top of the video during playback.

Code: Select all

vlc <input> --logo-file <some image file> --sout '#transcode{vcodec=<some codec>,vb=<some bitrate>,sfilter=logo}:std{access=file,mux=<some mux>,dst=<some filename>}'
will decode, overlay the logo, recode and save to a file. This is using video subfilters (so basically overaly an image with alpha transparency on top of the video). If you need to do fancier stuff that needs to have knowledge of the underlying video frame, you can use "video filter2" type modules.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

Re: An ad-hoc decoder to consume es

Postby angelo.difino » 06 Jul 2007 16:43

Wow, that seems really what i know. Thank thank very much... now i can start to enjoy!

Last question :) is it possible to 'insert' this effect zlso BEFORE the decoder?
i really don't need to know how the stream is formatted... i just simply p.ex. count how many data pass on
(and i've to insert it in the chain before and after decoder/encoder phase)...

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: An ad-hoc decoder to consume es

Postby dionoea » 06 Jul 2007 16:53

You unfortunately can't edit an image which hasn't been decoded yet. So no, it's not possible.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

Re: An ad-hoc decoder to consume es

Postby angelo.difino » 06 Jul 2007 16:56

You unfortunately can't edit an image which hasn't been decoded yet. So no, it's not possible.
Ops :(

so you mean that between the demux and the decoder there is no way to insert any module/to interrupt the chain just
to see the stream passing?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: An ad-hoc decoder to consume es

Postby dionoea » 06 Jul 2007 16:58

Ok, maybe I missunderstood your question. What do you exactly want to get?
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

Re: An ad-hoc decoder to consume es

Postby angelo.difino » 06 Jul 2007 17:16

Ok, maybe I missunderstood your question. What do you exactly want to get?
Ok, sorry for misunderstanding.
The two scenarios are quite complicated:

a)i need to put a box (i don't know how to call.. maybe module? maybe decoder?) between demux and decoder+renderer
that just pass the data on; i also need to put a box (module? decoder) between demux+decoder and renderer.
p.ex. in a chain DEMUX - DECOD - RENDER i've to put this box before and after the DECOD (if i put after i've to create an effect)

b)i need to put a box between demux/decoder and encoder/mux (filewriter)
in a chain DEMUX - DECOD - ENC - MUX (filewriter) i've to put this box between DECOD and ENC
in a chain DEMUX - MUX (filewriter) i've to put this box between DEMUX and MUX

Hope this can help you,
thank you very much for attention,

Best, Angelo

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: An ad-hoc decoder to consume es

Postby dionoea » 06 Jul 2007 17:22

Ah ok, so you basically need an "es filter"? To encrypt/decrypt the stream or something like that I guess?

(I don't think that we have an "es filter" notion in VLC atm. But you could kind of fake it using a demux (your filter) which would call another demux internaly (the normal demux))
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

Re: An ad-hoc decoder to consume es

Postby angelo.difino » 06 Jul 2007 17:37

Ah ok, so you basically need an "es filter"? To encrypt/decrypt the stream or something like that I guess?

(I don't think that we have an "es filter" notion in VLC atm. But you could kind of fake it using a demux (your filter) which would call another demux internaly (the normal demux))
I see, thanks for support :) , i will try this way and check if feasible

angelo.difino
Blank Cone
Blank Cone
Posts: 25
Joined: 05 Jul 2007 16:20

Re: An ad-hoc decoder to consume es

Postby angelo.difino » 12 Jul 2007 16:01

Hi dionoea and all,
i've tried to have a look to the documentation and the source code and i'm wondering about the possibility
to insert my module right after the demux. the input interface pass the buffer data to the decoder chosen by a list (the most
rated). Is there maybe some way to spill this es stream, without caring about the contents, like access to the audio/video frame...
or maybe the buffer passed is really format-oriented (and you've to care about it?).

Thank you very much, hope this is a not so much silly question.

Best regards,
Angelo

alexvf
Blank Cone
Blank Cone
Posts: 10
Joined: 06 Mar 2007 01:13

Re: An ad-hoc decoder to consume es

Postby alexvf » 23 Jul 2007 01:21

If you wanna insert your module after the demux, then you need a "fake" decoder since i guess that changing the vlc module chain to include another type of module would be too much complicate. You can write a decoder module that calls the actual decoder (or not to call it if you dont need it). This way you can just spill the stream or do what you want.

Hope that helps.

Regards,


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 23 guests