forked from forks/ffprobe-wasm
Add support for mp3 demuxer/decoder.
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -2,6 +2,7 @@ FROM emscripten/emsdk:3.1.15 as build
|
||||
|
||||
ARG FFMPEG_VERSION=4.3.1
|
||||
ARG X264_VERSION=20170226-2245-stable
|
||||
ARG LAME_VERSION=3.100
|
||||
|
||||
ARG PREFIX=/opt/ffmpeg
|
||||
ARG MAKEFLAGS="-j4"
|
||||
@@ -25,6 +26,21 @@ RUN cd /tmp/x264-snapshot-${X264_VERSION} && \
|
||||
RUN cd /tmp/x264-snapshot-${X264_VERSION} && \
|
||||
emmake make && emmake make install
|
||||
|
||||
# libmp3lame
|
||||
RUN cd /tmp && \
|
||||
wget -O lame-${LAME_VERSION}.tar.gz https://sourceforge.net/projects/lame/files/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz/download && \
|
||||
tar zxf lame-${LAME_VERSION}.tar.gz
|
||||
|
||||
RUN cd /tmp/lame-${LAME_VERSION} && \
|
||||
emconfigure ./configure \
|
||||
--prefix=${PREFIX} \
|
||||
--host=i686-gnu \
|
||||
--enable-static \
|
||||
--disable-frontend
|
||||
|
||||
RUN cd /tmp/lame-${LAME_VERSION} && \
|
||||
emmake make && emmake make install
|
||||
|
||||
# Get ffmpeg source.
|
||||
RUN cd /tmp/ && \
|
||||
wget http://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.gz && \
|
||||
@@ -56,11 +72,12 @@ RUN cd /tmp/ffmpeg-${FFMPEG_VERSION} && \
|
||||
--enable-postproc \
|
||||
--enable-swscale \
|
||||
--enable-protocol=file \
|
||||
--enable-decoder=h264,aac,pcm_s16le \
|
||||
--enable-demuxer=mov,matroska \
|
||||
--enable-decoder=h264,aac,pcm_s16le,mp3 \
|
||||
--enable-demuxer=mov,matroska,mp3 \
|
||||
--enable-muxer=mp4 \
|
||||
--enable-gpl \
|
||||
--enable-libx264 \
|
||||
--enable-libmp3lame \
|
||||
--extra-cflags="$CFLAGS" \
|
||||
--extra-cxxflags="$CFLAGS" \
|
||||
--extra-ldflags="$LDFLAGS" \
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<b-form-file
|
||||
v-if="protocol === 'file'"
|
||||
id="file"
|
||||
accept=".mp4, .mkv"
|
||||
accept=".mp4, .mkv, .mp3"
|
||||
v-model="file"
|
||||
:state="Boolean(file)"
|
||||
placeholder="Choose a file or drop it here..."
|
||||
@@ -59,7 +59,7 @@
|
||||
<Overview :info="data" />
|
||||
</div>
|
||||
</b-tab>
|
||||
<b-tab title="Frames" class="mt-2" lazy>
|
||||
<b-tab v-if="file.type !== 'audio/mpeg'" title="Frames" class="mt-2" lazy>
|
||||
<Frames :file="file" />
|
||||
</b-tab>
|
||||
</b-tabs>
|
||||
|
||||
Reference in New Issue
Block a user