New submission from herve <[email protected]>:

Hi,
the conversion to pix_fmt yuvj420p or yuvj422p produces "points/white 
holes" in the darkest part of videos.
I tried to understand its reason but failed.
my impression is: JPG YUV range (aka yuvj, ala full range, 0-255) 
produces "holes", yuv range does not produce them (16-235)
- if the output is YUV (range 16-235), no concern
- if the output is mjpeg (range 0-255), artefacts.
The concern only exists IF YOU RESCALE the video (no artifact without 
rescale)
This "bug"(?) is not new, it already occured before the new 
scale/libavfilter


how to reproduce them:
you will find screenshot and an input file here:
http://www.whynotflores.com/_PRIVATE/FFmpeg/index.php
(PS: the bug is not related to this MTS file, I encountered it with 
Xvid/AVI and other formats)
the best way to see it is to deinterlace the file (to avoid blended 
fields in output)
cli: 
ffmpeg -v 1 -deinterlace -i /Users/herve/Desktop/yuvjArtefacts.mts  -vf 
"scale=1280:720" -vcodec mjpeg -an -y  
/Users/herve/Desktop/yuvjArtefacts.mov


eg (command line with full output):

hard/software:
uname -a
Darwin iMac-de-Herve.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 
23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386

iMac-de-Herve:~ herve$ ffmpeg -v 1 -deinterlace -i 
/Users/herve/Desktop/yuvjArtefacts.mts  -vf "scale=1280:720" -vcodec 
mjpeg -an -y  /Users/herve/Desktop/yuvjArtefacts.mov
FFmpeg version SVN-r24716, Copyright (c) 2000-2010 the FFmpeg developers
  built on Aug 12 2010 15:23:58 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --enable-postproc --enable-gpl --enable-pthreads --
enable-static --disable-shared --enable-gray --enable-libx264 --enable-
libmp3lame
  libavutil     50.23. 0 / 50.23. 0
  libavcore      0. 3. 0 /  0. 3. 0
  libavcodec    52.84. 3 / 52.84. 3
  libavformat   52.78. 0 / 52.78. 0
  libavdevice   52. 2. 1 / 52. 2. 1
  libavfilter    1.27. 1 /  1.27. 1
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0

Seems stream 0 codec frame rate differs from container frame rate: 50.00 
(50/1) -> 50.00 (50/1)
Input #0, mpegts, from '/Users/herve/Desktop/yuvjArtefacts.mts':
  Duration: 00:00:03.65, start: 1.000033, bitrate: 7528 kb/s
  Program 1 
    Stream #0.0[0x1011]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 
16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
[buffer @ 0x100d02290] w:1440 h:1080 pixfmt:yuv420p
[scale @ 0x100d02620] w:1440 h:1080 fmt:yuv420p -> w:1280 h:720 
fmt:yuvj420p flags:0xa0000004
Output #0, mov, to '/Users/herve/Desktop/yuvjArtefacts.mov':
  Metadata:
    encoder         : Lavf52.78.0
    Stream #0.0: Video: mjpeg, yuvj420p, 1280x720 [PAR 4:3 DAR 64:27], 
q=2-31, 200 kb/s, 50 tbn, 50 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=   91 fps= 27 q=24.8 Lsize=    2830kB time=3.66 
bitrate=6335.4kbits/s    
video:2829kB audio:0kB global headers:0kB muxing overhead 0.048671%
iMac-de-Herve:~ herve$ 

thanks for your attention
bye

----------
messages: 11674
priority: normal
status: new
substatus: new
title: mjpeg (yuvj4…p) produces artefacts
type: bug

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2165>
________________________________________________

Reply via email to