Tuesday 15 January 2013

windows - ffmpeg and Red5 Issue: Increase in number of ffmpeg simultaneous streams to Red5 resulting in packet loss -



windows - ffmpeg and Red5 Issue: Increase in number of ffmpeg simultaneous streams to Red5 resulting in packet loss -

i have screen sharing app written in flex, using 1 person can share screen person via red5 server (version: 1.0.3). platform windows server 2008. now, want load test reddish 5 server find out maximum how many simultaneous screen sharing session can allow, without quality compromise. quality mean, speed of transmission , no info loss during transmission. simulated load using ffmpeg command.

for this, instead of transmitting live captured screen, transmitting (uploading) flv file stored in local red5 server using ffmpeg command. in receiving client side, starting download (transmitting) same flv file after 5 secs since upload has started. working fine when running test less 10 pairs of upstreaming-downstreaming sessions. but, when number increasing beyond 10, observing important packet loss in transmission.

here commands running in loop. loop count number of streaming pairs.

upstreaming: ffmpeg -re -i <file_name1> -f flv -ar 22050 "rtmp://<stream_name>" -report downstreaming: ffmpeg -re -i "rtmp://<stream_name> live=1" <file_name2> -report

the , set in such way, in downstream download same uploaded file. "rtmp://" same in both cases. not doing upstream in record mode, hence, no physical file getting saved in server side. when analyzing file received in receiving client side, poor quality video due frame loss. uploading , downloading machines 2 different machines. ran test many hours, repeating same 10 simultaneous streaming sets. each set consistently giving same results.

what puzzling me is, working fine without packet loss less 10 simultaneous streaming. searched in various forums, none of answers applicable scenario. while thinking red5 has limited capacity, found many posts saying red5 can scale take big load. mean, problem in configuration? not sure focus on.

an illustration log snippet:

lots of missing info @ downstream side. e.g. between frames 101 , 102 there difference of 25 sec. on replaying video there stoppage much time.in time gap frames lost.

frame= 101 fps=1.0 q=14.5 size= 2650kb time=00:01:41.00 bitrate= 214.9kbits/s frame= 102 fps=1.0 q=13.2 size= 2763kb time=00:02:06.00 bitrate= 179.6kbits/s

any help appreciated!

windows ffmpeg rtmp red5 flv

No comments:

Post a Comment