transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

About encoding, codec settings, muxers and filter usage
mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 11:29

I'm trying to transcode mpeg video delivered by a Vivotek IP7137 camera to WMV1 or WMV2.

When I transcode the stream using 0.8.6c, the quality is good.

When I transcode the stream using the same options and 0.9.0 (svn), the quality is very poor - biiig pixels.

This only seem to affect MPEG and 0.9.0 (svn); MJPEG transcoded to WMV2 by 0.9.0 (svn) is of good quality.

Any ideas what it might be? Forgot to compile something in?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby Jean-Baptiste Kempf » 25 Jul 2007 11:31

libmpeg2 not compiled ?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby dionoea » 25 Jul 2007 11:31

you can run vlc --list on both versions and compare the output to know if something's missing in 0.9.0.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 11:41

you can run vlc --list on both versions and compare the output to know if something's missing in 0.9.0.
I did vlc --list | grep -i mpe | sort for both players, and then, diffed the output:

$ diff -u 0.8 0.9
--- 0.8 2007-07-25 11:33:29.075704057 +0200
+++ 0.9 2007-07-25 11:33:32.575170231 +0200
@@ -1,4 +1,4 @@
- ffmpeg FFmpeg audio/video decoder/encoder ((MS)MPEG4,SVQ1,H263,WMV,WMA)
+ ffmpeg FFmpeg audio/video decoders/encoders
ffmpeg FFmpeg audio/video encoder
ffmpeg FFmpeg chroma conversion
ffmpeg FFmpeg crop padd filter
@@ -20,6 +20,5 @@
packetizer_mpegvideo MPEG-I/II video packetizer
ps MPEG-PS demuxer
ps MPEG-PS demuxer
- stream_out_switcher MPEG2 video switcher stream output
ts MPEG Transport Stream demuxer
-VLC media player 0.8.6c Janus
+VLC media player 0.9.0-svn Grishenko


So basically, the only thing that differs is stream_out_switcher not present in 0.9.0.

Can it make a difference? I'll build 0.9.0 with --enable-switcher to see if anything's changed.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby dionoea » 25 Jul 2007 11:45

It won't make any difference (switcher is some fancy stream output plugin which only one person knows how to use ... and what it's used for). The problem might be with the ffmpeg version you compiled. Or maybe with the configure flags you used in ffmpeg (if you didn't already try, try compiling ffmpeg with --disable-swscaler).
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 11:54

It won't make any difference (switcher is some fancy stream output plugin which only one person knows how to use ... and what it's used for). The problem might be with the ffmpeg version you compiled. Or maybe with the configure flags you used in ffmpeg (if you didn't already try, try compiling ffmpeg with --disable-swscaler).
As I remember, I didn't use any flags to ffmpeg.

Any other recommendations besides --disable-swscaler?

I just need transcoding from mpeg-4 to WMV2, no audio.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby dionoea » 25 Jul 2007 11:55

You'll at least need --enable-pp --enable-gpl to get ffmpeg to link with VLC.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 13:15

You'll at least need --enable-pp --enable-gpl to get ffmpeg to link with VLC.
It linked for me without --enable-pp --enable-gpl flags.

So, I compiled ffmpeg:

./configure --disable-swscaler --enable-pp --enable-gpl

And VLC:

./configure --with-ffmpeg-tree=/home/build/vlc/ffmpeg --enable-live555 --with-live555-tree=/usr/lib/live


And still, the transcoded image from a MPEG camera is very pixelized :(
On the other hand, transcoded image from a MJPEG camera looks very good.

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 13:25

This is the line I use to start VLC:

vlc --sout-keep -I dummy --run-time 60 -L playlist.xspf --sout "#transcode{vcodec=WMV2,vb=512,scale=1}:gather:std{access=mmsh,dst=:1755,mux=ts}"

Increasing bitrate (vb) doesn't change anything at all.

And these are the sources (MPEG and MJPEG) on the playlist - both give good quality when opened without transcoding:

rtsp://192.168.111.188/live.sdp

http://192.168.111.189/nphMotionJpeg?Re ... y=Standard


What's interesting, the *first* second from the MPEG camera gives good quality; only later the image gets very pixelized (when transcoding, that is; without transcoding, quality is always OK).

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby dionoea » 25 Jul 2007 13:36

Hum, I really don't know what that's due to. (btw, why are you using wmv2?)
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 14:21

Hum, I really don't know what that's due to. (btw, why are you using wmv2?)
The stream from cameras will be placed on a website.

AFAIK, WMV1 or WMV2 are the only codecs which work with Windows Media Player (that is, not requiring the user to install any 3rd party codecs or tools). Of course, I'd like to be wrong here.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby dionoea » 25 Jul 2007 14:39

DIV3 also works (and it's better than wmv1/2 in my opinion).
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 15:23

DIV3 also works (and it's better than wmv1/2 in my opinion).
Indeed, DIV3 seems to work, thanks for the tip.

I made some tests, and the issue is not 0.9.0 or WMV2 specific.

With 0.8.6c on Windows, I can see exactly the same behaviour.

To reproduce:

- open any MPEG4 stream or movie
- Stream/Save -> Settings -> Transcoding options -> choose mp4v, WMV2
- test with different bitrates

With network streams, even though the delivered stream is 256 kb/s, when transcoded by VLC, the video gets very pixelized.
Interesting things:

1. First second is not pixelized
2. For WMV2 and mp4v pixelization doesn't disappear even when we set bitrate to 3072


With movies, it's similar, although it's harder to spot (usually, movies have bigger resolution than 320x240).

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 15:42

All right, this is what I found out:

This camera streams using UDP, and has a link: rtsp://192.168.111.188/live.sdp

When I open this stream directly in VLC, and transcode it there, the video is very pixelized.

However, when I use another VLC as a "proxy" (no transcoding), picture is OK:

rtsp://192.168.111.188/live.sdp -> VLC output HTTP (no transcoding) -> VLC transcoding


This doesn't make much sense, does it?

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby dionoea » 25 Jul 2007 16:42

Yup, doesn't make much sense to me.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

mangoo
Blank Cone
Blank Cone
Posts: 46
Joined: 16 Jul 2007 12:05
Contact:

Re: transcoding MPEG: 0.8.6c - good; 0.9.0(svn) - poor quality

Postby mangoo » 25 Jul 2007 16:44

Yup, doesn't make much sense to me.
Looks like some kind of a bug to me, though ;)


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 30 guests