You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by Sonia SWEngineer <sw...@gmail.com> on 2018/03/21 13:53:26 UTC

How to compress video stream

Hello all,
I am trying to compress a video stream (no audio) because it is taking a
lot of bandwidth when it is being transmitted to the Red5 backend
application.
The application is based on Openmeetings. I see that the video data is
transmitted with CodecId=3 and it is being transmitted as an flv. Is it
possible to change the way it is being sent so it is more compressed? I was
checking how ffmpeg sends mp4 streams converting them into flv and it uses
less bandwidth. Would like to know if the same principle can be used when
sending the video stream using the Openmeetings code and how.
Thanks in advance for any advice on this regard.

Regards,

Sonia

Re: How to compress video stream

Posted by Sonia SWEngineer <sw...@gmail.com>.
Thanks very much Maxim for the great clarification and info.

On Wed, Mar 21, 2018 at 11:14 PM, Maxim Solodovnik <so...@gmail.com>
wrote:

> Hello,
>
> 1) sure there are alternatives to Screen Codec V1, it is screen codec
> v2 :) https://issues.apache.org/jira/browse/OPENMEETINGS-112
> Unfortunately I found no implementation of it compatible with Apache
> License (found no implementation, but it was long ago)
> You can use h264 codec for screen-sharing, but:
>     a) screen-sharing will be slower than right now
>     b) I found no implementation of it compatible with Apache License
>
> 2) you can capture your screen and send it to room using ffmpeg, this
> will work but without remote capabilities
>
> On Thu, Mar 22, 2018 at 2:11 AM, Sonia SWEngineer
> <sw...@gmail.com> wrote:
> > Thanks a lot Maxim. Here is my understanding so far. Please let me know
> if
> > it is correct.
> > 1- Screen Streaming can not use a different codec than CodecId=3 to
> > transmit the screen video from a client computer to a Red5 server
> > application.
> > 2- The only alternative to reduce bandwidth used by screen capture will
> be
> > to save the screen video locally as mp4 and then transmit it to Red5
> using
> > ffmpeg (to change the stream to flv)
> > My only question is for number 1: Is it not possible to change the
> > codec because
> > Red5 has the limitation? or can it be solved if the client application
> > implements another codec?
> >
> > Thanks very much,
> >
> > Sonia
> >
> > On Wed, Mar 21, 2018 at 1:00 PM, Maxim Solodovnik <so...@gmail.com>
> > wrote:
> >
> >> Unfortunately there is no alternative codec for screensharing so far :(
> >>
> >> WBR, Maxim
> >> (from mobile, sorry for the typos)
> >>
> >> On Wed, Mar 21, 2018, 23:47 Sonia SWEngineer <sw...@gmail.com>
> >> wrote:
> >>
> >> > Thanks very much Maxim. In my particular case is the video stream from
> >> > screenshare the one that needs to be compressed.  In ScreenV1Encoder I
> >> see
> >> > a default FLAG_CODEC_SCREEN of value 3. Is that the value that I will
> >> need
> >> > to change for another one representing h264?  if so, what will that
> value
> >> > be?
> >> >
> >> > On Wed, Mar 21, 2018 at 10:03 AM, Maxim Solodovnik <
> solomax666@gmail.com
> >> >
> >> > wrote:
> >> >
> >> > > you can change codec to h264 (in Admin->Config)
> >> > > But it will require more CPU power on both sender and receivers
> >> > >
> >> > > On Wed, Mar 21, 2018 at 8:53 PM, Sonia SWEngineer
> >> > > <sw...@gmail.com> wrote:
> >> > > > Hello all,
> >> > > > I am trying to compress a video stream (no audio) because it is
> >> taking
> >> > a
> >> > > > lot of bandwidth when it is being transmitted to the Red5 backend
> >> > > > application.
> >> > > > The application is based on Openmeetings. I see that the video
> data
> >> is
> >> > > > transmitted with CodecId=3 and it is being transmitted as an flv.
> Is
> >> it
> >> > > > possible to change the way it is being sent so it is more
> >> compressed? I
> >> > > was
> >> > > > checking how ffmpeg sends mp4 streams converting them into flv
> and it
> >> > > uses
> >> > > > less bandwidth. Would like to know if the same principle can be
> used
> >> > when
> >> > > > sending the video stream using the Openmeetings code and how.
> >> > > > Thanks in advance for any advice on this regard.
> >> > > >
> >> > > > Regards,
> >> > > >
> >> > > > Sonia
> >> > >
> >> > >
> >> > >
> >> > > --
> >> > > WBR
> >> > > Maxim aka solomax
> >> > >
> >> >
> >>
>
>
>
> --
> WBR
> Maxim aka solomax
>

Re: How to compress video stream

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello,

1) sure there are alternatives to Screen Codec V1, it is screen codec
v2 :) https://issues.apache.org/jira/browse/OPENMEETINGS-112
Unfortunately I found no implementation of it compatible with Apache
License (found no implementation, but it was long ago)
You can use h264 codec for screen-sharing, but:
    a) screen-sharing will be slower than right now
    b) I found no implementation of it compatible with Apache License

