" /> (Resolved) How to reach the BEST video and audio quality with Stream Manager - Genesys CTI User Forum

Author Topic: (Resolved) How to reach the BEST video and audio quality with Stream Manager  (Read 7474 times)

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Advertisement
Hi all,

i tested my Genesys StreamManager with various video files. I found in the Stream manager Deployment Guide the basic x263 conversion, it works, but it gives me not enough good quality.

Another test: x264 with CIF option works too, but not enough good  :(
The audio stream is 8khz mono stream. this is not enough good :(

What is the best quality, and how can i set these option is mencoder? My source video file is a sample mp4 HD video file.

Alex
« Last Edit: September 08, 2011, 09:23:57 AM by alexandercoachman »

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #1 on: August 31, 2011, 09:17:17 PM »
Hi,

i'm testing it since days and now i share with you my experiences. Well, i have an avi video file. (Converted from FLV).

First, i must extract the audio track from the avi file. Its easy, i use the following command:

[b]mplayer [i]sample.avi[/i] -ao pcm [i]outputfilename.wav[/i] -vc null -vo null[/b]

Next step, converting this wav file to 8kHz 16bit mono stream. Then i rename this file to [b]pcmu.wav[/b]

Now i'd like to create a H.263 video stream. I can use different picture sizes, CIF, or QCIF. I need CIF settings.

Converting the avi file to H.263 CIF format with 15FPS i will use mencoder. The command looks like:

[b]mencoder [i]sample.avi[/i] -vf scale=352:288 -of rawvideo -ofps 15000/1001 -nosound -o [i]h263_CIF=2[/i] -ovc lavc -lavcopts vcodec=h263:keyint=10:vpsize=1000:vqmin=3:vbitrate=100
[/b]

352:288 means CIF size, 15000/1001 means 15FPS which is option 2 in filename. (Option 1=30FPS)

Then i will use smzip to compress theses files (pcmu.wav & h263_CIF=2) into an archive file.

[b]smzip -ac all 10.zip pcmu.wav h263_CIF=2[/b]

I must use in the name of the zip file numbers only. Next step is copy this file into the announcement folder under Stream Manager. In the routing strategy i use play announcement block to play this video on a routing point.

It works! But... but i'd like to use H.264 video. Lets see the steps:

Audio extracting is the same method. Lets convert some video in H.264 format! Its good to know how it should work. I tried many formats, but it doesnt work.. :'( :'( :'( :'(

If i'd like to convert into CIF, 15FPS with profile-level-id=2

[b]mencoder.exe [i]sample.avi[/i] -vf scale=352:288 -of rawvideo -ofps 15000/1001 -nosound -o [i]h264_42e014=2[/i] -ovc x264 -x264encopts keyint=10:bframes=0:nob_adapt:nocabac:level_idc=20[/b]

I tried an another method too:

mencoder.exe [i]sample.avi[/i] -vf scale=352:288 -of rawvideo -ofps 15000/1001 -nosound -o [i]h264_42e014=2[/i] -ovc x264 -x264encopts [b]subq=6:keyint=25[/b]:bframes=0:nob_adapt:nocabac:level_idc=20

Then compress it with the pcmu.wav into an archive, but i receive only the sound of the video.  :'( :'(
It works, when i call the routing point from inside with the Counterpath bria softphone, but i use trunk DN -s to another gateways, and only the H263 video works properly.

I tried it with variable formats:

CIF with 15 or 30FPS : 42e00c, 42e00d, 42e014, 42e015, 42e016

Can anybody help me?
best regards, Alex
« Last Edit: August 31, 2011, 09:42:20 PM by alexandercoachman »

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #2 on: September 02, 2011, 07:57:36 AM »
Hi Alex,

Not sure I do understand you correctly... Are you saying that playing H.263 and H.264 video+audio works when dialing RP directly using Bria but it doesn't work when dialling via gateway? If my understanding is correct then please check what codes are offered in INVITE message received via gateway. Maybe there is an element (e.g. gateway itself) that removes support for H.264 codec...

R.

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #3 on: September 02, 2011, 08:28:33 AM »
Hi, yes this is the problem.
I will check the SIPServer logs, thanks for your advice.

A

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #4 on: September 02, 2011, 08:44:14 AM »
From the requestec's Flash2SIP Gateway i received the followings:

10:37:03.687:(1) SIPS:LOGBLOCK:BEGIN:SIPDATA:[
10:37:03.687:(1) Received [420,UDP] 1464 bytes from 213.152.241.166:5060 <<<<<
INVITE sip:requestec@10.35.37.10:5060 SIP/2.0
CSeq: 1 INVITE
v: SIP/2.0/UDP 213.152.241.166:5060;branch=z9hG4bK1827386c-acd3-e011-9bc7-00221952cf86;rport
User-Agent: ZS/3.327.0
f: "Sandor" <sip:v33245@213.152.241.166>;tag=40fc306c-acd3-e011-9bc7-00221952cf86
i: 2e04316c-acd3-e011-9bc7-00221952cf86@zenon166
k: 100rel,replaces
Organization: ZS
t: <sip:requestec@10.35.37.10>
m: "Sandor" <sip:v33245@213.152.241.166>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING,PRACK
l: 905
c: application/sdp
Max-Forwards: 70


v=0
o=- 1314952632 1 IN IP4 213.152.241.166
s=ZS/3.327.0
c=IN IP4 213.152.241.166
t=0 0
m=audio 5200 RTP/AVP 8 0 4 15 99 101 100
a=sendrecv
a=rtpmap:8 PCMA/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:4 G723/8000/1
a=rtpmap:15 G728/8000/1
a=rtpmap:99 AMR/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=maxptime:60
m=video 5202 RTP/AVP 103 104 105 34 102
b=AS:350
b=TIAS:350000
a=sendrecv
[b]a=rtpmap:103 H264/90000
a=fmtp:103 max-fs=1200;profile-level-id=428015
a=rtpmap:104 H264/90000
a=fmtp:104 max-fs=1200;packetization-mode=1;profile-level-id=428015[/b]
a=rtpmap:105 MP4V-ES/90000
a=fmtp:105 config=000001b001000001b58913000001000000012000c48d88007d0b04241463;profile-level-id=2
a=rtpmap:34 h263/90000
a=fmtp:34 F=1;CIF=2;maxbr=3500;QCIF=2
a=rtpmap:102 H263-1998/90000
a=fmtp:102 D=1;F=1;I=1;J=1;K=1;T=1;CIF=2;CIF4=2;QCIF=2

My video is converted to prifile-level-id 42e0xx format. Is this the problem? What do you think?
Alex

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #5 on: September 02, 2011, 11:32:15 AM »
I trying to understand the parameter profile-level-id in SDP Protocoll.
Can anyone tell me, for what stand this parameter? For example:

> a=fmtp:103 max-fs=1200;profile-level-id=428015

In the [b]profile-level-id=428015[/b]
42 is baseline and 15 is level 2.1

[b]But for what stand 80?[/b]  ??? ??? ???

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #6 on: September 02, 2011, 12:17:16 PM »
Hi Alex,

80 is indicator about what features of H.264 standard are supported. You can find more details in following RFC - [url=http://www.rfc-editor.org/rfc/rfc3984.txt]http://www.rfc-editor.org/rfc/rfc3984.txt[/url]

R.

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #7 on: September 02, 2011, 12:21:35 PM »
Yes i read this RFC many times  :)

I dont know which parameter should I change in the coding, to receive a profile-level-id value of 4280xx. Genesys recommendation is preparing media with 42e0xx settings. Im afraid, when i could convert to 4280xx format, Stream manager wouldnt support this format... Is it true?

Alex

Offline alexandercoachman

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 0
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #8 on: September 08, 2011, 09:23:26 AM »
I reached the best video quality yesterday. Tested with Counterpath Bria. I downloaded a sample H264 720p HD video. Converted to 30fps CIF from 24fps. Then I used the xxxx1e picture size option in the profile-level-id with CIF4 30FPS settings. Genesys doesnt support this format (only 15FPS) but it works  :)

I converted with the following mencoder command:

C:\Program Files\Sgi's Video Converter GUI\Mplayer>mencoder h264_hd_720p_30fps_cif.mp4 -vf scale=704:576 -of rawvideo -ofps 30000/1001 -nosound -o output.file -ovc x264 -x264encopts subq=7:me=umh:partitions=all:keyint=25:bframes=0:nob_adapt:nocabac:level_idc=30

(subq=7:me=umh:partitions=all options are not so important)

Used smzip to combine the 8khz mono 16bit stream (named to [b]pcmu.wav[/b]) and the video file (named to [b]h264_42e01e=1[/b]).

Best regards,
Alex

Offline briankkatz

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • convert 8mm to DVD
Re: How to reach the BEST video and audio quality with Stream Manager
« Reply #9 on: February 14, 2012, 08:33:03 AM »
[quote author=alexandercoachman link=topic=6619.msg28877#msg28877 date=1314966095]
Yes i read this RFC many times  :)

I dont know which parameter should I change in the coding, to receive a profile-level-id value of 4280xx. Genesys recommendation is preparing media with 42e0xx settings. Im afraid, when i could convert to 4280xx format, Stream manager wouldnt support this format... Is it true?

Alex
[/quote]

I totally agree you , unable to understand  Code , tried many time but failed :(