GES: Inaccurate layer durations with low FPS videos
Describe your issue
When composing a bunch of layers together with GES I frequently get some incorrect frames where one of the layers disappear too early. It seems like the issue has to do with low FPS videos that I get from Chrome's getDisplayMedia()
API when there's nothing moving in a tab that's being recorded.
We use GStreamer to render a long video in chunks, and last second of each chunk has one of the videos disappearing from the view, so the issue affects our product at https://www.tella.tv frequently when users record browser tabs. I would really appreciate help in fixing this or finding a workaround.
Expected Behavior
In the example reproduction below, every frame should look like this:
Observed Behavior
In the resulting video last second looks like this with the video disappearing, leaving only the background:
Setup
- Operating System: Ubuntu 20.04
- GStreamer Version: Built from Git main by the time this issue is created [10eaae12]
- Device: Virtual Machine
- gst-inspect-1.0 output
Steps to reproduce the bug
- Render a video with GES containing one image layer as background and one layer with a 1 FPS video above it:
ges-launch-1.0 \
-o 'file:///tmp/ges.webm' \
+clip 'https://tella-dev-tella-media.s3.us-east-2.amazonaws.com/cl6arh1v9000209mf4mudhn0e_test.mp4' \
start=0.0 duration=5.0 layer=0 set-width 640 set-height 480 set-posx 200 set-posy 200 \
+clip 'https://tella-dev-tella-media.s3.us-east-2.amazonaws.com/bg.png' \
start=0.0 duration=5.0 layer=1
How reproducible is the bug?
Always
With the same input it always happens. I see it frequently at different inpoints for low FPS videos, but the resulting time the video disappears differs.
Solutions you have tried
Re-encoding the video with high FPS before seems to work. Same command with high fps video URL:
ges-launch-1.0 \
-o 'file:///tmp/ges.webm' \
+clip 'https://tella-dev-tella-media.s3.us-east-2.amazonaws.com/cl6arh1v9000209mf4mudhn0e_test_high_fps.mp4' \
start=0.0 duration=5.0 layer=0 set-width 640 set-height 480 set-posx 200 set-posy 200 \
+clip 'https://tella-dev-tella-media.s3.us-east-2.amazonaws.com/bg.png' \
start=0.0 duration=5.0 layer=1