2) you can capture your screen and send it to room using ffmpeg, this
will work but without remote capabilities

On Thu, Mar 22, 2018 at 2:11 AM, Sonia SWEngineer
<sw...@gmail.com> wrote:
> Thanks a lot Maxim. Here is my understanding so far. Please let me know if
> it is correct.
> 1- Screen Streaming can not use a different codec than CodecId=3 to
> transmit the screen video from a client computer to a Red5 server
> application.
> 2- The only alternative to reduce bandwidth used by screen capture will be
> to save the screen video locally as mp4 and then transmit it to Red5 using
> ffmpeg (to change the stream to flv)
> My only question is for number 1: Is it not possible to change the
> codec because
> Red5 has the limitation? or can it be solved if the client application
> implements another codec?
>
> Thanks very much,
>
> Sonia
>
> On Wed, Mar 21, 2018 at 1:00 PM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
>> Unfortunately there is no alternative codec for screensharing so far :(
>>
>> WBR, Maxim
>> (from mobile, sorry for the typos)
>>
>> On Wed, Mar 21, 2018, 23:47 Sonia SWEngineer <sw...@gmail.com>
>> wrote:
>>
>> > Thanks very much Maxim. In my particular case is the video stream from
>> > screenshare the one that needs to be compressed.  In ScreenV1Encoder I
>> see
>> > a default FLAG_CODEC_SCREEN of value 3. Is that the value that I will
>> need
>> > to change for another one representing h264?  if so, what will that value
>> > be?
>> >
>> > On Wed, Mar 21, 2018 at 10:03 AM, Maxim Solodovnik <solomax666@gmail.com
>> >
>> > wrote:
>> >
>> > > you can change codec to h264 (in Admin->Config)
>> > > But it will require more CPU power on both sender and receivers
>> > >
>> > > On Wed, Mar 21, 2018 at 8:53 PM, Sonia SWEngineer
>> > > <sw...@gmail.com> wrote:
>> > > > Hello all,
>> > > > I am trying to compress a video stream (no audio) because it is
>> taking
>> > a
>> > > > lot of bandwidth when it is being transmitted to the Red5 backend
>> > > > application.
>> > > > The application is based on Openmeetings. I see that the video data
>> is
>> > > > transmitted with CodecId=3 and it is being transmitted as an flv. Is
>> it
>> > > > possible to change the way it is being sent so it is more
>> compressed? I
>> > > was
>> > > > checking how ffmpeg sends mp4 streams converting them into flv and it
>> > > uses
>> > > > less bandwidth. Would like to know if the same principle can be used
>> > when
>> > > > sending the video stream using the Openmeetings code and how.
>> > > > Thanks in advance for any advice on this regard.
>> > > >
>> > > > Regards,
>> > > >
>> > > > Sonia
>> > >
>> > >
>> > >
>> > > --
>> > > WBR
>> > > Maxim aka solomax
>> > >
>> >
>>



-- 
WBR
Maxim aka solomax

Re: How to compress video stream

Posted by Sonia SWEngineer <sw...@gmail.com>.
Thanks a lot Maxim. Here is my understanding so far. Please let me know if
it is correct.
1- Screen Streaming can not use a different codec than CodecId=3 to
transmit the screen video from a client computer to a Red5 server
application.
2- The only alternative to reduce bandwidth used by screen capture will be
to save the screen video locally as mp4 and then transmit it to Red5 using
ffmpeg (to change the stream to flv)
My only question is for number 1: Is it not possible to change the
codec because
Red5 has the limitation? or can it be solved if the client application
implements another codec?

Thanks very much,

Sonia

On Wed, Mar 21, 2018 at 1:00 PM, Maxim Solodovnik <so...@gmail.com>
wrote:

> Unfortunately there is no alternative codec for screensharing so far :(
>
> WBR, Maxim
> (from mobile, sorry for the typos)
>
> On Wed, Mar 21, 2018, 23:47 Sonia SWEngineer <sw...@gmail.com>
> wrote:
>
> > Thanks very much Maxim. In my particular case is the video stream from
> > screenshare the one that needs to be compressed.  In ScreenV1Encoder I
> see
> > a default FLAG_CODEC_SCREEN of value 3. Is that the value that I will
> need
> > to change for another one representing h264?  if so, what will that value
> > be?
> >
> > On Wed, Mar 21, 2018 at 10:03 AM, Maxim Solodovnik <solomax666@gmail.com
> >
> > wrote:
> >
> > > you can change codec to h264 (in Admin->Config)
> > > But it will require more CPU power on both sender and receivers
> > >
> > > On Wed, Mar 21, 2018 at 8:53 PM, Sonia SWEngineer
> > > <sw...@gmail.com> wrote:
> > > > Hello all,
> > > > I am trying to compress a video stream (no audio) because it is
> taking
> > a
> > > > lot of bandwidth when it is being transmitted to the Red5 backend
> > > > application.
> > > > The application is based on Openmeetings. I see that the video data
> is
> > > > transmitted with CodecId=3 and it is being transmitted as an flv. Is
> it
> > > > possible to change the way it is being sent so it is more
> compressed? I
> > > was
> > > > checking how ffmpeg sends mp4 streams converting them into flv and it
> > > uses
> > > > less bandwidth. Would like to know if the same principle can be used
> > when
> > > > sending the video stream using the Openmeetings code and how.
> > > > Thanks in advance for any advice on this regard.
> > > >
> > > > Regards,
> > > >
> > > > Sonia
> > >
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
>

Re: How to compress video stream

Posted by Maxim Solodovnik <so...@gmail.com>.
Unfortunately there is no alternative codec for screensharing so far :(

WBR, Maxim
(from mobile, sorry for the typos)

On Wed, Mar 21, 2018, 23:47 Sonia SWEngineer <sw...@gmail.com>
wrote:

> Thanks very much Maxim. In my particular case is the video stream from
> screenshare the one that needs to be compressed.  In ScreenV1Encoder I see
> a default FLAG_CODEC_SCREEN of value 3. Is that the value that I will need
> to change for another one representing h264?  if so, what will that value
> be?
>
> On Wed, Mar 21, 2018 at 10:03 AM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > you can change codec to h264 (in Admin->Config)
> > But it will require more CPU power on both sender and receivers
> >
> > On Wed, Mar 21, 2018 at 8:53 PM, Sonia SWEngineer
> > <sw...@gmail.com> wrote:
> > > Hello all,
> > > I am trying to compress a video stream (no audio) because it is taking
> a
> > > lot of bandwidth when it is being transmitted to the Red5 backend
> > > application.
> > > The application is based on Openmeetings. I see that the video data is
> > > transmitted with CodecId=3 and it is being transmitted as an flv. Is it
> > > possible to change the way it is being sent so it is more compressed? I
> > was
> > > checking how ffmpeg sends mp4 streams converting them into flv and it
> > uses
> > > less bandwidth. Would like to know if the same principle can be used
> when
> > > sending the video stream using the Openmeetings code and how.
> > > Thanks in advance for any advice on this regard.
> > >
> > > Regards,
> > >
> > > Sonia
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>

Re: How to compress video stream

Posted by Sonia SWEngineer <sw...@gmail.com>.
Thanks very much Maxim. In my particular case is the video stream from
screenshare the one that needs to be compressed.  In ScreenV1Encoder I see
a default FLAG_CODEC_SCREEN of value 3. Is that the value that I will need
to change for another one representing h264?  if so, what will that value
be?

On Wed, Mar 21, 2018 at 10:03 AM, Maxim Solodovnik <so...@gmail.com>
wrote:

> you can change codec to h264 (in Admin->Config)
> But it will require more CPU power on both sender and receivers
>
> On Wed, Mar 21, 2018 at 8:53 PM, Sonia SWEngineer
> <sw...@gmail.com> wrote:
> > Hello all,
> > I am trying to compress a video stream (no audio) because it is taking a
> > lot of bandwidth when it is being transmitted to the Red5 backend
> > application.
> > The application is based on Openmeetings. I see that the video data is
> > transmitted with CodecId=3 and it is being transmitted as an flv. Is it
> > possible to change the way it is being sent so it is more compressed? I
> was
> > checking how ffmpeg sends mp4 streams converting them into flv and it
> uses
> > less bandwidth. Would like to know if the same principle can be used when
> > sending the video stream using the Openmeetings code and how.
> > Thanks in advance for any advice on this regard.
> >
> > Regards,
> >
> > Sonia
>
>
>
> --
> WBR
> Maxim aka solomax
>

Re: How to compress video stream

Posted by Maxim Solodovnik <so...@gmail.com>.
you can change codec to h264 (in Admin->Config)
But it will require more CPU power on both sender and receivers

On Wed, Mar 21, 2018 at 8:53 PM, Sonia SWEngineer
<sw...@gmail.com> wrote:
> Hello all,
> I am trying to compress a video stream (no audio) because it is taking a
> lot of bandwidth when it is being transmitted to the Red5 backend
> application.
> The application is based on Openmeetings. I see that the video data is
> transmitted with CodecId=3 and it is being transmitted as an flv. Is it
> possible to change the way it is being sent so it is more compressed? I was
> checking how ffmpeg sends mp4 streams converting them into flv and it uses
> less bandwidth. Would like to know if the same principle can be used when
> sending the video stream using the Openmeetings code and how.
> Thanks in advance for any advice on this regard.
>
> Regards,
>
> Sonia



-- 
WBR
Maxim aka solomax