Skip to content

static_ffmpeg fails to see video file where ffmpeg doesnt #9

@sh34v3

Description

@sh34v3

I'm making a subprocess call like so:

subprocess.call([
                'static_ffmpeg',                   # call ffmpeg
                '-ss', str(start_time),          # our clip starts here
                '-i', infile_video,         # this is the video to be converted
                '-t', str(end_time - start_time), #how long our clip is
                '-threads', '4',            # use 4 threads for the video conversion
                '-c:v', 'libvpx-vp9',       # c[odec]:v[ideo] - we use libvpx cause we want webm
                '-c:a', 'libvorbis',        # c[odec]:a[udio] - this is the one everyone else was using
                '-b:v',  '400k',            # reccomended video bitrate
                '-b:a', '192k',             # reccomended audio bitrate
                '-deadline', 'good',    # setting for quality vs. speed (best, good, realtime (fastest)); boundry for quality vs. time set the following settings
                '-qmin', '0',               # quality minimum boundry. (lower means better)
                '-qmax', '50',              # quality maximum boundry (higher means worse)
                uniquename               # file to be written out
            ])

When I do, I get this error Some: No such file or directory. Meanwhile, this works fine:

subprocess.call([
                'ffmpeg',                   # call ffmpeg
                '-ss', str(start_time),          # our clip starts here
                '-i', infile_video,         # this is the video to be converted
                '-t', str(end_time - start_time), #how long our clip is
                '-threads', '4',            # use 4 threads for the video conversion
                '-c:v', 'libvpx-vp9',       # c[odec]:v[ideo] - we use libvpx cause we want webm
                '-c:a', 'libvorbis',        # c[odec]:a[udio] - this is the one everyone else was using
                '-b:v',  '400k',            # reccomended video bitrate
                '-b:a', '192k',             # reccomended audio bitrate
                '-deadline', 'good',    # setting for quality vs. speed (best, good, realtime (fastest)); boundry for quality vs. time set the following settings
                '-qmin', '0',               # quality minimum boundry. (lower means better)
                '-qmax', '50',              # quality maximum boundry (higher means worse)
                uniquename               # file to be written out
            ])

If it's relevant, the media files are in script's directory, and they end up having filenames with whitespace so their names look like: 'Some Youtube Video.mp4'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions