<div dir="ltr"><div><div><div>Hello Tim, Jean-Marc<br><br></div>Thanks for the inputs and the corrections. I think I understand the Ogg Opus better now and it all makes sense. There are two questions that I am left to ask. <br><br>1. Since the stream I am working with is a mono channel, what should be the advised page_segments to use. I am using an embedded system so keeping the flash and SRAM usage are vital for the development.<br></div><div>2. In the OpusTag the is the libopus a mandatory field?<br></div><div><br></div>Regards<br></div>Amit<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 9, 2016 at 2:11 PM, Amit Ashara <span dir="ltr"><<a href="mailto:ashara.amit@gmail.com" target="_blank">ashara.amit@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello Tim, Jean-Marc<br><br></div><div>Thanks for the clarification. Let me study the sample OPUS file and see if my understanding is now clarified.<br></div><div><br></div>Regards<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Amit<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 9, 2016 at 2:02 PM, Timothy B. Terriberry <span dir="ltr"><<a href="mailto:tterribe@xiph.org" target="_blank">tterribe@xiph.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Amit Ashara wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am referring to the following file<br>
<br>
<a href="https://en.wikipedia.org/wiki/File:Sample_of_%22Another_Day_in_Paradise%22.ogg" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/File:Sample_of_%22Another_Day_in_Paradise%22.ogg</a><br>
</blockquote>
<br></span>
The file you are looking at is an Ogg *Vorbis* file. It's not Opus at all.<br>
<br>
The file at <<a href="https://people.xiph.org/~giles/2012/opus/ehren-paper_lights-96.opus" rel="noreferrer" target="_blank">https://people.xiph.org/~giles/2012/opus/ehren-paper_lights-96.opus</a>> linked from <<a href="https://www.opus-codec.org/examples/" rel="noreferrer" target="_blank">https://www.opus-codec.org/examples/</a>> would be an example of an Ogg Opus file.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I opened the file in a HEX editor. I do not see the string OpusHead in<br>
the packet. It starts with Oggs. Also checking the occurrence of Oggs, I<br>
see that the first packet has BOS, the next all (except last) have 00<br>
(which is not defined in the RFC as continuation) and last one has EOS.<br>
</blockquote>
<br></span>
The header_type byte is a set of bit flags. 00 means none of them are set, in which case the "unset: ..." language of each flag from RFC 3533 applies. These pages are not continued pages.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The first packet in this ogg file makes sense.<br>
<br>
The second packet (I am taking a part of it)<br>
</blockquote>
<br></span>
You mean page, not packet. They are different.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
4f 67 67 53 = Oggs (THIS IS OK)<br>
00 = Version (THIS IS OK)<br>
00 = Header Type (WHY IS THIS 0)??<br>
</blockquote>
<br></span>
See above.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
00 00 00 00 00 00 00 00 = Granule Position (THERE IS NO SPECIFIC<br>
INFORMATION)<br>
</blockquote>
<br></span>
This is the correct value to use for header packets.<span><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
7e 46 00 00 = Bit Stream Serial Number (THIS IS OK)<br>
01 00 00 00 = Page Sequence Number (THIS IS OK)<br>
89 ab 50 5e = Checksum (THIS IS OK)<br>
10 = Page Segments is 16, so there would be 16 segments after this<br>
2d ff ff ff ff ff ff ff ff ff ff ff ff ff ff c1 = Each Segment Size (IS<br>
THIS CORRECT)??<br>
03 76 6f = First 3 data from Segment 0 indicated by the size 2d (IS THIS<br>
CORRECT INTERPRETATION)??<br>
</blockquote>
<br></span>
These are both correct.<div><div><br>
_______________________________________________<br>
opus mailing list<br>
<a href="mailto:opus@xiph.org" target="_blank">opus@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/opus" rel="noreferrer" target="_blank">http://lists.xiph.org/mailman/listinfo/opus</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>