歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 在CentOS上升級VLC至最新版本

在CentOS上升級VLC至最新版本

日期:2017/2/28 16:16:05   编辑:Linux教程

一直使用VLC對一個高清視頻流進行轉碼,以前使用的是以下:
cvlc http://xxx.xxx.xxx.xxx/live –sout “#transcode{vcodec=h264,vb=2048,scale=0.5,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=http,mux=ts,dst=:9000}}”

當時VLC 的版本是: vlc-0.9.9a-5.el5.rf.i386,最近我使用yum update(RPMforge的源)升級到vlc-0.9.9a-7.el5.rf版本後(當然ffmpeg、x264也升級了)卻出現以下錯誤:
[00000510] avcodec encoder error: cannot open encoder
[00000435] stream_out_transcode stream out error: cannot find video
encoder (module:any fourcc:h264)
[00000435] stream_out_transcode stream out error: cannot create video
chain
[00000508] main packetizer error: cannot create packetizer output (mpgv)

通過增加-v 2打開debug後,出現更多一些的提示:

cvlc http://xxx.xxx.xxx.xxx/live -v 2 –sout “#transcode{vcodec=h264,vb=2048,scale=0.5,acodec=mpga,ab=128,channels=2}:duplicate{dst=std{access=http,mux=ts,dst=:9000}}”

提示如下:

[00000510] avcodec encoder warning: broken ffmpeg default settings detected
(libx264@0×8374270)
[00000510] avcodec encoder warning: use an encoding preset (e.g. -vpre medium)
(libx264@0×8374270)
[00000510] avcodec encoder warning: preset usage: -vpre <speed> -vpre <profile>
(libx264@0×8374270)
[00000510] avcodec encoder warning: speed presets are listed in x264 –help
(libx264@0×8374270)
[00000510] avcodec encoder warning: profile is optional; x264 defaults to high
(libx264@0×8374270)
[00000510] avcodec encoder error: cannot open encoder
[00000435] stream_out_transcode stream out error: cannot find video encoder (module:any fourcc:h264)
[00000435] stream_out_transcode stream out error: cannot create video chain
[00000508] main packetizer error: cannot create packetizer output (mpgv)

不知道到底是那個程序的問題,還是好幾個程序沒協調好,當前這幾個程序的版本之間不兼容。

Copyright © Linux教程網 All Rights Reserved