Page 1 of 1

Resizing without changing video codec

Posted: 15 Apr 2010 14:06
by jansonb
Hello.

First, let me congratulate the VideoLAN team for the spectacular work that you have been doing.

Second, I am trying to use VLC to take a http stream input, resize it to a lower resolution, and stream it through http.
All this, without having to change the input's video codec (which is MJPEG).

Can anyone please give some suggestions?

These were my failed attempts:

vlc stream_input --sout #transcode{vcodec, width=320,height=240}:std{access=http,dst=localhost:8080,mux=ts}

vlc stream_input --sout #transcode{vcodec, vfilter=canvas{width=320,height=240}}:std{access=http,dst=localhost:8080,mux=ts}

vlc stream_input --sout #transcode{width=320,height=240}:std{access=http,dst=localhost:8080,mux=ts}

Thank you for your attention.
Bernardo

Re: Resizing without changing video codec

Posted: 20 Apr 2010 14:20
by jansonb
Anyone ever used VLC for doing this?

Simply resize the video stream or decrease the frame rate?

Re: Resizing without changing video codec

Posted: 29 Apr 2010 09:37
by GEFORCEXTREME
Whether you are changing the codec or not, you have to reencode (transcoding) the video if you're trying to change some of the video parameters (frame size, QP, bitrate, frame rate, etc...). I think you're problem stems from not specifying a codec for the video.

There is no way to change the frame size of a video file without transcoding. Just choose a codec and enter it into your command line and see if it works. No point to choose MJPEG, not really efficient.

Let me know if I'm wrong.

Re: Resizing without changing video codec

Posted: 30 Apr 2010 10:00
by jansonb
Yes, that's what I was afraid of. With VLC, there is no way to keep the original codec and change the frame rate or resolution. You always have to encode again.
I really need to have a mjpeg stream in the output, for video analysis purposes.
If I transcode to MJPEG it looses too much quality. See images below.
Original
Image

Transcoded
Image

What is wierd is that I can actually do it with ffmpeg like this:

ffmpeg -f mjpeg -i http://mjpeg_stream_ip -f mpjpeg -s 320x240 c:\test

Too bad it is not included in VLC. Maybe in the future.

Re: Resizing without changing video codec

Posted: 06 May 2010 12:05
by GEFORCEXTREME
Hi, so you're using ffmpeg to transcode, can't you set it to a better parameters, like maybe lower QP, rf, or higher bitrate?