Old 24th August 2009, 18:15   #41
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Quote:
Originally posted by jaromanda
Well, I'm stumped

Video was easy

Audio is proving to be annoying, I got the timing perfect and everything
Try mp3 first. I dont think it needs the sha.

search the red5 mailing list for the last few posts from a man named Gavriolai Eugen-Andrei.

Check the last posts he made regarding the sha. He is responsible I think for cracking it for usable aac functionality.
Smelter is offline   Reply With Quote
Old 24th August 2009, 23:34   #42
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Quote:
Originally posted by Smelter
Check the last posts he made regarding the sha. He is responsible I think for cracking it for usable aac functionality.
I actually found that info elsewhere (though the kudos leads back to the same guy!)

I know my sha stuff is right (algorithm I mean - had to write it myself) ... the incoming first handshake from flash passes validation

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 25th August 2009, 01:22   #43
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Quote:
Originally posted by Smelter
And then after that, they need to learn how to start a Haxe process/server.
well, it's neko ... but first things first
Quote:
Oh yeah, dont forget to make the 'pause' and 'play' work too.
damn it ... I haven't cracked the audio pickle matrix yet ... !! I'm actually beginning to suspect the "hack job" player app I made may just have the volume turned down (I haven't added a volume control!!)

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 25th August 2009, 01:29   #44
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
There is some specific stuff at the head of the aac stream.

here is the first packet that hits the flash player. This is some red5 java but should help if you got the sha right but not the aac.

PHP Code:
buffer.put((byte0xaf);
                    
buffer.put((byte0x00);
                    
buffer.put(getAACSpecificConfig());
//                    buffer.put((byte) 0x06);
                    
buffer.flip();
                    
RTMPMessage msg = new RTMPMessage();
                    
                    
AudioData data= new AudioData(buffer);
                    
data.setHeader(new Header());
                    
data.getHeader().setTimerRelative(false);
                
//    data.getHeader().setTimer(((IAACReader) codecReader).getCurrentTimecode()& 0xffffff );
                    
msg.setBody(new AudioData(buffer)); 



PHP Code:
private final byte[] getAACSpecificConfig() {        
        
byte[] = new byte[] { 
                (
byte) (0x10 /*((profile > 2) ? 2 : profile << 3) | */((sampleRateIndex >> 1) & 0x03)),
                (
byte) (((sampleRateIndex 0x01) << 7) | ((channels 0x0F) << 3))
            };
        
log.debug("SpecificAudioConfig {}"HexDump.toHexString(b));
        return 
b;    
    } 
Smelter is offline   Reply With Quote
Old 25th August 2009, 01:32   #45
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
nope, default flash player netstream should be full volume.
Smelter is offline   Reply With Quote
Old 25th August 2009, 02:06   #46
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Yeah, already sending the AudioSpecificConfig bytes

may leave it for a while, coding in circles

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 26th August 2009, 15:50   #47
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
OF FFS!!!
It helps when ...

a) You send the CORRECT server handshake frame
b) more importantly, you send the AudioSpecificConfig as an AUDIO packet rather than a VIDEO one


woot nipple chips - i.e. it works!!

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 27th August 2009, 07:36   #48
pollyanna03
Banned
 
Join Date: Aug 2009
Posts: 1
hello Glad to see you.First time to come here .hope you all have good days

fc*uk: despammed. and I would have had a better day if you would not have posted this crap.
pollyanna03 is offline   Reply With Quote
Old 27th August 2009, 12:57   #49
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
double woot ... first live test went well ... despite my 5 second feedback loop - never output stream audio back to stream source ...

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 27th August 2009, 15:29   #50
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
great job!
Smelter is offline   Reply With Quote
Old 28th August 2009, 18:53   #51
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
shoutcast title updates now working too

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 28th August 2009, 19:06   #52
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Nice! How long till you go public?
Smelter is offline   Reply With Quote
Old 29th August 2009, 03:24   #53
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Quote:
Originally posted by Smelter
Nice! How long till you go public?
Not sure ... while everything "works", it's not as stable as I would like. Of course, I'm sure it's the nekovm that's at fault

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 5th September 2009, 11:16   #54
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
LIVE Testing now http://users.tpg.com.au/radiorio/

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 5th September 2009, 13:27   #55
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: www.ScenicRadio.com
Posts: 2,974
Nice work Jaromanda!

Did you have to modify the Red5 server much ?

Scenic Television is your ambient window to the world - - Television.ScenicRadio.com
sankt is offline   Reply With Quote
Old 5th September 2009, 13:31   #56
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Red5??? Only thing I got from red5 was confirmation of the handshake "algorithm"

this is all written in haxe

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 5th September 2009, 14:45   #57
streamer45
Member
 
Join Date: Jul 2006
Location: Italy
Posts: 93
Quote:
Originally posted by jaromanda
Red5??? Only thing I got from red5 was confirmation of the handshake "algorithm"

this is all written in haxe

Nice work then, what about h264 , you think is possible make it work?
streamer45 is offline   Reply With Quote
Old 5th September 2009, 14:50   #58
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Quote:
Originally posted by streamer45
Nice work then, what about h264 , you think is possible make it work?
My comp can't encode h.264 real time (CPU not powerful enough), so it's a bit difficult for me to test or see what needs to be done

of course, I could use pre-encoded file ...

will look into it for sure

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 5th September 2009, 14:53   #59
streamer45
Member
 
Join Date: Jul 2006
Location: Italy
Posts: 93
Quote:
Originally posted by jaromanda
My comp can't encode h.264 real time (CPU not powerful enough), so it's a bit difficult for me to test or see what needs to be done

of course, I could use pre-encoded file ...

will look into it for sure
Nice , if you need help with something, just ask
streamer45 is offline   Reply With Quote
Old 5th September 2009, 15:06   #60
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Quote:
Originally posted by streamer45
Nice , if you need help with something, just ask
I actually want to get what I've got working for me a bit better - currently can't see how many are connected for instance ... also, whilst the server does end song title info, I haven't done anything with that info in the player

but ... I will take a look at h.264 eventually

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 5th September 2009, 15:58   #61
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Quote:
Originally posted by sankt
Nice work Jaromanda!

Did you have to modify the Red5 server much ?
Im the one who added it to red5, and no, it was added as a service and will be part of the core.

It should be available in the trunk very very soon.
Smelter is offline   Reply With Quote
Old 5th September 2009, 16:33   #62
sankt
Moderator
 
sankt's Avatar
 
Join Date: Apr 2003
Location: www.ScenicRadio.com
Posts: 2,974
Quote:
Red5??? Only thing I got from red5 was confirmation of the handshake "algorithm"
this is all written in haxe
Oops, sorry about that Jaromanda.

Will you release the haxel code and the swf specs ?

Scenic Television is your ambient window to the world - - Television.ScenicRadio.com
sankt is offline   Reply With Quote
Old 5th September 2009, 17:33   #63
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Here is how to start a shoutcast stream subscription in red5 (coming soon)

PHP Code:

NSVConsumer nsv
=new NSVConsumer(ServerTypes.MODE_NSV_CLIENT
                                        new 
ICYMarshal(room,"streamName")
                                        ,
"http://localhost:8000/;file.nsv");
        
nsv.start(); 
By changing the mode, you can have the following, however, in subscriber modes, Red5 will switch based on the content header. I the same goes for server mode. Red5 will handle both Winamp shoutcast dsp and nsvCap/scsrc and switch modes on the fly.

Red5 is also set up to handle any number of mount points and client-modes.


PHP Code:

    
/**
     * Act like a shoutcast client.
     */
    
public static int MODE_SHOUT_CAST_CLIENT=2;
    
/**
     * Act like a shoutcast server for the encoder.
     */
    
public static int MODE_SHOUT_CAST_SERVER=3;
    
/**
     * Act like a shoutcast client for nsv tv.
     */
    
public static int MODE_NSV_CLIENT=1;
    
/**
     * Act like a shoutcast server for nsv tv encoder.
     */
    
public static int MODE_NSV_SERVER=0
I've run it for over two weeks straight with good results.
Smelter is offline   Reply With Quote
Old 12th September 2009, 16:33   #64
streamer45
Member
 
Join Date: Jul 2006
Location: Italy
Posts: 93
Any news about a public release jaromanda?
streamer45 is offline   Reply With Quote
Old 13th September 2009, 04:57   #65
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
Quote:
Originally posted by streamer45
Any news about a public release jaromanda?
Main problem at the moment is an occasional "runaway thread" issue -

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 16th September 2009, 22:35   #66
john@ROCKNTV1
Registered User
 
john@ROCKNTV1's Avatar
 
Join Date: Apr 2006
Location: i have broken not a single rule and you deleted my sig craigF.. OK MY TURN CRAIGF and smelter thank for bumping bulks flame post
Posts: 641
whoot whoot
smelter you basted ...good to ear ya ....lol
how ah you guys , i poppt in this eve to give thanks to sankt for still kickin this stuff and cheese and rice
you WROTE my name in here and i would not have seen it , cept for i still lurk this place 9 /16/09 . Honestly you guys code above my head , but the water is nice and hope to do that fishN trip one day with you guys ..... we will make a thing of it.
thx smelter , find me, write me
john still drumming .. where is my tin foil hat ... ;-)
john@ROCKNTV1 is offline   Reply With Quote
Old 24th September 2009, 14:24   #67
streamer45
Member
 
Join Date: Jul 2006
Location: Italy
Posts: 93
The NSV plugin in red5 seems to be ready.
Smelter, can you confirm this?
streamer45 is offline   Reply With Quote
Old 24th September 2009, 19:53   #68
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Yes, as soon as I get the documentaion. on how to fire it up as a plugin. It worked awesome as a quartz thread! I should get that pretty soon here.
Smelter is offline   Reply With Quote
Old 24th September 2009, 20:39   #69
streamer45
Member
 
Join Date: Jul 2006
Location: Italy
Posts: 93
Quote:
Originally posted by Smelter
Yes, as soon as I get the documentaion. on how to fire it up as a plugin. It worked awesome as a quartz thread! I should get that pretty soon here.

Great, I'll wait for your news
streamer45 is offline   Reply With Quote
Old 29th September 2009, 01:40   #70
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
small update

here
Smelter is offline   Reply With Quote
Old 13th November 2009, 23:53   #71
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
H264 and mp3 added in addition to vp6x and aacp.

http://www.thebitstream.com/success.png
Smelter is offline   Reply With Quote
Old 17th November 2009, 03:58   #72
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Shoutcast tv h264 now plays to silverlight too with red5 proxie.

http://www.thebitstream.com/silverlightH264.png
Smelter is offline   Reply With Quote
Old 17th November 2009, 10:55   #73
jaromanda
Forum King
 
Join Date: Jun 2007
Location: Under the bridge
Posts: 2,247
just no stopping the smelter ... figuring out h264 streaming makes my inner child cry

Is it just me or are shoutcast users getting dumber?
jaromanda is online now   Reply With Quote
Old 17th November 2009, 15:16   #74
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
from nsv it was easy, once I figured out that ffmpeg puts the final byte of the previous frame as the first byte of the new frame.

Once you shift it correctly, both flash and silverlight will play them. Of course the container must be swapped for flash, and removed completely for silverlight. silverlight need NAL units and flash wants mkv style.

It is an acquired taste.
Smelter is offline   Reply With Quote
Old 20th November 2009, 17:47   #75
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Red5 application pre built and ready for configuration.

Read the file red5-web.properties

There are two example on configuring a server port.
Here is one of them.
code:

<bean id="shoutcast.stream_1" class="com.thebitstream.shoutcast.StreamConfiguration">
<property name="outputName" value="live" />
<property name="port" value="8001" />
<property name="password" value="changeme" />
</bean>




To playback in flash connect the flash player your server

code:
rtmp://localhost/shoutcast


and after the connection, play the output name.
Attached Files
File Type: zip shoutcast.zip (44.3 KB, 404 views)
Smelter is offline   Reply With Quote
Old 20th November 2009, 18:51   #76
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
A quick note: It may take several seconds for the h264 video to get a key frame and start decoding.

THis is the 'green screen' waiting time you experience in winamp sometimes on h264 streams.

vp6 streams will need to be flipped upside down.
Smelter is offline   Reply With Quote
Old 21st November 2009, 11:15   #77
MondayX
Junior Member
 
Join Date: Jul 2007
Location: Bavaria, Germany
Posts: 11
Send a message via ICQ to MondayX
hello,

nice work!
i tried this app with red5 0.9.0 RC2 but i got the following error:

Quote:
Exception in thread "Thread-1" java.lang.NoSuchMethodError: org.red5.server.net.rtmp.message.Header.setTimerRelative(Z)V
at org.red5.server.plugin.shoutcast.marshal.transpose.AudioFramer.deliverAACFrame(AudioFramer.java:197)
at org.red5.server.plugin.shoutcast.marshal.transpose.AudioFramer.onAACData(AudioFramer.java:143)
at org.red5.server.plugin.shoutcast.marshal.ICYMarshal.onAudioData(ICYMarshal.java:137)
at org.red5.server.plugin.shoutcast.parser.NSVSenderThread.execute(NSVSenderThread.java:38)
at org.red5.server.plugin.shoutcast.parser.NSVThread.execute(NSVThread.java:416)
at org.red5.server.plugin.shoutcast.stream.NSVConsumer.process(NSVConsumer.java:119)
at org.red5.server.plugin.shoutcast.stream.NSVConsumer.run(NSVConsumer.java:104)
at java.lang.Thread.run(Thread.java:619)
which version of red5 do i need?
thx!
MondayX is offline   Reply With Quote
Old 21st November 2009, 15:47   #78
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
This is for revisions before 3895

A version for .9rc2 will probably come this weekend.
Smelter is offline   Reply With Quote
Old 21st November 2009, 15:59   #79
MondayX
Junior Member
 
Join Date: Jul 2007
Location: Bavaria, Germany
Posts: 11
Send a message via ICQ to MondayX
thanks, works fine with RC1!
but i got another problem: there are often these pink buffering shapes on the video. i have to send every 10 frames a keyframe to solve is. is there any better solution?

edit: i used vp62/aacplus
MondayX is offline   Reply With Quote
Old 21st November 2009, 16:24   #80
Smelter
Major Dude
 
Smelter's Avatar
 
Join Date: Jan 2004
Posts: 1,141
Yes, their is something going on under the hood with flash and vp6 type normal I get it less if the encoder is not on the same machine as the playback, however the general movement is to migrate to h264 for its superior quality, bandwidth, and perfect playback in flash, silverlight, and soon(relativley) itouch.
Smelter is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > SHOUTcast > SHOUTcast TV / Nullsoft Video

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump