Skip to content

When  #123

Description

@helveden

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

Activity

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

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