Skip to content

Very interesting issue: video/mp2t #528

Open
@serdarkok

Description

@serdarkok

Test assets:
PHP: v8.1, v8.2, v8.3, v8.4
Laravel: v10, v8
pbmedia/laravel-ffmpeg: v8.5, v.8.4
ffmpeg: v7, v4.4.4

When I try to play a rendered video (I created a simple video.js html) m3u8s are loaded as "Content Type: application/vnd.apple.mpegurl". .ts files are also loaded as "ContentType: application/vnd.apple.mpegurl" and the video does not play. The interesting thing is that I can play the rendered video files under a static folder. I am attaching the screenshots. I can also play the rendered video with a player like VLC. What do you think could be the reason for this problem? I have been suffering for 4 days.

web route:

Route::get('/video/{playlist}', function ($playlist) {
      return FFMpeg::DynamicHLSPlaylist()
        ->fromDisk('converted')
        ->open($playlist)
        ->setMediaUrlResolver(function ($mediaFilename){
            return Storage::disk('converted')->url($mediaFilename);
        })
        ->setPlaylistUrlResolver(function ($playlistFilename) {
            return route('video.playlist', ['playlist' => $playlistFilename]);
        });
})->name('video.playlist');

filesystem.php:

'converted' => [
            'driver' => 'local',
            'root' => storage_path('app/converted'),
            'url' => env('APP_URL').'/video',
            'visibility' => 'public',
            'throw' => true,
        ],
image image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions