JMF with Optelecom IP Encoder

I'm trying to access a hardware codec from JMStudio. Eventually I'd like to be able to do processing on the video feed in java using JMF, but at this point I am not even able to connect to the codec.

The codec serves MP4 video in an RTSP feed. I realize JMF does not currently have support for MP4, but this is not what concerns me at the moment. In the following transaction log, several RTSP command sequences are successfully sent and received, but JMStudio fails after the PLAY command, issuing a "Server is not responding message:

start

#

# JMF Version 2.1.1e

#

## Platform: Windows XP, x86, 5.1

## Java VM: Sun Microsystems Inc., 1.6.0_01

## Player created: com.sun.media.content.rtsp.Handler@80f4cb

##using DataSource: com.sun.media.protocol.rtsp.DataSource@337d0f

## outgoing msg:

## DESCRIBE rtsp://10.1.140.155/video/input1/encoder1/transmitter3 RTSP/1.0

CSeq: 711

Accept: application/sdp

User-Agent: JMF RTSP Player Version 2.1.1e

## incoming msg:

## RTSP/1.0 200 OK

CSeq: 711

Server: Optelecom-NKF RTSPServer/1.0

Content-Type: application/sdp

Content-Length: 239

v=0

o=- 1181207442 1181207442 IN IP4 10.1.140.155

s=Video: input1 encoder1 transmitter3

m=video 0 RTP/AVP 101

a=control:rtsp://10.1.140.155/video/input1/encoder1/transmitter3

a=rtpmap:101 MP4V-ES/90000

a=fmtp:101 profile-level-id=1

!! [SDP Parser] Token missing: t=

!! [SDP Parser] Token missing: c=

## Add RTP dynamic payload for video: 101 : mp4v-es/rtp

## outgoing msg:

## SETUP rtsp://10.1.140.155/video/input1/encoder1/transmitter3 RTSP/1.0

CSeq: 712

Transport: RTP/AVP;unicast;client_port=7644-7645

User-Agent: JMF RTSP Player Version 2.1.1e

## incoming msg:

## RTSP/1.0 200 OK

CSeq: 712

Server: Optelecom-NKF RTSPServer/1.0

Session: 1181207443;timeout=20

Transport: RTP/AVP;unicast;client_port=7644-7645;server_port=5004-5005

Accept-Ranges: NPT

## outgoing msg:

## PLAY rtsp://10.1.140.155/video/input1/encoder1/transmitter3 RTSP/1.0

CSeq: 713

Range: npt=0.0-

Session: 1181207443

User-Agent: JMF RTSP Player Version 2.1.1e

## incoming msg:

## RTSP/1.0 200 OK

CSeq: 713

Server: Optelecom-NKF RTSPServer/1.0

Range: npt=now-

XX Failed to realize: Server is not responding

-end

I'm not sure if the problem is that the RTSPServer is not giving a sessionID on the last response, if JMF cannot deal with an npt range with start value "now", or the timeout for message response is too small.

Am I allowed to modify RTSPutil to experiment with these changes? What is the best way to go about solving this problem?

Thanks

Max

[2861 byte] By [englanderma] at [2007-11-27 6:45:29]
# 1

My problem was network related. Now JMF detects stream data but, of course, is unable to parse it.

Starting from received play response --

## incoming msg:

## RTSP/1.0 200 OK

CSeq: 219

Server: Optelecom-NKF RTSPServer/1.0

Range: npt=now-

## RTP video socket buffer size: 132495 bytes.

## RTP video socket buffer size: 177540 bytes.

## RTP video buffer size: 11 pkts, 7278 bytes.

## RTP video socket buffer size: 211365 bytes.

## RTP video socket buffer size: 216975 bytes.

## RTP video buffer size: 21 pkts, 21312 bytes.

## RTP video socket buffer size: 221265 bytes.

## RTP video socket buffer size: 221925 bytes.

## RTP video socket buffer size: 222255 bytes.

## RTP video socket buffer size: 222420 bytes.

## RTP video buffer size: 36 pkts, 41819 bytes.

## RTP video socket buffer size: 222585 bytes.

## RTP video buffer size: 59 pkts, 72846 bytes.

## RTP video buffer size: 93 pkts, 118712 bytes.

## RTP video socket buffer size: 224280 bytes.

## RTP video socket buffer size: 225456 bytes.

## RTP video socket buffer size: 226128 bytes.

## RTP video buffer size: 144 pkts, 187372 bytes.

## RTP video socket buffer size: 226632 bytes.

$$ Profile: instantiation: 16 ms

## Player created: com.sun.media.content.unknown.Handler@fe64b9

##using DataSource: com.sun.media.protocol.rtp.DataSource@12b6651

$$ Profile: parsing: 0 ms

## Building flow graph for: null

## Building Track: 0

## Input: MP4V-ES/RTP

!! Failed to handle track 0

XXUnable to handle format: MP4V-ES/RTP

XX Failed to realize: com.sun.media.PlaybackEngine@723d7c

XX Error: Unable to realize com.sun.media.PlaybackEngine@723d7c

- end log

A few questions:

Why are 'unknown.Handler' and 'rtp.DataSource' called? The player is created using 'com.sun.media.content.rtsp.Handler' and 'com.sun.media.protocol.rtsp.DataSource'.

What steps do I have to take to make JMF correctly handle the data? I am not interested in actually rendering the data, I just want JMF to be able to correctly process the stream.

In other words, do I need a codec, a demultiplexer, a depacketizer...?

Thanks,

Max

englanderma at 2007-7-12 18:17:22 > top of Java-index,Security,Cryptography...
# 2

I am trying to use the following codec from fobs4jmf (contributed by Scott Hays) to depacketize the mp4v-es/rtp stream:

com.neon.media.codec.video.mp4v.DePacketizer

1. Created a jar from the com.neon java files.

2. Added to classpath.

3. Registered coded with JMF registry.

I've tried this with DarwinStreamingServer, but I continue to get 'could not handle format MP4V-ES/RTP'.

I added a MP4V-ES/RTP video format to Scott Hays codec, but this did not change anything. I am suspecting that this codec is not even being successfully called. How can I test or ensure that it is? Am I forgetting any steps?

englanderma at 2007-7-12 18:17:22 > top of Java-index,Security,Cryptography...