Resizing without changing video codec

About encoding, codec settings, muxers and filter usage
jansonb
New Cone
New Cone
Posts: 4
Joined: 15 Apr 2010 13:35

Resizing without changing video codec

Postby jansonb » 15 Apr 2010 14:06

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

jansonb
New Cone
New Cone
Posts: 4
Joined: 15 Apr 2010 13:35

Re: Resizing without changing video codec

Postby jansonb » 20 Apr 2010 14:20

Anyone ever used VLC for doing this?

Simply resize the video stream or decrease the frame rate?

GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

Re: Resizing without changing video codec

Postby GEFORCEXTREME » 29 Apr 2010 09:37

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.

jansonb
New Cone
New Cone
Posts: 4
Joined: 15 Apr 2010 13:35

Re: Resizing without changing video codec

Postby jansonb » 30 Apr 2010 10:00

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.

GEFORCEXTREME
Blank Cone
Blank Cone
Posts: 36
Joined: 11 Jan 2010 16:03

Re: Resizing without changing video codec

Postby GEFORCEXTREME » 06 May 2010 12:05

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?


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 7 guests