linux下ffmpeg的使用方法
Linux / 2013年06月30日

格式转换 (将file.avi 转换成output.flv)
ffmpeg -i file.avi output.flv
-i 表示输入文件
:现在有个视频video.avi,有个音频 audio.mp3,将其合并成output.avi
两个命令(file.avi 是中间文件,用完可删)
ffmpeg -i video.avi -vcodec copy -an video2.avi
ffmpeg -i video2.avi -i audio.mp3 -vcodec copy -acodec copy output.avi
-i 表示输入文件
-vcodec copy 表示 force video codec (‘copy’ to copy stream) 这个不知怎么译 ,估计是直接copy
-acodec copy 这个说的应该是音频了 跟上面一样
-an:表示 disable audio 估计是audio no 之类的缩写,表示去掉video.avi 原有的音频

方法2 好像可以直接指定两个输入文件 ,
ffmpeg -i /tmp/a.wav -i /tmp/a.avi /tmp/a.avi 两个文件 的顺序很重
从视频里提取声音(声音与视频的分离)
ffmpeg -i 人生若只如初见.flv -vnr.mp3 从flv 文件 中提取声音并保存为mp3 格式
-vn : 表示忽略视频 估计是video no 之类的缩写
ffmpeg -i 人生若只如初见.flv -an r.flv 只留视频不留声音
-an : 表示 忽略 声音 估计是audio no 之类的缩写

linux Centos下Mplayer没有声音的解决方法
Linux / 2013年02月1日

Feb 1 11:38:05 localhost polkitd[2587]: started daemon version 0.96 using authority implementation `local’ version `0.96′
Feb 1 11:38:06 localhost rtkit-daemon[2598]: Sucessfully made thread 2596 of process 2596 (/usr/bin/pulseaudio) owned by ’42’ high priority at nice level -11.
Feb 1 11:38:06 localhost pulseaudio[2596]: alsa-util.c: Disabling timer-based scheduling because running inside a VM.
Feb 1 11:38:06 localhost gdm-simple-greeter[2582]: Gtk-WARNING: gtkwidget.c:5460: widget not within a GtkWindow
Feb 1 11:38:06 localhost rtkit-daemon[2598]: Sucessfully made thread 2602 of process 2596 (/usr/bin/pulseaudio) owned by ’42’ RT at priority 5.
Feb 1 11:38:06 localhost pulseaudio[2596]: alsa-util.c: Disabling timer-based scheduling because running inside a VM.
Feb 1 11:38:06 localhost pulseaudio[2596]: alsa-sink.c: ALSA 提醒我们在该设备中写入新数据,但实际上没有什么可以写入的!
Feb 1 11:38:06 localhost pulseaudio[2596]: alsa-sink.c: 这很可能是 ALSA 驱动程序 ‘snd_ens1371′ 中的一个 bug。请向 ALSA 开发人员报告这个问题。
Feb 1 11:38:06 localhost pulseaudio[2596]: alsa-sink.c: 提醒我们设置 POLLOUT — 但结果是 snd_pcm_avail() 返回 0 或者另一个小于最小可用值的数值。
Feb 1 11:38:06 localhost rtkit-daemon[2598]: Sucessfully made thread 2603 of process 2596 (/usr/bin/pulseaudio) owned by ’42’ RT at priority 5.
Feb 1 11:38:10 localhost kernel: readahead-collector: sorting
Feb 1 11:38:10 localhost kernel: readahead-collector: finished
Feb 1 11:38:11 localhost tpvmlpd2[2621]: device type not supported
Feb 1 11:38:24 localhost pam: gdm-password[2636]: WARNING: unable to log session
Feb 1 11:38:24 localhost kernel: type=1400 audit(1359689904.694:33450): avc: denied { read } for pid=2636 comm=”gdm-session-wor” name=”root” dev=dm-0 ino=2621441 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir
Feb 1 11:38:25 localhost seahorse-daemon[2734]: init gpgme version 1.1.8
Feb 1 11:38:26 localhost tpvmlpd2[2750]: device type not supported
Feb 1 11:38:27 localhost pulseaudio[2830]: pid.c: Stale PID file, overwriting.
Feb 1 11:38:27 localhost pulseaudio[2830]: alsa-sink.c: ALSA 提醒我们在该设备中写入新数据,但实际上没有什么可以写入的!
Feb 1 11:38:27 localhost pulseaudio[2830]: alsa-sink.c: 这很可能是 ALSA 驱动程序 ‘snd_ens1371’ 中的一个 bug。请向 ALSA 开发人员报告这个问题。
Feb 1 11:38:27 localhost pulseaudio[2830]: alsa-sink.c: 提醒我们设置 POLLOUT — 但结果是 snd_pcm_avail() 返回 0 或者另一个小于最小可用值的数值。
Feb 1 11:38:31 localhost nautilus: [N-A] Nautilus-Actions Tracker 2.30.3 initializing…
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] 无法在模块路径中找到主题引擎:“clearlooks”,
Feb 1 11:38:33 localhost vmusr[2777]: [ warning] [Gtk] gtk_disable_setlocale() must be called before gtk_init()
Feb 1 11:38:34 localhost nautilus: [N-A] Nautilus-Actions Menu Extender 2.30.3 initializing…
Feb 1 11:38:41 localhost tpvmlpd2[3086]: device type not supported
Feb 1 11:38:56 localhost tpvmlpd2[3104]: device type not supported
Feb 1 11:39:11 localhost tpvmlpd2[3109]: device type not supported
Feb 1 11:39:26 localhost tpvmlpd2[3113]: device type not supported
Feb 1 11:39:41 localhost tpvmlpd2[3184]: device type not supported
Feb 1 11:39:56 localhost tpvmlpd2[3189]: device type not supported
Feb 1 11:40:11 localhost tpvmlpd2[3196]: device type not supported
Feb 1 11:40:26 localhost tpvmlpd2[3202]: device type not supported
Feb 1 11:40:41 localhost tpvmlpd2[3206]: device type not supported
Feb 1 11:40:56 localhost tpvmlpd2[3215]: device type not supported
Feb 1 11:41:11 localhost tpvmlpd2[3219]: device type not supported
Feb 1 11:41:26 localhost tpvmlpd2[3224]: device type not supported
Feb 1 11:41:41 localhost tpvmlpd2[3231]: device type not supported
Feb 1 11:41:56 localhost tpvmlpd2[3235]: device type not supported
Feb 1 11:42:11 localhost tpvmlpd2[3239]: device type not supported
Feb 1 11:42:26 localhost tpvmlpd2[3252]: device type not supported
Feb 1 11:42:41 localhost tpvmlpd2[3256]: device type not supported
Feb 1 11:42:56 localhost tpvmlpd2[3262]: device type not supported
Feb 1 11:42:56 localhost tpvmlpd2[2201]: aborting