Server: LOADBG with AUTO not working after seeking forward

Created on 11 Apr 2018  ยท  28Comments  ยท  Source: CasparCG/server

Issue following commands:

    PLAY 1-10 clip1
    LOADBG 1-10 clip2 AUTO
    CALL SEEK 1-10 OUT -300 (or any command that seeks forward)

Clip2 should start playing automatically once clip1 comes to an end. It works fine so long as you don't reduce clip1 playout duration (eg, using the SEEK command). In other words, if you seek forward so that the amount of time clip1 was playing is less than the original duration of clip1, clip2 will not start playing.

This is important for example for cue-to-cue pre-event run-through, where all you need to play are ins and outs to make sure transitions are OK.

It seems some sort of timer gets fired, which is tied to the duration of clip1 and once the timer expires, clip2 is transitioned from bg to fg.

Expected Behaviour

Once clip1 is over, the queued up clip2 should start playing regardless of any seek commands.

Current Behaviour

As described above, if you seek forward while clip1 is playing, clip2 will not auto play.

Steps to Reproduce

Issue following commands:

    PLAY 1-10 clip1
    LOADBG 1-10 clip2 AUTO
    CALL SEEK 1-10 OUT -300 (or any command that seeks forward)

Wait for clip1 to end and clip2 to not start playing.

Environment

  • CasparCG Server version: 2.1.0.472 dc2e94b Beta 2
  • Operating system: Ubuntu 16.04 LTS
feedbacpull request wanted typbug

All 28 comments

Here is another example using built-in server media:

play 1-10 amb
call 1-10 seek rel 60
loadbg 1-10 empty mix 15 auto

Without the seek command the file will smoothly fade out at the end.
With the seek command, it will freeze at the end and then fade out after a second or so.

This further reconfirms that there seems to be a timer of some sort that gets fired when the file starts playing, which triggers auto transition.

@dimitry-ishenko CasparCG Server version: 2.1.0.472 dc2e94b Beta 2

Is this correct? โฌ†๏ธ

~~I can confirm this works as expected in Server v2.2.~

I can confirm just as you report that this is a bug for Server v.2.1 but that version is not actively developed anymore in favour of v.2.2.

Please submit a PR if you need this fixed for v2.1.

@dotarmin yes I am still on 2.1. Thank you for confirming that it works fine on 2.2. :+1: Unfortunately, we can't use 2.2 in our production environment until we do extensive testing on it. (And looking at some of the open bugs, it still crashes after playing video for some hours.)

Yes 2.1 is no longer being developed and will get no further improvements.
2.2 is still in active beta.

On Fri, Apr 13, 2018 at 10:44 Dimitry Ishenko notifications@github.com
wrote:

@dotarmin https://github.com/dotarmin yes I am still on 2.1. Thank you
for confirming that it works fine on 2.2. ๐Ÿ‘ Unfortunately, we can't use
2.2 in our production environment until we do extensive testing on it. (And
looking at some of the open bugs, it still crashes after playing video for
some hours.)

โ€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/CasparCG/server/issues/963#issuecomment-381158269,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AC0_IZTyWIZTV-i-WSeEqYWMGSwfhbVeks5toLnpgaJpZM4TPSer
.

>

Thomas Kaltz III 586-214-7150 Sent from Gmail Mobile

Thanks @TomKaltz. I am aware that 2.1 is no longer under development. :stuck_out_tongue_closed_eyes: I am mainly reporting bugs to make sure they are fixed in 2.2. As I've mentioned above, I can't use 2.2 just yet, but thankfully @dotarmin was able to test it.

@dimitry-ishenko we will patch this in a fork of 2.1. Expected to be done within 3 weeks.

@jesperstarkar oh nice! Is it publicly accessible?

Sure it will be. But the task is not top prio yet, but will be in a few weeks.

I think that LOADBG AUTO is even more broken in 2.2.0.4 555d0386
If I run the following (with no seek) then the transition doesnt start until the video has finished

PLAY 1-10 go1080p25
loadbg 1-10 empty mix 15 auto

I can see what is wrong in 2.1 though, its using the number of frames the producer has output instead of position in the file when checking for the start of the transition. From the code in 2.2 I expect it will be the same issue but its not as easy to check the numbers

we will patch this in a fork of 2.1. Expected to be done within 3 weeks.

๐Ÿ‘

@Julusian can you point me to the whereabouts of the loadbg transition code? If I have a chance I will try to take a stab at it.

@jesperstarkar is your 2.1 fork accessible at this time? Maybe I can contribute there.

I think that LOADBG AUTO is even more broken in 2.2.0.4 555d038

@Julusian Does this also apply for 42ee4c2? My testing is for the moment based on 42ee4c2 and it worked when I tested ๐Ÿ˜•

If I run the following (with no seek) then the transition doesnt start until the video has finished

I can also try this tomorrow using 42ee4c2.

@dimitry-ishenko yes I am still on 2.1. Thank you for confirming that it works fine on 2.2. ๐Ÿ‘ Unfortunately, we can't use 2.2 in our production environment until we do extensive testing on it. (And looking at some of the open bugs, it still crashes after playing video for some hours.)

No problems but I'm kind of confused right now based on what Julian wrote. I have tested this using 42ee4c2 and what I could see it worked but now I'm not sure... ๐Ÿ˜– I will do same tests again tomorrow morning just in case somebody swapped version on the testing machine accidentally. And if that's the case I apologies right away for my previous statement. I will let you know tomorrow and update my previous comments if that's the case ๐Ÿ˜•

More testing needed using v2.2.

@dimitry-ishenko It was a very quick fix. I havent tested it very thoroughly yet, but it appears to work. Also, it is likely to break anything that relies on the frame-number field in INFO/OSC
https://github.com/nrkno/tv-automation-caspar-server/tree/963-loadbg-auto-2.1
Let me know if you need a build and I can set one going

@dotarmin I tried in latest 2.2. I don't see anything suggesting it would have changed since your version, so that is odd.
What I'm expecting to see is the video to fade out while still playing, instead it fades after it ends:
Output.zip

@dotarmin
I will do same tests again tomorrow morning just in case somebody swapped version on the testing machine accidentally. And if that's the case I apologies right away for my previous statement. I will let you know tomorrow and update my previous comments if that's the case ๐Ÿ˜•

Ping @Julusian

Let me know if you need a build and I can set one going

@Julusian if you could I'd appreciate that

OK I found where the auto transition happens:

https://github.com/CasparCG/server/blob/6fec6f8f6b5276db86536dd551e047f2a8f3dcdb/core/producer/layer.cpp#L134-L142

@Julusian I will take a look at usages of frame_number() to see what may have gotten broken.

@dimitry-ishenko oh sorry, I meant to post that is where it is used.
I didn't see any other usages of frame_number() in the code that could be affected, so I think it is just clients that could be affected.

Here is a build: https://drive.google.com/open?id=1b9VGG0188dqtTdIEnVOZBFt7mL49ewpG

Update:
I can confirm that my previous tests are _invalid_ because it appears that v2.0.7 was running (somehow, I blame myself) meanwhile I tested ๐Ÿ˜–. I have just tested (once again, now with v2.2 for sure) and can confirm that this bug applies for both v2.1 and v2.2 of CasparCG Server.

f.y.i. @dimitry-ishenko @Julusian @TomKaltz

@Julusian you don't happen to have Linux builds, do you?

loadbg also not playing when play command is with length parameter

PLAY 1-10 clip1 length 40
LOADBG 1-10 clip2 AUTO

one more thing i think related to it.

PLAY 1-10 CLIP1 LENGTH 40

with length 40 clip1 is playing only 20frames and get stopped

also OSCMonitor is not showing fps information just showing time

Environment

  • CasparCG Server version: 2.2.0.4 Beta 1 x64
  • Channel Set to Pal DV
  • Operating system: Windows 7 x64

@sirfnomi Thanks for letting us know! ๐Ÿ‘

with length 40 clip1 is playing only 20frames and get stopped

in server 2.2 seek and lenght parameter should be twice of earlier.

in server 2.2 seek and lenght parameter should be twice of earlier.

I thought I had read something like that somewhere, but only for interlaced channels

I thought I had read something like that somewhere, but only for interlaced channels

I can confirm that this is for progressive channel also.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TomKaltz picture TomKaltz  ยท  47Comments

MauriceVeraart picture MauriceVeraart  ยท  45Comments

jesperstarkar picture jesperstarkar  ยท  53Comments

Behinder picture Behinder  ยท  28Comments

super-ienien picture super-ienien  ยท  24Comments