Video Transmit on Linux Using JMF

Experiment of video transmit between PC A and PC B on Linux using JMF

 

1. Prerequisite

------------------
(1) PC A

Fedora Core 10, JDK 6, JMF2.1.1e
Run command "hostname ", and get the output, e.g.
<username>-fedora
Run command "cat /etc/hosts ", and get the output, e.g.
127.0.0.1        localhost.localdomain localhost <username>-fedora
::1            localhost6.licaldomain6 localhost6


(2) PC B

Windows XP, JDK 6, JMF2.1.1e
Run command "ipconfig /all ", and get the output, e.g.
Host Name: <username>-winxp
Primary Dns Suffix: <domain>

...

(3) Install JMF on Fedora

Suppose jmf-2_1_1e-linux-i586.bin is under /home/<username>/ folder, follow the steps:

  • Edit jmf-2_1_1e-linux-i586.bin, find the statement "tail +309 $0 > $outname ", change it to "tail -n +309 $0 > $outname "
  • chmod u+x jmf-2_1_1e-linux-i586.bin
  • ./jmf-2_1_1e-linux-i586.bin
  • Set JMF_HOME, CLASSPATH, PATH in .bashrc
  • cp $JMF_HOME/lib/*.jar $JAVAHOME/lib/ext
  • cp $JMF_HOME/lib/*.so $JAVAHOME/lib/i386
  • Run JMF Diagnostics Applet http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/jmfdiagnostics.html

 

(4) Be sure of enabling the ports for tranmission on Firewall Configuration
Follow System -> Administration -> Firewall -> Other Ports, and enable the ports for RTP and RTCP.

 

(5) Modify AVReceive2.java and AVTransmit2.java from SUN

Add the statement of "System.out.println(localAddr); " before "mgrs[i].initialize(localAddr); ".
Compile it on both PCs.

 

(6) Only transmit video file

Video Compression: Cinepak and H.263.

H.263 Tx is not supported on Linux...

 

2. Procedure

----------------

(1) Default


(1.1) A as Rx with AVReceive2, B as Tx with AVTransmit2
No RTP stream is received on A, and the commandline output by AVReceive2 on A:
DataAddress: <user-name>-fedora/127.0.0.1
...

 

(1.2) A as Tx with AVTransmit2, B as Rx with AVReceive2

No PTP stream is received on B, and the commandline output by AVTransmit2 on A:

DataAddress: <user-name>-fedora/127.0.0.1
...

The local IP address output on A not the correct address but loopback address. However correct address can be found on output of B.

 

 

(2) Modify /etc/hosts on A
127.0.0.1        localhost.localdomain localhost
<A-ipaddress>        <username>-fedora.localdomain <username>-fedora
::1            localhost6.licaldomain6 localhost6

Run "/etc/init.d/network restart "


(2.1) A as Rx with AVReceive2, B as Tx with AVTransmit2

RTP stream is received on A, and the commmandline output by AVReceive2 on A:
DataAddress: <user-name>-fedora/<A-ipaddress>
...

The local IP address is correct.

 

(2.2) A as Tx with AVTransmit2, B as Rx with AVReceive2
RTP stream is received on B.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值