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

Very interesting issue: video/mp2t #528

Open
serdarkok opened this issue Sep 12, 2024 · 0 comments
Open

Very interesting issue: video/mp2t #528

serdarkok opened this issue Sep 12, 2024 · 0 comments

Comments

@serdarkok
Copy link

serdarkok commented Sep 12, 2024

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
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