AVReceive / AVTransmit

Hi all,

i'm trying to use AVTransmit2 and AVReceive2 without any success.

Both compile and run perfectly.

When testing AVTransmit, if i define as the destination IP 127.0.0.1 i can see the packets using ethereal listening to "lo" (with an obvious UDP error - same origin and destination port)

If i try to send to another IP Addr. i can't see the packets passing through eth0 on their way out.

When i try to test AVReceive, i use another machine to send a RTP/UDP stream.

AVReceive simply prints

"Waiting for RTP data to arrive..."

What is strange is that i can see the RTP/UDP packets flowing through the interface (on their way in) of the receiving machine where AVReceive is running.

I've tried this procedure in 2 different Linux boxes and on Windows.

It almost seems that both AVReceive2 and AVTransmit2 can't "access" the network interface....

Any suggestions?

[942 byte] By [PedroMoreiraa] at [2007-10-2 21:32:01]
# 1

1st test

use JMStudio on BOTH machines

set one up to transmit & the other to receive

prove you can send / receive video file

2nd test

replace transmitting JMStudio with your transmitter code

(use settings from test #1)

prove you can send / receive video file

3rd test

replace receiving JMStudio with your receiving code

(use settings from test #1)

if still having problems post up your code - someone will take a look & lend a hand

StefanMarica at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 2

Hi Stefan, thank you for your reply.

I've tried using JMStudio without success. I've used it in both linux boxes.

While using JMStudio i can't see the packets leaving or arriving in either box.

I've also tried to use another example (AVCustomRecv/AVCustomTrans) which also didn't work.

Another question:

JMStudio complains about some type of media that i try to stream. When trying some .avi and .mov only the audio is "streamable" by JMStudio.

Where can i find the supported formats or codecs, or the support depends on the codecs installed in the box?

Thanks in advance.

PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 3

Does JMStudio let you play an avi/mov file on its own

If NOT then I think you may have not installed JMF completely/properly

Supported Formats can be found here

http://java.sun.com/products/java-media/jmf/2.1.1/formats.html

Have you tried the JMF Diagnostic

http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html

It ONLY tells you ->>

JMF Version... 2.1.1e

Win32 Build

Native Libraries Found

StefanMarica at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 4

JMF Diagnostics:

Java 1.1 compliant browser.....Maybe

JMF classes.....Not Found

I'm running a Ubuntu box with Firefox 1.0.7

I've noticed, in the meantime, that using the code in Windows works. At least i can see the packets being sent through the eth0 interface.

Can it be any problem related with Linux? Codecs missing...

What's strange is that i can open any .avi or .mov file with mplayer or vlc, so the codecs are there. Maybe JMF isn't aware of the codecs...

I really don't know...

PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 5
Have you checked the Linux installation http://java.sun.com/products/java-media/jmf/2.1.1/setup.html
StefanMarica at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 6

Yes, i've checked and followed the instructions.

The message from the JMF Diagnostics is the same.

I've updated Firefox to the latest version.

I'm convinced that the problem is in the relation between Java and Linux...

To install Java i used the bundle NetBeans IDE + J2SE SDK...

Also, JMStudio complains about almost every file type... Isn't this an import symptom? Can i do anything in JMFRegistry? I've seen the instructions but i really don't know if any thing must shoud be added...

I don't really don't know what else to do.

PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 7
I'm running a Ubuntu box with Firefox 1.0.7Have you tried this with the JMF Cross platform installation rather than the Linux performance pack installation http://java.sun.com/products/java-media/jmf/2.1.1/setup.html
StefanMarica at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 8
I've just tried the JMF cross platform but everything stayed the same.I've got all the env variables defined correctly.
PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 9
The only other comment / suggestion / questionHave you checked your app when running as a Root user
StefanMarica at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 10

I've been trying to, simply, send a stream using JMStudio. I'm convinced that as soon as that's solved, everything will come together.

Right now i'm getting a different message on JMF Diagnostics

JMF Version... 2.1.1e

All Java Build

Native Libraries Not Found

This happened because i changed on the Java Control Panel the JRE from "Default" to the one i got installed. I don't have any other JRE so i don't know what he was assuming as Default.

The env vars are:

LD_LIBRARY_PATH=/opt/JMF-2.1.1e/lib:

JAVA_HOME=/opt/j2sdk1.4.2_11

JMFHOME=/opt/JMF-2.1.1e

CLASSPATH=/opt/JMF-2.1.1e/lib/jmf.jar:.:

Which i added to .bashrc in my profile and on the root profile.

I'm not sure about JAVA_HOME...

Any ideas?

Thanks for all the help.

PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 11
Can you please show me your env vars?In the JMF Diagnostics page, the Native libraries belong to JMF or Linux? I mean, the libraries that are missing should be provided by the OS or Java?Thank you.
PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 12

Sorry, I'm not running a Linux build at the moment

For the Linux performance pack installation

From

http://java.sun.com/products/java-media/jmf/2.1.1/setup-linux.html

JMF 2.1.1 Setup

Linux

Setting Up JMF

This page describes how to set up and run JMF for Linux, an optimized implementation of JMF that contains class files and native libraries for running JMF players.

So the NATIVE libraries should be included in the download

NOTE also from

Check the hardware and software requirements.

ie Here

http://java.sun.com/products/java-media/jmf/2.1.1/requirements.html#linux

It suggests

Software Requirements

RedHat Linux 6.2 or better.

Can you find a machine to install RedHat & then try with that

Initially just prove JMStudio runs a movie/avi

Then check transfer from redHat machine to/from a windows machine (where you already know it works)

StefanMarica at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 13

JMF Version... 2.1.2

All Java Build

Native Libraries Found

Sun Java Desktop System

All JDS systems have java JMF installed correctly.

The trick is to install jmf into correct JRE directory.

I have the following:

/usr/java/j2redefault/lib/jmf.properties

/usr/java/j2redefault/lib/ext/jmf.jar

/usr/java/j2redefault/lib/ext/jmplay.jar

/usr/java/j2redefault/lib/ext/jmfmp3.jar

Then make sure that the *.so libraries are installed in the correct location.

After installing jmf, the jmf/lib folder will have libjmf.so, and some others.

Copy all of the *.so files to

/usr/java/j2redefault/lib/i386/

This should get the Native Libraries found, if your browser is using the correct installation of java.

1964mercurya at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 14

It worked! Thank you!

Just one question.., I just tried to send a file using JMStudio to another machine. I tried to see the packets going out through the interface but i didn't see any. I'm only able to see the packets leaving and arriving the other machine if i use a multicast address.

Have you tried any of this situations?

Even when i see the packets arriving at a machine, JMStudio running on that machine can't open the Stream...

Thanks again for the help

PedroMoreiraa at 2007-7-14 0:45:29 > top of Java-index,Security,Cryptography...
# 15

Your host name/IP must be set

eg. If you type..

more /etc/hosts

and get in response ..

127.0.0.1 localhost

It will not work.

You need to do an ifconfig, get your IP address, and map it to your hostname.

Type:

hostname

ifconfig

then add into your /etc/hosts file a new line, so the file looks something like .....

127.0.0.1 localhost

192.168.xxx.xxx linuxHostName

don't forget to do a /etc/init.d/network restart

I think this will solve your problem,

1964mercurya at 2007-7-21 8:05:31 > top of Java-index,Security,Cryptography...
# 16

You solved the problem again. Thanks.

I hope i'm not pushing my luck, but i have one more problem...

Even though i can see unicast packets arriving, i can't catch the stream.

I've tried streming out using AVTransmit2 and JMStudio and i tried opening that stream in the remote machine using AVReceive2 and JMStudio without any sucess...

Do i need to do anything else?

Thank you for all your help.

PedroMoreiraa at 2007-7-21 8:05:31 > top of Java-index,Security,Cryptography...
# 17

I made a mistake and posted this in another topic a few days ago.

I'll just post it here also as a follow up.

I found out it i was doing wrong.

Everything works perfectly now.

Thanks for all your help... i would have never found this out for myself.

How did you do it?

Did you researched yourself?

PedroMoreiraa at 2007-7-21 8:05:31 > top of Java-index,Security,Cryptography...