[FFmpeg-trac] #7070(swscale:new): A proper way of converting yuvj420p colorspace to yuv420p (AVC to HEVC reencoding)
FFmpeg
trac at avcodec.org
Wed Mar 7 19:36:28 EET 2018
#7070: A proper way of converting yuvj420p colorspace to yuv420p (AVC to HEVC
reencoding)
---------------------------------+----------------------------------
Reporter: birdie | Type: defect
Status: new | Priority: minor
Component: swscale | Version: 3.2.4
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------+----------------------------------
This is not a bug, this is a request for help.
My phone generates files (AVC) in the yuvj420p colorspace and I cannot
figure out how to reencode them to HEVC without losing colors.
I have encoded 1) without options and I've also tried 2) this and 3) this:
{{{
ffmpeg -i src -vf "scale=in_range=pc:out_range=tv" out
}}}
and this
{{{
ffmpeg -i src -pix_fmt yuv420p -vf "scale=in_range=pc:out_range=tv" out
}}}
But I always get this warning message:
{{{
[swscaler @ 0x1229940] deprecated pixel format used, make sure you did set
range correctly
}}}
And the resulting file always has different colors (either undersaturated
(1) or oversatured (2,3) ).
{{{
ffprobe src.mp4
ffprobe -i part0*mp4
ffprobe version 3.4.2 Copyright (c) 2007-2018 the FFmpeg developers
built with gcc 7 (GCC)
configuration: --disable-static --enable-nonfree --enable-avfilter
--enable-shared --enable-gpl --enable-postproc --enable-pthreads --enable-
libspeex --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-
libopus --enable-libopenjpeg --disable-debug --disable-doc --enable-
libpulse --extra-cflags='-march=native' --enable-version3 --enable-
libvorbis --enable-libfdk-aac --enable-gnutls --enable-libfreetype
--enable-libx265 --libdir=/usr/local/lib64 --enable-lto
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'part0.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.83.100
Duration: 00:00:31.60, start: 0.014000, bitrate: 19315 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661),
yuvj420p(pc, smpte170m), 1920x1080, 19988 kb/s, SAR 1:1 DAR 16:9, 20.51
fps, 20 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 96 kb/s (default)
Metadata:
handler_name : SoundHandler
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7070>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list