transcoding mjpg-avi with correct chroma settings I420/J420

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
roman86
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2015 21:56

transcoding mjpg-avi with correct chroma settings I420/J420

Postby roman86 » 10 Apr 2015 22:24

I have a quite old digicam that produces mjpg videos that are played correctly in vlc, meaning that black is really black and white is really white.
vlc says the avi is "planar 4:2:0 YUV full scale".

if I transcode the video to h264 (but it also happens with when transcoding to other formats), black gets some kind of dark gray and white some kind of light grey.
vlc says the transcoded file is "planar 4:2:0 YUV". -> "full scale" is missing.

obviously the chroma from the source file is interpreted right when playing, but wrong when transcoding.

I understand the thing with the different chroma modes I420 (16-240 / analog) and J420 (0-255 / digital),
but how can I adjust the chrome for the input and/or the output file?
I'm doing

Code: Select all

vlc.exe -I dummy -vvv mjpeg.avi --sout #transcode{vcodec=h264,vb=1000,acodec=mp3,ab=128}:standard{access=file,mux=ts,dst=h264_mp3.ts}
but remember, as I mentioned above, the problem persists if I transcode in a different format, so in my opinion it has got nothing to do with h264.

thanks for your help!

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 mjpg-avi with correct chroma settings I420/J420

Postby Jean-Baptiste Kempf » 20 Apr 2015 22:17

VLC does not do that, yet.
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.

roman86
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2015 21:56

Re: transcoding mjpg-avi with correct chroma settings I420/J420

Postby roman86 » 22 Apr 2015 21:12

thanks for this information.
does someone has an recommendation which other tool I should try? ffmpeg? mplayer? something else?
thanks

roman86
New Cone
New Cone
Posts: 3
Joined: 10 Apr 2015 21:56

Re: transcoding mjpg-avi with correct chroma settings I420/J420

Postby roman86 » 11 Oct 2015 21:11

in the meantime I solved the problem by using ffmpeg with the argument

Code: Select all

-pix_fmt yuvj420p
at the end of the

Code: Select all

-c:v libx264
arguments.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 192 guests