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

When #123

Open
helveden opened this issue Apr 6, 2021 · 0 comments
Open

When #123

helveden opened this issue Apr 6, 2021 · 0 comments

Comments

@helveden
Copy link

helveden commented Apr 6, 2021

Hello, i have this error for create a vidéo by glob with img. And i don't understand.

Notice: Trying to access array offset on value of type null

I use this code :

$audio = new Audio($this->getParameter('kernel.project_dir') . '/public/music/Ballad_of_the_Sneak.mp3');

    $process = $audio->getProcess();
    $process->addPreInputCommand('-framerate', '1/5');
    $process->addPreInputCommand('-pattern_type', 'glob');
    $process->addPreInputCommand('-i', glob($this->getParameter('kernel.project_dir') . "/public/glob/*.jpg"));
    $process->addCommand('-pix_fmt', 'yuv420p');
    $process->addCommand('-shortest', '');

    $output_format = new VideoFormat();
    $output_format->setVideoFrameRate('1/5')
                  ->setVideoDimensions(320, 240, true, true)
                  ->setAudioCodec('libfdk_aac')
                  ->setVideoCodec('mpeg4');

    $process = $audio->save('./homemade-video.mp4', $output_format);

Can you help me please ?

Cordialy

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

1 participant