1080p Video in Ant VOD is actually 1800x1010

261 views
Skip to first unread message

Ben Bowler

unread,
May 12, 2021, 4:42:02 AM5/12/21
to Ant Media Server
Good morning,

We've been testing different resolutions and bitrates with AMS. One interesting thing we have found is that the "1080p" setting in the adaptive bitrate configuration actually returns a VOD file that is 1800x1010, not 1920x1080.

Screenshot 2021-05-12 at 09.41.18.png

Is there a way to update this to be the correct resolution via an underlying config?

We need the full resolution for our post-processing pipeline.

Best.

Ben



Ben Bowler

unread,
May 12, 2021, 5:53:38 AM5/12/21
to Ant Media Server
For more context, here is a sample recording trimmed from the original stream: https://www.dropbox.com/s/2nu79h7g4fefchw/RecordedStream2021-05-06T10_50_49.144Z-Trim%20for%20AMS.mp4?dl=0

And here are the details in ff-works that show the incorrect resolution:

Screenshot 2021-05-12 at 10.47.11.png

Selim Emre

unread,
May 13, 2021, 9:11:51 AM5/13/21
to Ant Media Server
Hi Ben,

Have a good day. Thank you for the great question.

If you can use adaptive option, AMS is using default 1080p resolution like: 1920x1080 resolution.

If you disable adaptive options, MP4 records will record according to your stream resolution. Btw, I think it can be a good feature. I have added this issue in our issue tracking system: https://github.com/ant-media/Ant-Media-Server/issues/3259

Best Regards,
Selim

Ben Bowler

unread,
May 13, 2021, 10:46:14 AM5/13/21
to Ant Media Server
We need the adaptive options so is it possible to:

 - get the full quality recording event with adaptive settings enabled (I know this works for RTMP currently but not WebRTC)
 OR
 - get the 1080p VOD recording resolution fixed so that it is the correct resolution 1920x1080 not 1800x1010px

Can you repeat this bug? If you record a file with the adaptive 1080p setting enabled - what resolution is the recording for you?

Selim Emre

unread,
May 16, 2021, 9:48:23 AM5/16/21
to Ant Media Server
Hi Ben,

Can you repeat this bug? If you record a file with the adaptive 1080p setting enabled - what resolution is the recording for you?
If you enable 1080p adaptive resolution, recording will be 1080p. You can check mp4 record resolution with FFprobe. 

Best Regards,
Selim

Ben Bowler

unread,
May 20, 2021, 10:46:00 AM5/20/21
to Ant Media Server
I can again repeat this issue today. When testing locally with Enterprise Edition 2.2.1 20201029_2042  streaming from WebRTC using the WebRTCAdapter.js library I get the following from ffprobe (and I've attached the file for you to look at) on the recording:

 Stream #0:1(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1800x1010, 578 kb/s, 15.17 fps, 20 tbr, 10240 tbn, 40 tbc (default)

The application on Ant is set up like so:

Screenshot 2021-05-20 at 15.39.28.png

Visually playing back the file I can see that the quality starts out low and "steps up" after a few seconds it appears to be the correct quality and bandwidth supplied in the library.

RTMP ingest is irrelevant because from RTMP we receive the full quality vod file.

Is there a way to force SDP/WebRTC to respect a predefined resolution so that we get the full resolution recording at the other end? Similar to this unanswered question on Stack Overflow?

RecordedStream2021-05-20T14_28_38.114Z.mp4

Ben Bowler

unread,
May 20, 2021, 10:47:21 AM5/20/21
to Ant Media Server
Both the canvas and the video tag used to create the video are set to 1920x1080px in size and I have verified this in the DOM via the inspector.

Selim Emre

unread,
May 22, 2021, 7:07:55 AM5/22/21
to Ant Media Server
Hi Ben,

Have a good day.

Visually playing back the file I can see that the quality starts out low and "steps up" after a few seconds it appears to be the correct quality and bandwidth supplied in the library.
In the latest version(v2.3.2), clients watching compatible stream quality according to client bitrate value.

Is there a way to force SDP/WebRTC to respect a predefined resolution so that we get the full resolution recording at the other end?
I think WebRTC client can force it before the stream starts, but it needs some development for this issue. I have added a task for this issue https://github.com/ant-media/Ant-Media-Server/issues/3287

I hope, I could help you.

Best Regards,
Selim

Selim Emre

unread,
Jun 6, 2021, 8:36:53 AM6/6/21
to Ant Media Server
Hi Ben,

I've discussed your questions with my colleagues and I've some updates.

>Visually playing back the file I can see that the quality starts out low and "steps up" after a few seconds it appears to be the correct quality and
>bandwidth supplied in the library.

For the 1920x1080p and  1800x1010 issue, Ant Media Server tries to fit the perfect aspect ratio otherwise DASH does not play the video due to different aspect ratios in the play list.  I think this is about that. 

Even if this is a default behavior, fortunately we can add a configuration parameter and server can behave accordingly. No worries about that. 

>Is there a way to force SDP/WebRTC to respect a predefined resolution so that we get the full resolution recording at the other end? Similar to this unanswered question on Stack Overflow?

Recently browsers does not allow to specify the encoder output. It changes accordingly network conditions. I mean resolution can increase/decrease while streaming. As far as I know, there are some options in the WebRTC W3C however browser did not implement yet. I can check again if it's implemented.

Best Regards,
Selim

Ben Bowler

unread,
Jun 7, 2021, 11:38:00 AM6/7/21
to Ant Media Server
Hey Selim, thanks for looking into this. We really need the video resolution to be 1920x1080p to work with the post stream encoding process.

What is the configuration parameter?

Ben Bowler

unread,
Jun 16, 2021, 11:27:11 AM6/16/21
to Ant Media Server
For future readers of this thread, the issues were caused by the canvas being resized after the WebRTCAdapter instance was created. Making sure the canvas was the correct size before this fixed the issue.
Reply all
Reply to author
Forward
0 new messages