Problem with multi-record(VP8 codec)

Denis Vasiliev

New Member
Hello,

We faced a problem when recording a "multi-record" from a Pixel 6 phone(missing video/audio track), during the reasirching we found out what comes from the device stream with the VP8 video codec:
Code:
{
...
  "name" : "challenger826",
  "published" : true,
  "hasVideo" : true,
  "hasAudio" : true,
  "status" : "PUBLISHING",
  "audioCodec" : "opus",
  "videoCodec" : "VP8",
  "record" : false,
  "width" : 480,
  "height" : 640,
....
}
If we look at the information about the video file that was recorded, then there is only one video track in it, which was recorded with the h.264 codec.

In all other test cases that we carried out(from other devices), there was always a H.264 codec and the recording proceeded correctly with two video tracks.

According to the documentation, WebCallServer supports the VP8 codec, but is multi-recording of the content supported with such a codec?

Another question, is it possible to forcefully specify which video codec to use? (we are using android / IOS SDK)
 

Max

Administrator
Staff member
Good day.
According to the documentation, WebCallServer supports the VP8 codec, but is multi-recording of the content supported with such a codec?
As clearly mentioned in documentation, multiple recording feature is supported for H264 streams only, because MP4 container is used.
Another question, is it possible to forcefully specify which video codec to use? (we are using android / IOS SDK)
Please use StreamOptions.setStripCodecs() method in Android SDK (see example on GitHub):
Code:
            StreamOptions streamOptions = new StreamOptions(streamName);
            streamOptions.setStripCodecs("VP8");
            publishStream = session.createStream(streamOptions);
Note that you should list the codecs to be stripped (not used).
Unfortunately, this option is not implemented in iOS SDK. We raised the ticket WCS-3416.
You can set up codecs priority on server side:
Code:
codecs=opus,alaw,ulaw,...,h264,vp8,...
In this case, H264 will be preferred for publishing/playback. This affects all the client applications.
 

Denis Vasiliev

New Member
Such a solution with disabling the VP8 codec leads to the fact that there is no video at all:
Code:
  "name" : "challenger872",
  "published" : false,
  "hasVideo" : true,
  "hasAudio" : true,
  "status" : "PLAYING",
  "audioCodec" : "opus",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 0,
  "minBitrate" : 0,
  "maxBitrate" : 0,
It looks as if the device does not support the H.264 codec, but according to the specification and our tests, this codec is supported on the device through WebRTC.

We tried using resource https://webrtc.github.io/samples/src/content/peerconnection/change-codecs/ for tests H.264 and WebRTC, here is the result from the problem device

1641398087629.png


but for some reason, the SDK for Android of the flashphoner cannot determine that the device has support for H.264 encoding.
The problem was detected on devices:
* Pixel 6
* Huawei P Smart 2019
 

Max

Administrator
Staff member
We tried using resource https://webrtc.github.io/samples/src/content/peerconnection/change-codecs/ for tests H.264 and WebRTC, here is the result from the problem device
This test shows that a browser supports H264 encoding/decoding. But system itself may not support this codec. Android SDK uses codecs available to the system itself only.
So if you wish to stream H264, seems like you should use Web SDK in browser or in WebView. Another option is to use stream mixer at server side to record a conference streams.
 

Denis Vasiliev

New Member
Is there some way to get the actual list of supported video codecs from the device and get them in the logs?

Both devices claim support for encoding/decoding h.264 video codec.
 

Denis Vasiliev

New Member
Are there any other alternative solutions to the problem?

We cannot switch to another SDK and "stream mixer" does not suit us in terms of functionality. Now the only problem is that Multi-records cannot record video with the VP8 codec.
 

Max

Administrator
Staff member
As an option, you can transcode all VP8 streams to H.264 using Transcoder API. Once stream is being transcoded, it can be added to the multi-recorder.

Please note. Single transcoding session may use 1-2 physical CPU cores on the server.
 

Denis Vasiliev

New Member
According to the stream-recording documentation, the flashphoner can record a stream with the VP8 codec.

Do you have plans in your Roadmap to add support for recording the VP8 codec for multi-recording?
If so, could you let us know an approximate deadline?

This is a very serious problem for us in the inability to record this codec and we believe that this is important not only for us but also for many of your other users.
 

Max

Administrator
Staff member
>According to the stream-recording documentation, the flashphoner can record a stream with the VP8 codec.

It's correct. WCS can record single stream in webM (vp8 codec).

These two features are bit different:

Single stream recording

Multiple stream recording

As you can see from docs the Multiple-recorder states mp4 container only (H.264). We will fix documentation here to make it more clear.

>Do you have plans in your Roadmap to add support for recording the VP8 codec for multi-recording? If so, could you let us know an approximate deadline?

We raised internal feature request WCS-3419. Will inform you once we have any progress on this ticket. No strict deadlines defined for this feature request. The multi-recorder feature is young and no other votes for now.
 

Denis Vasiliev

New Member
Thank you for the prompt reply.

Could you please estimate (time/cost) this feature development for our purposes? It would be hard for our project to wait for this feature more than 1-2 months.

Thank you.
 

Max

Administrator
Staff member
Could you please estimate (time/cost) this feature development for our purposes?
We do not provide ETA for feature request on the forum. But we can raise implementation priority if more customers request the feature.
It would be hard for our project to wait for this feature more than 1-2 months.
For temporary workaround, you can use on demand transcoding as recommended above
 
Top