I am creating a platform for video files to be uploaded to. In order for them to get played through Videojs, I convert/demux mkv/flv/3gp files to mp4 files.
The issue I encounter is that if I demux such video/mkv file, I get the error message Video format or mime type not supported
, even though it is a "working" mp4 file on my computer.
I think I understand that mkv files are containers, and that if demuxed it keeps the same video and audio codec and if that is not supported by Videojs/HTML5 the video cannot get played. Please, correct me if I am wrong.
Can anyone please tell me why this demux of mkv.mkv to mkv.mp4 will not play in my browser?
➜ ~ ffmpeg -i mkv.mkv -vcodec copy -acodec copy mkv.mp4
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, matroska,webm, from 'mkv.mkv':
Metadata:
ENCODER : Lavf53.24.2
Duration: 00:00:34.08, start: -1.400000, bitrate: 1232 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile), yuv420p, 720x480 [SAR 1:1 DAR 3:2], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
Stream #0:1: Audio: aac (LC), 48000 Hz, 5.1, fltp (default)
Output #0, mp4, to 'mkv.mp4':
Metadata:
encoder : Lavf57.56.100
Stream #0:0: Video: mpeg4 (Simple Profile) ( [0][0][0] / 0x0020), yuv420p, 720x480 [SAR 1:1 DAR 3:2], q=2-31, 25 fps, 25 tbr, 16k tbn, 1k tbc (default)
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, 5.1 (default)
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 887 fps=0.0 q=-1.0 Lsize= 5130kB time=00:00:35.45 bitrate=1185.4kbits/s speed= 668x
video:3447kB audio:1663kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.401607%
Thanks for all the help already. I cant seem to find an answer...