ffmpeg:将仅音频flv转换为swf [英] ffmpeg: convert audio-only flv to swf

查看:176
本文介绍了ffmpeg:将仅音频flv转换为swf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Flex应用程序使用red5记录仅音频FLV文件 - 我想将它们转换为SWF文件,以便我们可以将它们嵌入到其他SWF文件中。 (我也可以转换成MP3,然后自己嵌入到SWF中,但是我更喜欢一步一步的解决方案。)



任何人都有这样的经历? >

我尝试过:



以下naive ffmpeg命令失败:

 > ffmpeg -i 3139747641.flv -vn movie.swf 
FFmpeg版本SVN-r21751-snapshot,版权所有(c)2000-2010 Fabrice Bellard,et al。
建立在2010年2月11日09:15:42与gcc 4.2.1(SUSE Linux)
配置:--enable-gpl --enable-nonfree
libavutil 50. 9. 0 / 9. 0
libavcodec 52.53。 0 / 52.53。 0
libavformat 52.52。 0 / 52.52。 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10。 0 / 0.10。 0
[flv @ 0x8a5e3a0]无法找到编解码器参数(视频:0x0000)
[flv @ 0x8a5e3a0]从bitrate估计持续时间,这可能不准确
输入#0,flv, 3139747641.flv':
元数据:
audiocodecid:-1
持续时间:0
videocodecid:-1
canSeekToEnd:true
持续时间:00:00 :14.88,开始:0.000000,比特率:N / A
流#0.0:视频:0x0000,1k tbr,1k tbn,1k tbc
流#0.1:音频:nellymoser,8000 Hz,mono,s16
输出#0,swf,到'movie.swf':
流#0.0:音频:0x0000,8000 Hz,单声道,s16,64 kb / s
流映射:
流#0.1→> #0.0
编码器(编解码器编号86017)未找到输出流#0.0

ve尝试添加一个虚拟视频,但这也失败了:

 > ffmpeg -i dummy.mov -i 3139747641.flv movie.swf 
<! - snip - >
从'dummy.mov'输入#0,mov,mp4,m4a,3gp,3g2,mj2:
元数据:
major_brand:qt
minor_version:512
compatible_brands:qt
编码器:Lavf52.52.0
encoder-eng:Lavf52.52.0
持续时间:00:00:00.10,开始:0.000000,比特率:62 kb / s
Stream#0.0(eng):Video:mpeg4,yuv420p,10x10 [PAR 1:1 DAR 1:1],1 kb / s,10 fps,10 tbr,10 tbn,10 tbc
[flv @ 0x8a67fa0]无法找到编解码器参数(视频:0x0000)
[flv @ 0x8a67fa0]从bitrate估计持续时间,这可能不准确
输入#1,flv,从'3139747641.flv':
元数据:
audiocodecid:-1
duration:0
videocodecid:-1
canSeekToEnd:true
持续时间:00:00:14.88,开始:0.000000,比特率:N / A
流#1.0:视频:0x0000,1k tbr,1k tbn,1k tbc
流#1.1:音频:nellymoser,8000 Hz,mono,s16
图片大小无效(0x0)
无法分配te mp图片,检查pix fmt


解决方案

您需要安装libmp3lame 。此外,您可能需要尝试将麦克风录音速率设置为44。


My Flex application records audio-only FLV files using red5--I'd like to convert these to SWF files so I can embed them in other SWF files. (I could also convert to MP3 and then embed them into SWFs myself, but I'd prefer a one step solution.)

Anyone have experience doing this?

What I've tried:

The following naive ffmpeg command fails:

> ffmpeg -i 3139747641.flv -vn movie.swf
FFmpeg version SVN-r21751-snapshot, Copyright (c) 2000-2010 Fabrice Bellard, et al.
  built on Feb 11 2010 09:15:42 with gcc 4.2.1 (SUSE Linux)
  configuration: --enable-gpl --enable-nonfree
  libavutil     50. 9. 0 / 50. 9. 0
  libavcodec    52.53. 0 / 52.53. 0
  libavformat   52.52. 0 / 52.52. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[flv @ 0x8a5e3a0]Could not find codec parameters (Video: 0x0000)
[flv @ 0x8a5e3a0]Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from '3139747641.flv':
  Metadata:
    audiocodecid    : -1
    duration        : 0
    videocodecid    : -1
    canSeekToEnd    : true
  Duration: 00:00:14.88, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: 0x0000, 1k tbr, 1k tbn, 1k tbc
    Stream #0.1: Audio: nellymoser, 8000 Hz, mono, s16
Output #0, swf, to 'movie.swf':
    Stream #0.0: Audio: 0x0000, 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
Encoder (codec id 86017) not found for output stream #0.0

I've tried adding a dummy video, but this also failed:

> ffmpeg -i dummy.mov -i 3139747641.flv movie.swf
<!-- snip -->    
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dummy.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf52.52.0
    encoder-eng     : Lavf52.52.0
  Duration: 00:00:00.10, start: 0.000000, bitrate: 62 kb/s
    Stream #0.0(eng): Video: mpeg4, yuv420p, 10x10 [PAR 1:1 DAR 1:1], 1 kb/s, 10 fps, 10 tbr, 10 tbn, 10 tbc
[flv @ 0x8a67fa0]Could not find codec parameters (Video: 0x0000)
[flv @ 0x8a67fa0]Estimating duration from bitrate, this may be inaccurate
Input #1, flv, from '3139747641.flv':
  Metadata:
    audiocodecid    : -1
    duration        : 0
    videocodecid    : -1
    canSeekToEnd    : true
  Duration: 00:00:14.88, start: 0.000000, bitrate: N/A
    Stream #1.0: Video: 0x0000, 1k tbr, 1k tbn, 1k tbc
    Stream #1.1: Audio: nellymoser, 8000 Hz, mono, s16
picture size invalid (0x0)
Cannot allocate temp picture, check pix fmt

解决方案

You need to install libmp3lame. Also, you might need to try setting your microphone recording rate to 44.

这篇关于ffmpeg:将仅音频flv转换为swf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