[vlc] transcoding with different input and output chromas
lokidor
lokidor at lokiserv.ath.cx
Wed May 14 01:53:53 CEST 2008
Hello,
With vlc 0.9.0 from git is there a simple solution to transcode video
with different input and output chromas ?
My platform is a Nokia Internet Tablet N810 running maemo 4.0 (based on
linux debian) and I compiled vlc inside scratchbox.
This device has a builtin webcam TCM825x which is v4l2 compatible and
works perfectly with the following command :
qvlc v4l2:///dev/video0:chroma="UYVY":width=320:height=240
This webcam can only output UYVY or RV16 signal, so vlc need to convert
it to I420.
As I built ffmpeg with "--enable-swcale" vlc is supposed to use the
libswscale library which should be able to deal with the chroma
convertion, but when I try to trancode the video with the following command:
cvlc -vvv --color v4l2:///dev/video0:chroma="UYVY":width=320:height=240 \
--sout
'#transcode{vcodec=mp4v,vb=384}:std{access=http,mux=ts,url=192.168.1.6:8080}'
--ttl 12 \
--sout-ffmpeg-hurry-up --ffmpeg-hurry-up --rt-priority
I get the following error :
"
[00000329] stream_out_transcode generic debug: source 320x240, crop
320x240, destination 320x240, padding 320x240
[00000329] stream_out_transcode generic debug: encoder aspect is
576000:432000
[00000355] main encoder debug: looking for encoder module: 7 candidates
[00000355] ffmpeg encoder debug: libavcodec already initialized
[00000355] ffmpeg encoder debug: found encoder MPEG-4 Video
[00000355] main encoder debug: using encoder module "ffmpeg"
[00000338] main generic debug: adding a new input
[00000338] mux_asf generic debug: adding input
[00000385] main filter debug: looking for video filter2 module: 1 candidate
[00000385] main filter warning: no video filter2 module matching "scale"
could be loaded
"
And vlc continue failling to transcode rawvideo...
After looking at the code It seem's that vlc doesn't find the libswscale
filter defined in "codec/ffmpeg/ffmpeg.c" (which is correctly built) and
try to load the filter from "video_filter/scale.c".
This filter can only deal with identical input and output chroma
formats, so it is rejected.
I tried to build vlc without swscale in order to use the ffmpeg "crop
padd" filter but it is worst :
"
[00000632] main filter debug: looking for video filter2 module: 0 candidates
[00000632] main filter error: no video filter2 module matched "crop padd"
[00000621] stream_out_transcode generic debug: no video filter found
"
And vlc continue failling to transcode rawvideo...
Vlc doesn't find a "crop padd" filter but "vlc --list | grep crop" give
me croppadd...
Aflter looking at the code it seems that the missing space is the key
point but anyway this filter (defined in "video_filter/croppadd.c") is
not the ffmpeg filter and it can only deal with identical input and
output chroma formats...
As I know that is possible directly with vlc 0.8.6 with the ffmpeg "crop
padd" filter I would know why I can't with vlc 0.9 ?
Maybe vlc 0.9 uses a different method ?
I saw there is a yuy2_i420 conversion filter but I didn't find a way to
use it on the command line.
Lokidor
More information about the vlc
mailing list