I have been struggling with this issue in regards to playing my converted mp4 videos using FFMPEG into an html 5 video player, I basically just use a single video player and just replace the source when the video ends.
What happens is that a MediaError occurs randomly with different videos saying:
PIPELINE_ERROR_DECODE: Failed to send audio packet for decoding
or
PIPELINE_ERROR_DECODE: audio decode error
Videos have no issues on Safari, Internet Explorer, and Firefox. But this error shows up randomly on Opera and Google Chrome.
I am using Laravel [Laravel FFMpeg][1] to convert the videos, please see my conversion code below:
$bitrateFormat = (new FFMpeg\Format\Video\X264('aac', 'libx264'))->setKiloBitrate(1500);
$converted_video = FFMpeg::fromDisk('videos')
->open($this->video_id)
->addFilter(['-pix_fmt', 'yuv420p'], ['-movflags', '+faststart'])
->export()
->inFormat($bitrateFormat)
->toDisk('do_spaces_video')
->save($this->video_id);
Any help would be appreciated guys, thanks in advance!
EDIT - Added Media Internals Error
00:04:02.892 for_suspended_start false
00:04:02.892 pipeline_buffering_state BUFFERING_HAVE_ENOUGH
00:04:33.919 error Failed to send audio packet for decoding: timestamp=272341333 duration=21333 size=346 side_data_size=0 is_key_frame=1 encrypted=0 discard_padding (us)=(0, 0)
00:04:33.919 error audio decode error
00:04:33.943 error audio error during playing, status: PIPELINE_ERROR_DECODE
00:04:33.943 pipeline_error PIPELINE_ERROR_DECODE
00:04:33.944 pipeline_state kStopping
00:04:33.945 pipeline_state kStopped
00:04:33.950 event PAUSE