[Red5] Mondain, Art or other semigod! Helping on metadata for live h264 publisher.
Mondain
mondain at gmail.com
Tue Jul 7 09:04:27 PDT 2009
>From what Steven and I found out about MP4, the channel ids didnt matter all
that much if at all. For example, RubyIzumi sends all its data on channel 5
(audio, video, and data). BTW I cant tell whats wrong with your code, when I
want to construct meta data on the fly I just copy code from the Readers.
Paul
On Tue, Jul 7, 2009 at 8:48 AM, iMDT - Tiago Jacobs <tiago at imdt.com.br>wrote:
> Andy, I was looking inside red5, I debuged entire "walk" of packet.
>
> The method's I used is from red5 meta data services (or I think so).
>
> The amazing thing is that when "Three letter encoder" publish, the metadata
> and videoPackets come inside the same channelld.
>
> When the "RTMPClient" send metadata (with method publishStreamData), it
> goes inside other channel (Data channel), this is defined in
> ConnectionConsumer.java.
>
> I tried setting the data to go inside VideoChannel, like below. But don't
> worked.
>
> I also figured that RTMPClient uses channel 5, and "Three letter encoder"
> uses channel 4.
>
> case Constants.TYPE_STREAM_METADATA:
> log.trace("Meta data");
> Notify notify = new Notify(((Notify)
> msg).getData().asReadOnlyBuffer());
> notify.setHeader(header);
> notify.setTimestamp(header.getTimer());
> //I set to video for testing
> video.write(notify);
> break;
>
>
>
>
> Andy Shaules wrote:
>
> Why not copy red5's meta data method?
>
>
>
> ----- Original Message -----
> *From:* Art Clarke <aclarke at xuggle.com>
> *To:* red5 at osflash.org
> *Sent:* Tuesday, July 07, 2009 8:08 AM
> *Subject:* Re: [Red5] Mondain,Art or other semigod! Helping on metadata
> for live h264 publisher.
>
> Sorry Tiago, but I don't have time to look at this right now.
>
> On Tue, Jul 7, 2009 at 7:49 AM, iMDT - Tiago Jacobs <tiago at imdt.com.br>wrote:
>
>> People, I don't care if it take a week to be replied, just put "reply
>> to Tiago" in your todo list :D
>>
>> It will be a big improvement for everyone using red5 (and not much
>> revolutionaire, because all work was done by paul, with their mp4 code and
>> by art with xuggler), just putting some glue on this pieces.
>>
>> Thanks so much.
>>
>> iMDT - Tiago Jacobs wrote:
>>
>> SURPRISE! with "three letters other encoder" it's also give error, and
>> the codecid is 7, when "three letters other encoder" got closed, it
>> restarted with vp6.
>>
>> But no, it's not working yet, any help will be appreciated.
>>
>> Notify createdNotify = new Notify();
>> createdNotify.setTimestamp((int) System.currentTimeMillis());
>>
>> IoBuffer buf2 = IoBuffer.allocate(1024);
>> buf2.setAutoExpand(true);
>> Output out2 = new Output(buf2);
>>
>> out2.writeString("@setDataFrame");
>> out2.writeString("onMetaData");
>>
>> Map<Object, Object> props2 = new HashMap<Object, Object>();
>> props2.put("videodevice", "Microsoft LifeCam VX-1000");
>> props2.put("keywords", "");
>> props2.put("width", (java.lang.Integer) 320);
>> props2.put("videodatarate", (java.lang.Integer) 200);
>> props2.put("presetname", "Medium Bandwidth (300 Kbps) -
>> H.264");
>> props2.put("copyright", "");
>> props2.put("creationdate", "Mon Jul 06 18:22:19 2009");
>> props2.put("videocodecid", (java.lang.Integer) 7);
>> props2.put("author", "");
>> props2.put("title", "");
>> props2.put("height", (java.lang.Integer) 240);
>> props2.put("avcprofile", (java.lang.Integer) 66);
>> props2.put("avclevel", (java.lang.Integer) 31);
>> props2.put("description", "");
>> props2.put("rating", "");
>> props2.put("framerate", Double.parseDouble("15"));
>>
>>
>> out2.writeMap(props2, new Serializer());
>> buf2.flip();
>>
>> createdNotify.setData(out2.buf());
>> RTMPMessage msg2 = new RTMPMessage();
>> msg2.setBody(createdNotify);
>> _client.publishStreamData(streamId, msg2);
>>
>> iMDT - Tiago Jacobs wrote:
>>
>> It's known by everyone that i am working on a opensource live encoder,
>> it's ugly and dirty code for now, just to figure the work, after this, i'll
>> rewrite everythin on a beauty code.
>>
>> Please, may I give a bit of your attention?
>>
>> I am writing a publisher of H264 live content, and I am having problems
>> with metadata.
>>
>> I got the packets generated by other "well known encoder" that comes to
>> "ClientBroadcastStream" and deserialized them.
>>
>> I maked a "reverse" of this, serializing the new packets.
>>
>> When packet arrive client (the publisher application) I got: "19:52:45:911
>> - Asynchronous code error - ReferenceError: Error #1069".
>>
>> Have you seen this error?
>>
>> I never created a packet from scratch on my whole life, so, it's possible
>> that the error is obvious.
>>
>> _client is a simple RTMPClient with "published" state (some code from
>> StreamingProxy).
>>
>> Look my created packet:
>>
>> Notify createdNotify = new Notify();
>>
>> IoBuffer buf2 = IoBuffer.allocate(1024);
>> buf2.setAutoExpand(true);
>> Output out2 = new Output(buf2);
>>
>> out2.writeString("@setDataFrame");
>> out2.writeString("onMetaData");
>>
>> Map<Object, Object> props2 = new HashMap<Object, Object>();
>> props2.put("videokeyframe_frequency", (java.lang.Integer) 5);
>> props2.put("videodevice", "Microsoft LifeCam VX-1000");
>> props2.put("keywords", "");
>> props2.put("width", (java.lang.Integer) 320);
>> props2.put("videodatarate", (java.lang.Integer) 200);
>> props2.put("presetname", "Medium Bandwidth (300 Kbps) -
>> H.264");
>> props2.put("copyright", "");
>> props2.put("creationdate", "Mon Jul 06 18:22:19 2009\n");
>> props2.put("videocodecid", (java.lang.Integer) 4);
>> props2.put("author", "");
>> props2.put("title", "");
>> props2.put("height", (java.lang.Integer) 240);
>> props2.put("description", "");
>> props2.put("rating", "");
>> props2.put("framerate", Double.parseDouble("15"));
>>
>>
>> out2.writeMap(props2, new Serializer());
>> buf2.flip();
>>
>> createdNotify.setData(out2.buf());
>> RTMPMessage msg2 = new RTMPMessage();
>> msg2.setBody(createdNotify);
>>
>> _client.publishStreamData(streamId, msg2);
>>
>> ------------------------------
>>
>> _______________________________________________
>> Red5 mailing listRed5 at osflash.orghttp://osflash.org/mailman/listinfo/red5_osflash.org
>>
>> ------------------------------
>>
>> _______________________________________________
>> Red5 mailing listRed5 at osflash.orghttp://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>>
>
>
> --
> http://www.xuggle.com/
> xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and
> video.
>
> Use Xuggle to get the power of FFmpeg in Java.
>
> ------------------------------
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
> ------------------------------
>
> _______________________________________________
> Red5 mailing listRed5 at osflash.orghttp://osflash.org/mailman/listinfo/red5_osflash.org
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20090707/3e41a1bd/attachment-0001.html>
More information about the Red5
mailing list