Skip to content

Record Plugin : MimeType MP4 (All browsers) #3035

Answered by visualight
visualight asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, unfortunately this doesn't work.

Google Chrome only uses the webm format. So I had to set up an audio transcoding microservice to encode the streams in MP4 (Safari obviously only reads this format).

For those interested, here's the server-side transcoding code:

sudo apt-get install ffmpeg

<?php

namespace App\Http\Controllers\Backoffice;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Symfony\Component\HttpFoundation\Response;

class AudioController extends Controller
{
    /**
     * Encode the audio blob to mp4 format and upload it to S3.
     *
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     */
 …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@visualight
Comment options

Answer selected by visualight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants