[Live-devel] playback only working to localhost

Tom Pepper tom at silocorp.com
Sat Feb 6 11:34:06 PST 2010


Jeremy:

Thanks for the quick response.  I've had difficulty locating a good source of information on what the parameter sets should look like, so that's probably the issue.

MainConcept provides them via h264OutVideoGetParSets().  Here's the code I use to retrieve them and parse:

                // get AVC Parameter Sets                                                                   
                char * parset = (char *) malloc(1024);
		int length;

		if(h264OutVideoGetParSets(v_encoder, &v_settings, (uint8_t *) parset, &length)) {
	          fprintf(stderr,"h264OutVideoGetParSets() failed!");
                  exit(-1);
	        }
                fprintf(stderr, "h264OutVideoGetParSets: %i\n", length);
                hexdump(parset, length);

                char *b64parset = base64Encode(parset + 4, length - 4); // skip sync
                fprintf(stderr, "b64parset: %s, %zu\n", b64parset, strlen(b64parset));

                unsigned int numrecords = 0;
                SPropRecord* poo = parseSPropParameterSets(b64parset, numrecords);

                for (unsigned i = 0; i < numrecords; ++i) {
                        fprintf(stderr, "decoded [%i] = %s\n", i, poo[i].sPropBytes);
                }


And here's the output:

h264OutVideoGetParSets: 38
 >00000001 674D4029 965200A0 173E5C05< ....gM@).R...>\. 00000000
 >42000007 D20001D4 C13B42C5 B2C00000< B........;B..... 00000010
 >000168EB 7352<                       ..h.sR           00000020
b64parset: Z01AKZZSAKAXPlwFQgAAB9IAAdTBO0LFssAAAAABaOtzUg==, 48
decoded [0] = gM@)?R

parseSPropParameterSets should be returning 2 values with a well-formed parset, no?  Are the zero bytes returned in the parset screwing up the base64 encode?


Excerpt from MainConcept's immensely-detailed SDK Docs:
2.2.13 h264OutVideoGetParSets
Call this function to retrieve sequence and picture parameter sets. Can be useful when doing streamtype I encoding to separate VCL NAL units and parameter sets (non-VCL NAL units). 

int h264OutVideoGetParSets(h264venc_tt *instance, struct h264_v_settings * set, unsigned char * buffer, int * length);
Be sure to allocate enough memory for buffer (1024 bytes should be more than enough). 
After calling this function, length will show the actual size of the data.

-t




On Feb 6, 2010, at 11:07 AM, Jeremy Noring wrote:

> On Sat, Feb 6, 2010 at 10:39 AM, Tom Pepper <tom at silocorp.com> wrote:
> The parameter set as I encode and report it:
> 
> a=fmtp:96 packetization-mode=1;profile-level-id=000041;sprop-parameter-sets=AWdNQCmWUgCgFz5cBUIAAAfSAAHUwTtCxbLAAAAAAWjrc1I=
> 
> 
> Something about your sprop-parameter-sets looks wrong--there should be a comma in it to delimit the SPS and PPS sets.  How are you forming that?
> 
> Also, in my experience, wowsa doesn't like having SPS/PPS sent in-stream.
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list