#9860 closed enhancement (fixed)
yuvj420p spam
Reported by: | Jacky Koning | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | swscale |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
My camera produces a yuvj420p format video and every time I open it with ffmpeg it first spams 100 lines saying
[swscaler @ 00000229eeb9b540] [swscaler @ 00000229eebb0540] deprecated pixel format used, make sure you did set range correctly
Yes I actually copy pasted it to see how much lines it was printing and yes it is actually 100 lines.
As you might imagine this is disrupting for what I am trying to achieve, sometimes I need to find the output of the previous command. There is also no need to keep yelling it at me since I can not change what my camera creates.
There are 3 ways to fix this IMO.
- Allow 1 print and that is it.
- Remove this message if it is from an input file. I can understand when you use it as an output but with inputs there is nothing you can do about it.
- Change how your string printer works and make it ignore the small differences in say 00000229f66e3000 and have it say previous message repeated 99 times.
Thank you for your understanding and for the work that has gone into this project.
Change History (21)
comment:3 by , 2 years ago
Ok https://drive.google.com/file/d/16evMKmRdeJIL2ytj6Zd1GzfrVr0VGduF/view this is a sample file. Its quite large as I record like that.
It happens every time you add any type of -pix_fmt to the command line or if the codec does not support yuvj420p and auto translates itself to another pixel format like libsvtav1.
comment:4 by , 2 years ago
Status: | new → open |
---|---|
Version: | unspecified → git-master |
So this is not mjpeg (it is H.264); just outright doing ffplay sample.mov prints the line 20 times.
comment:5 by , 2 years ago
Please provide the command line you tested together with the complete, uncut console output to make this a valid ticket.
comment:6 by , 2 years ago
Command:
ffmpeg.exe -i .\sample.mov -pix_fmt yuv420p -f null - > ffmpeg.log 2>&1
ffmpeg.log:
ffmpeg version 2022-08-03-git-d3f48e68b3-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.1.0 (Rev2, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 57. 32.101 / 57. 32.101 libavcodec 59. 41.101 / 59. 41.101 libavformat 59. 29.100 / 59. 29.100 libavdevice 59. 8.101 / 59. 8.101 libavfilter 8. 46.101 / 8. 46.101 libswscale 6. 8.101 / 6. 8.101 libswresample 4. 8.100 / 4. 8.100 libpostproc 56. 7.100 / 56. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.\sample.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf59.29.100 Duration: 00:00:28.13, start: 0.000000, bitrate: 64335 kb/s Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt709/bt470m, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 62037 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default) Metadata: handler_name : VideoHandler vendor_id : FFMP Stream #0:1[0x2](eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native)) Stream #0:1 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b3f80c7c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b3e02c580] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b3f452e40] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b3fc03780] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b428e93c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42943780] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42952640] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42981500] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b429d9280] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42a25d80] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42a32d40] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42acf040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42adf040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42b3df40] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42ba2040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42bb2d80] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42c4c040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42c5af00] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42c67ec0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42d1e040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42d6c040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42d99000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42da6000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42db2fc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b3f7ff800] [swscaler @ 0000014b42dbff80] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b3f7ff800] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b3f80c7c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b3e023240] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b3e030200] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b3fbe4dc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b432100c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b4323d080] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42dd9040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b429d9040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42c2aa00] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42c379c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42c44980] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42b11040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42b1e000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42b2afc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42ab7040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42b47fc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42cfc040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42d19040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42d67040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42898ec0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b428e7040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42935040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b42983040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42becdc0] [swscaler @ 0000014b432f6040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b3f7ff800] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b3f80c7c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b432f6040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b43303000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b3e023240] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b3fc04dc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b3e030200] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b428d8ec0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b428e5e80] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42c7c4c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42c89480] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b43252040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b4327f000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42977040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42984000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42a33040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42a40000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42abd040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42a4cfc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42bf1040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42bfe000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42c4c040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42cd8040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42d46040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42b47fc0] [swscaler @ 0000014b42d94040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42abd040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3e023240] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3e030200] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3f7ff800] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3f80c7c0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3f440c00] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3fc04dc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b3f44dbc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42d18040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b429b7ec0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b429c4e80] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42a34040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42a41000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42b31040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42b3e000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b4291c040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42929000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42936000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42987040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b432b4040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b432c1000] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b432cdfc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b432dafc0] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42db4040] deprecated pixel format used, make sure you did set range correctly [swscaler @ 0000014b42d46040] [swscaler @ 0000014b42dc1000] deprecated pixel format used, make sure you did set range correctly Output #0, null, to 'pipe:': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf59.29.100 Stream #0:0(eng): Video: wrapped_avframe, yuv420p(tv, smpte170m/bt709/bt470m, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn (default) Metadata: handler_name : VideoHandler vendor_id : FFMP encoder : Lavc59.41.101 wrapped_avframe Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] encoder : Lavc59.41.101 pcm_s16le frame= 0 fps=0.0 q=-0.0 size=N/A time=00:00:00.52 bitrate=N/A speed= 9.5x frame= 197 fps=0.0 q=-0.0 size=N/A time=00:00:07.07 bitrate=N/A speed=12.6x frame= 398 fps=375 q=-0.0 size=N/A time=00:00:13.78 bitrate=N/A speed= 13x frame= 605 fps=386 q=-0.0 size=N/A time=00:00:20.70 bitrate=N/A speed=13.2x frame= 815 fps=394 q=-0.0 size=N/A time=00:00:27.71 bitrate=N/A speed=13.4x frame= 840 fps=391 q=-0.0 Lsize=N/A time=00:00:28.06 bitrate=N/A speed=13.1x video:394kB audio:5252kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
comment:7 by , 2 years ago
Should we set the ticket Component to swscale? I thought it was just ffmpeg but if it is also ffplay it might be better to change it.
comment:8 by , 2 years ago
I don't think there is anything that can be fixed about the output:
If you don't redirect the output into a file you get exactly the one line that you requested in your original report. If I print the log file here into the console I also get exactly one line.
The request to completely fix the warning is a duplicate iirc but I could so far not find the original ticket.
follow-up: 10 comment:9 by , 2 years ago
https://trac.ffmpeg.org/ticket/6088 This one? I did a google search like "deprecated pixel format used, make sure you did set range correctly site:trac.ffmpeg.org"
comment:10 by , 2 years ago
Component: | ffmpeg → swscale |
---|
Replying to Jacky Koning:
https://trac.ffmpeg.org/ticket/6088 This one? I did a google search like "deprecated pixel format used, make sure you did set range correctly site:trac.ffmpeg.org"
No, some other one that was talking about many many lines instead of one, I common come up with it. There are a lot of such tickets, it is won't fix for jpeg, since that one always uses full range, but we did not migrate jpeg decoder to new API yet and it is a real problem, e.g., the use of old API can put BT.709 instead of BT.601 yuv inside and it also does not change the chroma siting from left or top-left to jpeg's center. (See my own bug #9693.) That is also why we cannot try and apply Paul's patchset that removes long time ago deprecated yuvj* formats. https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=&submitter=&state=*&q=yuvj&archive=&delegate=
I mean your issue is simple to fix: just decrease the visability to -v trace for this line. It also possible that this 💩 is not thread safe.
P.S. Please note it is not the first time this line causes issue, 3bb1c58e953256ca614c79a511cd0a94e4673e79
comment:11 by , 2 years ago
Component: | swscale → undetermined |
---|
comment:12 by , 2 years ago
The real problem is that just like in 3bb1c58e953256ca614c79a511cd0a94e4673e79 JPEG is considered anything that has BT.601 and full range (while this one does not even use sRGB transfer). So your file causes trouble. The fix may be to specify that JPEG always uses chroma siting center, while your file uses as default left.
follow-up: 14 comment:13 by , 2 years ago
Just change this line https://github.com/FFmpeg/FFmpeg/blob/26180e8855327cd5fed517c5931c5e05446318f4/libswscale/utils.c#L1335
to
av_log(c, AV_LOG_VERBOSE, "deprecated pixel format used, make sure you did set range correctly\n");
comment:14 by , 2 years ago
Replying to Balling:
Just change this line https://github.com/FFmpeg/FFmpeg/blob/26180e8855327cd5fed517c5931c5e05446318f4/libswscale/utils.c#L1335
to
av_log(c, AV_LOG_VERBOSE, "deprecated pixel format used, make sure you did set range correctly\n");
I agree that solution will work for me. As it hides it unless you are looking for it.
comment:15 by , 2 years ago
You can also use -v error to fix this and BTW on your sample -v message does give you "previous message repeated 1 times" at leasy sometimes.
comment:17 by , 2 years ago
comment:18 by , 2 years ago
That should do it even though I don't think that website does a good job of telling exactly what is changed. Or not in a way I can understand it easily.
Thank you
follow-up: 20 comment:19 by , 2 years ago
Component: | undetermined → swscale |
---|---|
Resolution: | → fixed |
Status: | open → closed |
Fixed in b2d1a258162a619187bbb0a72f7e8eb94f91cfa4.
comment:20 by , 2 years ago
Replying to mkver:
Fixed in b2d1a258162a619187bbb0a72f7e8eb94f91cfa4.
Is it possible to further decrease it? It is now once per thread, which is still 4 times for my CPU. (Compared to once before threading and slice threading was done by Anton.)
comment:21 by , 2 years ago
Just want to update that it indeed no longer spams. It now has a line with the message and then a second line saying last message repeated x times. That is a good way to handle it.
Thank you for doing it this way.
mjpeg codec is not yet migrated to range flag. It still uses deprecated yuvj*
I agree it is highly bothersome.