Skip to content

Bug: Commands in BATCH not executing #1687

@pyahmed

Description

@pyahmed

Observed Behavior

CasparCG doesn't execute certain commands sent as a batch (via Python or console) under certain conditions.

Expected behaviour

All commands should always execute as long as they are valid.

Steps to reproduce

Assuming sample.mov is under media and minimal.html (see below for code) is under template

  1. Send the following command batch (via python or console):
    REQ aaa BEGIN\r\nLOAD 1-10 sample\r\nCG 1-11 ADD 11 minimal 0\r\nCOMMIT\r\n
    This is executed properly, video is loaded and first frame is shown / template is loaded and visible as well.
  2. Send the following command batch:
    REQ bbb BEGIN\r\nPLAY 1-10\r\nCG 1-11 PLAY 11\r\nCOMMIT
    The HTML Template will play but the video stays frozen.

If in step 2 you send the following commands:
REQ ccc BEGIN\r\nLOADBG 1-09 qwert\r\nPLAY 1-10\r\nCG 1-11 PLAY 11\r\nCOMMIT
The HTML and video play properly. Please note, the media qwert does not actually exist. So just executing a nonsensical LOADBG command seems to fix it.

code for the HTML template

<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	</head>
	<body>
		<h2 style="color: #424242; font-size: 72pt; left: 50%; position: absolute; opacity: 1;transform: translate(-50%,0%);background: rgba(184, 227, 244, 0.81);padding-left: 16px;padding-right: 16px;border-radius: 14px; border: 4px solid #0286c6cc;;font-family: Consolas;">LOADED</h2>
		<h1 style="color: rgb(66, 66, 66); font-size: 72pt; left: 50%; position: absolute; opacity: 0; transform: translate(-50%, 0%); background: rgba(184, 244, 191, 0.81); padding-left: 16px; padding-right: 16px; border-radius: 14px; font-family: Consolas;border: 4px solid #02c602cc;">NOW PLAYING</h1>
	</body>
	<script>
		function play(){
			document.querySelector('h1').style.opacity = 1;
			document.querySelector('h2').style.opacity = 0;
			return 'OK'
		}

		function stop(){
			document.querySelector('h1').style.opacity = 0;
			return 'OK'
		}

		function update(inp){
			return 'OK'
		}		
	</script>
</html>

Environment

  • Server version: v2.4.3 and 2.5.0
  • Operating system: Windows 10/11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions