Re: [FFmpeg-user] Correct conversion of yuvj420p?

2020-10-10 Thread Mark Himsley
On Fri, 2 Oct 2020 at 14:28, Tobias Rapp  wrote:
>
> ffmpeg -i $INPUT ... -pix_fmt +yuv420p \
>   -filter:v "format=pix_fmts=yuv420p,setrange=full,..."

Be careful with that if you have any interlaced material.
The `format` filter will force the inclusion of a `scale` filter before it.
Unless it's changed recently and I've missed it, the scale filter will
not be interlaced aware, so you might end up blurring the colours for
the two fields in each frame.

-- 
Mark Himsley
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] bwdif filter question

2020-09-16 Thread Mark Himsley
On Mon, 14 Sep 2020 at 15:42, Mark Filipak (ffmpeg)  wrote:
>
> Is the input to the bwdif filter fields or frames?

The input to every filter in a filter chain is a raster of pixels.
That raster may contain one frame or two fields.
The bwdif filter will interpret a single raster and is designed to
output two rasters, each containing one or the other of the fields
that were contained in the input raster.

-- 
Mark Himsley
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Dolby Vision

2019-12-10 Thread Mark Himsley
On Sun, 8 Dec 2019 at 10:03, Ted Park  wrote:
>
> > When I play the file downloaded from that page on an VG 4K Dolby
> > Vision capable TV it plays correctly with the right colours, but the
> > colours are way wrong when decoded/converted with FFmpeg.
> >
> > Should I be expecting Dolby Vision files to decode correctly? I mean,
> > it's very close, but just not quite right.
> I’m not sure, I think so? But when you are transcoding to h264 and yuv420p, 
> the point is sort of moot.

The command line was an example. Encoding to yuv420p should not make
such a difference in the luminance and colours.

As I understand it, FFmpeg (the libav libraries) can convert HLD and
'standard' PQ from HDR to SDR acceptably. (VLC also does the job
admirably). With HLG I imagine that a LUT needs to be applied to
compress the peek whites and deep blacks. I don't quite know what
happens with PQ, perhaps its similar. But with Dolby Vision there is
the sub-layer of metadata.


> > $ ffmpeg -i 'LG Amaze Dolby Vision UHD 4K Demo.ts'  -sws_flags lanczos
> > -filter:v "scale=1920:1080:interl=0,format=yuv420p" -c:v libx264 -crf
> > 18 -an -y out.mkv
>
>
> I think it might have the capability to at least decode and remux the data 
> since the mov demuxer just happens after hevc notices nal unit 62
> > [hevc @ 0x37c9ec0] Skipping NAL unit 62
> > Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'LG Amaze Dolby Vision UHD 4K 
> > Demo.ts':
> >  Metadata:
> >major_brand : mp42
> >minor_version   : 1
> >compatible_brands: mp42dby1isom
> >creation_time   : 2017-04-13T20:09:18.00Z
> >  Duration: 00:00:56.20, start: 0.00, bitrate: 28362 kb/s
> >Stream #0:0(und): Video: hevc (Main 10) (dvhe / 0x65687664),
> > yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 27713 kb/s, 60 fps, 60
> > tbr, 60k tbn, 60 tbc (default)
> > ...
> > Stream mapping:
> >  Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
> > Press [q] to stop, [?] for help
> > [hevc @ 0x37f3380] Skipping NAL unit 62
> > [hevc @ 0x37fa1c0] Skipping NAL unit 62
> > [hevc @ 0x380ce80] Skipping NAL unit 62
> > [hevc @ 0x385de80] Skipping NAL unit 62
> > [hevc @ 0x386e700] Skipping NAL unit 62
> > [hevc @ 0x38d8940] Skipping NAL unit 62
> > [hevc @ 0x38e9080] Skipping NAL unit 62
> > [hevc @ 0x38f98c0] Skipping NAL unit 62
> > [hevc @ 0x390a140] Skipping NAL unit 62
> > [hevc @ 0x37f3380] Skipping NAL unit 62
> > [hevc @ 0x37fa1c0] Skipping NAL unit 62
> > [libx264 @ 0x37f2940] using SAR=1/1
> > [libx264 @ 0x37f2940] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
> > [hevc @ 0x380ce80] Skipping NAL unit 62
> > [libx264 @ 0x37f2940] profile Progressive High, level 4.2, 4:2:0, 8-bit
> > [libx264 @ 0x37f2940] 264 - core 157 r2969 d4099dd - H.264/MPEG-4 AVC
> > codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html -
> > options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
> > psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
> > 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
> > threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1
> > interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
> > b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
> > keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
> > mbtree=1 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
> > aq=1:1.00
> > Output #0, matroska, to 'out.mkv':
> >  Metadata:
> >major_brand : mp42
> >minor_version   : 1
> >compatible_brands: mp42dby1isom
> >encoder : Lavf58.35.100
> >Stream #0:0(und): Video: h264 (libx264) (H264 / 0x34363248),
> > yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 60 fps, 1k tbn, 60 tbc
> > (default)
> > ...
> > [hevc @ 0x385de80] Skipping NAL unit 62
> > [hevc @ 0x386e700] Skipping NAL unit 62
> > [hevc @ 0x38d8940] Skipping NAL unit 62
> > …
>
> But is it simply skipping or does it know what that signals? Also I’m not as 
> familiar with mkv, but is H264 as the codec normal instead of avc? Can it 
> handle the enhancement layer info?
>
> As far as “correctness” goes, the color probably is correct, as in it was 
> decoded and interpolated  the way it is supposed to be, but obviously it’s 
> not going to have the full range that you get from the output from a licensed 
> hardware decoder after you transcode from the minimal/compatibility hevc main 
> 10 to h264 42.

