Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can Xuggler read from a Network-Based Source?

network-based read source
0
10 Posted

Can Xuggler read from a Network-Based Source?

0
10

Yes, but it’s a little more complex than reading from a file. The simple version of IContainer.open(String, Type, IContainerFormat) will always attempt to read meta-data from a media header, and find at least one packet of each stream in the file, before returning. This can be problematic when reading from network-based streams (as you don’t want to block). To change this behaviour, use the IContainer.open(String, Type, IContainerFormat, boolean, boolean) method, passing in “true” for the streamsCanBeAddedDynamically parameter and “false” for the queryStreamMetaData parameter. This instructs Xuggler to assume the number of streams the header of a stream communicates is not guaranteed to be complete (e.g. audio may not have shown up yet), and also tells open not to read through the stream to find a packet for each stream before it returns. The last correct step here (if you want Xuggler to be able to fill in IStreamCoder settings correctly for you when decoding) is to ask Xuggler to ICo

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123