Custom mixer issues

Saimir

New Member
Hello,
I'm trying to make a Picture in Picture custom Mixer for HLS delivery.
I have installed the 5.2.481 to fix the mixer/startup issues.
I tried with online example class (https://docs.flashphoner.com/display/WCS5EN/Stream+mixer), but I have blue and repeated window. Im sending only one webrtc feed.

Do you have any Picture in Picture Mixer layout?
Con you please help me with this issues?

Thanks
 

Max

Administrator
Staff member
Good day.
We work on custom mixer layout problem in ticket WCS-2419. We'll let you know when fix it.
 

Max

Administrator
Staff member
Good day.
This issue probably requires fix on server side, so we still working on it. We'll let you know result here.
 

Saimir

New Member
Good day.
This issue probably requires fix on server side, so we still working on it. We'll let you know result here.
Hi Max,
Any news? We have to make soon a choise because of App approvation.
Plese let me know.

Regards
 

Max

Administrator
Staff member
Good day.
We fixed custom mixer layout example:
Code:
public class TestLayout implements IVideoMixerLayout {

    private static final int PADDING = 4; // This value should be even

    @Override
    public Layout[] computeLayout(YUVFrame[] yuvFrames, String[] strings, int canvasWidth, int canvasHeight) {
        ArrayList<IVideoMixerLayout.Layout> layout = new ArrayList<>();

        int canvasCenter = canvasHeight / 2;
        int frameCenter = canvasCenter - (canvasHeight / yuvFrames.length) / 2;

        int layoutWidth = canvasWidth / yuvFrames.length - PADDING;
        int layoutHeight = canvasHeight / yuvFrames.length;

        for (int c = 0; c < yuvFrames.length; c++) {
            Point prevPoint = new Point();
            Dimension prevDimension = new Dimension();
            if (layout.size() > 0) {
                prevPoint.setLocation(layout.get(c - 1).getPoint());
                prevDimension.setSize(layout.get(c - 1).getDimension());
            }
            Point currentPoint = new Point((int) (prevPoint.getX() + prevDimension.getWidth() + PADDING),
                    frameCenter);

            layout.add(new IVideoMixerLayout.Layout(currentPoint, new Dimension(layoutWidth,
                    layoutHeight), yuvFrames[c]));
        }
        return layout.toArray(new IVideoMixerLayout.Layout[layout.size()]);
    }
}
With this sample layout, the picture look good. Please check.
Note that custom layout padding and mixer output resolution should always be even, for example, 640x360, but not 641x365. We still working to fix this.
 

Max

Administrator
Staff member
The issue with uneven custom layout padding or mixer output resolution has been fixed in WCS v. 5.2.572: if width or height is uneven, it will be decremented.
 
Top