Skip to content

Conversation

@nytamin
Copy link
Member

@nytamin nytamin commented Oct 7, 2025

About Me

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a: Feature

New Behavior

This PR adds support for specifying multiple conversion steps for a media file, allowing a user to specify using an external application to perform conversions.

Example of ExpectedPackage:

{
    "packageContainers": {
        "source0": {
            "label": "Source",
            "accessors": {
                "share": {
                    "type": "file_share",
                    "label": "Local",
                    "folderPath": "\\\\MY-SHARE\\source0",
                    "allowRead": true,
                    "allowWrite": false
                }
            }
        },
        "target0": {
            "label": "Target",
            "accessors": {
                "share": {
                    "type": "file_share",
                    "label": "Local",
                    "folderPath": "\\\\MY-SHARE\\target0",
                    "allowRead": true,
                    "allowWrite": true
                }
            }
        }
    },
    "expectedPackages": [
        {
            "type": "media_file",
            "_id": "test_convert",
            "sources": [
                {
                    "containerId": "source0",
                    "accessors": {
                        "share": {
                            "type": "file_share",
                            "filePath": "amb.mp4"
                        }
                    }
                }
            ],
            "contentVersionHash": "abc1234",
            "content": {
                "filePath": "amb.rr"
            },
            "version": {
                "conversions": [
                    {
                        "executable": "ffmpeg.exe",
                        "args": [
                            "-i",
                            "{SOURCE}",
                            "-vf",
                            "scale=640:-1",
                            "-c:a",
                            "copy",
                            "{TARGET}"
                        ],
                        "needsLocalSource": true,
                        "needsLocalTarget": true,
                        "outputFileName": "amb.mp4"
                    },
                    {
                        "executable": "ffmpeg.exe",
                        "args": [
                            "-i",
                            "{SOURCE}",
                            "-vf",
                            "colortemperature=40000",
                            "-c:a",
                            "copy",
                            "{TARGET}"
                        ],
                        "needsLocalSource": true,
                        "needsLocalTarget": true,
                        "outputFileName": "amb.mp4"
                    },
                    {
                        "executable": "ffmpeg.exe",
                        "args": [
                            "-i",
                            "{SOURCE}",
                            "-vf",
                            "rotate=PI/6",
                            "-c:a",
                            "copy",
                            "{TARGET}"
                        ],
                        "needsLocalSource": true,
                        "needsLocalTarget": true,
                        "outputFileName": "amb.mp4"
                    },
                    {
                        "executable": "KairosConverter.exe",
                        "args": [
                            "-i",
                            "{SOURCE}",
                            "-o",
                            "{TARGET}"
                        ],
                        "needsLocalSource": true,
                        "needsLocalTarget": true
                    }
                ]
            },
            
            "layers": [
                "target0"
            ]
        }
    ],
}

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@nytamin nytamin requested a review from a team October 7, 2025 14:16
@nytamin nytamin changed the title chore: refactor: add ProgressParts class to clarify tracking of progress Add support for Multi-step conversions of media file Oct 7, 2025
@nytamin nytamin merged commit b6c1e42 into develop Oct 22, 2025
9 of 12 checks passed
@nytamin nytamin deleted the feat/media-convert branch October 22, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants