如何将webm转换为mp4?

时间:2016-02-04 12:28:50

标签: video ffmpeg webcam mp4 webm

我无法将通过网络摄像头录制创建的webm文件转换为mp4。

我正在使用以下命令。

ffmpeg -fflags +genpts -i  uploads/2586913190845018.webm -r 24 uploads/abc.mp4 2>&1

上述命令的输出是

Array
(
    [0] => FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
    [1] =>   built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
    [2] =>   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
    [3] =>   libavutil     50.15. 1 / 50.15. 1
    [4] =>   libavcodec    52.72. 2 / 52.72. 2
    [5] =>   libavformat   52.64. 2 / 52.64. 2
    [6] =>   libavdevice   52. 2. 0 / 52. 2. 0
    [7] =>   libavfilter    1.19. 0 /  1.19. 0
    [8] =>   libswscale     0.11. 0 /  0.11. 0
    [9] =>   libpostproc   51. 2. 0 / 51. 2. 0
    [10] => [matroska @ 0x14ce690]max_analyze_duration reached
    [11] => [matroska @ 0x14ce690]Estimating duration from bitrate, this may be inaccurate
    [12] => Input #0, matroska, from 'uploads/2586913190845018.webm':
    [13] =>   Metadata:
    [14] =>     doctype         : webm
    [15] =>   Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
    [16] =>     Stream #0.0(eng): Video: 0x0000, 640x480, PAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 30 tbc
    [17] =>     Stream #0.1(eng): Audio: vorbis, 48000 Hz, mono, s16
    [18] => swScaler: Unknown format is not supported as input pixel format
    [19] => Cannot get resampling context
)

如果我从youtube或任何其他在线资源上传webm文件,则上述命令有效。它可以正常工作。

0 个答案:

没有答案