Dropping audio untill video key frame

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Dropping audio untill video key frame

Manoj
Hi All,

I need a help in resolving issue in live stream decoding (udpsrc), where i need to avoid audio rendering until video key frame gets detected for valid video decode to start.

Scenario is as per below diagram,
So is it possible to block 'sink' pad of decoder1 in below pipeline? Keeping all rest of the data flowing in pipeline.
Ultimately discarding data going to decoder1, utill decoder2 receives valid data.

 .---------.      .---------.                   .----------.
 | livesrc |      | demuxer |     .------.    | decoder1 |
 |        src -> sink      src1 ->|queue1|-> sink       src
 '---------'     |           |        '------'    '----------' X
                   |            |                   .----------.
                   |            |     .------.    | decoder2 |
                   |        src2 ->|queue2|-> sink       src-> sink
                   '---------'      '------'     '----------'

Thanks a lot in advance,
Reply | Threaded
Open this post in threaded view
|

Re: Dropping audio untill video key frame

Paddy
This is how I'd try. Switch the output selector src when your keyframe is detected

 
     .------------.              
     |  demuxer   |     .---------.    .-----------------.      .-----------.
     |          src1--->| queue 1 |->| output-selector  |      |  fakesink |
     |                |     '---------'    |                     src1--->sink         |
     |                |                       |                        |      '-----------'
                                               |                        |
                                               |                     src2-- > your audio pipeline
                                                '-----------------'

Reply | Threaded
Open this post in threaded view
|

Re: Dropping audio untill video key frame

Manoj
Thanks Paddy.
Reply | Threaded
Open this post in threaded view
|

Re: Dropping audio untill video key frame

Sagar
hi can you post any code related to this answer ?