使用ffmpeg将flv转换为mp4

时间:2013-08-14 05:46:44

标签: java ffmpeg processbuilder wowza

我想将flv文件转换为mp4文件,该文件通过RTMP协议发送到Wowza服务器。 flv文件的详细信息是..

video codec - Sorenson Spark
Audio codec - Nellymoser 16khz

我目前正在使用以下代码如下...

ProcessBuilder processBuilder = new ProcessBuilder(ffmpegApp, "-i", filenameIn,
                "-ar", "22050", filenameOut);

当我启动进程buider时,我收到以下错误信息......

FFmpeg version SVN-r23607, Copyright (c) 2000-2010 the FFmpeg developers
built on Jun 15 2010 04:09:35 with gcc 4.4.2
configuration: --target-os=mingw32 --enable-runtime-cpudetect --enable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-libx264 --extra-libs='-lx264 -lpthread' --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm' --arch=x86 --cross-prefix=i686-mingw32- --cc='ccache i686-mingw32-gcc' --enable-memalign-hack


libavutil     50.19. 0 / 50.19. 0
libavcodec    52.76. 0 / 52.76. 0
libavformat   52.68. 0 / 52.68. 0
libavdevice   52. 2. 0 / 52. 2. 0
libavfilter    1.20. 0 /  1.20. 0
libswscale     0.11. 0 /  0.11. 0
[flv @ 01a0d0a0]Unsupported audio codec (4)
Last message repeated 54 times
[flv @ 01a0d0a0]Could not find codec parameters (Audio: [4][0][0][0] / 0x0004, 5512Hz,   1 channels)
[flv @ 01a0d0a0]Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from 'C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server         3.6.2\content\iStream.flv':
 Metadata:
 duration        : 11
 creationdate    : Tue Aug 13 13:21:15
 Duration: 00:00:11.19, start: 0.000000, bitrate: N/A
Stream #0.0: Video: flv, yuv420p, 192x144, 1k tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: [4][0][0][0] / 0x0004, 5512 Hz, 1 channels

1 个答案:

答案 0 :(得分:0)

我建议你试试xuggler http://www.xuggle.com/xuggler。它是ffmpeg的Java包装器。