Capturing VOD from a file

Luca

Member
Hi

I am trying to implement a feature that lets me add a stream a VOD file to a mixer, however I wold like to also add the functionality to pause the video stream and start it from the beginning when its tie to push it into the mixer

Is this possible?

Thank you in advance for your response
Best
Luca
 

Luca

Member
Thank you Max

Not 100% what I was asking, but let me clarify

The application I would like to build would work a bit like an MCU, however would also give the possibility to mix OnDemand files as live files.

Flashphoner already supports this feature, but functionality is pretty weak, I would need to be able to "Pause" the video and restart when I need, right now, once you add the live translation of the OD video in the server, the video will start playing behind the scenes and doing the whole process you have suggested whilst live is not particularly smooth as it takes time to load making the process clunky.
Also, when I add a stream live to the mixer there is a lag between the time I push the command and the time the stream loads in which a Grey Box is visible, please could you let me know if there is a way to smooth this out when adding streams to a mixer?

Thank you in advance
 

Max

Administrator
Staff member
Flashphoner already supports this feature, but functionality is pretty weak, I would need to be able to "Pause" the video and restart when I need, right now, once you add the live translation of the OD video in the server, the video will start playing behind the scenes and doing the whole process you have suggested whilst live is not particularly smooth as it takes time to load making the process clunky.
Unfortunately, VOD does not support pausing at all. You can only start VOD live stream from the beginning of the file or stop it.
A workaround is to split VOD file to a small fragments and play them subsequentally, in this case you can stop playback and start it again from a closest fragment.
Also, when I add a stream live to the mixer there is a lag between the time I push the command and the time the stream loads in which a Grey Box is visible, please could you let me know if there is a way to smooth this out when adding streams to a mixer?
Mixer (or player) waits for the first keyframe to start VOD stream playback. So you have to prepare VOD files by reencoding them with ffmpeg for example:
Code:
ffmpeg -i VODfile.mp4 -c:v libx264 -preset ultrafast -g 60 -filter:v fps=30 -c:a aac -ar 48000 -strict -2 VODfileFixed.mp4
In this example, there will be keyframes in file every 2 seconds, so a gray box will bw displayed no more than 2 seconds.
 

Luca

Member
Thank you for the response Max

The issue is as well that the grey box appears also when I add a stream from a local or remote camera and I would really love to know if there is a way to smooth this process out as we would be using the application to work as a video mixer and this grey box appearing as a placeholder whilst the video loads is pretty ugly

Please let me know
Best
Luca
 

Max

Administrator
Staff member
The issue is as well that the grey box appears also when I add a stream from a local or remote camera
Please enable periodic FIR request
Code:
periodic_fir_request=true
periodic_fir_request_interval=2000
In this case, server asks client browser to send key frame every 2 seconds.
Also make sure that your server has capacity enough for mixer to work: at least 2 CPU cores per one mixer + 2 cores reserved for other tasks. So the server should have 4 CPU cores to run one mixer simultaneously.
 

Luca

Member
Thank you Max

Unfortunately(even after applying your suggested changes) it is still happening, is there a way I can make that transition smoother? change that grey colour? apply a video transition?

Any help would be much appreciated

Thank you
Best
Luca
 

Max

Administrator
Staff member
Please clarify your flow:
1. Start the mixer by REST API /mixer/startup
2. Play the mixer stream (should be black box by default)
3. Publish WebRTC stream from camera
4. Add the stream to mixer by REST API /mixer/add
Is that right?
On what step do you see a gray box?
We can't reproduce this in a latest WCS build 5.2.1329, so please update and test again.
 

Luca

Member
Hi Max

your process description is correct, that's how I am doing it

Below is the link to a loom video where I demonstrate when the grey box briefly appears


This is at step 4 of your process

Please le me know if there is anything I can do to mitigate the appearance of these grey boxes

Best
Luca
 

Max

Administrator
Staff member
Thanks. We were able to locate the gray background on your video. We would need a bit more time to reproduce such effect on our env.

0:04 second

1659365497445.png


0:22 second

1659365590042.png


0:25 second

1659365646160.png
 

Max

Administrator
Staff member
Hello,

Ticket WCS-3564 has been submitted for removing the "grey box", we'll notify in this thread about an update.
Meanwhile, this setting can be tried as workaround to conceal the box (to change gray to a different color): mixer_text_background_colour.
The setting is for text background, but in this case it also is applied.
 

Luca

Member
Hello,

Ticket WCS-3564 has been submitted for removing the "grey box", we'll notify in this thread about an update.
Meanwhile, this setting can be tried as workaround to conceal the box (to change gray to a different color): mixer_text_background_colour.
The setting is for text background, but in this case it also is applied.
That is great Max, thank you very much, I am looking forward to hear about the change.

P.s. it could be great if it would be possible to implement some sort of basic video transition when a user is activated in the mixer so to make it look more professional and more like a video mixer rather than hard cut, but removing the grey box( or the initial frame that causes the box) would be already an improvement
 
Last edited:

Luca

Member
Hello,

Ticket WCS-3564 has been submitted for removing the "grey box", we'll notify in this thread about an update.
Meanwhile, this setting can be tried as workaround to conceal the box (to change gray to a different color): mixer_text_background_colour.
The setting is for text background, but in this case it also is applied.
@Max Is there any ETA for this so we can plan accordingly? if not please let me know so we can think about some workaround

Thank you in advance
Best
Luca
 

Max

Administrator
Staff member
We do not provide ETA on forum tickets unless they are crictical and concern the most of customers. May be next month.
 

Max

Administrator
Staff member
Good day.
We fixed the issue in build 5.2.1359. Please update WCS and set
Code:
mixer_show_separate_audio_frame=false
then restart WCS. After that, the grey box will not be displayed when stream is added to a mixer.
 
Top