Page 1 of 1

Subtitles and Transcoding not working in Stream

Posted: 31 Dec 2011 07:01
by eNergizer
I'm streaming an mkv file on Centos 5.

I tried streaming with
vlc file2.mkv --sout-keep --sout="#transcode{soverlay}:std{access=http,mux=ts,dst=:8080}"

But there's no subtitles showing up.



Also when I try transcoding as so
vlc file2.mkv --sout-keep --sout="#transcode{vcodec=h264,vb=800,soverlay}:std{access=http,mux=ts,dst=:8080}"

I get these errors:
[00000410] avcodec encoder error: cannot open encoder
[00000394] stream_out_transcode stream out error: cannot find video encoder (module:any fourcc:h264)
[00000394] stream_out_transcode stream out error: cannot create video chain
[00000407] main packetizer error: cannot create packetizer output (h264)



However if I do vlc -l | grep h264 I get:
h264 H264 video demuxer
packetizer_h264 H.264 video packetizer



Why are the subtitles and transcoding not working?

Re: Subtitles and Transcoding not working in Stream

Posted: 31 Dec 2011 12:00
by Jean-Baptiste Kempf
Use vcodec=x264

Re: Subtitles and Transcoding not working in Stream

Posted: 31 Dec 2011 19:09
by eNergizer
Use vcodec=x264
I tried:
vlc file.mkv --sout-keep --sout="#transcode{vcodec=x264,soverlay}:std{access=http,mux=ts,dst=:8080}"

And I'm getting:
[00000410] avcodec encoder error: cannot open encoder
[00000394] stream_out_transcode stream out error: cannot find video encoder (module:any fourcc:x264)
[00000394] stream_out_transcode stream out error: cannot create video chain
[00000406] main packetizer error: cannot create packetizer output (mp4v)


However, I'm not getting anything for vlc -l | grep x264, so I'm guessing I don't have the codec.
But I tried yum install x264 and it says it's installed and up to date.

Re: Subtitles and Transcoding not working in Stream

Posted: 01 Jan 2012 21:21
by RĂ©mi Denis-Courmont
It's the VLC x264 plugin that's missing. Not x264 as such.

Re: Subtitles and Transcoding not working in Stream

Posted: 02 Jan 2012 02:53
by eNergizer
It's the VLC x264 plugin that's missing. Not x264 as such.
I don't suppose you would know how to get the x264 plugin for VLC on Centos 5?

Re: Subtitles and Transcoding not working in Stream

Posted: 02 Jan 2012 09:48
by eNergizer
So the VLC that I downloaded from repoforge didn't have x264 enabled, so I ended up compiling VLC to add it in.

I fixed it by using yum install vlc which gave me vlc 0.9.9a

Then I compiled vlc 1.1.2 and replaced the files in /usr/bin/ with the compiled files.

Followed these posts for compiling:
USE AT YOUR OWN RISK... This does work perfectly fine for me.

Make sure you have Yum setup to point to Dags repositorys before starting.

install the following via yum
x11
libshout
lame
zlibs
libgcrypt
libdvbpsi
gcc
g++
libtool

There might be some I missed.. When you run your make on each package list below.. it it errors out, it'll tell you which package you'll need to install via Yum.

Get the: x264-snapshot-20100710-2245 snapshot of X264
X264

./configure --enable-shared --prefix=/usr/local/customvlc/x264 --enable-gprof
make
make test
make install

Set these environemental variables.
PKG_CONFIG_PATH=/usr/local/customvlc/libshout/lib/pkgconfig:/usr/local/customvlc/ffmpeg/lib/pkgconfig:/usr/lib64/pkgconfig/:/usr/local/customvlc/x264/lib/pkgconfig
export PKG_CONFIG_PATH

PATH=$PATH:/usr/local/customvlc/x264/bin:/usr/local/customvlc/ffmpeg/bin
export PATH

Get the 8.6 Version of FFMPEG

./configure --prefix=/usr/local/customvlc/ffmpeg --enable-avfilter --enable-libdirac --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab --enable-swscale --extra-ldflags=-L/usr/local/customvlc/x264/lib --extra-cflags=-I/usr/local/customvlc/x264/include

make
make install


Get the source of VLC 1.1.2
./configure --prefix=/usr/local/customvlc/vlc.1.1.2 --enable-shout --enable-x264 --disable-nls --disable-mozilla --disable-a52 --disable-xcb --disable-qt4 --disable-skins2 --disable-v4l2
make
make install

that should do it for you.

Hope that helps. Best of luck.
http://www.everydayjunglist.org/forum.p ... 0157&p=1#8

This is an older post from the same guy:

http://ntp1.centos.org/modules/newbb/vi ... 1301857472