谁知道怎么把ogg视频转换为h.264格式的avi或者mpeg?

Totem,mplayer,sopcast,realplayer,bmp
回复
icebird
帖子: 13
注册时间: 2007-07-16 10:40

谁知道怎么把ogg视频转换为h.264格式的avi或者mpeg?

#1

帖子 icebird » 2008-07-01 1:04

现在有一个项目,要把recodemydesktop录制下来的Linux下的视频转换为h.264格式以供flash程序播放和使用。但我找了好久也没找到合适的转换程序,请问哪位高手可以帮帮忙?告诉我一下使用哪个软件或者命令可以做到这点?

解决方案最好是开源的,以避免可能产生的版权问题。
leafei
帖子: 84
注册时间: 2008-06-29 21:41

#2

帖子 leafei » 2008-07-01 9:31

不知道ffmpeg能不能满足你的要求?

http://ffmpeg.mplayerhq.hu/

http://en.wikipedia.org/wiki/Ffmpeg
icebird
帖子: 13
注册时间: 2007-07-16 10:40

#3

帖子 icebird » 2008-07-01 15:46

谢谢楼上的,但我装了ffmpeg和x264两个包后却无法成功转换视频为h.264格式的mpeg4格式。

直接 ffmpeg -i demo1.ogg demo1.mp4不行,终端上输出的内容很多,关于输出视频格式如下:

代码: 全选

Output #0, mp4, to 'demo1.mp4':
  Stream #0.0: Video: mpeg4, yuv420p, 1024x768, q=2-31, 200 kb/s, 15.00 fps(c)
  Stream #0.1: Audio: 0x0000, 48000 Hz, stereo, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[mpeg4 @ 0xb7e3a6e8]removing common factors from framerate
Unsupported codec for output stream #0.1
加 -f 参数后跟DVDT 、"D V DT"、h264、x264这些没有一个能够成功的。
使用h264输出“Unsupported codec for output stream #0.1”
其他三个输出"Unknown input or output format: DVDT"
按照这个提示我想我用ffmpeg -i demo1.ogg demo1.mp4 -f h264时是成功了,但h264编码支持没打开,谁能告诉我怎么打开这个支持啊?

无奈,只好分步执行,先 ffmpeg -i demo1.ogg demo1.avi 转换成功,在 x264 demo1.avi -o demo1.mp4 时就输出如下错误:

代码: 全选

x264 [error]: not compiled with AVIS input support
最后的尝试:

代码: 全选

$ x264 demo1.ogg -o demo1.mp4
x264 [error]: Rawyuv input requires a resolution.
$
彻底晕S了……谁能告诉我该怎么设置啊?
头像
牙签儿
帖子: 509
注册时间: 2007-06-30 0:27

#4

帖子 牙签儿 » 2008-07-01 16:04

试试winFF
icebird
帖子: 13
注册时间: 2007-07-16 10:40

#5

帖子 icebird » 2008-07-01 16:26

icebird@icebird-laptop:~$ winff
winff: error while loading shared libraries: libglib-1.2.so.0: cannot open shared object file: No such file or directory
icebird@icebird-laptop:~$ winff
winff: error while loading shared libraries: libgdk-1.2.so.0: cannot open shared object file: No such file or directory
icebird@icebird-laptop:~$ winff
winff: error while loading shared libraries: libgdk_pixbuf.so.2: cannot open shared object file: No such file or directory
icebird@icebird-laptop:~$
非要低版本的库,依次安装下来,到了这个libgdk_pixbuf.so.2的时候实在是找不到这个库了。
leafei
帖子: 84
注册时间: 2008-06-29 21:41

#6

帖子 leafei » 2008-07-01 16:30

leafei 写了:不知道ffmpeg能不能满足你的要求?

http://ffmpeg.mplayerhq.hu/

http://en.wikipedia.org/wiki/Ffmpeg
对不起,这个东西我也没怎么用,遇到问题只能自己去解决。:(

PS: 如果你想要转成其他格式,你首先得有这种格式的codec. 不过有一些codec不是免费的.
icebird
帖子: 13
注册时间: 2007-07-16 10:40

#7

帖子 icebird » 2008-07-01 16:41

codec有了,我装的x264,但却没法用在ffmpeg里。
头像
jarlyyn
帖子: 4671
注册时间: 2006-04-12 18:54
联系:

#8

帖子 jarlyyn » 2008-07-01 21:00

你不制定视频输出编码怎么转……
头像
nyfair
帖子: 1067
注册时间: 2007-12-07 12:49
系统: winnux10
来自: Tree New Bee

#9

帖子 nyfair » 2008-07-01 21:23

对初学者有个比较傻的办法是用avidemux,有图形界面,类似于win下的virtualdubmod
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#10

帖子 eexpress » 2008-07-01 21:34

录制ogg的时候,视频采集达到了h.264格式的要求没。
● 鸣学
头像
牙签儿
帖子: 509
注册时间: 2007-06-30 0:27

#11

帖子 牙签儿 » 2008-07-02 19:07

icebird 写了:icebird@icebird-laptop:~$ winff
winff: error while loading shared libraries: libglib-1.2.so.0: cannot open shared object file: No such file or directory
icebird@icebird-laptop:~$ winff
winff: error while loading shared libraries: libgdk-1.2.so.0: cannot open shared object file: No such file or directory
icebird@icebird-laptop:~$ winff
winff: error while loading shared libraries: libgdk_pixbuf.so.2: cannot open shared object file: No such file or directory
icebird@icebird-laptop:~$
非要低版本的库,依次安装下来,到了这个libgdk_pixbuf.so.2的时候实在是找不到这个库了。
用高版本的库文件做个符号连接就可以了。
qwsaer
帖子: 34
注册时间: 2008-01-24 9:52

#12

帖子 qwsaer » 2008-07-10 8:34

怎么做亚,我在lib中找不到这个库
头像
牙签儿
帖子: 509
注册时间: 2007-06-30 0:27

#13

帖子 牙签儿 » 2008-07-10 11:18

代码: 全选

sudo apt-get install libgdk-pixbuf2
qwsaer
帖子: 34
注册时间: 2008-01-24 9:52

#14

帖子 qwsaer » 2008-07-10 18:20

谢谢
头像
tnger
帖子: 69
注册时间: 2007-10-06 0:07

#15

帖子 tnger » 2008-07-10 19:35

用mencoder吧,参数很多的,自己查一下手册
回复