The colour (and luminance) which has been decoded, mapped between
colour-spaces, and and re-encoded is not correct. If you have a Dolby
Vision compatible TV you can see the difference very clearly. Do you
need me to point a camera at my TV to demonstrate :-)
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Dolby Vision

2019-12-07 Thread Mark Himsley
hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 62
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
[hevc @ 0x38e9080] Skipping NAL unit 62
[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 62kB time=00:00:00.00 bitrate=N/A
speed=   0x
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
[hevc @ 0x38e9080] Skipping NAL unit 62
[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 62
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
[hevc @ 0x38e9080] Skipping NAL unit 62
[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 62
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
[hevc @ 0x38e9080] Skipping NAL unit 62
[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 62
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62kB time=00:00:00.00 bitrate=N/A
speed=   0x
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
[hevc @ 0x38e9080] Skipping NAL unit 62
[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 62
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
[hevc @ 0x38e9080] Skipping NAL unit 62
[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 62
[hevc @ 0x37fa1c0] Skipping NAL unit 621kB time=00:00:00.06 bitrate=
99.4kbits/s speed=0.0442x
[hevc @ 0x380ce80] Skipping NAL unit 62

[hevc @ 0x38f98c0] Skipping NAL unit 62
[hevc @ 0x390a140] Skipping NAL unit 62
[hevc @ 0x37f3380] Skipping NAL unit 624kB time=00:00:54.95
bitrate=27572.6kbits/s speed=0.292x
[hevc @ 0x37fa1c0] Skipping NAL unit 62
[hevc @ 0x380ce80] Skipping NAL unit 62
[hevc @ 0x385de80] Skipping NAL unit 62
[hevc @ 0x386e700] Skipping NAL unit 62
[hevc @ 0x38d8940] Skipping NAL unit 62
frame= 3372 fps= 18 q=-1.0 Lsize=  184967kB time=00:00:56.15
bitrate=26985.2kbits/s speed=0.296x
video:184940kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.014368%
[libx264 @ 0x37f2940] frame I:23Avg QP:17.12  size:372237
[libx264 @ 0x37f2940] frame P:1397  Avg QP:21.18  size:103814
[libx264 @ 0x37f2940] frame B:1952  Avg QP:25.00  size: 18334
[libx264 @ 0x37f2940] consecutive B-frames: 22.3%  1.2%  1.1% 75.4%
[libx264 @ 0x37f2940] mb I  I16..4: 22.5% 50.1% 27.3%
[libx264 @ 0x37f2940] mb P  I16..4:  0.7%  5.0%  1.1%  P16..4: 42.2%
13.8% 13.0%  0.0%  0.0%skip:24.2%
[libx264 @ 0x37f2940] mb B  I16..4:  0.1%  0.7%  0.5%  B16..8: 29.7%
3.9%  1.9%  direct: 3.3%  skip:59.9%  L0:34.9% L1:50.8% BI:14.3%
[libx264 @ 0x37f2940] 8x8 transform intra:66.6% inter:58.6%
[libx264 @ 0x37f2940] coded y,uvDC,uvAC intra: 83.7% 60.1% 24.9%
inter: 23.1% 16.1% 6.0%
[libx264 @ 0x37f2940] i16 v,h,dc,p: 41% 16%  7% 36%
[libx264 @ 0x37f2940] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 19% 14%  6%
10%  7% 14%  7% 13%
[libx264 @ 0x37f2940] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 17% 11%  7%
12%  9% 13%  7% 11%
[libx264 @ 0x37f2940] i8c dc,h,v,p: 63% 19% 13%  5%
[libx264 @ 0x37f2940] Weighted P-Frames: Y:8.7% UV:5.0%
[libx264 @ 0x37f2940] ref P L0: 68.6% 13.3% 11.9%  6.1%  0.1%
[libx264 @ 0x37f2940] ref B L0: 88.4%  9.2%  2.4%
[libx264 @ 0x37f2940] ref B L1: 93.4%  6.6%
[libx264 @ 0x37f2940] kb/s:26957.74


-- 
Mark Himsley
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] how to distribute ffmpeg code before the patch is approved

2019-06-18 Thread Mark Himsley Gmail


On 15 May 2019 20:39:22 BST, Yufei He  wrote:
>Hi
>
>How to distribute ffmpeg + our patch  before our patch is approved ?
>
>Can we send our code to customer and ask them to compile themselves?


I think you need to ask for the definition of 'distribute'.

IANAL, but I believe you can give your customer your compiled version of FFmpeg 
so long as you make available all of the source code including your patches 
from which you compiled your version of FFmpeg.



-- 
Mark Himsley
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] compilation issues

2017-10-20 Thread Mark Himsley
On 20 October 2017 at 06:33, tasos <tas...@trigonongroup.com> wrote:
> Hello and thx for replying.
> To be honest i didn't understand what you are telling me.Sorry.
> In any case i had to make  the following changes in order to compile ffmpeg
> as usual.
>
>> -enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h
>> lame_set_VBR_quality -lmp3lame
>> +enabled libmp3lame&& require "libmp3lame >= 3.98.3" lame/lame.h
>> lame_set_VBR_quality -lmp3lame -lm
>> -enabled libx265   && require_pkg_config libx265 x265 x265.h
>> x265_api_get &&
>> +enabled libx265   && require_pkg_config libx265 x265 x265.h
>> x265_api_get -lpthread  &&
>>   require_cpp_condition x265.h "X265_BUILD >=
>> 68"

This has been discussed on ffmpeg-devel with the simplest fix being
adding -lm and -lpthreads to --extra-libs.

http://ffmpeg.org/pipermail/ffmpeg-devel/2017-October/217986.html


-- 
Mark Himsley
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".