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

Title Frame can be generated much more efficiently #43

Open
kalegood opened this issue Feb 12, 2013 · 1 comment
Open

Title Frame can be generated much more efficiently #43

kalegood opened this issue Feb 12, 2013 · 1 comment

Comments

@kalegood
Copy link

Multiple frames are currently generated for title screen; only 1 is needed.

The following website seems to suggest that -r 1/(number of seconds) would do the trick:

http://ffmpeg.org/trac/ffmpeg/wiki/Create%20a%20video%20slideshow%20from%20images

I don't know python, but I think on ffmpeg side, replace

# generate silent title video
        silentAudio    = generateSilence(options.titleDuration)
        titleFramePath = tmpPath('title', 'frame%d.png')
        titlePath      = tmpPath('title.mpg')
        cmd = [
            ffmpeg,
            "-f", "image2",
            "-r", fps,
            "-i", titleFramePath,
            "-i", silentAudio,
            "-q:v", str(options.quality),
            titlePath
        ]
        safeRun(cmd, exitcode=14)

with

# generate silent title video
        silentAudio    = generateSilence(options.titleDuration)
        titleFramePath = tmpPath('title', 'title.png')
        titlePath      = tmpPath('title.mpg')
        cmd = [
            ffmpeg,
            "-f", "title",
            "-r", 1/(variable from --title-duration),
            "-i", titleFramePath,
            "-i", silentAudio,
            "-q:v", str(options.quality),
            titlePath
        ]
        safeRun(cmd, exitcode=14)
@kalegood
Copy link
Author

Changing line 373 to

TotalFrames = 1

works but I don't know why. I'm assuming that the 1 frame covers all 3 seconds of generated silence. Sloppy, but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant