Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Uncaught TypeError: Must be a file URL" in encoding_event_stream_test when trying to use module #14

Open
markmals opened this issue Sep 3, 2021 · 3 comments

Comments

@markmals
Copy link

markmals commented Sep 3, 2021

I'm currently trying to use this module in my own script. When trying to run the simplest of tests on my script that uses fast forward, I get the following error:

import { ffmpeg } from "https://deno.land/x/[email protected]/mod.ts"
import { assert } from "https://deno.land/[email protected]/testing/asserts.ts"
Deno.test("fast_forward runs", async () => {
    await ffmpeg("<path to mkv>")
        .output("<path to mp4>")
        .encode()

    assert(true, "works")
})
error: Uncaught TypeError: Must be a file URL.
    throw new TypeError("Must be a file URL.");
          ^
    at fromFileUrl (https://deno.land/[email protected]/path/posix.ts:487:11)
    at https://deno.land/x/[email protected]/encoding_event_stream_test.ts:21:33
The terminal process "deno 'test', '--allow-all', '--unstable', '--filter', 'fast_forward runs', '.../transcodeDir_test.ts'" terminated with exit code: 1.

I'm new to Deno, so I might be overlooking something, but nothing about my input should be causing this error, especially in a global constant in a test file. I'm using deno 1.13.2.

@SnowGuest
Copy link

I also encountered this problem

@denizdogan
Copy link

If you import ffmpeg.ts instead of mod.ts, it works. For some reason the author of this module decided to import unit tests in mod.ts. Maybe this is an old Deno convention?

@brzostekd
Copy link

Thank you @denizdogan. Too bad that it won't be fixed. 🤷‍♂️

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

No branches or pull requests

4 participants