html5tomp4

FREEMIUM
By karolisk | Updated vor einem Monat | Video, Images
Popularity

8.2 / 10

Latency

1,465ms

Service Level

100%

Health Check

N/A

Back to All Tutorials (1)

options explained

full expanded options:

"options": {
        "webhook": "",
        "duration": 15,
        "audio": true,
        "fps": 30,
        "crf": 30,
        "width": 1080,
        "height": 1080,
        "zoom": 1
        "crop": {
            "x": 0,
            "y": 0,
            "width": 1080,
            "height": 1080
        },
        "startFrame": "domContentLoaded",
        "modifiers": {
            "cssproperties": [
                {
                    "selector": "#animated_bar_horizontal",
                    "property": "background-color",
                    "value": "black"
                }
            ],
            "tagattributes": [
                {
                    "selector": "#animated_bar",
                    "name": "class",
                    "value": "test_class",
                    "mode": "add"
                }
            ],
            "tagcontent": [
                {
                    "selector": "#counter_unit",
                    "content": "mil'lisec\" <br/>onds"
                }
            ]
        }
    }
  • webhook: enter an callback url where the status is reported, when the job is finished
  • duration: runtime of animation in seconds
  • fps: desired frames per second
  • crf: Constant Rate Factor - 0 - 51. 0 is lossless and large, 51 has very low bitrate, but small size
  • width: the window/browser width
  • height: the window/browser height
  • zoom: zoom scale of browser window
  • crop: (optional) if you want to crop the window
  • startFrame: either domContentLoaded, saturationGreaterZero or custom (see โ€œCustom start and end timestampโ€)
  • modifiers:
    • cssproperties: converted to css directive: <> {<>: <> !important;}
    • tagattributes: at dom-loaded-event executed modification of attributes. mode set to override and add to add attribute
    • tagcontent: at dom-loaded-event executed replacement of innertext of dom elements (preferably text elements like span, p,โ€ฆ)

Custom start and end timestamp

if you want your video to have a custom start and end time, you have to set startFrame to custom and implement it in your javascript with the following statements:

start recording (In the case of multiple invocations, the first incovation counts):

window.startRecording();

end recording (In the case of multiple invocations, the last incovation counts):

window.endRecording();

Attention: the duration must be set anyway and must include at least the length of the expected javascript requests.