OpenMCU not using video codecs
Hi everyone,
I'm having a lot of trouble setting up an OpenMCU server on either FreeBSD/Ubuntu (Ubuntu preferred).
On FreeBSD, after all the packages are installed I am seemingly limited to H.261 - The endpoints are capable of H.263/264, however I cannot get OpenMCU to use this codec.
On Ubuntu (my preferred system) OpenMCU preferences report the use of the G711 audio codecs, but do not even use the H.261 video codecs. There is no video output to any of the endpoints.
I think it might have to do with the codec installation on Ubuntu - How can I check if these are installed properly?
When I try to configure the h323plus install, I get the following:
=================== Plugin configuration ====================== prefix : /usr/local exec_prefix : ${prefix} libdir : ${exec_prefix}/lib Audio Codec plugin install dir : ${libdir}/opal-1.23.0/codecs/audio Video Codec plugin install prefix: ${libdir}/opal-1.23.0/codecs/video LID plugin install prefix : ${libdir}/opal-1.23.0/lid FAX plugin install prefix : ${libdir}/opal-1.23.0/fax
GSM : yes (internal) gsm-amr : yes iLBC : yes (internal) Speex : yes (internal, version 1.1.11.1) LPC10 : yes G.726 : yes IMA_ADPCM : yes SBC : no
H.261 : yes H.263 : no (ffmpeg version) H.263/H.263+ : no H.264 : no THEORA : yes MPEG4 Part 2 : no CELT : no
SpanDSP FAX : no
CAPI : no Quicknet xJACK support : no Voicetronics VPB support : yes
OS Type : linux-gnu Machine Type : i686
If all settings are OK, type make and make install ========================================================
Level 5 debug logs show:
0:00.034 OpenMCU MCU Codecs (in preference order): Table: G.711-ALaw-64k <1> G.711-uLaw-64k <2> UserInput/hookflash <3> UserInput/basicString <4> UserInput/dtmf <5> UserInput/RFC2833 <6> UserInput/Navigation <7> UserInput/Softkey <8> UserInput/PointDevice <9> UserInput/Modal <10> Set: 0: 0: G.711-ALaw-64k <1> G.711-uLaw-64k <2> 1: 2: UserInput/hookflash <3> UserInput/basicString <4> UserInput/dtmf <5> UserInput/RFC2833 <6> UserInput/Navigation <7> UserInput/Softkey <8> UserInput/PointDevice <9> UserInput/Modal <10>
There seem to be no video codecs being found or loaded... I'm running the latest version of everything from the h323plus.org site, OpenMCU 2.2.5-1, h323plus 1.23.0.
I've added what I believe to be the video codec directories in the following locations (yes, it's a mess):
/usr/local/lib/opal-1.23.0/plugins/video /usr/local/lib/opal-1.23.0/codecs/video /usr/local/lib/opal-1.23.0/codecs/video/video /usr/local/lib/opal-1.23.0/temp/plugins/video /usr/local/lib/opal-1.23.0/video /usr/lib/ptlib/plugins/video /usr/lib/ptlib/codecs/video /usr/lib/ptlib/video /usr/lib/ptlib-2.4.5/plugins/video
The contents of these are:
root@OpenMCU:/usr/lib/ptlib/codecs/video# ls common H.261-vic H.263-1998 H.263-ffmpeg H.264
I'm also seemingly missing the H.264 codec:
configure: h264 support disabled due to disabled dependency HAVE_H264_DECODER checking enable H.264 support... no
Can anyone shed some light on this?
Thanks!
Victor
Victor
Video codecs are plugins (external libraries) and H.263 and H.264 have dependencies that are required before they will build.
H.261
No dependencies. Make sure your copy the plugin to the same directory (or subDir) as the executable or set the PTLIBPLUGINDIR environmental variable to point to where the *plugin.so resides.
H.263
Dependency FFMPEG
for debian based systems
sudo apt-get install libavcodec-dev libavformat-dev libavcodec-dev
Goto H.261
H.264
Dependency FFMPEG (decode) and X264 (encode)
for debian based systems
sudo apt-get install libx264-dev
Goto H.263
Rerun ./configure and the codecs should then be available. Do a Make and the the *plugin.so should be in the h323plus/plugins directory. Copy them from there.
H.264 also has a *helper.so file which needs to be copied as well. This *MUST* be in the same directory as the executable. It does not understand the PTLIBPLUGINDIR environmental variable.
You should then be good to go.
To debug the codecs set the environmental variable PTLIB_TRACE_CODECS=4
You should see in the console the initial tests to check that all the dependencies are found at startup.
Simon
From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Victor Zanozin Sent: 24 November 2011 16:41 To: h323plus@lists.packetizer.com Subject: [h323plus] OpenMCU not using video codecs
Hi everyone,
I'm having a lot of trouble setting up an OpenMCU server on either FreeBSD/Ubuntu (Ubuntu preferred).
On FreeBSD, after all the packages are installed I am seemingly limited to H.261 - The endpoints are capable of H.263/264, however I cannot get OpenMCU to use this codec.
On Ubuntu (my preferred system) OpenMCU preferences report the use of the G711 audio codecs, but do not even use the H.261 video codecs. There is no video output to any of the endpoints.
I think it might have to do with the codec installation on Ubuntu - How can I check if these are installed properly?
When I try to configure the h323plus install, I get the following:
=================== Plugin configuration ======================
prefix : /usr/local
exec_prefix : ${prefix}
libdir : ${exec_prefix}/lib
Audio Codec plugin install dir : ${libdir}/opal-1.23.0/codecs/audio
Video Codec plugin install prefix: ${libdir}/opal-1.23.0/codecs/video
LID plugin install prefix : ${libdir}/opal-1.23.0/lid
FAX plugin install prefix : ${libdir}/opal-1.23.0/fax
GSM : yes (internal)
gsm-amr : yes
iLBC : yes (internal)
Speex : yes (internal, version 1.1.11.1)
LPC10 : yes
G.726 : yes
IMA_ADPCM : yes
SBC : no
H.261 : yes
H.263 : no (ffmpeg version)
H.263/H.263+ : no
H.264 : no
THEORA : yes
MPEG4 Part 2 : no
CELT : no
SpanDSP FAX : no
CAPI : no
Quicknet xJACK support : no
Voicetronics VPB support : yes
OS Type : linux-gnu
Machine Type : i686
If all settings are OK, type make and make install
========================================================
Level 5 debug logs show:
0:00.034 OpenMCU MCU Codecs (in preference order):
Table:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
UserInput/hookflash <3>
UserInput/basicString <4>
UserInput/dtmf <5>
UserInput/RFC2833 <6>
UserInput/Navigation <7>
UserInput/Softkey <8>
UserInput/PointDevice <9>
UserInput/Modal <10>
Set:
0:
0:
G.711-ALaw-64k <1>
G.711-uLaw-64k <2>
1:
2:
UserInput/hookflash <3>
UserInput/basicString <4>
UserInput/dtmf <5>
UserInput/RFC2833 <6>
UserInput/Navigation <7>
UserInput/Softkey <8>
UserInput/PointDevice <9>
UserInput/Modal <10>
There seem to be no video codecs being found or loaded. I'm running the latest version of everything from the h323plus.org site, OpenMCU 2.2.5-1, h323plus 1.23.0.
I've added what I believe to be the video codec directories in the following locations (yes, it's a mess):
/usr/local/lib/opal-1.23.0/plugins/video
/usr/local/lib/opal-1.23.0/codecs/video
/usr/local/lib/opal-1.23.0/codecs/video/video
/usr/local/lib/opal-1.23.0/temp/plugins/video
/usr/local/lib/opal-1.23.0/video
/usr/lib/ptlib/plugins/video
/usr/lib/ptlib/codecs/video
/usr/lib/ptlib/video
/usr/lib/ptlib-2.4.5/plugins/video
The contents of these are:
root@OpenMCU:/usr/lib/ptlib/codecs/video# ls
common H.261-vic H.263-1998 H.263-ffmpeg H.264
I'm also seemingly missing the H.264 codec:
configure: h264 support disabled due to disabled dependency HAVE_H264_DECODER
checking enable H.264 support... no
Can anyone shed some light on this?
Thanks!
Victor
Hi all,
How would one go about adjusting the video codec max transmission bit rate?
I understand thus can be done in OpenVideoChannel by calling codec.SetMaxBitRate but I I get no flow control supported when I attempted to do so.
I am using v 1.23 for H323plus downloaded from h323plus.org and pitlib v 2.8.5. I noticed that flow control is not supported in ptlib less than 2.9 but would there be another way of changing the bit rate?
Thanks!
Josh C.
Josh
Unfortunately the OpenVideoChannel is called after the H.245 TCS stage so you cannot use it to negotiate a bandwidth limit for a call.
To set the Initial Bandwidth limit in the TCS there is a callback which is called when building. H323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec);
So you could do something like this in your code
void MyH323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec) { unsigned bitrate = <your rate in kbps> * 1000; if ((bitrate != 0) && (codec->GetMediaFormat().GetBandwidth() > bitrate)) { PTRACE(4,"My\tAdjusting maximum video bitrate to " << bitrate); codec->SetMaxBitRate(bitrate); } }
During a call the bitrate may change via FlowControl requests but will not exceed the value you set in this callback.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J C Mercier Sent: 25 November 2011 05:08 To: h323plus@lists.packetizer.com Subject: [h323plus] Changing video codec transmit bit rate
Hi all,
How would one go about adjusting the video codec max transmission bit rate?
I understand thus can be done in OpenVideoChannel by calling codec.SetMaxBitRate but I I get no flow control supported when I attempted to do so.
I am using v 1.23 for H323plus downloaded from h323plus.org and pitlib v 2.8.5. I noticed that flow control is not supported in ptlib less than 2.9 but would there be another way of changing the bit rate?
Thanks!
Josh C.
Thanks Simon for your prompt response.
Having tested the code as suggested, it seems that the bit rate still remains at 327kbps for the h.263 codec after i attempted to set it to 128kbps.
Is it possible that because this version of ptlib (2.8.5) does not support flow control, changing the bit rate will not take affect?
I traced the SetMaxBitRate function, and it was called by the descendant class in plugin, which is correct, which in turn looks as follows;
PBoolean H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) { if (SetFlowControl(codec,context,mediaFormat,bitRate/100)) { frameWidth = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameWidthOption); frameHeight = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameHeightOption); targetFrameTimeMs = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameTimeOption); mediaFormat.SetBandwidth(bitRate); return true; } return false; }
the SetFlowControl always returns false with the following message;
- > "No Flow Control supported in codec"
Any ideas or other suggestions you may provide will be greatly appreciated.
Thanks
Josh
On Thu, Nov 24, 2011 at 2:29 PM, Simon Horne s.horne@packetizer.com wrote:
Josh
Unfortunately the OpenVideoChannel is called after the H.245 TCS stage so you cannot use it to negotiate a bandwidth limit for a call.
To set the Initial Bandwidth limit in the TCS there is a callback which is called when building. H323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec);
So you could do something like this in your code
void MyH323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec) { unsigned bitrate = <your rate in kbps> * 1000; if ((bitrate != 0) && (codec->GetMediaFormat().GetBandwidth() > bitrate)) { PTRACE(4,"My\tAdjusting maximum video bitrate to " << bitrate); codec->SetMaxBitRate(bitrate); } }
During a call the bitrate may change via FlowControl requests but will not exceed the value you set in this callback.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J C Mercier Sent: 25 November 2011 05:08 To: h323plus@lists.packetizer.com Subject: [h323plus] Changing video codec transmit bit rate
Hi all,
How would one go about adjusting the video codec max transmission bit rate?
I understand thus can be done in OpenVideoChannel by calling codec.SetMaxBitRate but I I get no flow control supported when I attempted to do so.
I am using v 1.23 for H323plus downloaded from h323plus.org and pitlib v 2.8.5. I noticed that flow control is not supported in ptlib less than 2.9 but would there be another way of changing the bit rate?
Thanks!
Josh C.
Josh
Yes you are correct FlowControl for the InputDevice (change frame size and rate) requires PTLIB 2.9 or above. Also FlowControl is not supported on H.263 or H.261 which have fixed frame sizes. In H.264 you pass to the plugin the required bitrate and it will return an appropriate frameWidth, FrameHeight and FrameRate to match the proposed BitRate. In H.263 and H.261 the framesize is more rigid (CIF,QCIF) so really you can only adjust the FrameRate.
For H.261/H.263 If you set
mediaFormat.SetBandwidth(yourrate) if SetFlowControl() fails in the H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) function then you'll force the remote via the TCS to that bitrate. Then in your OpenVideoChannel you set your inputdevice to a matching FrameRate (ie 128kbps/327kbps * 30 = 12) then that should be a workaround to get the bitrate in both directions.
The limitation is you will not be able to change the bitrate during the call.
Simon
From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J.C Mercier Sent: 25 November 2011 07:04 To: Simon Horne Cc: h323plus@lists.packetizer.com Subject: Re: [h323plus] Changing video codec transmit bit rate
Thanks Simon for your prompt response.
Having tested the code as suggested, it seems that the bit rate still remains at 327kbps for the h.263 codec after i attempted to set it to 128kbps.
Is it possible that because this version of ptlib (2.8.5) does not support flow control, changing the bit rate will not take affect?
I traced the SetMaxBitRate function, and it was called by the descendant class in plugin, which is correct, which in turn looks as follows;
PBoolean H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) { if (SetFlowControl(codec,context,mediaFormat,bitRate/100)) { frameWidth = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameWidthOption); frameHeight = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameHeightOption); targetFrameTimeMs = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameTimeOption); mediaFormat.SetBandwidth(bitRate); return true; } return false; }
the SetFlowControl always returns false with the following message;
- > "No Flow Control supported in codec"
Any ideas or other suggestions you may provide will be greatly appreciated.
Thanks
Josh
On Thu, Nov 24, 2011 at 2:29 PM, Simon Horne s.horne@packetizer.com wrote:
Josh
Unfortunately the OpenVideoChannel is called after the H.245 TCS stage so you cannot use it to negotiate a bandwidth limit for a call.
To set the Initial Bandwidth limit in the TCS there is a callback which is called when building. H323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec);
So you could do something like this in your code
void MyH323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec) { unsigned bitrate = <your rate in kbps> * 1000; if ((bitrate != 0) && (codec->GetMediaFormat().GetBandwidth() > bitrate)) { PTRACE(4,"My\tAdjusting maximum video bitrate to " << bitrate); codec->SetMaxBitRate(bitrate); } }
During a call the bitrate may change via FlowControl requests but will not exceed the value you set in this callback.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J C Mercier Sent: 25 November 2011 05:08 To: h323plus@lists.packetizer.com Subject: [h323plus] Changing video codec transmit bit rate
Hi all,
How would one go about adjusting the video codec max transmission bit rate?
I understand thus can be done in OpenVideoChannel by calling codec.SetMaxBitRate but I I get no flow control supported when I attempted to do so.
I am using v 1.23 for H323plus downloaded from h323plus.org and pitlib v 2.8.5. I noticed that flow control is not supported in ptlib less than 2.9 but would there be another way of changing the bit rate?
Thanks!
Josh C.
Thanks very much for your help Simon.
I don't seem to have good luck working with any of ptlib 2.10 on windows but i'll try 2.9.
Just for curiosity, you mentioned that one can change the bit rate during a call which i had not thought was possible, but in the case of h.264, how would one go about doing so?
Thanks!
Josh
On Thu, Nov 24, 2011 at 4:36 PM, Simon Horne s.horne@packetizer.com wrote:
Josh****
Yes you are correct FlowControl for the InputDevice (change frame size and rate) requires PTLIB 2.9 or above. Also FlowControl is not supported on H.263 or H.261 which have fixed frame sizes. In H.264 you pass to the plugin the required bitrate and it will return an appropriate frameWidth, FrameHeight and FrameRate to match the proposed BitRate. In H.263 and H.261 the framesize is more rigid (CIF,QCIF) so really you can only adjust the FrameRate. ****
For H.261/H.263 If you set ****
mediaFormat.SetBandwidth(yourrate) if SetFlowControl() fails in the H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) function then you’ll force the remote via the TCS to that bitrate. Then in your OpenVideoChannel you set your inputdevice to a matching FrameRate (ie 128kbps/327kbps * 30 = 12) then that should be a workaround to get the bitrate in both directions.****
The limitation is you will not be able to change the bitrate during the call.****
Simon****
*From:* h323plus-bounces@lists.packetizer.com [mailto: h323plus-bounces@lists.packetizer.com] *On Behalf Of *J.C Mercier *Sent:* 25 November 2011 07:04 *To:* Simon Horne *Cc:* h323plus@lists.packetizer.com *Subject:* Re: [h323plus] Changing video codec transmit bit rate****
Thanks Simon for your prompt response.
Having tested the code as suggested, it seems that the bit rate still remains at 327kbps for the h.263 codec after i attempted to set it to 128kbps.
Is it possible that because this version of ptlib (2.8.5) does not support flow control, changing the bit rate will not take affect?
I traced the SetMaxBitRate function, and it was called by the descendant class in plugin, which is correct, which in turn looks as follows;
PBoolean H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) { if (SetFlowControl(codec,context,mediaFormat,bitRate/100)) { frameWidth = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameWidthOption); frameHeight = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameHeightOption); targetFrameTimeMs = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameTimeOption); mediaFormat.SetBandwidth(bitRate); return true; } return false; }
the SetFlowControl always returns false with the following message;
"No Flow Control supported in codec"Any ideas or other suggestions you may provide will be greatly appreciated.
Thanks
Josh
On Thu, Nov 24, 2011 at 2:29 PM, Simon Horne s.horne@packetizer.com wrote:****
Josh
Unfortunately the OpenVideoChannel is called after the H.245 TCS stage so you cannot use it to negotiate a bandwidth limit for a call.
To set the Initial Bandwidth limit in the TCS there is a callback which is called when building. H323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec);
So you could do something like this in your code
void MyH323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec) { unsigned bitrate = <your rate in kbps> * 1000; if ((bitrate != 0) && (codec->GetMediaFormat().GetBandwidth() > bitrate)) { PTRACE(4,"My\tAdjusting maximum video bitrate to " << bitrate); codec->SetMaxBitRate(bitrate); } }
During a call the bitrate may change via FlowControl requests but will not exceed the value you set in this callback.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J C Mercier Sent: 25 November 2011 05:08 To: h323plus@lists.packetizer.com Subject: [h323plus] Changing video codec transmit bit rate****
Hi all,
How would one go about adjusting the video codec max transmission bit rate?
I understand thus can be done in OpenVideoChannel by calling codec.SetMaxBitRate but I I get no flow control supported when I attempted to do so.
I am using v 1.23 for H323plus downloaded from h323plus.org and pitlib v 2.8.5. I noticed that flow control is not supported in ptlib less than 2.9 but would there be another way of changing the bit rate?
Thanks!
Josh C.****
Josh
The video bitrate is adjusted by a FlowControlRequest from the remote. Have a look at
void H323Connection::OnLogicalChannelFlowControl()
if you want to adjust manually (not recommended).
You can adjust the video input from your webcam on windows by overriding PVideoInputDevice::FlowControl
Something like this
bool PVideoInputDevice_MyDevice::FlowControl(const void * flowData)
{
const PStringArray & options = *(const PStringArray *)flowData;
int w=0; int h=0; int r=0;
for (PINDEX i=0; i < options.GetSize(); i+=2) {
if (options[i] == "Frame Width")
w = options[i+1].AsInteger();
else if (options[i] == "Frame Height")
h = options[i+1].AsInteger();
else if (options[i] == "Frame Time")
r = 90000/options[i+1].AsInteger();
}
SetFrameSize(w,h);
SetFrameRate(r);
return true;
}
Simon
From: J.C Mercier [mailto:jcmerc5@gmail.com] Sent: Friday, 25 November 2011 12:49 PM To: Simon Horne Cc: h323plus@lists.packetizer.com Subject: Re: [h323plus] Changing video codec transmit bit rate
Thanks very much for your help Simon.
I don't seem to have good luck working with any of ptlib 2.10 on windows but i'll try 2.9.
Just for curiosity, you mentioned that one can change the bit rate during a call which i had not thought was possible, but in the case of h.264, how would one go about doing so?
Thanks!
Josh
On Thu, Nov 24, 2011 at 4:36 PM, Simon Horne s.horne@packetizer.com wrote:
Josh
Yes you are correct FlowControl for the InputDevice (change frame size and rate) requires PTLIB 2.9 or above. Also FlowControl is not supported on H.263 or H.261 which have fixed frame sizes. In H.264 you pass to the plugin the required bitrate and it will return an appropriate frameWidth, FrameHeight and FrameRate to match the proposed BitRate. In H.263 and H.261 the framesize is more rigid (CIF,QCIF) so really you can only adjust the FrameRate.
For H.261/H.263 If you set
mediaFormat.SetBandwidth(yourrate) if SetFlowControl() fails in the H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) function then you'll force the remote via the TCS to that bitrate. Then in your OpenVideoChannel you set your inputdevice to a matching FrameRate (ie 128kbps/327kbps * 30 = 12) then that should be a workaround to get the bitrate in both directions.
The limitation is you will not be able to change the bitrate during the call.
Simon
From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J.C Mercier Sent: 25 November 2011 07:04 To: Simon Horne Cc: h323plus@lists.packetizer.com Subject: Re: [h323plus] Changing video codec transmit bit rate
Thanks Simon for your prompt response.
Having tested the code as suggested, it seems that the bit rate still remains at 327kbps for the h.263 codec after i attempted to set it to 128kbps.
Is it possible that because this version of ptlib (2.8.5) does not support flow control, changing the bit rate will not take affect?
I traced the SetMaxBitRate function, and it was called by the descendant class in plugin, which is correct, which in turn looks as follows;
PBoolean H323PluginVideoCodec::SetMaxBitRate(unsigned bitRate) { if (SetFlowControl(codec,context,mediaFormat,bitRate/100)) { frameWidth = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameWidthOption); frameHeight = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameHeightOption); targetFrameTimeMs = mediaFormat.GetOptionInteger(OpalVideoFormat::FrameTimeOption); mediaFormat.SetBandwidth(bitRate); return true; } return false; }
the SetFlowControl always returns false with the following message;
- > "No Flow Control supported in codec"
Any ideas or other suggestions you may provide will be greatly appreciated.
Thanks
Josh
On Thu, Nov 24, 2011 at 2:29 PM, Simon Horne s.horne@packetizer.com wrote:
Josh
Unfortunately the OpenVideoChannel is called after the H.245 TCS stage so you cannot use it to negotiate a bandwidth limit for a call.
To set the Initial Bandwidth limit in the TCS there is a callback which is called when building. H323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec);
So you could do something like this in your code
void MyH323EndPoint::OnSetInitialBandwidth(H323VideoCodec * codec) { unsigned bitrate = <your rate in kbps> * 1000; if ((bitrate != 0) && (codec->GetMediaFormat().GetBandwidth() > bitrate)) { PTRACE(4,"My\tAdjusting maximum video bitrate to " << bitrate); codec->SetMaxBitRate(bitrate); } }
During a call the bitrate may change via FlowControl requests but will not exceed the value you set in this callback.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of J C Mercier Sent: 25 November 2011 05:08 To: h323plus@lists.packetizer.com Subject: [h323plus] Changing video codec transmit bit rate
Hi all,
How would one go about adjusting the video codec max transmission bit rate?
I understand thus can be done in OpenVideoChannel by calling codec.SetMaxBitRate but I I get no flow control supported when I attempted to do so.
I am using v 1.23 for H323plus downloaded from h323plus.org and pitlib v 2.8.5. I noticed that flow control is not supported in ptlib less than 2.9 but would there be another way of changing the bit rate?
Thanks!
Josh C.
participants (5)
-
J C Mercier
-
J.C Mercier
-
Simon Horne
-
Simon Horne
-
Victor Zanozin