Re: [FFmpeg-user] Question about "normalize" filter

2023-01-29 Thread Paul B Mahol
On Mon, Jan 30, 2023 at 12:23 AM Michael Koch 
wrote:

> Am 29.01.2023 um 23:36 schrieb Paul B Mahol:
> > On 1/29/23, Michael Koch  wrote:
> >> Am 29.01.2023 um 23:07 schrieb Paul B Mahol:
> >>> On 1/29/23, Michael Koch  wrote:
> >>>> Am 29.01.2023 um 22:05 schrieb Paul B Mahol:
> >>>>> On 1/29/23, Michael Koch  wrote:
> >>>>>> Am 29.01.2023 um 19:32 schrieb Paul B Mahol:
> >>>>>>> On 1/29/23, Michael Koch  wrote:
> >>>>>>>> Hello,
> >>>>>>>>
> >>>>>>>> if I understood the documentation correctly, the normalize filter
> >>>>>>>> maps
> >>>>>>>> the darkest input pixel to blackpt and the brightest input pixel
> to
> >>>>>>>> whitept:
> >>>>>>>> darkest pixel --> blackpt
> >>>>>>>> brightest pixel --> whitept
> >>>>>>>>
> >>>>>>>> However I need a slightly different mapping:
> >>>>>>>> A black input pixel shall remain black, and the brightest input
> >>>>>>>> pixel
> >>>>>>>> shall become white.
> >>>>>>>> black --> blackpt
> >>>>>>>> brightest pixel --> whitept
> >>>>>>>>
> >>>>>>>> With other words: Just multiply all pixels by a suitable constant.
> >>>>>>>> Don't
> >>>>>>>> add or subtract anything.
> >>>>>>>> Is this possible?
> >>>>>>>>
> >>>>>>>> Known workaround: Make sure that the input frame contains a black
> >>>>>>>> pixel,
> >>>>>>>> by inserting one in a corner.
> >>>>>>> Try attached patch.
> >>>>>> How must I set the options for the desired behaviour?
> >>>>> Set first strength to reverse of second strength.
> >>>>> So 1.0 and 0.0 or 0.0 and 1.0
> >>>> I did try with strength=0:strength2=1 but the output isn't as
> expected.
> >>>>
> >>>> I'm using this input image:
> >>>> http://www.astro-electronic.de/flat.png
> >>>>
> >>>> The pixel values are about 171 in the center and 107 in the top right
> >>>> corner.
> >>>> The center to corner ratio is 171 / 107 = 1.6
> >>>>
> >>>> In the output image I measure 248 in the center (which is almost as
> >>>> expected, probably correct because I'm measuring the average of a 7x7
> >>>> neighborhood), but I measure 122 in the top right corner.
> >>>> The center to corner ratio is 248 / 122 = 2.03
> >>>> The corner is too dark.
> >>>>
> >>> I checked with oscilloscope filter (s=1:tw=1:t=1:x=0), far left pixels
> >>> (as they are darkest) and they are not changing (min values are same
> >>> with and without filter run)
> >>> With default parameters and just strength(2) set to your values, so
> >>> the darkest pixels are left  untouched. Did not checked brightest
> >>> pixels output, but they should be correct too.
> >> But that's not the behaviour I need. All pixels shall be multiplied by
> >> the same suitable constant, so that the brightest pixel becomes white.
> >>
> >> Input center: 171
> >> Input corner: 107
> >>
> >> constant c = 255 / 171 =1.49
> >> Output center: 171 * c = 255
> >> Output corner: 107 * c = 160
> >>
> > Normalization does not do that and that functionality does not belong
> > to such filter, it stretches ranges of all pixel values so they reach
> > maximal possible range.
>
> Can't you just add an option that disables the minimum finding
> algorithm, and set the minimum to zero (=black)? That would do the job.
>

I just did, but for whatever reason you think its incorrect.


>
> Let me explain why I need this kind of normalization.
> Most lenses have vignetting. Especially in astronomical images,
> vignetting must be corrected before any other image processing can be
> done. For this purpose a flatfield image is taken with the same lens at
> the same aperture, but with a uniform white screen in front of the lens.
> Normally the flatfield image is exposed at roughly 50% gray level, to
> avoid problems with nonlinearity near white level. The linked image is
> the flatfield.
> Vignetting in an astronomical image is corrected by dividing the image
> by the flatfield. That can be done with the blend filter.
> If I use the flatfied as-is (with roughly 50% gray level), then the
> image is effectively multiplied by a factor 2. That's a problem because
> bright pixels might get clipped. To minimize this problem, I want to
> normalize the flatfield as close to white level as possible, before
> using it.
>
> Michael
>
> ___
> 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 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] Question about "normalize" filter

2023-01-29 Thread Paul B Mahol
On 1/29/23, Michael Koch  wrote:
> Am 29.01.2023 um 23:07 schrieb Paul B Mahol:
>> On 1/29/23, Michael Koch  wrote:
>>> Am 29.01.2023 um 22:05 schrieb Paul B Mahol:
>>>> On 1/29/23, Michael Koch  wrote:
>>>>> Am 29.01.2023 um 19:32 schrieb Paul B Mahol:
>>>>>> On 1/29/23, Michael Koch  wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> if I understood the documentation correctly, the normalize filter
>>>>>>> maps
>>>>>>> the darkest input pixel to blackpt and the brightest input pixel to
>>>>>>> whitept:
>>>>>>> darkest pixel --> blackpt
>>>>>>> brightest pixel --> whitept
>>>>>>>
>>>>>>> However I need a slightly different mapping:
>>>>>>> A black input pixel shall remain black, and the brightest input
>>>>>>> pixel
>>>>>>> shall become white.
>>>>>>> black --> blackpt
>>>>>>> brightest pixel --> whitept
>>>>>>>
>>>>>>> With other words: Just multiply all pixels by a suitable constant.
>>>>>>> Don't
>>>>>>> add or subtract anything.
>>>>>>> Is this possible?
>>>>>>>
>>>>>>> Known workaround: Make sure that the input frame contains a black
>>>>>>> pixel,
>>>>>>> by inserting one in a corner.
>>>>>> Try attached patch.
>>>>> How must I set the options for the desired behaviour?
>>>> Set first strength to reverse of second strength.
>>>> So 1.0 and 0.0 or 0.0 and 1.0
>>> I did try with strength=0:strength2=1 but the output isn't as expected.
>>>
>>> I'm using this input image:
>>> http://www.astro-electronic.de/flat.png
>>>
>>> The pixel values are about 171 in the center and 107 in the top right
>>> corner.
>>> The center to corner ratio is 171 / 107 = 1.6
>>>
>>> In the output image I measure 248 in the center (which is almost as
>>> expected, probably correct because I'm measuring the average of a 7x7
>>> neighborhood), but I measure 122 in the top right corner.
>>> The center to corner ratio is 248 / 122 = 2.03
>>> The corner is too dark.
>>>
>> I checked with oscilloscope filter (s=1:tw=1:t=1:x=0), far left pixels
>> (as they are darkest) and they are not changing (min values are same
>> with and without filter run)
>> With default parameters and just strength(2) set to your values, so
>> the darkest pixels are left  untouched. Did not checked brightest
>> pixels output, but they should be correct too.
>
> But that's not the behaviour I need. All pixels shall be multiplied by
> the same suitable constant, so that the brightest pixel becomes white.
>
> Input center: 171
> Input corner: 107
>
> constant c = 255 / 171 =1.49
> Output center: 171 * c = 255
> Output corner: 107 * c = 160
>

Normalization does not do that and that functionality does not belong
to such filter, it stretches ranges of all pixel values so they reach
maximal possible range.
___
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] Question about "normalize" filter

2023-01-29 Thread Paul B Mahol
On 1/29/23, Michael Koch  wrote:
> Am 29.01.2023 um 22:05 schrieb Paul B Mahol:
>> On 1/29/23, Michael Koch  wrote:
>>> Am 29.01.2023 um 19:32 schrieb Paul B Mahol:
>>>> On 1/29/23, Michael Koch  wrote:
>>>>> Hello,
>>>>>
>>>>> if I understood the documentation correctly, the normalize filter maps
>>>>> the darkest input pixel to blackpt and the brightest input pixel to
>>>>> whitept:
>>>>> darkest pixel --> blackpt
>>>>> brightest pixel --> whitept
>>>>>
>>>>> However I need a slightly different mapping:
>>>>> A black input pixel shall remain black, and the brightest input pixel
>>>>> shall become white.
>>>>> black --> blackpt
>>>>> brightest pixel --> whitept
>>>>>
>>>>> With other words: Just multiply all pixels by a suitable constant.
>>>>> Don't
>>>>> add or subtract anything.
>>>>> Is this possible?
>>>>>
>>>>> Known workaround: Make sure that the input frame contains a black
>>>>> pixel,
>>>>> by inserting one in a corner.
>>>> Try attached patch.
>>> How must I set the options for the desired behaviour?
>> Set first strength to reverse of second strength.
>> So 1.0 and 0.0 or 0.0 and 1.0
>
> I did try with strength=0:strength2=1 but the output isn't as expected.
>
> I'm using this input image:
> http://www.astro-electronic.de/flat.png
>
> The pixel values are about 171 in the center and 107 in the top right
> corner.
> The center to corner ratio is 171 / 107 = 1.6
>
> In the output image I measure 248 in the center (which is almost as
> expected, probably correct because I'm measuring the average of a 7x7
> neighborhood), but I measure 122 in the top right corner.
> The center to corner ratio is 248 / 122 = 2.03
> The corner is too dark.
>

I checked with oscilloscope filter (s=1:tw=1:t=1:x=0), far left pixels
(as they are darkest) and they are not changing (min values are same
with and without filter run)
With default parameters and just strength(2) set to your values, so
the darkest pixels are left  untouched. Did not checked brightest
pixels output, but they should be correct too.
___
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] Question about "normalize" filter

2023-01-29 Thread Paul B Mahol
On 1/29/23, Michael Koch  wrote:
> Am 29.01.2023 um 19:32 schrieb Paul B Mahol:
>> On 1/29/23, Michael Koch  wrote:
>>> Hello,
>>>
>>> if I understood the documentation correctly, the normalize filter maps
>>> the darkest input pixel to blackpt and the brightest input pixel to
>>> whitept:
>>> darkest pixel --> blackpt
>>> brightest pixel --> whitept
>>>
>>> However I need a slightly different mapping:
>>> A black input pixel shall remain black, and the brightest input pixel
>>> shall become white.
>>> black --> blackpt
>>> brightest pixel --> whitept
>>>
>>> With other words: Just multiply all pixels by a suitable constant. Don't
>>> add or subtract anything.
>>> Is this possible?
>>>
>>> Known workaround: Make sure that the input frame contains a black pixel,
>>> by inserting one in a corner.
>> Try attached patch.
>
> How must I set the options for the desired behaviour?

Set first strength to reverse of second strength.
So 1.0 and 0.0 or 0.0 and 1.0

>
> Micheal
>
> ___
> 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 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] Question about "normalize" filter

2023-01-29 Thread Paul B Mahol
On 1/29/23, Michael Koch  wrote:
> Hello,
>
> if I understood the documentation correctly, the normalize filter maps
> the darkest input pixel to blackpt and the brightest input pixel to
> whitept:
> darkest pixel --> blackpt
> brightest pixel --> whitept
>
> However I need a slightly different mapping:
> A black input pixel shall remain black, and the brightest input pixel
> shall become white.
> black --> blackpt
> brightest pixel --> whitept
>
> With other words: Just multiply all pixels by a suitable constant. Don't
> add or subtract anything.
> Is this possible?
>
> Known workaround: Make sure that the input frame contains a black pixel,
> by inserting one in a corner.

Try attached patch.


>
> Michael
> ___
> 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".
>
diff --git a/libavfilter/vf_normalize.c b/libavfilter/vf_normalize.c
index 43ed3c67b3..91499bd009 100644
--- a/libavfilter/vf_normalize.c
+++ b/libavfilter/vf_normalize.c
@@ -101,7 +101,9 @@ typedef struct NormalizeContext {
 uint8_t whitept[4];
 int smoothing;
 float independence;
+float independence2;
 float strength;
+float strength2;
 
 uint8_t co[4];  // Offsets to R,G,B,A bytes respectively in each pixel
 int depth;
@@ -132,6 +134,8 @@ static const AVOption normalize_options[] = {
 { "smoothing",  "amount of temporal smoothing of the input range, to reduce flicker", OFFSET(smoothing), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX/8, FLAGS },
 { "independence", "proportion of independent to linked channel normalization", OFFSET(independence), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, 0.0, 1.0, FLAGSR },
 { "strength", "strength of filter, from no effect to full normalization", OFFSET(strength), AV_OPT_TYPE_FLOAT, {.dbl=1.0}, 0.0, 1.0, FLAGSR },
+{ "independence2", "proportion of independent to linked channel normalization, for brightest input", OFFSET(independence2), AV_OPT_TYPE_FLOAT, {.dbl=-1.0}, -1.0, 1.0, FLAGSR },
+{ "strength2", "strength of filter, from no effect to full normalization, for brightest input", OFFSET(strength2), AV_OPT_TYPE_FLOAT, {.dbl=-1.0}, -1.0, 1.0, FLAGSR },
 { NULL }
 };
 
@@ -335,22 +339,30 @@ static void normalize(NormalizeContext *s, AVFrame *in, AVFrame *out)
 // Now, process each channel to determine the input and output range and
 // build the lookup tables.
 for (c = 0; c < 3; c++) {
+float strength[2], independence[2];
 int in_val;
+
+strength[0] = s->strength;
+strength[1] = s->strength2 >= 0.f ? s->strength2 : s->strength;
+
+independence[0] = s->independence;
+independence[1] = s->independence2 >= 0.f ? s->independence2 : s->independence;
+
 // Adjust the input range for this channel [min.smoothed,max.smoothed]
 // by mixing in the correct proportion of the linked normalization
 // input range [rgb_min_smoothed,rgb_max_smoothed].
-min[c].smoothed = (min[c].smoothed  * s->independence)
-+ (rgb_min_smoothed * (1.0f - s->independence));
-max[c].smoothed = (max[c].smoothed  * s->independence)
-+ (rgb_max_smoothed * (1.0f - s->independence));
+min[c].smoothed = (min[c].smoothed  * independence[0])
++ (rgb_min_smoothed * (1.0f - independence[0]));
+max[c].smoothed = (max[c].smoothed  * independence[1])
++ (rgb_max_smoothed * (1.0f - independence[1]));
 
 // Calculate the output range [min.out,max.out] as a ratio of the full-
 // strength output range [blackpt,whitept] and the original input range
 // [min.in,max.in], based on the user-specified filter strength.
-min[c].out = (s->sblackpt[c] *s->strength)
-   + (min[c].in * (1.0f - s->strength));
-max[c].out = (s->swhitept[c] *s->strength)
-   + (max[c].in * (1.0f - s->strength));
+min[c].out = (s->sblackpt[c] *strength[0])
+   + (min[c].in * (1.0f - strength[0]));
+max[c].out = (s->swhitept[c] *strength[1])
+   + (max[c].in * (1.0f - strength[1]));
 
 // Now, build a lookup table which linearly maps the adjusted input range
 // [min.smoothed,max.smoothed] to the output range [min.out,max.out].
___
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] Replace part of the audio

2023-01-23 Thread Paul B Mahol
On 1/22/23, Reino Wijnsma  wrote:
> Hello Michael,
>
> On 2023-01-22T18:50:20+0100, Michael Koch 
> wrote:
>> This command line works with asendcmd and astreamselect:
>>
>> ffmpeg -i audio1.wav -i audio2.wav -lavfi asendcmd="4 astreamselect map
>> 1",asendcmd="6 astreamselect map 0",astreamselect=map=0 -y out.wav
>>
>>
>> However with amix filter I have no idea what's the syntax for the string
>> inside the string. It doesn't work.
>>
>> ffmpeg -i audio1.wav -i audio2.wav -lavfi asendcmd="4 amix weights '0
>> 1'",amix=weights='1 0' -y out.wav
>
> You've got your quotes all wrong. Always surround the complete filter-chain
> with double quotes and use single quotes for the individual filters.
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi "asendcmd='4 astreamselect map
> 1',asendcmd='6 astreamselect map 0',astreamselect=map=0" -y out.wav
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi "asendcmd='4 amix weights '\\\'0
> 1\\\',amix=weights='1 0'" -y out.wav
>
> See: http://ffmpeg.org/ffmpeg-all.html#Quoting-and-escaping and
> http://ffmpeg.org/ffmpeg-all.html#Notes-on-filtergraph-escaping.
>
> On 2023-01-22T19:21:53+0100, Paul B Mahol  wrote:
>> there is way to escape stuff
>
> Can't you for once make a useful post?!

I love you!
___
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] Replace part of the audio

2023-01-22 Thread Paul B Mahol
On 1/22/23, Michael Koch  wrote:
> Am 22.01.2023 um 16:56 schrieb Michael Koch:
>> Am 22.01.2023 um 16:25 schrieb Paul B Mahol:
>>> On 1/22/23, Michael Koch  wrote:
>>>> Am 21.01.2023 um 17:05 schrieb Paul B Mahol:
>>>>> On 1/19/23, Michael Koch  wrote:
>>>>>> Am 19.01.2023 um 15:49 schrieb Alexander Bieliaev via ffmpeg-user:
>>>>>>> How can I replace a part of the audio from and to a specific time
>>>>>>> with
>>>>>>> some
>>>>>>> other audio/sound (I want to replace it with beep in this case)?
>>>>>>>
>>>>>> Here is an example:
>>>>>>
>>>>>> ffmpeg -lavfi sine=500:d=10 -y audio1.wav
>>>>>> ffmpeg -lavfi sine=2000:d=10 -y audio2.wav
>>>>>>
>>>>>> ffmpeg -i audio1.wav -i audio2.wav -lavfi
>>>>>> [0]volume='1-between(t,4,6)':eval=frame[a];[1]volume='between(t,4,6)':eval=frame[b];[a][b]amix
>>>>>>
>>>>>>
>>>>>>
>>>>>> -y out.wav
>>>>> That is never going to give smooth transitions.
>>>>>
>>>>> Also overly complicated as can be simplified with commands to to amix
>>>>> filter.
>>>> If my example is too complicated, then please show a simpler example.
>>>>
>>> asendcmd=10.0 amix weights 'X Y',
>>>
>>> X/Y being wanted volume of first/second input to amix filter.
>>
>> That doesn't work because the argument of asendcmd must be
>> encapsulated in quotes (because it contains spaces), and X Y must also
>> be encapsulated in quotes. Please show the whole command line.
>>
>
> This command line works with asendcmd and astreamselect:
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi asendcmd="4 astreamselect map
> 1",asendcmd="6 astreamselect map 0",astreamselect=map=0 -y out.wav
>
>
> However with amix filter I have no idea what's the syntax for the string
> inside the string. It doesn't work.
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi asendcmd="4 amix weights '0
> 1'",amix=weights='1 0' -y out.wav

there is way to escape stuff
___
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] Replace part of the audio

2023-01-22 Thread Paul B Mahol
On 1/22/23, Michael Koch  wrote:
> Am 21.01.2023 um 17:05 schrieb Paul B Mahol:
>> On 1/19/23, Michael Koch  wrote:
>>> Am 19.01.2023 um 15:49 schrieb Alexander Bieliaev via ffmpeg-user:
>>>> How can I replace a part of the audio from and to a specific time with
>>>> some
>>>> other audio/sound (I want to replace it with beep in this case)?
>>>>
>>> Here is an example:
>>>
>>> ffmpeg -lavfi sine=500:d=10 -y audio1.wav
>>> ffmpeg -lavfi sine=2000:d=10 -y audio2.wav
>>>
>>> ffmpeg -i audio1.wav -i audio2.wav -lavfi
>>> [0]volume='1-between(t,4,6)':eval=frame[a];[1]volume='between(t,4,6)':eval=frame[b];[a][b]amix
>>>
>>> -y out.wav
>> That is never going to give smooth transitions.
>>
>> Also overly complicated as can be simplified with commands to to amix
>> filter.
>
> If my example is too complicated, then please show a simpler example.
>

asendcmd=10.0 amix weights 'X Y',

X/Y being wanted volume of first/second input to amix filter.
___
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] Replace part of the audio

2023-01-21 Thread Paul B Mahol
On 1/19/23, Michael Koch  wrote:
> Am 19.01.2023 um 15:49 schrieb Alexander Bieliaev via ffmpeg-user:
>> How can I replace a part of the audio from and to a specific time with
>> some
>> other audio/sound (I want to replace it with beep in this case)?
>>
>
> Here is an example:
>
> ffmpeg -lavfi sine=500:d=10 -y audio1.wav
> ffmpeg -lavfi sine=2000:d=10 -y audio2.wav
>
> ffmpeg -i audio1.wav -i audio2.wav -lavfi
> [0]volume='1-between(t,4,6)':eval=frame[a];[1]volume='between(t,4,6)':eval=frame[b];[a][b]amix
>
> -y out.wav

That is never going to give smooth transitions.

Also overly complicated as can be simplified with commands to to amix filter.

>
> Michael
>
> ___
> 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 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] aresample filter not resampling?

2023-01-05 Thread Paul B Mahol
On Thu, Jan 5, 2023 at 7:04 PM Jayson Larose  wrote:

> How is the `aresample` filter supposed to work? I'm recording video
> from a v4l2 capture device, audio from jack, like such:
>
> ffmpeg -vsync cfr -timestamps mono2abs -copyts -framerate 59.73 \
>   -f v4l2 -thread_queue_size 2048 -i /dev/video10 -f jack \
>   -thread_queue_size 2048 -i capture_out -map 0:v:0 -map 1:a:0 \
>   -c:v hevc_nvenc -filter:v setpts=PTS-STARTPTS -c:a:0 aac \
>   -b:a:0 128k -filter:a:0 aresample=async=1000 -f matroska \
>   -f matroska output.mkv
>
> The end recording has the following stream durations, as reported by
> ffprobe:
>
> Input #0, matroska,webm, from 'recording__2023-01-04 02_13_52.mkv':
>Metadata:
>  ENCODER : Lavf59.25.100
>Duration: 02:34:51.14, start: 0.00, bitrate: 1574 kb/s
>Stream #0:0: Video: hevc (Main), yuv420p(tv, progressive), 1120x1008
> [SAR 1:1 DAR 10:9], 59.73 fps, 59.73 tbr, 1k tbn
>  Metadata:
>ENCODER : Lavc59.33.100 hevc_nvenc
>DURATION: 02:34:51.13800
>Stream #0:1: Audio: aac (LC), 96000 Hz, stereo, fltp
>  Metadata:
>ENCODER : Lavc59.33.100 aac
>DURATION: 02:34:50.87000
>
> This is .268 seconds of difference, but more importantly, if I
> actually analyze the content of the recorded file, the beginning of
> the video starts out with audio and video reasonably well
> synchronized (audio is ahead by ~4 frames), but at the end of the
> video, there's nearly a half of a second of desynch between the two
> (audio is behind by ~23 frames).
>
> I was led to believe that using `aresample=async=96` would
> stretch the audio stream up to 96 samples per second in order to
> keep audio and video in sync, but it doesn't seem to be doing
> anything at all. The documentation is super vague about how it goes
> about doing this, just talking about "timestamps". So I checked to
> make sure that the PTS timestamps coming from my audio and video
> streams were close to in sync:
>
> % ffprobe -timestamps mono2abs -i /dev/video10 -of compact \
>   -show_packets 2>/dev/null | head -n 1 & \
>   ffprobe -timestamps mono2abs -i capture_out -f jack -of compact \
>   -show_packets 2>/dev/null | head -n 1
>
>
> packet|codec_type=video|stream_index=0|pts=1672940948329853|pts_time=1672940948.329853|dts=1672940948329853|dts_time=1672940948.329853|duration=16742|duration_time=0.016742|size=1693440|pos=N/A|flags=K_
>
> packet|codec_type=audio|stream_index=0|pts=1672940948367972|pts_time=1672940948.367972|dts=1672940948367972|dts_time=1672940948.367972|duration=10666|duration_time=0.010666|size=8192|pos=N/A|flags=K_
>
> and they look to be pretty much in sync. If I don't supply
> `-timestamps mono2abs` the video packets come in monotonic time
> and the audio packets come in wallclock time.
>
> This is driving me up the wall, because it's a very manual and
> tedious procedure to fix the audio for every file I record.
>
>
async option make sense only when there are pts gaps between audio.

pts gaps means that frame's pts + frame'duration is < than next frame's pts.


--Jays
>
> ___
> 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 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] Error initializing filter 'channelsplit' with args 'channel_layout=stereo:channels=FL|FR'

2023-01-04 Thread Paul B Mahol
On Wed, Jan 4, 2023 at 6:16 PM adam smith  wrote:

>
>
> On 4 Jan 2023, at 16:30, Paul B Mahol  wrote:
>
> Correct syntax is FL+FR and not using '|’
>
>
> Thanks very much Paul, I will give it a whirl. Do you know if I was just
> being lucky it worked at all previously or is this a change?
>

If itt worked previously it was by pure luck.
___
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] Error initializing filter 'channelsplit' with args 'channel_layout=stereo:channels=FL|FR'

2023-01-04 Thread Paul B Mahol
On Wed, Jan 4, 2023 at 5:17 PM adam smith via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Hi Everyone,
>
> I have been running this command no problem using FFmpeg 5.0;  but after
> updating to 5.1.2 it is complaining about the arguments used in the channel
> split.
> Error initializing filter 'channelsplit' with args
> 'channel_layout=stereo:channels=FL|FR’
>

Correct syntax is FL+FR and not using '|'



>
> Command line
> ffmpeg -i
> /data/disposable/419255_20230104-7-gnim60/5d5c058e-e2ca-4a7d-8622-0a529322bfb3_1672828076604.mp4
> -filter_complex
> "[0:0]minterpolate=mi_mode=dup:fps=29.97[0frame_conversion];[0:1]channelsplit=channel_layout=stereo:channels=FL|FR[001_channelsplit][002_channelsplit];[001_channelsplit]asplit=8[001_asplit][003_asplit][005_asplit][007_asplit][009_asplit][011_asplit][013_asplit][015_asplit];[002_channelsplit]asplit=8[002_asplit][004_asplit][006_asplit][008_asplit][010_asplit][012_asplit][014_asplit][016_asplit]"
> -map "[0frame_conversion]" -map "[001_asplit]" -map "[002_asplit]" -map
> "[003_asplit]" -map "[004_asplit]" -map "[005_asplit]" -map "[006_asplit]"
> -map "[007_asplit]" -map "[008_asplit]" -map "[009_asplit]" -map
> "[010_asplit]" -map "[011_asplit]" -map "[012_asplit]" -map "[013_asplit]"
> -map "[014_asplit]" -map "[015_asplit]" -map "[016_asplit]" -c:v dnxhd
> -pix_fmt yuv422p -s 1920x1080 -b:v 145M -flags +ildct+ilme -r 3/1001
> -c:a pcm_s24le -ar 48000 -f tee
> "/data/disposable/419255_20230104-7-gnim60/5d5c058e-e2ca-4a7d-8622-0a529322bfb3_1672828076604.mxf”
>
> Output
> ffmpeg version 5.1.1 Copyright (c) 2000-2022 the FFmpeg developers
>   built with gcc 12.2.1 (Alpine 12.2.1_git20220924-r4) 20220924
>   configuration: --prefix=/opt/ffmpeg --disable-debug --disable-doc
> --disable-ffplay --enable-shared --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig
> --enable-libfreetype --enable-libfontconfig --enable-libfribidi
> --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora
> --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb
> --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree
> --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small
> --enable-version3 --enable-libbluray --disable-libzmq --enable-libopenjpeg
> --enable-libkvazaar --enable-libaom --enable-libsrt --enable-libaribb24
> --extra-libs=-ldl --extra-libs=-lpthread
> --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
>   libavutil  57. 28.100 / 57. 28.100
>   libavcodec 59. 37.100 / 59. 37.100
>   libavformat59. 27.100 / 59. 27.100
>   libavdevice59.  7.100 / 59.  7.100
>   libavfilter 8. 44.100 /  8. 44.100
>   libswscale  6.  7.100 /  6.  7.100
>   libswresample   4.  7.100 /  4.  7.100
>   libpostproc56.  6.100 / 56.  6.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
> '/data/disposable/419255_20230104-7-gnim60/5d5c058e-e2ca-4a7d-8622-0a529322bfb3_1672828076604.mp4':
>   Metadata:
> major_brand : isom
> minor_version   : 512
> compatible_brands: isomiso2avc1mp41
>   Duration: 00:00:58.21, start: 0.00, bitrate: 15153 kb/s
>   Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661),
> yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 14957 kb/s, 25 fps, 25
> tbr, 12800 tbn (default)
> Metadata:
>   handler_name: VideoHandler
>   vendor_id   : [0][0][0][0]
>   Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
> fltp, 192 kb/s (default)
> Metadata:
>   handler_name: SoundHandler
>   vendor_id   : [0][0][0][0]
>   Stream #0:2[0x3](und): Subtitle: mov_text (tx3g / 0x67337874),
> 1920x1080, 0 kb/s (default)
> Metadata:
>   handler_name: SubtitleHandler
> [AVFilterGraph @ 0x7f673f65e180] Error initializing filter 'channelsplit'
> with args 'channel_layout=stereo:channels=FL|FR'
> Error initializing complex filters.
> Invalid argument
>
>
> I realise that in this example the channel layout is not really required
> as it would default to ‘all’ which for this would be fine, but sometimes
> the source will be 5.1 and I only need FL & FR so I try and keep the
> command consistent.
>
> Do you know if the syntax has changed between versions?
>
> Thanks for your help as always
> Adam
>
> ___
> 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 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] Decode 360 reality audio (mpeg-h 3d) to ADM BWF format

2023-01-04 Thread Paul B Mahol
On Wed, Jan 4, 2023 at 3:18 PM Joy Jin  wrote:

> Hello,
>
> Cavern  is a tool that I can use to
> decode eac3 to ADM BWF. Is there a tool that I can use to decode Sony’s 360
> reality audio format (mpeg-h 3d) to ADM BWF? (Reason being, gain is set too
> high so DRC / peak limiting is way too aggressive, and I have no option to
> change that.) I’ve asked everywhere and it seems like the answer is no.
>

What is 'reality' in this context?


> Below is a mediainfo on a sample file:
>
> General
>
> Complete name: /Users/jin/Desktop/Music/Stem
> Separation/Tidal/YOASOBI - 360/ THE BOOK (360 Reality Audio) [203033692]
> [2021]/06 - YOASOBI - 群青 (360 Reality Audio).mp4
>
> Format   : MPEG-4
>
> Format profile   : Base Media / Version 2
>
> Codec ID : mp42 (mp42/isom)
>
> File size: 19.8 MiB
>
> Duration : 4 min 8 s
>
> Overall bit rate : 670 kb/s
>
> Encoded date : UTC 2021-09-18 08:59:38
>
> Tagged date  : UTC 2021-09-18 08:59:38
>
>
> Audio
>
> ID   : 1
>
> Format   : MPEG-H 3D Audio
>
> Format profile   : LC@L3
>
> Codec ID : mha1
>
> Duration : 4 min 8 s
>
> Source duration  : 4 min 8 s
>
> Bit rate : 666 kb/s
>
> Channel(s)   : 12 channels (7.1.4)
>
> Channel layout   : L R C LFE Lb Rb Lss Rss Tfl Tfr
> Tbl Tbr
>
> Sampling rate: 48.0 kHz
>
> Frame rate   : 46.875 FPS (1024 SPF)
>
> Stream size  : 19.7 MiB (99%)
>
> Source stream size   : 19.7 MiB (100%)
>
> Encoded date : UTC 2021-09-18 08:59:38
>
> Tagged date  : UTC 2021-09-18 08:59:38
>
> Signal group #1  : 10 objects
>
>  Type: Object
>
>  Number of objects   : 10 objects
>
> Codec configuration box  : mhaC
>
> Thank you,
> Joy
> ___
> 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 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] Can v360 use cuda or GPU

2023-01-01 Thread Paul B Mahol
On Sun, Jan 1, 2023 at 10:35 PM Fritz Farnel  wrote:

> I found conflicting info on the web and couldn't understand the source.
>
> Does v360 utilize GPU (cuda) ?
>

v360 is cpu only filter.


>
>
> My test with just adding '-hwaccel cuda' to a  -filter_complex (hstack and
> v360) chain does not throw error and shows ffmpeg on GPU, but the speed is
> same as using CPU.
> ___
> 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 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] Resizing ffplay window with fixed aspect ratio

2022-12-22 Thread Paul B Mahol
On 12/22/22, Carl Zwanzig  wrote:
>
> While ffmpeg is quite useful, there are better free players than ffplay*
> (often built on the ffmpeg libs). And for some purposes, there are better
> open-source info tools than ffprobe.

That is doubtful, citation needed.

You are still trying to be truth teller, but fail badly.

>
> *from the doc- "It is mostly used as a testbed for the various FFmpeg
> APIs."
>
> I hadn't noticed mplayer leaking memory but then I haven't used it for a few
>
> years.
>
> Find the best tool for the job, and all that.
>
> z!
> ___
> 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 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] Changing scan type (progressive<->interlaced) without reencoding.

2022-12-07 Thread Paul B Mahol
On Tue, Dec 6, 2022 at 10:56 AM Nicolas Gaullier 
wrote:

> >As the title says, is this at all possible? My concern is mostly with
> mpeg2 and h264 that have content of one type but encoded/marked as another.
> In a general manner, amongst other things, interlaced encoding involves
> interlaced DCT, so this is not possible because it is not a simple "mark".
> In some very limited scenarios, it is possible to tag interlaced content
> as progressive-segmented frame (PsF). Take mpeg2/h264: I have never seen
> any implementation (neither encoder or decoder) of the flags that actually
> allow to mark progressive content, so PsF is pure theory here. So today,
> for example, only "progressive sequence" mpeg2 is considered progressive :
> you have to transcode.
>
> >Most notably content that has progressive video but stored interlaced.
> "encoded" rather than "stored", but yes, it is indeed very commonplace.
> Nevertheless, be very very carefull, it is also very very commonplace to
> have interlaced branding/finishing on progressive content, so it can end up
> with  1 hours of pure progressive content with 3x period of 10s where an
> interlaced title appear or disappear in a corner... This is why
> deinterlacing filters are both so useful and so tricky.
>
>
IIRC there was/are some bitstream filters that can change stored flags  at
bitstream level.


> Nicolas
> ___
> 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 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] datascope 16-bit

2022-11-19 Thread Paul B Mahol
On 11/19/22, Paul B Mahol  wrote:
> On 11/19/22, Michael Koch  wrote:
>> Am 03.11.2022 um 10:10 schrieb Paul B Mahol:
>>>
>>> Some things in sea of myriad others:
>>> [...]
>>> Why you claim that datascope does not support >8 bit formats where in
>>> fact it does support it?
>>
>> In some cases datascope works with 16-bit data, but not in all cases.
>> Here is an example where it doesn't work:
>>
>> ffmpeg -f lavfi -i color=black:s=32x32,format=gray10le -lavfi
>> geq=lum='X+32*Y',format=gray10le -frames 1 -y test.png
>>
>> ffmpeg -i test.png -vf
>> format=rgb48,showinfo,datascope=s=1280x1152:mode=color2:format=hex -y
>> out.png
>
> Works here just fine, nice trolling.
>

And if you want 16bit numbers, this is libavfilter pixel format
negotiation bug which does not pick proper high bit depth format
nothing to do with datascope at all.
___
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] datascope 16-bit

2022-11-19 Thread Paul B Mahol
On 11/19/22, Michael Koch  wrote:
> Am 03.11.2022 um 10:10 schrieb Paul B Mahol:
>>
>> Some things in sea of myriad others:
>> [...]
>> Why you claim that datascope does not support >8 bit formats where in
>> fact it does support it?
>
> In some cases datascope works with 16-bit data, but not in all cases.
> Here is an example where it doesn't work:
>
> ffmpeg -f lavfi -i color=black:s=32x32,format=gray10le -lavfi
> geq=lum='X+32*Y',format=gray10le -frames 1 -y test.png
>
> ffmpeg -i test.png -vf
> format=rgb48,showinfo,datascope=s=1280x1152:mode=color2:format=hex -y
> out.png

Works here just fine, nice trolling.
___
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] Loudnorm filter in ffmpeg increases and decreases the volume of parts of the audio.

2022-11-15 Thread Paul B Mahol
On 11/15/22, CMG DiGiTaL  wrote:
> Hi Paul,
> But it's not me who defines which mode will be used, but Loudnorm... how
> can I do that then?
>
> Using dynamic mode and not linear is far from working correctly.
>>
>> One use dynamic mode when not specifying measured values to filter.
>>
>
>  Hi Paul,

This is explained on web.

You set filter measured_* options values from first pass processing of
input values reported by same filter at end of same file.

So you need two-pass processing.
___
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] ffserver

2022-11-10 Thread Paul B Mahol
On 11/10/22, Dave Blanchard  wrote:
>
>
> Date: Wed, 9 Nov 2022 10:16:03 -0500
> From: Clay 
> To: FFmpeg user questions , Nicolas George
> 
> Subject: Re: [FFmpeg-user] ffserver
>
> Nicolas George wrote on 11/9/22 03:18:
>
>> I hope you do not expect getting help with that kind of attitude.
>
> Let's be clear: I DID NOT COME HERE for what you call "HELP."
>
> I already learned long ago that *your* type usually has no useful assistance
> to offer. You are short on knowledge, and long on narcissism. What you're
> best qualified for is pearl-clutching, and indignantly proclaiming how
> Triggered and Offended you are. Your entire so-called "civilization" is like
> this. That's the root of the problem here, and of so many other problems we
> face.
>
>> To vent your frustration, please go elsewhere, this list is not made for
>> that. (I suggest you prefer a therapist over violence towards people
>> around you.)
>
> What exactly in my reply would suggest "violence toward people around me"?
>
> "Therapist"? Are you sure you're the one who doesn't need therapy?
>
> The only person possibly at risk of "violence" in my vicinity is this thief
> who has been robbing me for 6 years now. He has slowly graduated from
> robbing distant outbuildings to now stealing directly from my carport,
> attached to my house. I will willing to forgive him for the first small
> thefts, but it has become apparent over time that this will never end. He
> will just keep taking and taking and taking. The way things are progressing,
> it's only a matter of time before I'd end up having to kill this asshole.
>
> Where I live (in God's country, Alabama) I would be well within my rights to
> blow this SOB's head clean off, right where he stands, then call the police
> to mop up a bit and drag off the corpse. No charges would be filed, and
> there would be a newspaper story a few days later, half-bragging about the
> accomplishment and half warning other would-be thieves. I would be
> considered a local hero. Nobody would ever touch my property again.
>
> Clearly, by choosing instead to put up security cameras, to catch this SOB
> instead and put him in prison, I am choosing the non-violent route...so rest
> easy, snowflake. You can come out of your safe space, and put the teddy bear
> away. You're safe here.
>
>> I would also suggest you use a mail software that does not break
>> threads, but it will not matter much anyway.
>
> This mailer is doing exactly what I programmed it to do, and for good
> reason. Thread breakage is an unfortunate, but on the whole rather
> inconsequential side effect. You'll learn to live with it.
>
>> While I *really* understand Dave's frustration (including the added
>> pressure of dealing with major irl problems), Nicolas is right:  this is
>> not the forum for high-temp venting.
>
> If only I had a nickel for every person who was Quite Sure my approach to
> life is Completely Wrong, and they are Way Smarter and Know So Much Better
> than me. Sigh.
>
> Any rant which I feel obligated to post online does in fact tend to persuade
> and influence people, far better than a person like yourself could possibly
> understand. That's because I'm speaking the truth, and directly so--which is
> a rare and valued commodity these days, among people who actually matter.
>
> You ever heard the name "Dave Cutler"? How about R. Lee Ermey? Those are a
> couple random examples of guys who made an entire career of telling people
> exactly what they didn't want to hear, in a tone of voice they didn't
> particularly like. There are millions of other equally valuable people like
> us, in different places. We are fulfilling an important need: helping you
> surgically remove your head from your asshole.
>
> I didn't come here for help, though I'm thankful to those who have offered
> it. I already understood going into this that I had been fucked once again
> by a software project, that little would be gained from consulting the
> mailing list, and that I'd just have to figure out a solution myself, as
> usual.
>
> The fact is, ffmpeg introduced a half-ass streaming "solution" in ffserver,
> which sucked, but could be made to work well in many configurations with
> some trial and error. People figured it out, and put up working recipes to
> help others along.
>
> There very well might have been other, better software written by someone to
> fill the same niche, but maybe they saw ffserver already existed, so why go
> through the trouble?
>
> Over the years a lot of people started using ffserver, and became dependent
> on it. Many man-hours were spent among the userbase tweaking and customizing
> config files and scripts. Lots of information was read, absorbed, and
> remembered. People integrated this software into their lives, spending a lot
> of time and energy on it, designing their whole system around it in many
> cases.
>
> But then instead of fixing up and improving ffserver to actually be worth a
> damn, the ffmpeg developers just 

Re: [FFmpeg-user] volume normalization: loudnorm versus replaygain; which is better?

2022-11-09 Thread Paul B Mahol
On 8/2/22, James Ralston  wrote:
> When I record videos with my phone (a Google Pixel 6), the audio track
> of those videos tends to be too quiet, especially if I recorded in a
> quiet environment.  I want to normalize the volume of those videos
> when I play them.
>
> I see basically two ways to do this:
>
> 1.  Rewrite the audio track of the video to normalize its loudness.
>
> 2.  Calculate the ReplayGain of the audio track of the video and embed
> the ReplayGain information as metadata, so devices that play back
> the video will find the ReplayGain tags and normalize the volume
> for playback.
>
> Accomplishing #1 with ffmpeg is easy:
>
> $ ffmpeg -i too-quiet.mp4 -filter:a loudnorm -vcodec copy better.mp4

This is completely valid way to ruin audio permanently.

The only usefulness of loudnorm filter is way to normalize audio
by providing measured parameters prior filtering.
And that is accomplished only by dual pass processing.

>
> But: is this the best approach?
>
> Because in the audio world, the preferred way to handle variable
> loudness of songs (e.g., if you are ripping old CDs) is to apply
> ReplayGain tags.  This leaves the original audio intact, and just
> applies volume correction at playback.  The majority of players
> recognize and obey ReplayGain tags.
>
> To me, it feels like the ReplayGain strategy is better than rewriting
> the original audio, for at least two reasons:
>
> 1. Re-encoding the audio track is going to introduce additional loss.
>
> 2. If, say, subsequent improvements are made to the loudnorm filter,
>unless I retain a copy of the original (unmodified) video, I can’t
>go back and re-apply the new-and-improved loudnorm filter, because
>I destroyed the original audio track the first time I applied it.
>
> If I wanted to use the ReplayGain approach, the calculate part is
> easy:
>
> $ ffmpeg -i too-quiet.mp4 -c:v copy -af replaygain foo.mp4
> …
> [Parsed_replaygain_0 @ 0x55dc42d5c940] track_gain = +45.88 dB
> [Parsed_replaygain_0 @ 0x55dc42d5c940] track_peak = 0.021767
>
> But it’s not clear to me from the ffmpeg documentation how I would
> actually *add* the ReplayGain metadata to the audio track of the video
> once I have calculated it.
>
> And it’s also not clear to me whether this approach would actually
> work in the real world.  If the majority of video playback devices
> (e.g. smartphones) and software (e.g. social media sites) ignore
> ReplayGain metadata tags in the audio tracks of videos, then while
> this approach might be the best from a audio purist perspective, it
> won’t have the practical effect of making a quiet video playback at a
> normalized volume.
>
> I can’t be the only person to have encountered this situation.  Is
> there currently a “best practices” for audio track loudness
> normalization in the video world?  Will using the ReplayGain metadata
> work?  Or should I just give up and use the loudnorm filter for now,
> and save the original videos so that when ReplayGain metadata is
> better supported, I can go back and just add ReplayGain metadata to
> the original videos and discard the versions that I created with the
> loudnorm filter?

You should try not to use loudnorm filter in dynamic mode if you care
for dynamics of audio.
With two-pass loudnorm mode (the linear mode), it works like
replaygain, It will just multiply all audio samples with same value.

If you do not care for audio dynamics and just want quiet parts to
become louder and louder parts to become less louder than there are
more sophisticated filters in FFmpeg and far more efficient.

>
> Thanks in advance for any advice!
> ___
> 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 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] Loudnorm filter in ffmpeg increases and decreases the volume of parts of the audio.

2022-11-09 Thread Paul B Mahol
On 10/10/22, CMG DiGiTaL  wrote:
> I searched the internet before and couldn't find any comments about this
> situation:
>
> In some songs, the loudnorm filter quickly increases the volume of part of
> the audio and returns to normal in milliseconds.
>
> Has anyone been in this situation or know what could be happening?

Using dynamic mode and not linear is far from working correctly.

One use dynamic mode when not specifying measured values to filter.

> ___
> 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 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] Different FrameMD5 when converting between loss-less encodings

2022-11-07 Thread Paul B Mahol
On 11/7/22, Tobias Rapp  wrote:
> On 07/11/2022 10:56, Paul B Mahol wrote:
>> On 11/7/22, Tobias Rapp  wrote:
>>> Hi,
>>>
>>> recently when testing I stumbled over the situation that a specific
>>> 10-bit YUV input file was encoded separately using two different
>>> loss-less encoders V210 and FFV1. When comparing the FrameMD5 checksum
>>> of both output files most of the checksums did match, but some of them
>>> where different (approx. 3% of the frames).
>>>
>>> When trying to reproduce the scenario with the attached batch script
>>> using a video source filter the resulting files even differ in every
>>> frame. My assumption would have been that the FrameMD5 checksums of both
>>> files would be the same, as they originate from the same input file and
>>> the intermediate encoding should be loss-less.
>>>
>>> Can someone give a hint where the differences come from? Is there some
>>> command-line option for bit-exactness missing, or is there something
>>> going wrong in the decoder/encoders?
>>
>> The v210 encoder or decoder is buggy. Strange that both C and asm is
>> buggy.
>> The first pixels at start and end of each scanline are wrong.
>
> When I replace "-vcodec v210" in the shell script with "-vcodec ffvhuff"
> it matches the output of FFV1. So yes, there seems to be an issue with
> v210 encoding or decoding in FFmpeg.
>
> Looking into the bugtracker, could this be related to ticket #8195 "v210
> encoding clips to 4-1019"?

Ah, probably yes, and yuvtestsrc gives you 0-1023 ramp

>
> Regards,
> Tobias
>
> ___
> 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 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] Different FrameMD5 when converting between loss-less encodings

2022-11-07 Thread Paul B Mahol
On 11/7/22, Tobias Rapp  wrote:
> Hi,
>
> recently when testing I stumbled over the situation that a specific
> 10-bit YUV input file was encoded separately using two different
> loss-less encoders V210 and FFV1. When comparing the FrameMD5 checksum
> of both output files most of the checksums did match, but some of them
> where different (approx. 3% of the frames).
>
> When trying to reproduce the scenario with the attached batch script
> using a video source filter the resulting files even differ in every
> frame. My assumption would have been that the FrameMD5 checksums of both
> files would be the same, as they originate from the same input file and
> the intermediate encoding should be loss-less.
>
> Can someone give a hint where the differences come from? Is there some
> command-line option for bit-exactness missing, or is there something
> going wrong in the decoder/encoders?

The v210 encoder or decoder is buggy. Strange that both C and asm is buggy.
The first pixels at start and end of each scanline are wrong.

>
> Regards,
> Tobias
___
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] V360 stabilization

2022-11-03 Thread Paul B Mahol
On 11/3/22, Michael Koch  wrote:
> Am 03.11.2022 um 09:35 schrieb Paul B Mahol:
>> On 10/11/20, Michael Koch  wrote:
>>> Am 29.09.2020 um 22:54 schrieb Michael Koch:
>>>> Hello all,
>>>>
>>>> I've programmed a C# workaround for stabilization of 360° videos. The
>>>> procedure is as follows:
>>>>
>>>> 1. FFmpeg: From each frame of the equirectangular input video, extract
>>>> two small images which are 90° apart in the input video. I call them A
>>>> and B images.
>>>>
>>>> 2. C# code: Analyze the x and y image shift from subsequent A and B
>>>> images. Calculate how the equirectangular frames must be rotated (yaw,
>>>> pitch, roll) to compensate the image shifts. This part wasn't easy.
>>>> Two rotation matrices and one matrix multiplication are required.
>>>> Write the results to a *.cmd file.
>>>>
>>>> 3. FFmpeg: Read the *.cmd file and apply the rotations with the v360
>>>> filter. The output video is stabilized.
>>>>
>>>> For details and source code please have a look at chapter 2.78 in my
>>>> book:
>>>> http://www.astro-electronic.de/FFmpeg_Book.pdf
>>>>
>>>> If anyone wants to implement this in FFmpeg, please feel free to do it.
>>> I've written and tested an improved version for 360° stabilization, it's
>>> in chapter 2.79.
>> Your book is full or factual errors,
>>
>> Notice to anyone: do not use this thing for anything serious.
>
> Thank you for so much promotion for my book.
> Sure, it's likely that in more than 900 pages there are a few errors. We
> all make errors. If anyone finds an error, please let me know. You find
> my e-mail address on the first page.
>
> http://www.astro-loltronic.de/FFmpeg_Book.pdf

Some things in sea of myriad others:
Why you claim that FFmpeg does not have SER format support while in
fact it have support for it?
Why you claim that datascope does not support >8 bit formats where in
fact it does support it?
Why you claim that drawbox does not support RGB formats while in fact
it does support them?

I think this is enough, I could continue this forever.

I could bet there is at least one and sometimes even much more factual
errors on every single page of this book that mentions FFmpeg directly
or indirectly.
___
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] V360 stabilization

2022-11-03 Thread Paul B Mahol
On 10/11/20, Michael Koch  wrote:
> Am 29.09.2020 um 22:54 schrieb Michael Koch:
>> Hello all,
>>
>> I've programmed a C# workaround for stabilization of 360° videos. The
>> procedure is as follows:
>>
>> 1. FFmpeg: From each frame of the equirectangular input video, extract
>> two small images which are 90° apart in the input video. I call them A
>> and B images.
>>
>> 2. C# code: Analyze the x and y image shift from subsequent A and B
>> images. Calculate how the equirectangular frames must be rotated (yaw,
>> pitch, roll) to compensate the image shifts. This part wasn't easy.
>> Two rotation matrices and one matrix multiplication are required.
>> Write the results to a *.cmd file.
>>
>> 3. FFmpeg: Read the *.cmd file and apply the rotations with the v360
>> filter. The output video is stabilized.
>>
>> For details and source code please have a look at chapter 2.78 in my
>> book:
>> http://www.astro-electronic.de/FFmpeg_Book.pdf
>>
>> If anyone wants to implement this in FFmpeg, please feel free to do it.
>
> I've written and tested an improved version for 360° stabilization, it's
> in chapter 2.79.

Your book is full or factual errors,

Notice to anyone: do not use this thing for anything serious.
___
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] lavfi-preview

2022-10-31 Thread Paul B Mahol
On 10/31/22, Diederick C. Niehorster  wrote:
> Hi Paul,
>
> On Mon, Oct 31, 2022 at 10:35 AM Paul B Mahol  wrote:
>>
>> On 4/24/22, Bang He  wrote:
>> > hwo to run it
>> >
>>
>> There are now binaries auto build for Windows and Linux and are ready
>> for download.
>> All for 64bit.
>
> This is super! Really nice to play with. I have trouble understanding
> one thing (perhaps I'm just not seeing it). Let me describe what i do,
> in case i am misunderstanding something.
> 1. Add a movie source and a buffersink.
> 2. set filename of movie source
> 3. control enter to configure, now a pad shows up at the movie source.
> 4. connect out pad of movie source to in pad of buffer sink
> 5. control enter to configure again, now a preview window shows up.
> 6. i play my file, things work. Great!
> 7. Now i want to add an actual filter in between. How do i do that? I
> can't seem to edit anything anymore once its configured/played, almost
> all options are grayed out.
>
> I tried exporting the filtergraph, restarting lavfi-preview and then
> importing the filter graph. This however directly brings me to the
> state after step 5 above, so again can't edit anything, only play.
>
> So more generally, how to preview and then edit the filter graph?

If it played out and video is gone, just press Ctrl+Enter again
and after that Shift + Q to quit output.
To remove links between nodes use X to remove and also to remove node Shift+X.
First need to select node/link with mouse.
You can select more links/nodes at once in editor too.
Use Shit - A to auto add sinks, so you do not need to do that quite
boring task over and over again.

>
> Thanks!
> Dee
> ___
> 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 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] lavfi-preview

2022-10-31 Thread Paul B Mahol
On 4/24/22, Bang He  wrote:
> hwo to run it
>

There are now binaries auto build for Windows and Linux and are ready
for download.
All for 64bit.

> On Wed, Mar 30, 2022 at 7:53 PM Paul B Mahol  wrote:
>
>> Hello,
>>
>> I would like to inform you about the new tool, located here:
>>
>> https://github.com/richardpl/lavfi-preview
>>
>> It is GUI filtergraph editor and foremost ffmpeg's libavfilter
>> filtergraph
>> preview tool.
>>
>> It is in early stage, but already functional.
>>
>> Regards
>> ___
>> 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 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 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] Error in aeval?

2022-10-29 Thread Paul B Mahol
On 10/29/22, Michael Koch  wrote:
> This command line works as expected:
>
> ffmpeg -f lavfi -i sine,aeval="val(0)|val(0)*sin(2)*sin(2)" -ac 2 -t 5
> -y out.wav
>
>
> Why does it no longer work when I replace sin(2)*sin(2)  by pow(sin(2),2)  ?
>
> ffmpeg -f lavfi -i sine,aeval="val(0)|val(0)*pow(sin(2),2)" -ac 2 -t 5
> -y out.wav
>
> Is this a bug? The console output is below.

PEBKAC

Escape ','

>
> Michael
>
>
> C:\Users\astro\Desktop\Mosquito>ffmpeg -f lavfi -i
> sine,aeval="val(0)|val(0)*pow(sin(2),2)" -ac 2 -t 5 -y out.wav
> ffmpeg version 2022-10-24-git-d79c240196-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-libaribb24 --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-libvpl
> --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. 39.101 / 57. 39.101
>libavcodec 59. 51.100 / 59. 51.100
>libavformat59. 34.101 / 59. 34.101
>libavdevice59.  8.101 / 59.  8.101
>libavfilter 8. 49.101 /  8. 49.101
>libswscale  6.  8.112 /  6.  8.112
>libswresample   4.  9.100 /  4.  9.100
>libpostproc56.  7.100 / 56.  7.100
> [Parsed_aeval_1 @ 02d8c2939000] [Eval @ 00f7499fe440] Missing
> ')' or too many args in 'pow(sin(2)'
> [lavfi @ 02d8c29261c0] Error initializing filter 'aeval' with args
> 'val(0)|val(0)*pow(sin(2)'
> sine,aeval=val(0)|val(0)*pow(sin(2),2): Invalid argument
>
>
> ___
> 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 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] “Brick wall” high pass filter

2022-10-27 Thread Paul B Mahol
On 10/27/22, Benjamin Houtman  wrote:
> Hi all,
> I’m attempting to create a high pass filter that removes all frequencies
> below 50 Hz. I’ve tried acutsub, acrossover, and highpass, but they all
> seem to attenuate rather than remove those tones entirely. I need to do
> these in batch on multiple files so a DAW really isn’t an option. My
> apologies, but I’ve tried multiple commands so I don’t know that i could
> post them all here. Please advise.
> Best,
> Ben

To "remove" _all_ frequencies use on some bands use afftfilt if you want.

> --
> Benjamin Houtman
> Archivist
> ___
> 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 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] encode to RAW video

2022-10-26 Thread Paul B Mahol
On 10/25/22, Michael Koch  wrote:
> Am 25.10.2022 um 09:29 schrieb Naveen.B:
>>>
>>> What do you want to do with the RAW video? You know that you can't play
>>> it with most players?
>>>
>>> Yes, I know it cannot be played with most of th players, I need to see
>>> the
>>> size of the RAW video and make some compression on it for our further
>>> analysis.
>>  Could you please help me on the missing parameters to generate the
>> RAW
>> video?
>
> I did some tests and came to the conclusion that it's impossible to
> import a group of numbered raw images.
> It's possible to import a single raw image.
> It's possible to import a group of numbered images (JPG, PNG, TIF...)
> But it's not possible to import a numbered group of raw images.
> (To the experts: Please correct me if I'm wrong).
>
> Anyway it's a bad idea to save the images in raw format. You should use
> PNG images, which have a lossless compression, and 16-bit depth is possible.
> I recommend that you convert your images to PNG, and then things become
> much easier.
>
> Here is a (Windows) batch file with a few examples:
>
> rem  Make 30 PNG images (48-bit per pixel):
> ffmpeg -f lavfi -i testsrc2=s=320x200,format=rgb48 -frames 30 -f image2
> -y image-%%03d.png
>
> rem  Convert these 30 images to a raw video (this conversion is lossless):
> ffmpeg -i image-%%03d.png -s 320x200 -pixel_format rgb48 -f rawvideo
> -c:v rawvideo -y video.raw
>
> rem  The size of the raw video is exactly 320 * 200 * 2 * 3 * 30 =
> 1152 Bytes
>
> rem  Convert the first frame from the raw video to a PNG image (48-bit
> per pixel):
> ffmpeg -video_size 320x200 -pixel_format rgb48 -f rawvideo -i video.raw
> -frames 1 -y image.png
>
> rem  Convert the raw video to a (almost lossless) MP4 video:
> ffmpeg -video_size 320x200 -pixel_format rgb48 -f rawvideo -framerate 30
> -i video.raw -crf 0 -y video.mp4
>
> pause
>
>
> I have a question to the experts. The above example works fine with
> pixel format rgb48, but with pixel formats gray16 or gray10le the MP4
> output looks wrong. I don't yet understand why.
>

Not all muxers support all pixel formats as raw.

> Michael
>
> ___
> 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 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] encode to RAW video

2022-10-26 Thread Paul B Mahol
On 10/25/22, Michael Koch  wrote:
> Am 25.10.2022 um 09:29 schrieb Naveen.B:
>>>
>>> What do you want to do with the RAW video? You know that you can't play
>>> it with most players?
>>>
>>> Yes, I know it cannot be played with most of th players, I need to see
>>> the
>>> size of the RAW video and make some compression on it for our further
>>> analysis.
>>  Could you please help me on the missing parameters to generate the
>> RAW
>> video?
>
> I did some tests and came to the conclusion that it's impossible to
> import a group of numbered raw images.
> It's possible to import a single raw image.
> It's possible to import a group of numbered images (JPG, PNG, TIF...)
> But it's not possible to import a numbered group of raw images.
> (To the experts: Please correct me if I'm wrong).
>
> Anyway it's a bad idea to save the images in raw format. You should use
> PNG images, which have a lossless compression, and 16-bit depth is possible.
> I recommend that you convert your images to PNG, and then things become
> much easier.
>
> Here is a (Windows) batch file with a few examples:
>
> rem  Make 30 PNG images (48-bit per pixel):
> ffmpeg -f lavfi -i testsrc2=s=320x200,format=rgb48 -frames 30 -f image2
> -y image-%%03d.png
>
> rem  Convert these 30 images to a raw video (this conversion is lossless):
> ffmpeg -i image-%%03d.png -s 320x200 -pixel_format rgb48 -f rawvideo
> -c:v rawvideo -y video.raw
>
> rem  The size of the raw video is exactly 320 * 200 * 2 * 3 * 30 =
> 1152 Bytes
>
> rem  Convert the first frame from the raw video to a PNG image (48-bit
> per pixel):
> ffmpeg -video_size 320x200 -pixel_format rgb48 -f rawvideo -i video.raw
> -frames 1 -y image.png
>
> rem  Convert the raw video to a (almost lossless) MP4 video:
> ffmpeg -video_size 320x200 -pixel_format rgb48 -f rawvideo -framerate 30
> -i video.raw -crf 0 -y video.mp4
>
> pause
>
>
> I have a question to the experts. The above example works fine with
> pixel format rgb48, but with pixel formats gray16 or gray10le the MP4
> output looks wrong. I don't yet understand why.
>

Not all muxers support all pixel formats as raw.

> Michael
>
> ___
> 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 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] ffmpeg problem: Wrong or missing size information for certain EXRs

2022-09-22 Thread Paul B Mahol
On 9/20/22, Kevin Steele  wrote:
> Hi! I am trying to convert EXRs to a quicktime video. It has worked several
> times for me in the past. However, sometimes it doesn't work mysteriously
> on certain exrs and I am not clear why.
> Below is a google drive link to the exr file as an example; I assume people
> may need to reproduce this. The file is too big to include in an email. The
> EXR opens fine for me in various programs.
> https://drive.google.com/file/d/1p4l5XOSQYOyfV6ojdWP0CZGLFPWmIcJa/view?usp=sharing
> I have tested this on both my mac and windows and I get the issue on both
> platforms. I am using a new version of ffmpeg from 2022.
> The command I tried is below:
>
> ffmpeg -analyzeduration 9223372036854775807 -probesize 9223372036854775807
> -s 1280x720 -i Window_v001.1001.exr -codec:v libx264 -s
> 1280x720  Window_v001.mov
>
>
> Below are things I have already tried, as you can tell from my
> command above:
>
>  - setting analyzeduration and probesize to highest possible values
>
> - forcing the size
>
> - I have also tried various codecs.
>
>
> This exr was rendered from a program called 3ds Max: I'm not sure if that
> matters. However, often fmmpeg works totally fine with exrs rendered from
> 3ds. It just mysteriously fails sometimes.
>
>
> Anyone have any ideas/suggestions? Thanks so much

This was bug in parsing exr string metadata values of length greater than 255.
Fixed in master.

> ___
> 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 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] Size of 10-bit 4:2:2 video streams?

2022-09-21 Thread Paul B Mahol
On 9/21/22, Olivier Bruchez via ffmpeg-user  wrote:
> Hi Marc,
>
> Thanks for your answer.
>
>>> /So I made some further tests and discovered that my original AVI
>>> file is />/simply corrupted. It's supposed to have 88 minutes of
>>> video, but it fails />/after 38 minutes. /
>> What does "fails" mean? The player stops? Which player? The video goes
>> black
>> but playing continues? Please be specific.
>
> ffmpeg (a very recent version - or any version) will stop copying the
> stream after 00:38:50.12 (instead of 01:28:00.80):
>
> ffmpeg -i test.avi -c copy test.copy.avi
> ffmpeg version N-63101-gc92edd969a-static
> https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg
> developers
>built with gcc 8 (Debian 8.3.0-6)
>configuration: --enable-gpl --enable-version3 --enable-static
> --disable-debug --disable-ffplay --disable-indev=sndio
> --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
> --enable-gnutls --enable-gmp --enable-libgme --enable-gray
> --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf
> --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband
> --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis
> --enable-libopus --enable-libtheora --enable-libvidstab
> --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp
> --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d
> --enable-libxvid --enable-libzvbi --enable-libzimg
>libavutil  57. 36.101 / 57. 36.101
>libavcodec 59. 42.104 / 59. 42.104
>libavformat59. 30.101 / 59. 30.101
>libavdevice59.  8.101 / 59.  8.101
>libavfilter 8. 48.100 /  8. 48.100
>libswscale  6.  8.108 /  6.  8.108
>libswresample   4.  9.100 /  4.  9.100
>libpostproc56.  7.100 / 56.  7.100
> [avi @ 0x653e900] non-interleaved AVI

This 'non-interleaved AVI' can be problematic.
Does other files report similar?

> Input #0, avi, from 'test.avi':
>Duration: 01:28:00.80, start: 0.00, bitrate: 221185 kb/s
>Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576,
> 25 fps, 25 tbr, 25 tbn
> Output #0, avi, to 'test.copy.avi':
>Metadata:
>  ISFT: Lavf59.30.101
>Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576,
> q=2-31, 25 fps, 25 tbr, 25 tbn
> Stream mapping:
>Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> frame=58254 fps=128 q=-1.0 Lsize=62915254kB time=00:38:50.12
> bitrate=221191.1kbits/s speed=5.12x
> video:62914320kB audio:0kB subtitle:0kB other streams:0kB global
> headers:0kB muxing overhead: 0.001485%
>
> The exit code is zero:
>
> echo $?
> 0
>
> test.avi is still the 146-GB file I mentioned originally.
>
>> You may want to try multiple players to see what's in the file and
>> look at
>> it with ffprobe and mediainfo. Also try encoding into a different format
>> which will force ffmpeg to demux/decode the frames; that might turn up
>> something.
>
> Here are a few things I've tried:
>
> - I've checked other AVI files in our archive coming from the same
> company. They "behave" as expected, i.e. they indeed contain about 1.5
> GB per minute of video stream (SD video) and can be copied or transcoded
> from beginning to end. No problem there. I've only found one single
> problematic file.
>
> - Play the problematic file with VLC. It stops the playback after 38
> minutes as well and doesn't even display the full duration of the file
> (01:28:00).
>
> - Examine it with mediainfo (full log here
> https://drive.google.com/drive/folders/1h2GxriHtvx86jxcpN41GKmJBURGO3y6P?usp=sharing).
> mediainfo says the duration is 01:28:00.800, but the "source duration"
> is 00:00:38.840 (not 38 minutes, but 38 seconds, which is weird!).
>
> - Transcode the AVI to MKV/H.264 (full command line available, but
> pretty standard). The resulting MKV file has a duration of 38 minutes
> only and can be played without any problem. Actually, I think I can do
> pretty much anything with the problematic AVI file using ffmpeg. It will
> just see it as a normal 38-minute file.
>
> - Examine the file with ffprobe (ffprobe -hide_banner -select_streams
> v:0 -show_frames). The full output log is available at the same location
> as the mediainfo output. I get information for 58254 frames, so about 38
> minutes of video.

It could be that index for frames in AVI is not listing all entries.
Hard to guess.
You could inspect file in some AVI file format analyzer.
If there is such thing available.

There could be still bug in avi demuxer but without file its very
limited to find out such bug.

>
> Thanks,
>
> Olivier
>
> ___
> 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-16 Thread Paul B Mahol
On 9/16/22, Dan  wrote:
>> showinfo filter shows video frame color metadata to output of console,
>> nothing less - nothing more. showinfo cant produce incorrect video, if
>> you ever bothered to read documentation you would know.
>
> By the way, just to clarify, I wasn't talking about the console output, but
> the window it opened up alongside (on the right), which showed the green
> was darker.
>
>> Nobody is wrong. Everybody is correct. Your file is encoded so badly
>> that it should be immediately removed from existence.
>
> In the end, I used "-colorspace fcc" which seems to have fixed the issue.
> A shame we needed to research that, since it looks like fcc should be
> the default, at least for a large subset of Windows systems.
>

It is evident that your knowledge is exactly 0.
FCC colorspace is not correct way to represent encoded material.

Use -color_range flags.

> Dan
> ___
> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-15 Thread Paul B Mahol
On 9/15/22, Michael Koch  wrote:
> Am 15.09.2022 um 13:43 schrieb Dan:
>> On Thu, 15 Sep 2022 12:07:08 +0100, Michael Koch
>>  wrote:
>>
>>> Am 15.09.2022 um 11:53 schrieb Dan:
> This seems to work with VLC player:
>
> ffmpeg -f lavfi -i color=0x19be0f:s=400x576 -colorspace bt709 -crf 0
> -vcodec libx264 -t 5 -y out1.mp4
> ffmpeg -f lavfi -i color=0x19be0f:s=400x578 -colorspace bt709 -crf 0
> -vcodec libx264 -t 5 -y out2.mp4

 Unfortunately, doesn't work for me in MPC or Chrome. Can you try a
 height of 720 instead of 578 to see if that fails for you?
>>>
>>> Please try this, for me it works with VLC player, the color is exactly
>>> the same:
>>>
>>> ffmpeg -f lavfi -i color=0x19be0f:s=400x576 -colorspace bt709
>>> -color_primaries bt709 -color_trc bt709 -crf 0 -vcodec libx264 -t 5 -y
>>> out1.mp4
>>> ffmpeg -f lavfi -i color=0x19be0f:s=400x720 -colorspace bt709
>>> -color_primaries bt709 -color_trc bt709 -crf 0 -vcodec libx264 -t 5 -y
>>> out2.mp4
>>
>> Sure.
>>
>> The colour is both the same now (for both Chrome and MPC), except it's
>> the darker, wrong colour (green=164 instead of 190).
>
> Try some other values instead of "bt709".

MIssing -color_range when encoding?

yuvj is full range.

>
>
> ___
> 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 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] Size of 10-bit 4:2:2 video streams?

2022-09-15 Thread Paul B Mahol
On 9/15/22, Bruchez Olivier via ffmpeg-user  wrote:
> Hi all,
>
> I have a 10-bit 4:2:2 (yuv422p10le) AVI file containing only a video
> stream:
>
> Input #0, avi, from 'test.avi':
>   Duration: 01:28:00.80, start: 0.00, bitrate: 221185 kb/s
>   Stream #0:0: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x576, 25
> fps, 25 tbr, 25 tbn, 25 tbc
>
> The file has a size of 146 GB = 146004770816 bytes.
>
> Am I correct to infer that those 10-bit YUV values are grouped into 30-bit
> packets and encoded into 32-bit/4-byte packets?
>
> With 20 bits per pixel (Y + either U or V), that would give a theoretical
> file size of:
>
> 88 * 60 * 25 * 720 * 576 * (10 + 10) / 30 * 32 / 8 = 14598144 bytes
>
> Which seems to more or less match the original file size.
>
> Now here's my problem. When I extract the raw video stream:
>
> ffmpeg -i test.avi -c:v rawvideo -pix_fmt yuv422p10le -f rawvideo test.raw
>
> I get a RAW video file with a size of 96 GB = 96636395520 bytes. I’ve lost
> one third of the video stream.
>
> Another strange thing: if I copy the video stream to another AVI file:
>
> ffmpeg -i test.avi -c copy test.copy.avi
>
> The resulting file has a size of 64 GB = 64425220302 bytes. This time I’ve
> lost 56% of the video stream.
>
> What's happening here? It seems like I’m missing something obvious.
>

Can not guess without access to the file in question.

> Thanks for any help,
> Olivier
> ___
> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-15 Thread Paul B Mahol
On 9/15/22, Michael Koch  wrote:
> Am 15.09.2022 um 11:26 schrieb Dan:
>>> You are right that datascope shows no difference. But the issue is also
>>> reproducible with VLC player.
>>
>> As well as VLC Player and FFplay, I've tried MediaPlayerClassic,
>> Google Chrome,
>> Microsoft Edge and Vegas Pro, and the problem occurs with each of
>> those. Could
>> there be a "takes two to tango" thing going on, where both the players
>> and ffmpeg
>> are at fault due to miscommunication? It's somewhat hard to conceive
>> they'd all
>> interpret the file incorrectly otherwise. Only one player I tried -
>> Irfanview - interpreted
>> it correctly.
>>
>> I can't get to test it with Firefox or Waterfox unfortunately. They
>> think the file
>> is corrupt (output mp4 produced using the "-f lavfi -i
>> color=0x19be0f:s=400x720" technique).
>> Maybe there's a way around that.
>>
>> Also, showinfo produced an incorrect colour too. See:
>> https://i.imgur.com/LF43udT.png
>>
>> (I use: "ffplay.exe -vf showinfo 576.mp4" ).
>>
>> In summary, I've love a workaround at least, or at least some
>> reassurance that
>> Chrome et al. will come round to fix this, or that ffmpeg will
>> communicate the file
>> better to them.
>
> This seems to work with VLC player:
>
> ffmpeg -f lavfi -i color=0x19be0f:s=400x576 -colorspace bt709 -crf 0
> -vcodec libx264 -t 5 -y out1.mp4
> ffmpeg -f lavfi -i color=0x19be0f:s=400x578 -colorspace bt709 -crf 0
> -vcodec libx264 -t 5 -y out2.mp4

mostly because of extra -colorspace flag supplied.

>
> ___
> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-15 Thread Paul B Mahol
On 9/15/22, Dan  wrote:
>> You are right that datascope shows no difference. But the issue is also
>> reproducible with VLC player.
>
> As well as VLC Player and FFplay, I've tried MediaPlayerClassic, Google
> Chrome,
> Microsoft Edge and Vegas Pro, and the problem occurs with each of those.
> Could
> there be a "takes two to tango" thing going on, where both the players and
> ffmpeg
> are at fault due to miscommunication? It's somewhat hard to conceive they'd
> all
> interpret the file incorrectly otherwise. Only one player I tried -
> Irfanview - interpreted
> it correctly.
>
> I can't get to test it with Firefox or Waterfox unfortunately. They think
> the file
> is corrupt (output mp4 produced using the "-f lavfi -i
> color=0x19be0f:s=400x720" technique).
> Maybe there's a way around that.
>
> Also, showinfo produced an incorrect colour too. See:
> https://i.imgur.com/LF43udT.png
>
> (I use: "ffplay.exe -vf showinfo 576.mp4" ).

Looks like your knowledge is very limited, incorrect and completely
full of nonsense.

showinfo filter shows video frame color metadata to output of console,
nothing less - nothing more. showinfo cant produce incorrect video, if
you ever bothered to read documentation you would know.

Next time be less so ignorant and do some research and do read
documentation and do your homework before coming here asking for
questions.

It clearly shows that everything is unknown in that showinfo filter
output on messages on console thus everybody can pick whatever they
want to display video.

>
> In summary, I've love a workaround at least, or at least some reassurance
> that
> Chrome et al. will come round to fix this, or that ffmpeg will communicate
> the file

Nobody is wrong. Everybody is correct. Your file is encoded so badly
that it should be immediately removed from existence.

> better to them.
>
> Dan
> ___
> 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".
>


Whats about users that come here these days?

They show no sign of caring for details or knowledge.

They just want shortcuts and prompt solutions.

And clearly shows no incentive to change that anytime soon.
___
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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-15 Thread Paul B Mahol
On 9/15/22, Michael Koch  wrote:
> Am 15.09.2022 um 00:30 schrieb Paul B Mahol:
>> On 9/15/22, Dan  wrote:
>>>> zscale=...,format=yuv420p
>>> O okay. I tried that before (except using two -vf commands),
>>> because
>>> I
>>> suspected you might've meant that.
>>>
>>> Just tried it again, still no luck. Let me know if I need to tweak
>>> anything:
>>>
>>> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264
>>> -vf
>>> zscale=w=-1:h=-1,format=yuv420p -t 5 -y "578.mp4"
>>>
>>> I'm using Media Player Classic to test the colours, which breaks the pic
>>> using the 578 pixel
>>> height. Chrome actually works with both the 576 and 578 pixel height, but
>>> as
>>> soon as I
>>> change the height to 984, then both Media Player Classic AND Chrome show
>>> it
>>> broken.
>>>
>>> Datascope shows the strange and seemingly unrelated 78,4C,44 values for
>>> all
>>> three sizes,
>>> but it does that even without using zscale at all.
>> Good, we move forward, that are real values encoded in bitstream.
>>
>> Anything RGB values you complain about have nothing directly related
>> about ffmpeg.
>>
>> Also make sure that all software are reinterpreting your files correctly.
>> The files need to signal correct encoded colorspace/primaries/range/etc
>> so
>> it can be correctly displayed on screen.
>
> Below is a Windows batch file for reproducing with FFplay. I did use the
> latest version from Gyan. The color difference is clearly visible.

Looks like you had hard time understanding text you quoted above.

>
> ffmpeg -f lavfi -i color=0x19be0f:s=400x576 -vf
> zscale,setrange=full,format=yuv420p -colorspace bt709 -color_primaries
> bt709 -crf 0 -vcodec libx264 -t 5 -y out1.mp4
> ffmpeg -f lavfi -i color=0x19be0f:s=400x578 -vf
> zscale,setrange=full,format=yuv420p -colorspace bt709 -color_primaries
> bt709 -crf 0 -vcodec libx264 -t 5 -y out2.mp4
> start ffplay -left 0 -top 0 out1.mp4
> start ffplay -left 400 -top 0 out2.mp4
>
> When inspecting the files with FFprobe or ExifTool, I see no differences
> except height and small differences in bitrate and filesize.

ffplay is broken/buggy and should not be used here, it will display
differently stuff
all the time, and uses SDL library by default for video output.

Using datascope filter it clearly shows pixels are exactly same.

>
> ___
> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-14 Thread Paul B Mahol
On 9/15/22, Dan  wrote:
>> zscale=...,format=yuv420p
>
> O okay. I tried that before (except using two -vf commands), because
> I
> suspected you might've meant that.
>
> Just tried it again, still no luck. Let me know if I need to tweak
> anything:
>
> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264 -vf
> zscale=w=-1:h=-1,format=yuv420p -t 5 -y "578.mp4"
>
> I'm using Media Player Classic to test the colours, which breaks the pic
> using the 578 pixel
> height. Chrome actually works with both the 576 and 578 pixel height, but as
> soon as I
> change the height to 984, then both Media Player Classic AND Chrome show it
> broken.
>
> Datascope shows the strange and seemingly unrelated 78,4C,44 values for all
> three sizes,
> but it does that even without using zscale at all.

Good, we move forward, that are real values encoded in bitstream.

Anything RGB values you complain about have nothing directly related
about ffmpeg.

Also make sure that all software are reinterpreting your files correctly.
The files need to signal correct encoded colorspace/primaries/range/etc so
it can be correctly displayed on screen.

-vf showinfo will show it for encoded files.

If it shows bunch of unknown/unknown it explains why every player
display it in different/own/special way.

ffmpeg also have options to set/signal video parameters(colorspace/range/etc)
but not all codecs or containers store such info.


>
> Dan
>
>>
>> Here both zscale/scale gives same output pixel values.
>> I use datascope filter to inspect it.
>>
>> ffplay input.file -vf datascope
>> ___
>> 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 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-14 Thread Paul B Mahol
On 9/14/22, Dan  wrote:
>>> Unless I'm somehow misusing zscale (which is a possibility), it would
>>> seem
>>> as if the
>>> problem lies elsewhere.
>>
>> If you do not use format filter after zscale it will not work correctly.
>
> Do you mean using the "filter" keyword under the zscale property/variable?
>
> I tried this, again no luck (also tried filter=point):
>
> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264 -vf
> zscale=w=-1:h=-1:filter=lanczos -t 5 -y "578.mp4"
>
> If you would kindly give the appropriate command line, or even just the
> relevant bit of the line
> to make zscale work, that might help save me from flailing around as much
> ;)

zscale=...,format=yuv420p

Here both zscale/scale gives same output pixel values.
I use datascope filter to inspect it.

ffplay input.file -vf datascope
___
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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-14 Thread Paul B Mahol
On 9/14/22, Paul B Mahol  wrote:
> On 9/14/22, Dan  wrote:
>> On Wed, 14 Sep 2022 21:26:59 +0100, Carl Zwanzig  wrote:
>>
>>> On 9/14/2022 8:01 AM, Paul B Mahol wrote:
>>>> The reason of scale behavior is known and legacy.
>>>
>>> Is it documented with the filter? I don't see anything obvious about it
>>> at
>>> https://ffmpeg.org/ffmpeg-filters.html#toc-scale-1, where can a person
>>> find
>>> about this otherwise-known behavior?
>>
>> To be fair, Paul did suggest the use of the zscale filter instead of
>> using
>> scale.
>> I actually managed to get the line to run in the end. I just needed to
>> put
>> the
>> "zscale=w=-1:h=-1" bit at the end like this:
>>
>> ffmpeg.exe -i "input.bmp" -crf 0 -vcodec libx264 -t 5 -y "output.mp4" -vf
>> zscale=w=-1:h=-1
>>
>> Unfortunately, I'm still getting the same darkening problem. The second
>> mp4
>> is darker
>> than the first.
>>
>> Even tried using Michael's direct colour technique combined with zscale:
>>
>> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x576 -crf 0 -vcodec libx264
>> -vf
>> zscale=w=-1:h=-1 -t 5 -y "576.mp4"
>> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264
>> -vf
>> zscale=w=-1:h=-1 -t 5 -y "578.mp4"
>>
>> Again, no luck. Second is darker.
>>
>> Unless I'm somehow misusing zscale (which is a possibility), it would
>> seem
>> as if the
>> problem lies elsewhere.
>
> If you do not use format filter after zscale it will not work correctly.

Also please state player you use/ how you inspect hex values.
It is important what you use to decode output of ffmpeg.

>
>>
>> Dan
>> ___
>> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-14 Thread Paul B Mahol
On 9/14/22, Dan  wrote:
> On Wed, 14 Sep 2022 21:26:59 +0100, Carl Zwanzig  wrote:
>
>> On 9/14/2022 8:01 AM, Paul B Mahol wrote:
>>> The reason of scale behavior is known and legacy.
>>
>> Is it documented with the filter? I don't see anything obvious about it
>> at
>> https://ffmpeg.org/ffmpeg-filters.html#toc-scale-1, where can a person
>> find
>> about this otherwise-known behavior?
>
> To be fair, Paul did suggest the use of the zscale filter instead of using
> scale.
> I actually managed to get the line to run in the end. I just needed to put
> the
> "zscale=w=-1:h=-1" bit at the end like this:
>
> ffmpeg.exe -i "input.bmp" -crf 0 -vcodec libx264 -t 5 -y "output.mp4" -vf
> zscale=w=-1:h=-1
>
> Unfortunately, I'm still getting the same darkening problem. The second mp4
> is darker
> than the first.
>
> Even tried using Michael's direct colour technique combined with zscale:
>
> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x576 -crf 0 -vcodec libx264 -vf
> zscale=w=-1:h=-1 -t 5 -y "576.mp4"
> ffmpeg.exe -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264 -vf
> zscale=w=-1:h=-1 -t 5 -y "578.mp4"
>
> Again, no luck. Second is darker.
>
> Unless I'm somehow misusing zscale (which is a possibility), it would seem
> as if the
> problem lies elsewhere.

If you do not use format filter after zscale it will not work correctly.

>
> Dan
> ___
> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-14 Thread Paul B Mahol
On 9/14/22, Michael Koch  wrote:
> Am 14.09.2022 um 11:21 schrieb Dan:
>> Using the latest 5.1.1 "essentials build" by www.gyan.dev.
>>
>> Hi all, I'm a beginner to ffmpeg so I'm having a hard time believing
>> that a utility so old and so widely used has such a fundamental bug,
>> but the evidence is staring me in the face and leads me to no other
>> conclusion.
>>
>> It's incredibly easy to replicate thankfully. I want to convert
>> numerous frames to make an animation, but thankfully, I've simplified
>> the problem to even using a single image to make a '1 frame video' for
>> the purposes of debugging.
>>
>> Simply perform this command line:
>>
>> ffmpeg.exe -i original.png -crf 0 -vcodec libx264 output.mp4
>>
>> ...With this "original.png" ("fC2Tj") image:
>> https://i.stack.imgur.com/5jkct.png
>>
>> And this command line:
>>
>> ffmpeg.exe -i doubleHeight.png -crf 0 -vcodec libx264 output.mp4
>>
>> ...On this "doubleHeight" ("RGIvA") image:
>> https://i.stack.imgur.com/PLdsb.png
>>
>> The double height version is darker than it should be. I've checked
>> the resulting video in both Media Player Classic and Chrome.
>
> The issue can be reproduced without input images as follows:
>
> ffmpeg -f lavfi -i color=0x19be0f:s=400x576 -crf 0 -vcodec libx264 -t 5
> -y out1.mp4
> ffmpeg -f lavfi -i color=0x19be0f:s=400x578 -crf 0 -vcodec libx264 -t 5
> -y out2.mp4
>
> The color seems to be brighter if the height is 576 or smaller, and
> darker if the height is 578 or larger.
> It's clearly visible if you play both videos side by side. I did test
> with VLC Player and FFplay. I don't see how zscale could fix this issue.
>

Zscale is not scale filter, Next time be more constructive and try it
before pointlesly commenting here in so bold and arrogant fashion.

The reason of scale behavior is known and legacy.
If you do not want it you need to specify more options to filter.

Like specify colorspace and similar.

> Michael
>
> ___
> 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 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] ffmpeg MP4/x264 output colours change when input source is different resolution (bug?)

2022-09-14 Thread Paul B Mahol
On 9/14/22, Dan  wrote:
> Using the latest 5.1.1 "essentials build" by www.gyan.dev.
>
> Hi all, I'm a beginner to ffmpeg so I'm having a hard time believing that a
> utility so old and so widely used has such a fundamental bug, but the
> evidence is staring me in the face and leads me to no other conclusion.
>
> It's incredibly easy to replicate thankfully. I want to convert numerous
> frames to make an animation, but thankfully, I've simplified the problem to
> even using a single image to make a '1 frame video' for the purposes of
> debugging.
>
> Simply perform this command line:

Scale filter may give different colors depending on frame dimensions.

Use zscale filter instead.

>
> ffmpeg.exe -i original.png -crf 0 -vcodec libx264 output.mp4
>
> ...With this "original.png" ("fC2Tj") image:
> https://i.stack.imgur.com/5jkct.png
>
> And this command line:
>
> ffmpeg.exe -i doubleHeight.png -crf 0 -vcodec libx264 output.mp4
>
> ...On this "doubleHeight" ("RGIvA") image:
> https://i.stack.imgur.com/PLdsb.png
>
> The double height version is darker than it should be. I've checked the
> resulting video in both Media Player Classic and Chrome.
>
> If you check the dark green colour on the original PNG images, using an eye
> dropper tool, they're both R=25,G=74,B=15. However, if you check the same
> colour on the output MP4s, the colour matches on the original PNG, but not
> the doubleHeight version, which is R=22,G=66,B=12.
>
> If I use -vcodec libx264rgb, instead of -vcodec libx264, that fixes the
> issue, but I need libx264 so the output video can work on Chrome and other
> media players.
>
> What gives? CLI output below (for the double height version):
>
> ---
>
> D:\Utils\ffmpeg\bin\ffmpeg.exe -i
> C:\Users\\Desktop\testcol\PLdsb.png -crf 0 -vcodec libx264
> C:\Users\\Desktop\testcol\PLdsb.mp4
> ffmpeg version 5.1.1-essentials_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-lzma --enable-zlib
> --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth
> --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
> --enable-libass --enable-libfreetype --enable-libfribidi --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-libgme
> --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
> --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm
> --enable-libopencore-amrnb --enable-libopus --enable-libspeex
> --enable-libvorbis --enable-librubberband
>libavutil  57. 28.100 / 57. 28.100
>libavcodec 59. 37.100 / 59. 37.100
>libavformat59. 27.100 / 59. 27.100
>libavdevice59.  7.100 / 59.  7.100
>libavfilter 8. 44.100 /  8. 44.100
>libswscale  6.  7.100 /  6.  7.100
>libswresample   4.  7.100 /  4.  7.100
>libpostproc56.  6.100 / 56.  6.100
> Input #0, png_pipe, from 'C:\Users\\Desktop\testcol\PLdsb.png':
>Duration: N/A, bitrate: N/A
>Stream #0:0: Video: png, rgb24(pc), 968x984, 25 fps, 25 tbr, 25 tbn
> Stream mapping:
>Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 01b24acb3400] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
> [libx264 @ 01b24acb3400] profile High 4:4:4 Predictive, level 3.2,
> 4:4:4, 8-bit
> [libx264 @ 01b24acb3400] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC
> codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options:
> cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=0
> mixed_ref=1 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0 deadzone=21,11
> fast_pskip=0 chroma_qp_offset=0 threads=12 lookahead_threads=2
> sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
> constrained_intra=0 bframes=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
> intra_refresh=0 rc=cqp mbtree=0 qp=0
> Output #0, mp4, to 'C:\Users\\Desktop\testcol\PLdsb.mp4':
>Metadata:
>  encoder : Lavf59.27.100
>Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv444p(tv, progressive),
> 968x984, q=2-31, 25 fps, 12800 tbn
>  Metadata:
>encoder : Lavc59.37.100 libx264
>  Side data:
>cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
> frame=1 fps=0.0 q=0.0 Lsize=   2kB time=00:00:00.00
> bitrate=180512.8kbits/s speed=0.0017x
> video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 88.235291%
> [libx264 @ 

Re: [FFmpeg-user] Combining xfade and drawtext

2022-09-12 Thread Paul B Mahol
On 9/12/22, Cecil Westerhof via ffmpeg-user  wrote:
> Cecil Westerhof via ffmpeg-user  writes:
>
>> I am using xfade and drawtext without problems. But now I want to use
>> both. But combining the two goes wrong.
>>
>> I use:
>> ffmpeg -ss 308 -t 4 -i 00011-00016.MTS -ss 329 -to 374 -i 00011-00016.MTS
>> -pix_fmt yuv420p -vcodec libx264 -crf 26 -acodec libmp3lame -qscale:a 9
>> -preset veryfast -filter_complex
>> 'xfade=transition=hlslice:duration=4:offset=0;acrossfade=d=4,drawtext=
>>box= 1:
>> boxborderw = 6: boxcolor   = black@0.2:
>>  fontcolor  = white@0.4: fontfile   =
>> FreeSerifBold.ttf: fontsize   = 32:text
>>= © 2022 Cecil Westerhof - ce...@decebal.nl: x  =
>> ((main_w - text_w) / 2):   y  = main_h - (text_h * 2)'
>> xfadeMusicalTestTemp/accordeonmuziek.ts
>
> I should have thought a little longer. :'-(
>
> Found something that works:
> ffmpeg -ss 308 -t 4 -i 00011-00016.MTS -ss 329 -to 374 -i 00011-00016.MTS
> -pix_fmt yuv420p -vcodec libx264 -crf 26 -acodec libmp3lame -qscale:a 9
> -preset veryfast -filter_complex '
> [0:v][1:v] xfade=transition=hlslice:
>  duration=4:
>  offset=0
>[v01];
> [0:a][1:a] acrossfade=d=4
>[a01];
> [v01]  drawtext=
>box= 1:
>boxborderw = 6:
>boxcolor   = black@0.2:
>fontcolor  = white@0.4:
>fontfile   = FreeSerifBold.ttf:
>fontsize   = 32:
>text   = © 2022 Cecil Westerhof - ce...@decebal.nl:
>x  = ((main_w - text_w) / 2):
>y  = main_h - (text_h * 2)
>[v02]
>  ' -map '[v02]' -map '[a01]' xfadeMusicalTestTemp/accordeonmuziek.ts
>
>
> It looks and sounds OK to me. But I do get:
> [h264 @ 0x56182acb1a00] reference picture missing during reorder
> [h264 @ 0x56182acb1a00] Missing reference picture, default is 2147483647
> [h264 @ 0x56182aca9140] Found reference and non-reference fields in the same
> frame, which is not implemented. Update your FFmpeg version to the newest
> one from Git. If the problem still occurs, it means that your file has a
> feature which has not been implemented.
> [h264 @ 0x56182aca9140] If you want to help, upload a sample of this file to
> https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
> list. (ffmpeg-de...@ffmpeg.org)
> [h264 @ 0x56182aca9140] decode_slice_header error
> [h264 @ 0x56182add8340] reference picture missing during reorder
> [h264 @ 0x56182add8340] Missing reference picture, default is 2147483647
> [h264 @ 0x56182acb1a00] reference picture missing during reorder
> [h264 @ 0x56182acb1a00] Missing reference picture, default is 2147483647
> [h264 @ 0x56182aca9140] mmco: unref short failure
> [h264 @ 0x56182ae6a4c0] mmco: unref short failure
> [h264 @ 0x56182b03f880] reference picture missing during reorder
> [h264 @ 0x56182b03f880] Missing reference picture, default is 2147483647
> [h264 @ 0x56182b031280] Found reference and non-reference fields in the same
> frame, which is not implemented. Update your FFmpeg version to the newest
> one from Git. If the problem still occurs, it means that your file has a
> feature which has not been implemented.
> [h264 @ 0x56182b031280] If you want to help, upload a sample of this file to
> https://streams.videolan.org/upload/ and contact the ffmpeg-devel mailing
> list. (ffmpeg-de...@ffmpeg.org)
> [h264 @ 0x56182b031280] decode_slice_header error
> [h264 @ 0x56182aca4080] reference picture missing during reorder
> [h264 @ 0x56182aca4080] Missing reference picture, default is 2147483647
> [h264 @ 0x56182b6ba1c0] reference picture missing during reorder
> [h264 @ 0x56182b6ba1c0] Missing reference picture, default is 2147483647
> [h264 @ 0x56182b031280] mmco: unref short failure
> [h264 @ 0x56182b03f880] mmco: unref short failure
>
>
> Is this something to worry about?

If this is from input files there is not much that can be done.

>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] Combining xfade and drawtext

2022-09-12 Thread Paul B Mahol
On 9/12/22, Cecil Westerhof via ffmpeg-user  wrote:
> I am using xfade and drawtext without problems. But now I want to use
> both. But combining the two goes wrong.
>
> I use:
> ffmpeg -ss 308 -t 4 -i 00011-00016.MTS -ss 329 -to 374 -i 00011-00016.MTS
> -pix_fmt yuv420p -vcodec libx264 -crf 26 -acodec libmp3lame -qscale:a 9
> -preset veryfast -filter_complex
> 'xfade=transition=hlslice:duration=4:offset=0;acrossfade=d=4,drawtext=
>  box= 1: boxborderw
> = 6: boxcolor   = black@0.2:
> fontcolor  = white@0.4: fontfile   = FreeSerifBold.ttf:
>fontsize   = 32:text   = © 2022 Cecil
> Westerhof - ce...@decebal.nl: x  = ((main_w - text_w) /
> 2):   y  = main_h - (text_h * 2)'
> xfadeMusicalTestTemp/accordeonmuziek.ts
>
> But this gives:
> ffmpeg version 4.3.4-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers
>   built with gcc 10 (Debian 10.2.1-6)
>   configuration: --prefix=/usr --extra-version=0+deb11u1
> --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
> --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
> --disable-stripping --enable-avresample --disable-filter=resample
> --enable-gnutls --enable-ladspa --enable-libaom --enable-libass
> --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
> --enable-libcodec2 --enable-libdav1d --enable-libflite
> --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame
> --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus
> --enable-libpulse --enable-librabbitmq --enable-librsvg
> --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora
> --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2
> --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx
> --enable-openal --enable-opencl --enable-opengl --enable-sdl2
> --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm
> --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264
> --enable-shared
>   libavutil  56. 51.100 / 56. 51.100
>   libavcodec 58. 91.100 / 58. 91.100
>   libavformat58. 45.100 / 58. 45.100
>   libavdevice58. 10.100 / 58. 10.100
>   libavfilter 7. 85.100 /  7. 85.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale  5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc55.  7.100 / 55.  7.100
> Input #0, mpegts, from '00011-00016.MTS':
>   Duration: 01:31:13.52, start: 1.44, bitrate: 16005 kb/s
>   Program 1
> Metadata:
>   service_name: Service01
>   service_provider: FFmpeg
> Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
> yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn,
> 50 tbc
> Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
> stereo, fltp, 256 kb/s
> Input #1, mpegts, from '00011-00016.MTS':
>   Duration: 01:31:13.52, start: 1.44, bitrate: 16005 kb/s
>   Program 1
> Metadata:
>   service_name: Service01
>   service_provider: FFmpeg
> Stream #1:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
> yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn,
> 50 tbc
> Stream #1:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
> stereo, fltp, 256 kb/s
> [Parsed_drawtext_2 @ 0x56143c223540] Using
> "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf"
> [Parsed_acrossfade_1 @ 0x56143c5f9880] Media type mismatch between the
> 'Parsed_acrossfade_1' filter output pad 0 (audio) and the
> 'Parsed_drawtext_2' filter input pad 0 (video)

This above is pretty clear, drawtext is video filter and acrossfade is
audio filter.
It is not allowed to pass audio frames from audio only filter to video
input of video only filter.

> [AVFilterGraph @ 0x56143c54a500] Cannot create the link acrossfade:0 ->
> drawtext:0
> Error initializing complex filters.
> Invalid argument
> Command exited with non-zero status 1
>
>
> What am I doing wrong?
>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] -threads 1 seems not work

2022-09-12 Thread Paul B Mahol
On 9/12/22, Cecil Westerhof via ffmpeg-user  wrote:
> Paul B Mahol  writes:
>
>> On 9/12/22, Cecil Westerhof via ffmpeg-user 
>> wrote:
>>> Paul B Mahol  writes:
>>>
>>>> On 9/12/22, Cecil Westerhof via ffmpeg-user 
>>>> wrote:
>>>>> For a certain conversion I use '-threads 1'. As I understand it ffmpeg
>>>>> should then only use one CPU. I see that the CPU usage is lower as
>>>>> without this parameter, but it goes up to 180%. So clearly it is using
>>>>> at least two CPU's.
>>>>> Or am I understanding this parameter wrongly?
>>>>>
>>>>> I am using ffmpeg version 4.3.4-0+deb11u1. (Debian always lags a
>>>>> little bit behind to be more stable.)
>>>>>
>>>>
>>>> threads can be used for input decoding, output encoding and filtering.
>>>>
>>>> You need to use threads = 1 for all 3 of them.
>>>
>>> I see:
>>> -filter_threads
>>> -filter_complex_threads
>>>
>>> But nothing for input decoding and output decoding.
>>>
>>>
>>> By the way: does this mean that ffmpeg can always use 4 CPU's?
>>> (input, output, filtering and complex filtering)
>>
>> No, ffmpeg may use sometimes only 1 or sometimes all available CPUs.
>> That depends on many factors.
>
> OK. But that  still means it can use  three CPU's if it wants  to if I
> have set all three to one?

For older versions you currently use that is not true.

>
>> -threads is both input and output option.
>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] -threads 1 seems not work

2022-09-12 Thread Paul B Mahol
On 9/12/22, Cecil Westerhof via ffmpeg-user  wrote:
> Paul B Mahol  writes:
>
>> On 9/12/22, Cecil Westerhof via ffmpeg-user 
>> wrote:
>>> For a certain conversion I use '-threads 1'. As I understand it ffmpeg
>>> should then only use one CPU. I see that the CPU usage is lower as
>>> without this parameter, but it goes up to 180%. So clearly it is using
>>> at least two CPU's.
>>> Or am I understanding this parameter wrongly?
>>>
>>> I am using ffmpeg version 4.3.4-0+deb11u1. (Debian always lags a
>>> little bit behind to be more stable.)
>>>
>>
>> threads can be used for input decoding, output encoding and filtering.
>>
>> You need to use threads = 1 for all 3 of them.
>
> I see:
> -filter_threads
> -filter_complex_threads
>
> But nothing for input decoding and output decoding.
>
>
> By the way: does this mean that ffmpeg can always use 4 CPU's?
> (input, output, filtering and complex filtering)

No, ffmpeg may use sometimes only 1 or sometimes all available CPUs.
That depends on many factors.

-threads is both input and output option.

>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] -threads 1 seems not work

2022-09-12 Thread Paul B Mahol
On 9/12/22, Cecil Westerhof via ffmpeg-user  wrote:
> For a certain conversion I use '-threads 1'. As I understand it ffmpeg
> should then only use one CPU. I see that the CPU usage is lower as
> without this parameter, but it goes up to 180%. So clearly it is using
> at least two CPU's.
> Or am I understanding this parameter wrongly?
>
> I am using ffmpeg version 4.3.4-0+deb11u1. (Debian always lags a
> little bit behind to be more stable.)
>

threads can be used for input decoding, output encoding and filtering.

You need to use threads = 1 for all 3 of them.

> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] What am I doing wrong with xfade

2022-09-10 Thread Paul B Mahol
On 9/10/22, Cecil Westerhof via ffmpeg-user  wrote:
> Cecil Westerhof via ffmpeg-user  writes:
>
>> Paul B Mahol  writes:
>>
>>> On 9/10/22, Cecil Westerhof via ffmpeg-user 
>>> wrote:
>>>> I have to concatenate about 30 videos together with xfade. Because I
>>>> did not mange to find a way to do that in one command I wrote a script
>>>> that does 1 and 2 to 1-2, 3 and 4 to 3-4, 4 and 5 to 5-6, …
>>>> Then 1-2 and 3-4 to 1-4, 5-6 and 7-8 to 5-8, …
>>>> Etcetera.
>>>>
>>>> But it seems that in every iteration the audio goes out of sync with
>>>> about one second.
>>>>
>>>> Example of one of the commands:
>>>> nice -n 10 ionice -c3 time ffmpeg -y \
>>>>   -i snellerDanDeWind.mkv\
>>>>   -i deFinale.mkv\
>>>>   -vcodec libx264\
>>>>   -crf 26\
>>>>   -acodec libmp3lame \
>>>>   -qscale:a 9\
>>>>   -preset veryfast   \
>>>>   -filter_complex
>>>>
>>>> 'xfade=transition=slidedown:duration=4:offset=126.083000;acrossfade=d=4'
>>>> \
>>>
>>> Offset should be first video duration minus xfade duration.
>>> Assuming that audio is not longer than video.
>>
>>>>   DURATION: 00:02:10.08300
>>
>> But that is the case.
>> 02:10.08300 -> 130.083
>> 130.083 - 4 = 126.083
>>
>> Audio and video off the first file are the same.
>> Strangely the video of the second file is 0.44 seconds longer as the
>> audio. But that should not be a problem?
>
> Strangely enough I see that in several of the videos the length of the
> video and audio is not the same. But they where all cut with ffmpeg
> out of a bigger one with something like:
> ffmpeg -y  \
>   -ss $1 -to $2\
>   -i ${input}  \
>   -pix_fmt yuv420p \
>   -vcodec libx264  \
>   -crf 26  \
>   -preset veryfast \
>   $3.mkv
>

Video needs to be constant frame rate pts without gaps.
Audio must have constant sample rate & channels and no pts gaps.
The only correct way to get audio duration is to count audio samples,
with astats filter.

> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] What am I doing wrong with xfade

2022-09-10 Thread Paul B Mahol
On 9/10/22, Cecil Westerhof via ffmpeg-user  wrote:
> I have to concatenate about 30 videos together with xfade. Because I
> did not mange to find a way to do that in one command I wrote a script
> that does 1 and 2 to 1-2, 3 and 4 to 3-4, 4 and 5 to 5-6, …
> Then 1-2 and 3-4 to 1-4, 5-6 and 7-8 to 5-8, …
> Etcetera.
>
> But it seems that in every iteration the audio goes out of sync with
> about one second.
>
> Example of one of the commands:
> nice -n 10 ionice -c3 time ffmpeg -y \
>   -i snellerDanDeWind.mkv\
>   -i deFinale.mkv\
>   -vcodec libx264\
>   -crf 26\
>   -acodec libmp3lame \
>   -qscale:a 9\
>   -preset veryfast   \
>   -filter_complex
> 'xfade=transition=slidedown:duration=4:offset=126.083000;acrossfade=d=4'
> \

Offset should be first video duration minus xfade duration.
Assuming that audio is not longer than video.

> snellerDanDeWind-deFinale.mkv
>
> What am I doing wrong?
>
> The first part of the log for this command:
> ffmpeg version 4.3.4-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg
> developers
>   built with gcc 10 (Debian 10.2.1-6)
>   configuration: --prefix=/usr --extra-version=0+deb11u1
> --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
> --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
> --disable-stripping --enable-avresample --disable-filter=resample
> --enable-gnutls --enable-ladspa --enable-libaom --enable-libass
> --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio
> --enable-libcodec2 --enable-libdav1d --enable-libflite
> --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame
> --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus
> --enable-libpulse --enable-librabbitmq --enable-librsvg
> --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr
> --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora
> --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx
> --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2
> --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx
> --enable-openal --enable-opencl --enable-opengl --enable-sdl2
> --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm
> --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264
> --enable-shared
>   libavutil  56. 51.100 / 56. 51.100
>   libavcodec 58. 91.100 / 58. 91.100
>   libavformat58. 45.100 / 58. 45.100
>   libavdevice58. 10.100 / 58. 10.100
>   libavfilter 7. 85.100 /  7. 85.100
>   libavresample   4.  0.  0 /  4.  0.  0
>   libswscale  5.  7.100 /  5.  7.100
>   libswresample   3.  7.100 /  3.  7.100
>   libpostproc55.  7.100 / 55.  7.100
> Input #0, matroska,webm, from 'snellerDanDeWind.mkv':
>   Metadata:
> ENCODER : Lavf58.45.100
>   Duration: 00:02:10.08, start: 0.00, bitrate: 4829 kb/s
> Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080
> [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
> Metadata:
>   ENCODER : Lavc58.91.100 libx264
>   DURATION: 00:02:10.08300
> Stream #0:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
> Metadata:
>   ENCODER : Lavc58.91.100 libvorbis
>   DURATION: 00:02:10.00300
> Input #1, matroska,webm, from 'deFinale.mkv':
>   Metadata:
> ENCODER : Lavf58.45.100
>   Duration: 00:12:10.44, start: 0.00, bitrate: 3210 kb/s
> Stream #1:0: Video: h264 (High), yuv420p(progressive), 1920x1080
> [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
> Metadata:
>   ENCODER : Lavc58.91.100 libx264
>   DURATION: 00:12:10.44300
> Stream #1:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)
> Metadata:
>   ENCODER : Lavc58.91.100 libvorbis
>   DURATION: 00:12:10.00300
> Stream mapping:
>   Stream #0:0 (h264) -> xfade:main
>   Stream #0:1 (vorbis) -> acrossfade:crossfade0
>   Stream #1:0 (h264) -> xfade:xfade
>   Stream #1:1 (vorbis) -> acrossfade:crossfade1
>   xfade -> Stream #0:0 (libx264)
>   acrossfade -> Stream #0:1 (libmp3lame)
> Press [q] to stop, [?] for help
> [libx264 @ 0x55f112f35200] using SAR=1/1
> [libx264 @ 0x55f112f35200] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX XOP FMA3 BMI1
> [libx264 @ 0x55f112f35200] profile High 4:4:4 Predictive, level 4.0,
> 4:4:4, 8-bit
> [libx264 @ 0x55f112f35200] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4
> AVC codec - Copyleft 2003-2020 - 

Re: [FFmpeg-user] [Libav-user] Need Help to understand usages of Libavformat.

2022-09-08 Thread Paul B Mahol
On 9/8/22, Rishabh Shak Dwipeey  wrote:
> Hello Team
>
> Any update on this?
>
> Regards,
> Rishabh Shak Dwipeey
>
> On Mon, Sep 5, 2022 at 4:39 PM Rishabh Shak Dwipeey <
> rishabhshakdwip...@gmail.com> wrote:
>
>> Hello Team
>>
>> I need your help to understand and get a clear view on Libavformat.
>> we are using below command to capture the screen and create movie (screen
>> capturing) file and store locally :-
>>
>> "-f gdigrab -framerate 30 -i desktop -offset_x 10 -offset_y 20
>> -video_size 20x40 -codec x264 output.wmv"
>>
>> Could you please let us know if mov.c which is present in Libavformat
>> library, would be used for above mentioned functionality?

mov by default will store headers needed for proper processing at end of muxing.
So if recording is interrupted the file may be unplayable.

There are probably streaming options for mov but I do not know about it more.

>> Or is there a method "build_open_gop_key_points()" also executing
>> while screen capturing?
>>
>> Many thanks in advance.
>>
>> Regards,
>> Rishabh Shak Dwipeey
>>
>>
>>
>>
>
___
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] Error decoding DTS-HD MA audio files

2022-08-26 Thread Paul B Mahol
On Fri, Aug 26, 2022 at 10:23 PM  wrote:

> Thanks, Paul
> You are a genius. Your command worked with the two files I had sent you. I
> am now getting playback on the dCS Rossini from the beginning and (as far
> as I can hear) gapless playback between 4 and 5.
> However, I still have an inkling that not all is well
> I have attached the log of the two conversions that I did. Chapter 4 seems
> to convert ok with some messages but (as I see it) nothing serious. However
> Chapter 5 (the one that previously converted to 48kHz) has some serious
> error messages. Playback of the flac file seems ok.
> The dts file was extracted from the BluRay using DVDAE and the 'direct
> stream demux' option.  Ffmpeg has more issues with some extracted "dts
> files than with others. Could it be that the issue is already at the stage
> of the 'direct stream demux' option?
> As I am getting exactly the same results (same files extract @48kHz) using
> MakeMKV / MMH, there could be a problem at the ripping stage of the BluRay
> and not primarily with ffmpeg? What do you think?
> Best regards
> Rudi
>
>
I do not think it is ripping stage. It is how content was originally
produced.
I also noticed some strange error at end of chapter 5. So to be 100% sure
it is still ok, check for gapless between chapter 5 and 6 (if there is 6
chapter or whatever comes next).
There is very slight chance that there is no delay in any of dts files but
I doubt that because decoder follows specification 100% AFAIK.


>
>
>
> -Original Message-
> From: ffmpeg-user  On Behalf Of Paul B
> Mahol
> Sent: Friday, 26. August 2022 21:57
> To: FFmpeg user questions 
> Subject: Re: [FFmpeg-user] Error decoding DTS-HD MA audio files
>
> On Fri, Aug 26, 2022 at 4:12 PM  wrote:
>
> > Hello
> >
> > Am trying to extract DTS-HD MA audio files from the following Blu-Ray
> > (which I physically purchased)
> >
> > KARL RICHTER - J.S. Bach: Cantatas - Pure Audio Recordings <
> > https://pureaudiorecordings.com/en/product/karl-richter-j-s-bach-canta
> > tas/
> > >
> >
> >
> > I am getting the same result both with DVDAE and with MakeMKV / MMH
> > which I believe both use ffmpeg to extract DTS-HD MA. About 80% of the
> > tracks are correctly extracted to 24/192kHz files and around 20% of
> > the tracks are extracted to 24/48kHz files which play back at ¼ speed.
> > I then corrected the speed using
> >
> >
> >
> > ffmpeg -i 1.flac -af asetrate=192000 2.flac
> >
> >
> >
> > This now works on some of my playback equipment. However when I launch
> > playback of a converted file, it shows 0/192kHz for around 5 seconds
> > and only then locks to the 24/192kHz stream and plays back. This
> > happens with files that were correctly extracted to 192kHz and to
> > those that I had to speed up after the fact. So there seems to be
> > something fundamentally wrong with the ffmpeg extraction of this
> > BluRay
> >
> >
> >
> > I have prepared some sample files on one drive
> >
> > https://1drv.ms/u/s!AmpEbEYrlrk5lWGskTYvPp0iv4L3?e=U7kCRC
> >
> > Chapter 4 extracts correctly to 192kHz
> >
> > Chapter 5 extracts to 48kHz
> >
>
> The Chapter 5 file dts-hd-ma have certain delay. Thus you get with ffmpeg
> first few frames in only dts core at 48kHz 16bit and later full dts-hd-ma
> kicks in with 192kHz and 32bit, but because filtering is not supporting
> changing of sample rate and/or sample format at runtime all remaining
> frames are filtered back to 48kHz and 16bit. This is evident if you run
> ffmpeg with '-v debug'
> flag.
>
> Workaround is to force filtering at 192kHz and 32bit right at start with
> this command:
>
> ffmpeg -i Title1\ -\ Chapter\ 05.dts -af aformat=f=s32p:r=192000:cl=stereo
> out.flac
>
>
>
>
> >
> > Both flac extract to not play back correctly on dCS Rossini
> >
>
> Hardware playback of 24bit flac at 192000 Hz is not widely supported AFAIK.
>
>
> >
> >
> >
> > Could you please take a look at this? Thanks a lot
> >
> > Rudi
> >
> >
> >
> > ___
> > 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 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 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 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] Error decoding DTS-HD MA audio files

2022-08-26 Thread Paul B Mahol
On Fri, Aug 26, 2022 at 4:12 PM  wrote:

> Hello
>
> Am trying to extract DTS-HD MA audio files from the following Blu-Ray
> (which
> I physically purchased)
>
> KARL RICHTER - J.S. Bach: Cantatas - Pure Audio Recordings
> <
> https://pureaudiorecordings.com/en/product/karl-richter-j-s-bach-cantatas/
> >
>
>
> I am getting the same result both with DVDAE and with MakeMKV / MMH which I
> believe both use ffmpeg to extract DTS-HD MA. About 80% of the tracks are
> correctly extracted to 24/192kHz files and around 20% of the tracks are
> extracted to 24/48kHz files which play back at ¼ speed. I then corrected
> the
> speed using
>
>
>
> ffmpeg -i 1.flac -af asetrate=192000 2.flac
>
>
>
> This now works on some of my playback equipment. However when I launch
> playback of a converted file, it shows 0/192kHz for around 5 seconds and
> only then locks to the 24/192kHz stream and plays back. This happens with
> files that were correctly extracted to 192kHz and to those that I had to
> speed up after the fact. So there seems to be something fundamentally wrong
> with the ffmpeg extraction of this BluRay
>
>
>
> I have prepared some sample files on one drive
>
> https://1drv.ms/u/s!AmpEbEYrlrk5lWGskTYvPp0iv4L3?e=U7kCRC
>
> Chapter 4 extracts correctly to 192kHz
>
> Chapter 5 extracts to 48kHz
>

The Chapter 5 file dts-hd-ma have certain delay. Thus you get with ffmpeg
first few frames in only dts core at 48kHz 16bit and later full dts-hd-ma
kicks in
with 192kHz and 32bit, but because filtering is not supporting changing of
sample rate and/or sample format at runtime all remaining frames are
filtered
back to 48kHz and 16bit. This is evident if you run ffmpeg with '-v debug'
flag.

Workaround is to force filtering at 192kHz and 32bit right at start with
this command:

ffmpeg -i Title1\ -\ Chapter\ 05.dts -af aformat=f=s32p:r=192000:cl=stereo
out.flac




>
> Both flac extract to not play back correctly on dCS Rossini
>

Hardware playback of 24bit flac at 192000 Hz is not widely supported AFAIK.


>
>
>
> Could you please take a look at this? Thanks a lot
>
> Rudi
>
>
>
> ___
> 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 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] Error decoding DTS-HD MA audio files

2022-08-26 Thread Paul B Mahol
On Fri, Aug 26, 2022 at 4:12 PM  wrote:

> Hello
>
> Am trying to extract DTS-HD MA audio files from the following Blu-Ray
> (which
> I physically purchased)
>
> KARL RICHTER - J.S. Bach: Cantatas - Pure Audio Recordings
> <
> https://pureaudiorecordings.com/en/product/karl-richter-j-s-bach-cantatas/
> >
>
>
> I am getting the same result both with DVDAE and with MakeMKV / MMH which I
> believe both use ffmpeg to extract DTS-HD MA. About 80% of the tracks are
> correctly extracted to 24/192kHz files and around 20% of the tracks are
> extracted to 24/48kHz files which play back at ¼ speed. I then corrected
> the
> speed using
>
>
>
> ffmpeg -i 1.flac -af asetrate=192000 2.flac
>
>
>
> This now works on some of my playback equipment. However when I launch
> playback of a converted file, it shows 0/192kHz for around 5 seconds and
> only then locks to the 24/192kHz stream and plays back. This happens with
> files that were correctly extracted to 192kHz and to those that I had to
> speed up after the fact. So there seems to be something fundamentally wrong
> with the ffmpeg extraction of this BluRay
>
>
>
> I have prepared some sample files on one drive
>
> https://1drv.ms/u/s!AmpEbEYrlrk5lWGskTYvPp0iv4L3?e=U7kCRC
>
> Chapter 4 extracts correctly to 192kHz
>
> Chapter 5 extracts to 48kHz
>
> Both flac extract to not play back correctly on dCS Rossini
>
>
>
> Could you please take a look at this? Thanks a lot
>
>
File is password protected.


> Rudi
>
>
>
> ___
> 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 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] multiple flat videos in a equirectangular projection - v360 filter

2022-07-16 Thread Paul B Mahol
On Sat, Jul 16, 2022 at 11:22 AM Denis Połeć  wrote:

> Hello,
> I wouldn't call myself a beginner, but I still need a little bit to become
> a pro. :)
> I have a question that might be easy to answer.
>
> I am working on a script to bring multiple flat videos into a
> equirectangular projection by using v360 filter.
> I have the problem that the edges of the input are very jagged.
>
> This did not lead to a good result when I play the equirectangular
> projection in a 360 player. I have also already tried different
> interpolation modes, which does not lead to a better result.
> Does anyone have an idea how I can avoid that? Is there a better way to do
> this task?
>
>
> Here is an example code with the result. The video in the example has a
> resolution of 1080p:
>
>
> ffmpeg -i BRAIN.mp4 -lavfi "\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw='0':alpha_mask=1[fg1];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=90:alpha_mask=1[fg2];[fg2][fg1]overlay[a];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=-90:alpha_mask=1[fg3];[fg3][a]overlay[b];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=180:alpha_mask=1[fg4];[fg4][b]overlay[c];\
> \
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=45:alpha_mask=1[fg5];[fg5][c]overlay[d];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=90:roll=45:alpha_mask=1[fg6];[fg6][d]overlay[e];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=-90:roll=-45:alpha_mask=1[fg7];[fg7][e]overlay[f];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=180:pitch=-45:alpha_mask=1[fg8];[fg8][f]overlay[g];\
> \
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=-45:alpha_mask=1[fg9];[fg9][g]overlay[h];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=90:roll=-45:alpha_mask=1[fg10];[fg10][h]overlay[i];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=-90:roll=45:alpha_mask=1[fg11];[fg11][i]overlay[j];\
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=180:pitch=45:alpha_mask=1[fg12];[fg12][j]overlay[k];\
> \
>
> [0]v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=90:alpha_mask=1[fg13];[fg13][k]overlay[l];\
> [0]drawbox=w=1:h=1:color=black,v360=input=flat:output=e:id_fov=45:w=5120:h=2560:yaw=0:pitch=-90:alpha_mask=1[fg14];[fg14][l]overlay"
> -q:v 4  -vframes 1 -y test11.jpg
>
> Your filtergraph is extremely inefficient with that many cascaded overlays
and gives poor results. For proper stitching borders need to have small
transition from full opacity to no opacity.

To add small transitions with opacity on borders could use blurring filters
for example on alpha plane only.
Did not tried yet as I never needed to do stitching.



> output:
> https://nextcloud.denispolec.de/index.php/s/8yF7rKdnB9HdJsa <
> https://nextcloud.denispolec.de/index.php/s/8yF7rKdnB9HdJsa>
> zoomed:
> https://nextcloud.denispolec.de/index.php/s/fwdapyA8aGBdC2M <
> https://nextcloud.denispolec.de/index.php/s/fwdapyA8aGBdC2M>
>
> Thanks!
>
> All the best,
> denis
> ___
> 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 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] Raw video conversion

2022-07-08 Thread Paul B Mahol
On Fri, Jul 8, 2022 at 10:44 PM Phil Rhodes via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

>  > I did NOT, I repeat, NOT write the message below.
>
> I had that happen last week, in the thread titled "Re: [FFmpeg-user]
> asubboost and asupercut"
>

Perhaps you use too much clones.


> > On Sun, Nov 29, 2020 at 6:07 PM Phil Rhodes via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> ...no, he didn't.
> P
>
> On Friday, 8 July 2022 at 21:37:43 BST, Bouke / Videotoolshed <
> bo...@videotoolshed.com> wrote:
>
>
> > On 8 Jul 2022, at 12:17, Bouke / Videotoolshed 
> wrote:
> >
> > Please provide full command and console output, and do NOT top post here!
> >>
> >> I have a raw video file captured from the monochrome camera, I need to
> >> convert the raw video file to visualise it in .avi or .mp4.
> >> I tried this command, but this did not worked out to me,
> >> ffmpeg -f rawvideo -pixel_format yuv420p -video_size 1600x1300
> -framerate
> >> 30 -i raw_video.raw raw_video.avi
> >>
> >> Could anyone help me on how to do conversion from raw file to .avi or
> -mp4
> >> file?
> >
> > ___
> > 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 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 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 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] Multiple xfade in one run

2022-07-04 Thread Paul B Mahol
On Mon, Jul 4, 2022 at 11:30 PM Michael Koch 
wrote:

> Am 04.07.2022 um 18:46 schrieb Cecil Westerhof via ffmpeg-user:
> > Paul B Mahol  writes:
> >
> >> On Mon, Jul 4, 2022 at 6:15 PM Cecil Westerhof via ffmpeg-user <
> >> ffmpeg-user@ffmpeg.org> wrote:
> >>
> >>> Some time ago I was experimenting with xfade. I wanted to know how to
> >>> use several in one run. Now I really needed it, so I did some digging
> >>> and found this:
> >>>   ffmpeg -y  \
> >>>-i input0.mkv \
> >>>-i input1.mkv \
> >>>-i input2.mkv \
> >>>-i input3.mkv \
> >>>-i input4.mkv \
> >>>-i input5.mkv \
> >>>-i input6.mkv \
> >>>-i input7.mkv \
> >>>-i input8.mkv \
> >>>-i input9.mkv \
> >>>-vcodec libx264   \
> >>>-crf26\
> >>>-preset veryfast  \
> >>>-filter_complex "
> >>>  [0:a][1:a] acrossfade=d=4[a1];
> >>>  [0:v][1:v] xfade=transition=hlslice:
> >>>duration=4:
> >>>offset=308[v1];
> >>>
> >>>  [a1][2:a] acrossfade=d=4[a2];
> >>>  [v1][2:v] xfade=transition=vertopen:
> >>>duration=4:
> >>>offset=357[v2];
> >>>
> >>>  [a2][3:a] acrossfade=d=4[a3];
> >>>  [v2][3:v] xfade=transition=circlecrop:
> >>>duration=4:
> >>>offset=533[v3];
> >>>
> >>>  [a3][4:a] acrossfade=d=4[a4];
> >>>  [v3][4:v] xfade=transition=rectcrop:
> >>>duration=4:
> >>>offset=1016[v4];
> >>>
> >>>  [a4][5:a] acrossfade=d=4[a5];
> >>>  [v4][5:v] xfade=transition=slideup:
> >>>duration=4:
> >>>offset=1158[v5];
> >>>
> >>>  [a5][6:a] acrossfade=d=4[a6];
> >>>  [v5][6:v] xfade=transition=wiperight:
> >>>duration=4:
> >>>offset=1473[v6];
> >>>
> >>>  [a6][7:a] acrossfade=d=4[a7];
> >>>  [v6][7:v] xfade=transition=horzclose:
> >>>duration=4:
> >>>offset=1661[v7];
> >>>
> >>>  [a7][8:a] acrossfade=d=4[a8];
> >>>  [v7][8:v] xfade=transition=diagbl:
> >>>duration=4:
> >>>offset=2082[v8];
> >>>
> >>>  [a8][9:a] acrossfade=d=4[a9];
> >>>  [v8][9:v] xfade=transition=slideright:
> >>>duration=4:
> >>>offset=2211[v9]
> >>>" \
> >>>-map '[v9]' -map '[a9]'   \
> >>>output.mkv
> >>>
> >>> I hope there are better ways, because there are some problems with it.
> >>> For example it needs a lot of memory. (24 GB)
> >>>
> >> Could use (a)movie filters and only use such filter when actually
> needed in
> >> graph.
> > I am concerning ffmpeg still a newbie. What do you mean by this?
> >
>
> I also didn't understand it.
>

Before each new input to xfade use movie filter to set input file.
Similar for audio.

Your current solution is problematic because it starts decoding everything
from start and that used lots of memory
to keep timestamps in sync when they are not really needed.

>
> Michael
>
> ___
> 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 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] Multiple xfade in one run

2022-07-04 Thread Paul B Mahol
On Mon, Jul 4, 2022 at 6:46 PM Cecil Westerhof via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Paul B Mahol  writes:
>
> > On Mon, Jul 4, 2022 at 6:15 PM Cecil Westerhof via ffmpeg-user <
> > ffmpeg-user@ffmpeg.org> wrote:
> >
> >> Some time ago I was experimenting with xfade. I wanted to know how to
> >> use several in one run. Now I really needed it, so I did some digging
> >> and found this:
> >>  ffmpeg -y  \
> >>   -i input0.mkv \
> >>   -i input1.mkv \
> >>   -i input2.mkv \
> >>   -i input3.mkv \
> >>   -i input4.mkv \
> >>   -i input5.mkv \
> >>   -i input6.mkv \
> >>   -i input7.mkv \
> >>   -i input8.mkv \
> >>   -i input9.mkv \
> >>   -vcodec libx264   \
> >>   -crf26\
> >>   -preset veryfast  \
> >>   -filter_complex "
> >> [0:a][1:a] acrossfade=d=4[a1];
> >> [0:v][1:v] xfade=transition=hlslice:
> >>   duration=4:
> >>   offset=308[v1];
> >>
> >> [a1][2:a] acrossfade=d=4[a2];
> >> [v1][2:v] xfade=transition=vertopen:
> >>   duration=4:
> >>   offset=357[v2];
> >>
> >> [a2][3:a] acrossfade=d=4[a3];
> >> [v2][3:v] xfade=transition=circlecrop:
> >>   duration=4:
> >>   offset=533[v3];
> >>
> >> [a3][4:a] acrossfade=d=4[a4];
> >> [v3][4:v] xfade=transition=rectcrop:
> >>   duration=4:
> >>   offset=1016[v4];
> >>
> >> [a4][5:a] acrossfade=d=4[a5];
> >> [v4][5:v] xfade=transition=slideup:
> >>   duration=4:
> >>   offset=1158[v5];
> >>
> >> [a5][6:a] acrossfade=d=4[a6];
> >> [v5][6:v] xfade=transition=wiperight:
> >>   duration=4:
> >>   offset=1473[v6];
> >>
> >> [a6][7:a] acrossfade=d=4[a7];
> >> [v6][7:v] xfade=transition=horzclose:
> >>   duration=4:
> >>   offset=1661[v7];
> >>
> >> [a7][8:a] acrossfade=d=4[a8];
> >> [v7][8:v] xfade=transition=diagbl:
> >>   duration=4:
> >>   offset=2082[v8];
> >>
> >> [a8][9:a] acrossfade=d=4[a9];
> >> [v8][9:v] xfade=transition=slideright:
> >>   duration=4:
> >>   offset=2211[v9]
> >>   " \
> >>   -map '[v9]' -map '[a9]'   \
> >>   output.mkv
> >>
> >> I hope there are better ways, because there are some problems with it.
> >> For example it needs a lot of memory. (24 GB)
> >>
> >
> > Could use (a)movie filters and only use such filter when actually needed
> in
> > graph.
>
> I am concerning ffmpeg still a newbie. What do you mean by this?
>

Read documentation few times.


>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] Multiple xfade in one run

2022-07-04 Thread Paul B Mahol
On Mon, Jul 4, 2022 at 6:15 PM Cecil Westerhof via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Some time ago I was experimenting with xfade. I wanted to know how to
> use several in one run. Now I really needed it, so I did some digging
> and found this:
>  ffmpeg -y  \
>   -i input0.mkv \
>   -i input1.mkv \
>   -i input2.mkv \
>   -i input3.mkv \
>   -i input4.mkv \
>   -i input5.mkv \
>   -i input6.mkv \
>   -i input7.mkv \
>   -i input8.mkv \
>   -i input9.mkv \
>   -vcodec libx264   \
>   -crf26\
>   -preset veryfast  \
>   -filter_complex "
> [0:a][1:a] acrossfade=d=4[a1];
> [0:v][1:v] xfade=transition=hlslice:
>   duration=4:
>   offset=308[v1];
>
> [a1][2:a] acrossfade=d=4[a2];
> [v1][2:v] xfade=transition=vertopen:
>   duration=4:
>   offset=357[v2];
>
> [a2][3:a] acrossfade=d=4[a3];
> [v2][3:v] xfade=transition=circlecrop:
>   duration=4:
>   offset=533[v3];
>
> [a3][4:a] acrossfade=d=4[a4];
> [v3][4:v] xfade=transition=rectcrop:
>   duration=4:
>   offset=1016[v4];
>
> [a4][5:a] acrossfade=d=4[a5];
> [v4][5:v] xfade=transition=slideup:
>   duration=4:
>   offset=1158[v5];
>
> [a5][6:a] acrossfade=d=4[a6];
> [v5][6:v] xfade=transition=wiperight:
>   duration=4:
>   offset=1473[v6];
>
> [a6][7:a] acrossfade=d=4[a7];
> [v6][7:v] xfade=transition=horzclose:
>   duration=4:
>   offset=1661[v7];
>
> [a7][8:a] acrossfade=d=4[a8];
> [v7][8:v] xfade=transition=diagbl:
>   duration=4:
>   offset=2082[v8];
>
> [a8][9:a] acrossfade=d=4[a9];
> [v8][9:v] xfade=transition=slideright:
>   duration=4:
>   offset=2211[v9]
>   " \
>   -map '[v9]' -map '[a9]'   \
>   output.mkv
>
> I hope there are better ways, because there are some problems with it.
> For example it needs a lot of memory. (24 GB)
>

Could use (a)movie filters and only use such filter when actually needed in
graph.

>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] ffmpeg don't stop working

2022-07-04 Thread Paul B Mahol
On Mon, Jul 4, 2022 at 3:47 PM Windstyle - Sistemas via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> I need help with behavior that is incomprehensible to me. Ubuntu 20
> system, compiled ffmpeg by Nvidia's GIT for CUDA support. At the start of
> the conversion ffmpeg continues to write output indefinitely even beyond
> the duration of the input.
> Here is the command used:
> /home/giulio/nvidia/ffmpeg/ffmpeg -y -hwaccel cuda -hwaccel_output_format
> cuda -i ~/360_3499.MP4 -i /home/giulio/gear360/l_x.tif -i
> /home/giulio/gear360/l_y.tif -loop 1 -i
> /home/giulio/gear360/Alpha_Map.tif -i /home/giulio/gear360/r_x.tif -i
> /home/giulio/gear360/r_y.tif -i /home/giulio/gear360/l.tif -i
> /home/giulio/gear360/r.tif -gpu 0 -vcodec h264_nvenc -preset p6 -tune
> hq -b:v 20M -bufsize 30M -maxrate 50M -qmin 0 -g 250 -bf 3 -b_ref_mode
> middle -temporal-aq 1 -rc-lookahead 20 -i_qfactor 0.75 -b_qfactor 1.1
> -filter_complex [3]alphaextract[alf];
> [v:0]scale=w=3840:h=-1:flags=lanczos,split=2[l][r];
> [l][1][2]remap[l_remap]; [r][4][5]remap[r_remap];
> [l_remap]setsar=sar=1/1[l_sar]; [r_remap]setsar=sar=1/1[r_sar];
> [l_sar][6]blend=c0_mode=multiply[l_blend];
> [r_sar][7]blend=c0_mode=multiply[r_blend];
> [r_blend][alf]alphamerge[r_rm_a]; [l_blend][r_rm_a]overlay=0:0[merged];
> [merged]eq=contrast=1.4:brightness=0.2:gamma=1.2:saturation=0.9[out] -map
> [out] -map 0:a?
> ~/360_3499-gpu.MP4
> Other information: No error reported with configure/compile/execution,
> same command with embedded ubuntu ffmpeg work fine.
> Download and compiled from official GIT repository = same issue. other
> thinks, compiled version work fast 2X better that the builtin ubuntu version
>


When using  -loop 1 you need to add shortest=1 to relevant filter(s) to
stop processing.

___
> 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 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] asubboost and asupercut

2022-07-01 Thread Paul B Mahol
On Sun, Nov 29, 2020 at 6:07 PM Phil Rhodes via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

>
>
> On Sunday, 29 November 2020, 15:55:29 GMT, Michael Koch <
> astroelectro...@t-online.de> wrote:
> > The name "feedback" is misleading because this signal isn't going back.>
> It would make sense to rename "feedback" to "wet".> What's now "wet" could
> be renamed "gain", or it could be removed because > it's unnecessary.
> I may not be fully comprehending the behaviour of the software in this
> case, but if your diagram is accurate that would make sense. Certainly it
> would reflect the meaning of the terms "dry" and "wet" as they're commonly
> used in audio processing. Using those terms in another way is confusing.
>

It is completely misleading and never was relevant, more so when there is
new 'boost' option now.


P
> ___
> 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 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] Need Command

2022-07-01 Thread Paul B Mahol
On Fri, Jul 1, 2022 at 7:18 AM Dhwani Shukla 
wrote:

> Hi,
>
> Logs:
> 2022-07-01 10:33:12.216336+0530 Picskitz[5943:54020] Loaded
> mobile-ffmpeg-full-gpl-x86_64-4.4-20200725
> 2022-07-01 10:33:12.220093+0530 Picskitz[5943:55881] INFO: ffmpeg version
> v4.4-dev-416
> 2022-07-01 10:33:12.220166+0530 Picskitz[5943:55881] INFO:  Copyright (c)
> 2000-2020 the FFmpeg developers
>


Now is 2022 year.


> 2022-07-01 10:33:12.220252+0530 Picskitz[5943:55881] INFO:
> 2022-07-01 10:33:12.220302+0530 Picskitz[5943:55881] INFO:   built with
> Apple clang version 11.0.3 (clang-1103.0.32.62)
> 2022-07-01 10:33:12.220375+0530 Picskitz[5943:55881] INFO:
>  configuration:
> --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk
> --prefix=/Users/taner/Projects/mobile-ffmpeg/prebuilt/ios-x86_64/ffmpeg
> --enable-version3 --arch=x86_64 --cpu=x86_64 --target-os=darwin
> --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
> --cc=clang --cxx=clang++ --as='clang -arch x86_64 -target x86_64-ios-darwin
> -march=x86-64 -msse4.2 -mpopcnt -m64 -mtune=intel -DMOBILE_FFMPEG_X86_64
> -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -DIOS
> -DMOBILE_FFMPEG_BUILD_DATE=20200725 -isysroot
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk
> -O2 -mios-simulator-version-min=12.1
> -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include'
> --ranlib=
>  
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
> --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
> --disable-neon --enable-cross-compile --enable-pic --disable-asm
> --enable-inline-asm --enable-optimizations --enable-swscale --enable-static
> --disable-shared --enable-small --disable-v4l2-m2m --disable-outdev=v4l2
> --disable-outdev=fbdev --disable-outdev=audiotoolbox --disable-indev=v4l2
> --disable-indev=fbdev --disable-openssl --disable-xmm-clobber-test
> --disable-debug --disable-neon-clobber-test --disable-programs
> --disable-postproc --disable-doc --disable-htmlpages --disable-manpages
> --disable-podpages --disable-txtpages --disable-sndio --disable-schannel
> --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid
> --disable-nvenc --disable-vaapi --disable-vdpau --disable-appkit
> --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc
> --disable-vaapi --disable-vdpau --enable
>  -libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp
> --enable-gnutls --enable-libmp3lame --enable-libass --enable-libtheora
> --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2
> --enable-libopencore-amrnb --enable-libshine --enable-libspeex
> --enable-libwavpack --enable-libkvazaar --enable-libx264 --enable-gpl
> --enable-libxvid --enable-gpl --enable-libx265 --enable-gpl
> --enable-libvidstab --enable-gpl --enable-libilbc --enable-libopus
> --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame
> --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-audiotoolbox
> --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv
> --enable-libfontconfig --enable-libfreetype --enable-libfribidi
> --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass
> --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp
> --enable-libxml2 --enable-libopencore-amrnb --enable-libshine
> --enable-libspeex --enable-libwavpack --enabl
>  e-libkvazaar --enable-libx264 --enable-gpl --enable-libxvid --enable-gpl
> --enable-libx265 --enable-gpl --enable-libvidstab --enable-gpl
> --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr
> --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc
> --enable-zlib --enable-audiotoolbox --enable-bzlib --enable-videotoolbox
> --enable-avfoundation --enable-iconv
> 2022-07-01 10:33:12.221414+0530 Picskitz[5943:55881] INFO:   libavutil
>   56. 55.100 / 56. 55.100
> 2022-07-01 10:33:12.221457+0530 Picskitz[5943:55881] INFO:   libavcodec
>  58. 96.100 / 58. 96.100
> 2022-07-01 10:33:12.221506+0530 Picskitz[5943:55881] INFO:   libavformat
>   58. 48.100 / 58. 48.100
> 2022-07-01 10:33:12.221552+0530 Picskitz[5943:55881] INFO:   libavdevice
>   58. 11.101 / 58. 11.101
> 2022-07-01 10:33:12.221598+0530 Picskitz[5943:55881] INFO:   libavfilter
>7. 87.100 /  7. 87.100
> 2022-07-01 10:33:12.221648+0530 Picskitz[5943:55881] INFO:   libswscale
>   5.  8.100 /  5.  8.100
> 2022-07-01 10:33:12.221683+0530 Picskitz[5943:55881] INFO:
>  libswresample   3.  8.100 /  3.  8.100
> 2022-07-01 10:33:12.245856+0530 Picskitz[5943:55881] INFO: Input #0, gif,
> from
> 

Re: [FFmpeg-user] remap with pixel interpolation

2022-06-30 Thread Paul B Mahol
On Wed, Jun 29, 2022 at 9:43 AM Paul B Mahol  wrote:

>
>
> On Wed, Jun 29, 2022 at 9:18 AM Michael Koch 
> wrote:
>
>> Am 29.06.2022 um 09:15 schrieb Paul B Mahol:
>> > On Wed, Jun 29, 2022 at 8:56 AM Michael Koch <
>> astroelectro...@t-online.de>
>> > wrote:
>> >
>> >> Suggestion for improvement:
>> >> Add pixel interpolation to the remap filter. For example if the output
>> >> size is 800x600, multiply the values in the mapping files by 16 so that
>> >> the range is 12800x9600, and use the 4 least significant bits for pixel
>> >> interpolation.
>> >>
>> >>
>> > Very bad suggestion.
>> >
>> > Better make remap filter use float pixel format for map files.
>>
>> Which image format supports float grayscale?
>>
>
> PFM (Portable FloatMap)
>
> I just gonna add grayf32 support to it.
>

Also will add remap_opencl filter soon, with support for near and bilinear
interpolation already.

Need build with OpenCL enabled and modern GPU.



>
>
>
>> Michael
>>
>> ___
>> 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 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] Make white of photo transparant

2022-06-29 Thread Paul B Mahol
On Wed, Jun 29, 2022 at 2:30 PM Bouke / edit 'B  wrote:

> Beledig me niet, lijk met niet in lijn met je princiepes / de Heer, iig
> siert het niemand.
>
> Bouke / edit 'B
>
>
Stop top posting and use English.



> videotoolshed.com
> Van Oldenbarneveltstraat 33
> 6512 AS Nijmegen, the Netherlands
> +31 6 21817248
> If you want to send me large files, please use:
> https://videotoolshed.wetransfer.com/
>
> > On 29 Jun 2022, at 13:45, Cecil Westerhof via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> >
> > Bouke / Videotoolshed  writes:
> >
> >> Pff, make it an option.
> >
> > You probably would tell a homeless person that is hungry and cold:
> > just put on clothes and eat something.
> > (Without providing him anything.)
> >
> > --
> > Cecil Westerhof
> > Senior Software Engineer
> > LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> > ___
> > 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 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 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] Make white of photo transparant

2022-06-29 Thread Paul B Mahol
On Wed, Jun 29, 2022 at 11:37 AM Cecil Westerhof via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Bouke / Videotoolshed  writes:
>
> > On 29 Jun 2022, at 01:48, Cecil Westerhof via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> >>
> >>
> >> The background of the photo is white. Would it be possible to make
> >> that transparent? (So where there is white, I do not see white, but
> >> the video.)
> >
> > This is called Luma (or Luminance) key.
> >
> > Yes, it is possible, yes, it will be ugly unless you know what you are
> > doing, and IMHO, FFmpeg is not the tool for this.
>
> A long time ago I tried to work with GUI programs, but I found them to
> bothersome. Ffmpeg was in my case easier. Maybe because I do not edit
> videos often enough. ;-)
>
>
> > (But someone recently mentioned a GUI for filters, that might help you
> big time on this one.)
>
> Do you remember the GUI?
>

https://github.com/richardpl/lavfi-preview


>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] Make white of photo transparant

2022-06-29 Thread Paul B Mahol
On Wed, Jun 29, 2022 at 10:05 AM Bouke / Videotoolshed <
bo...@videotoolshed.com> wrote:

> On 29 Jun 2022, at 01:48, Cecil Westerhof via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> >
> >
> > The background of the photo is white. Would it be possible to make
> > that transparent? (So where there is white, I do not see white, but
> > the video.)
>
> This is called Luma (or Luminance) key.
>
> Yes, it is possible, yes, it will be ugly unless you know what you are
> doing, and IMHO, FFmpeg is not the tool for this.
> (But someone recently mentioned a GUI for filters, that might help you big
> time on this one.)
>
>
Use colorkey filter, and set color as white.


> Bouke
>
>
>
> ___
> 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 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] remap with pixel interpolation

2022-06-29 Thread Paul B Mahol
On Wed, Jun 29, 2022 at 9:18 AM Michael Koch 
wrote:

> Am 29.06.2022 um 09:15 schrieb Paul B Mahol:
> > On Wed, Jun 29, 2022 at 8:56 AM Michael Koch <
> astroelectro...@t-online.de>
> > wrote:
> >
> >> Suggestion for improvement:
> >> Add pixel interpolation to the remap filter. For example if the output
> >> size is 800x600, multiply the values in the mapping files by 16 so that
> >> the range is 12800x9600, and use the 4 least significant bits for pixel
> >> interpolation.
> >>
> >>
> > Very bad suggestion.
> >
> > Better make remap filter use float pixel format for map files.
>
> Which image format supports float grayscale?
>

PFM (Portable FloatMap)

I just gonna add grayf32 support to it.



> Michael
>
> ___
> 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 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] remap with pixel interpolation

2022-06-29 Thread Paul B Mahol
On Wed, Jun 29, 2022 at 8:56 AM Michael Koch 
wrote:

> Suggestion for improvement:
> Add pixel interpolation to the remap filter. For example if the output
> size is 800x600, multiply the values in the mapping files by 16 so that
> the range is 12800x9600, and use the 4 least significant bits for pixel
> interpolation.
>
>
Very bad suggestion.

Better make remap filter use float pixel format for map files.

As always patch welcome.



> Michael
>
> ___
> 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 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] Problem with videos not playing in mobile browser

2022-06-28 Thread Paul B Mahol
On Tue, Jun 28, 2022 at 3:44 PM Dr Mark A. Garlick 
wrote:

> Dear all
>
> I am new to this forum.
>
> I have noticed that some of my videos, encoded with ffmpeg and uploaded
> to my websites, do not play on mobile web browsers, but they work
> perfectly well on desktop browsers on my Linux machine. I get either a
> message saying 'file is corrupted' or no message at all (just a blank
> video) depending on the browser. I've tried Brave, Firefox and Chrome,
> on an iPhone, a Samsung tablet and a Samsung Galaxy s10 plus. The 'bad'
> videos consistently fail to play on mobile devices.
>
> I've run an ffprobe on two .mp4 files: one which works on a mobile and
> desktop browser (good.mp4) and one which will only play on a desktop
> browser (bad.mp4. These are partial outputs (the rest of the output for
> the two files seems identical):
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bad.mp4':
>Metadata:
>  major_brand : isom
>  minor_version   : 512
>  compatible_brands: isomiso2avc1mp41
>  encoder : Lavf58.76.100
>Duration: 00:00:30.02, start: 0.00, bitrate: 1582 kb/s
>Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661),
> yuv422p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 1574 kb/s, 24 fps,
> 24 tbr, 12288 tbn, 48 tbc (default)
>  Metadata:
>handler_name: VideoHandler
>vendor_id   : [0][0][0][0]
>Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
> stereo, fltp, 2 kb/s (default)
>  Metadata:
>handler_name: SoundHandler
>vendor_id   : [0][0][0][0]
>
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'good.mp4':
>Metadata:
>  major_brand : isom
>  minor_version   : 512
>  compatible_brands: isomiso2avc1mp41
>  encoder : Lavf58.76.100
>Duration: 00:00:30.00, start: 0.00, bitrate: 4824 kb/s
>Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
> bt470bg/unknown/unknown), 1920x1080 [SAR 1:1 DAR 16:9], 4821 kb/s, 24
> fps, 24 tbr, 12288 tbn, 48 tbc (default)
>  Metadata:
>handler_name: VideoHandler
>vendor_id   : [0][0][0][0]
>
> The command I used to encode them both (via a bash scrip on Linux) is
>
> for f in *.mp4
>  do ffmpeg -i "$f"  -vf "drawtext=text='© Mark A. Garlick /
> markgarlick.com':x=w-tw-10:y=10:
> fontfile=/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf:fontsize=25:fontcolor=white"
>
> -write_tmcd false -s 1280x720 -preset medium -crf 24 "full/${f%.*}.mp4"
> done
>
> Can anybody offer any insight?
>

probably YUV420P vs YUV422P

Some players only supports YUV420P.


>
> My thanks.
>
> --
> Dr Mark A. Garlick  *Dr Mark A. Garlick
>  *   [Follow me on Facebook!]
>  [Follow me on Twitter!]
>  [Follow me on LinkedIn!]
>  [Subscribe on
> YouTube!]  [Follow me on
> Instagram!] 
> Illustrator | Author | Animator
> e: m...@markgarlick.com 
> t:+44 7952 830 945
> w: markgarlick.com 
> w: space-art.co.uk 
> ___
> 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 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] Forced upmixing scheme with no way to disable

2022-06-24 Thread Paul B Mahol
On Fri, Jun 24, 2022 at 1:47 AM Jeremy F  wrote:

> The join filter appears to work - specifying a 6.0 layout does indeed
> output what I want, but: the backend video player (AVPro) in the game I'm
> playing does not respect/acknowledge 6.0 (seemingly) so that doesn't work.
> Also the webplayer for the CDN I'm using also does not work (flv.js). Lucky
> me!
>
> These of course are not ffmpeg's fault, but would anyone have advice for,
> perhaps setting the AAC channel layout bit to say it's 5.1 instead? (I
> *think* that might fix it?). I don't think that's unreasonable, my layout
> very well may be true to 5.1, but ffmpeg forcing a 128hz filter is not
> always desired. I should be able to override that filter but retain a 5.1
> channel layout designation.
>
> IIUC lowpass is done in encoder.


> On Thu, Jun 23, 2022 at 5:22 PM Paul B Mahol  wrote:
>
> > On Thu, Jun 23, 2022 at 10:30 PM Jeremy F  wrote:
> >
> > > Unfortunately due to platform limitations, AAC is the only
> > > mutli-channel audio codec supported in my use case. However, I do not
> > see,
> > > at a glance, where the AAC specification mandates that if there are 6
> > > channels, that channel 4 must be a 128hz LFE channel. AAC also supports
> > the
> > > 6.0 channel layout for example, which does not include LFE. Ffmpeg
> > appears
> > > to be making assumptions at channel layout, as well as doing
> > corresponding
> > > upmixing schemes, with no way to override or disable. This is does not
> > > appear to be an AAC problem
> > >
> >
> > Then use join filter instead of amerge and specify 6.0 layout,
> >
> > Good luck.
> >
> > >
> > > On Thu, Jun 23, 2022 at 4:04 PM Paul B Mahol  wrote:
> > >
> > > > On Thu, Jun 23, 2022 at 8:43 PM Jeremy F 
> wrote:
> > > >
> > > > > That's what I thought! However, here are some commands showing
> this.
> > I
> > > > set
> > > > > the lowpass to be 10khz on channel4 just to prevent any confusion
> (it
> > > > > should clearly _not_ sound like any kind of real low pass filter).
> > With
> > > > an
> > > > > input of "vid.mp4" that has standard stereo, run the following:
> > > > >
> > > > > ffmpeg -i vid.mp4 -err_detect ignore_err -filter_complex
> > > > >
> > > > >
> > > >
> > >
> >
> "[0:a]channelsplit[left][right];[left]asplit=3[l1][l2][l3];[l1]aecho=1.0:0.7:25|60:0.5|0.3[l1];[l2]lowpass=f=550[l2];[l3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[l3];[right]asplit=3[r1][r2][r3];[r1]aecho=1.0:0.7:25|60:0.5|0.3[r1];[r2]lowpass=f=1[r2];[r3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[r3];[l1][r1][l2][r2][l3][r3]amerge=inputs=6[a]"
> > > > > -map 0:v -map [a] -acodec aac -c:v copy vid1.mp4
> > > > >
> > > > > Then to extract channel 4 (since its zero based it's labeled 3):
> > > > >
> > > > > ffmpeg -i vid1.mp4 -map_channel 0.1.3 ch4.mp3
> > > > >
> > > > > ch4.mp3 will be a 128hz lowpass filtered version of the audio,
> > despite
> > > me
> > > > > never specifying that.
> > > > >
> > > > >
> > > > Stop transcoding to aac.
> > > >
> > > >
> > > >
> > > > >
> > > > > On Thu, Jun 23, 2022 at 1:48 PM Paul B Mahol 
> > wrote:
> > > > >
> > > > > > On Thu, Jun 23, 2022 at 7:09 PM Jeremy F 
> > > wrote:
> > > > > >
> > > > > > > A more succinct way of putting it: if I channelsplit (or any
> > other
> > > > type
> > > > > > of
> > > > > > > upmixing as far as I'm aware) into 6 channels, channel 4 always
> > > has a
> > > > > > 128hz
> > > > > > > low pass filter applied to it. I do not want this
> > > > > > >
> > > > > > > My particular use case is I play a game that supports
> > multi-channel
> > > > > live
> > > > > > > audio streams, but no filters on any audio. So I apply filters
> > > myself
> > > > > and
> > > > > > > position them as appropriate in the game (i.e. a reverb/echo
> > effect
> > > > in
> > > > > a
> > > > > > > hallway, a 550hz lowpass outside the main area, etc.). More
> > > > generally,
> > > > > > > ffmpeg should al

Re: [FFmpeg-user] Forced upmixing scheme with no way to disable

2022-06-23 Thread Paul B Mahol
On Thu, Jun 23, 2022 at 10:30 PM Jeremy F  wrote:

> Unfortunately due to platform limitations, AAC is the only
> mutli-channel audio codec supported in my use case. However, I do not see,
> at a glance, where the AAC specification mandates that if there are 6
> channels, that channel 4 must be a 128hz LFE channel. AAC also supports the
> 6.0 channel layout for example, which does not include LFE. Ffmpeg appears
> to be making assumptions at channel layout, as well as doing corresponding
> upmixing schemes, with no way to override or disable. This is does not
> appear to be an AAC problem
>

Then use join filter instead of amerge and specify 6.0 layout,

Good luck.

>
> On Thu, Jun 23, 2022 at 4:04 PM Paul B Mahol  wrote:
>
> > On Thu, Jun 23, 2022 at 8:43 PM Jeremy F  wrote:
> >
> > > That's what I thought! However, here are some commands showing this. I
> > set
> > > the lowpass to be 10khz on channel4 just to prevent any confusion (it
> > > should clearly _not_ sound like any kind of real low pass filter). With
> > an
> > > input of "vid.mp4" that has standard stereo, run the following:
> > >
> > > ffmpeg -i vid.mp4 -err_detect ignore_err -filter_complex
> > >
> > >
> >
> "[0:a]channelsplit[left][right];[left]asplit=3[l1][l2][l3];[l1]aecho=1.0:0.7:25|60:0.5|0.3[l1];[l2]lowpass=f=550[l2];[l3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[l3];[right]asplit=3[r1][r2][r3];[r1]aecho=1.0:0.7:25|60:0.5|0.3[r1];[r2]lowpass=f=1[r2];[r3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[r3];[l1][r1][l2][r2][l3][r3]amerge=inputs=6[a]"
> > > -map 0:v -map [a] -acodec aac -c:v copy vid1.mp4
> > >
> > > Then to extract channel 4 (since its zero based it's labeled 3):
> > >
> > > ffmpeg -i vid1.mp4 -map_channel 0.1.3 ch4.mp3
> > >
> > > ch4.mp3 will be a 128hz lowpass filtered version of the audio, despite
> me
> > > never specifying that.
> > >
> > >
> > Stop transcoding to aac.
> >
> >
> >
> > >
> > > On Thu, Jun 23, 2022 at 1:48 PM Paul B Mahol  wrote:
> > >
> > > > On Thu, Jun 23, 2022 at 7:09 PM Jeremy F 
> wrote:
> > > >
> > > > > A more succinct way of putting it: if I channelsplit (or any other
> > type
> > > > of
> > > > > upmixing as far as I'm aware) into 6 channels, channel 4 always
> has a
> > > > 128hz
> > > > > low pass filter applied to it. I do not want this
> > > > >
> > > > > My particular use case is I play a game that supports multi-channel
> > > live
> > > > > audio streams, but no filters on any audio. So I apply filters
> myself
> > > and
> > > > > position them as appropriate in the game (i.e. a reverb/echo effect
> > in
> > > a
> > > > > hallway, a 550hz lowpass outside the main area, etc.). More
> > generally,
> > > > > ffmpeg should allow me to apply any effect to any channel, but it
> > would
> > > > > appear ffmpeg sees me using 6 channels, and decides to use the
> > default
> > > > > 5.1(side) upmixing scheme. I could find little documentation on
> this
> > > > > behaviour, but this page very briefly mentions this behaviour about
> > > > halfway
> > > > > down https://trac.ffmpeg.org/wiki/AudioChannelManipulation
> > > > >
> > > > > Also my provided command was a bit verbose. I could simply
> > channelsplit
> > > > L &
> > > > > R into 3 channels each without any modification to any individual
> > > > channels.
> > > > > All channels will be duplicates of its original L or R channel, but
> > > > channel
> > > > > 4 will have a 128hz low pass on it.
> > > > >
> > > >
> > > > That directly contradicts with reality.
> > > >
> > > > FFmpeg never applies lowpass to LFE channels, unless you call lowpass
> > > > filter or similar filter on it.
> > > >
> > > >
> > > > >
> > > > > On Thu, Jun 23, 2022 at 12:55 PM Paul B Mahol 
> > > wrote:
> > > > >
> > > > > > On Thu, Jun 23, 2022 at 6:45 PM Jeremy F 
> > > wrote:
> > > > > >
> > > > > > > Hi I'm probably using ffmpeg in an edge-case way, but I simply
> > want
> > > > to
> > > > > > take
> > > > > > > 2 channels/stereo, and end up with 6 channels of audio, w

Re: [FFmpeg-user] Forced upmixing scheme with no way to disable

2022-06-23 Thread Paul B Mahol
On Thu, Jun 23, 2022 at 8:43 PM Jeremy F  wrote:

> That's what I thought! However, here are some commands showing this. I set
> the lowpass to be 10khz on channel4 just to prevent any confusion (it
> should clearly _not_ sound like any kind of real low pass filter). With an
> input of "vid.mp4" that has standard stereo, run the following:
>
> ffmpeg -i vid.mp4 -err_detect ignore_err -filter_complex
>
> "[0:a]channelsplit[left][right];[left]asplit=3[l1][l2][l3];[l1]aecho=1.0:0.7:25|60:0.5|0.3[l1];[l2]lowpass=f=550[l2];[l3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[l3];[right]asplit=3[r1][r2][r3];[r1]aecho=1.0:0.7:25|60:0.5|0.3[r1];[r2]lowpass=f=1[r2];[r3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[r3];[l1][r1][l2][r2][l3][r3]amerge=inputs=6[a]"
> -map 0:v -map [a] -acodec aac -c:v copy vid1.mp4
>
> Then to extract channel 4 (since its zero based it's labeled 3):
>
> ffmpeg -i vid1.mp4 -map_channel 0.1.3 ch4.mp3
>
> ch4.mp3 will be a 128hz lowpass filtered version of the audio, despite me
> never specifying that.
>
>
Stop transcoding to aac.



>
> On Thu, Jun 23, 2022 at 1:48 PM Paul B Mahol  wrote:
>
> > On Thu, Jun 23, 2022 at 7:09 PM Jeremy F  wrote:
> >
> > > A more succinct way of putting it: if I channelsplit (or any other type
> > of
> > > upmixing as far as I'm aware) into 6 channels, channel 4 always has a
> > 128hz
> > > low pass filter applied to it. I do not want this
> > >
> > > My particular use case is I play a game that supports multi-channel
> live
> > > audio streams, but no filters on any audio. So I apply filters myself
> and
> > > position them as appropriate in the game (i.e. a reverb/echo effect in
> a
> > > hallway, a 550hz lowpass outside the main area, etc.). More generally,
> > > ffmpeg should allow me to apply any effect to any channel, but it would
> > > appear ffmpeg sees me using 6 channels, and decides to use the default
> > > 5.1(side) upmixing scheme. I could find little documentation on this
> > > behaviour, but this page very briefly mentions this behaviour about
> > halfway
> > > down https://trac.ffmpeg.org/wiki/AudioChannelManipulation
> > >
> > > Also my provided command was a bit verbose. I could simply channelsplit
> > L &
> > > R into 3 channels each without any modification to any individual
> > channels.
> > > All channels will be duplicates of its original L or R channel, but
> > channel
> > > 4 will have a 128hz low pass on it.
> > >
> >
> > That directly contradicts with reality.
> >
> > FFmpeg never applies lowpass to LFE channels, unless you call lowpass
> > filter or similar filter on it.
> >
> >
> > >
> > > On Thu, Jun 23, 2022 at 12:55 PM Paul B Mahol 
> wrote:
> > >
> > > > On Thu, Jun 23, 2022 at 6:45 PM Jeremy F 
> wrote:
> > > >
> > > > > Hi I'm probably using ffmpeg in an edge-case way, but I simply want
> > to
> > > > take
> > > > > 2 channels/stereo, and end up with 6 channels of audio, where I can
> > > > > apply/modify/filter each channel as I please. And I figured out the
> > > > ffmpeg
> > > > > magic to do this, but along my dive into this it appears that no
> > matter
> > > > the
> > > > > method used to upmix (of which there are many such as "-ac 6",
> > > "asplit",
> > > > > "pan", "channelsplit") it appears no matter what, I'm forced to use
> > the
> > > > > upmixing scheme that always sets channel 4 to a lowpass filter of
> > > 128hz,
> > > > > rendering it useless for my case.
> > > > >
> > > > > There doesn't appear to be a way to disable this that I can find,
> and
> > > it
> > > > > seems like there should be
> > > > >
> > > > > My current command I'm using, which works great except for channel
> 4
> > > > > (labeled r2 in here). No matter what filter I apply, it always ends
> > up
> > > > > being a lowpass of 128.
> > > > >
> > > > > -err_detect ignore_err -filter_complex
> > > > >
> > > > >
> > > >
> > >
> >
> [0:a]channelsplit[left][right];[left]asplit=3[l1][l2][l3];[l1]aecho=1.0:0.7:25|60:0.5|0.3[l1];[l2]lowpass=f=550[l2];[l3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[l3];[right]asplit=3[r1][r2][r3];[r1]aecho=1.0:0.7:25|60:0.5|0.3[r1];[r2]lowpass=f=550[r2];[r3]ade

Re: [FFmpeg-user] Forced upmixing scheme with no way to disable

2022-06-23 Thread Paul B Mahol
On Thu, Jun 23, 2022 at 7:09 PM Jeremy F  wrote:

> A more succinct way of putting it: if I channelsplit (or any other type of
> upmixing as far as I'm aware) into 6 channels, channel 4 always has a 128hz
> low pass filter applied to it. I do not want this
>
> My particular use case is I play a game that supports multi-channel live
> audio streams, but no filters on any audio. So I apply filters myself and
> position them as appropriate in the game (i.e. a reverb/echo effect in a
> hallway, a 550hz lowpass outside the main area, etc.). More generally,
> ffmpeg should allow me to apply any effect to any channel, but it would
> appear ffmpeg sees me using 6 channels, and decides to use the default
> 5.1(side) upmixing scheme. I could find little documentation on this
> behaviour, but this page very briefly mentions this behaviour about halfway
> down https://trac.ffmpeg.org/wiki/AudioChannelManipulation
>
> Also my provided command was a bit verbose. I could simply channelsplit L &
> R into 3 channels each without any modification to any individual channels.
> All channels will be duplicates of its original L or R channel, but channel
> 4 will have a 128hz low pass on it.
>

That directly contradicts with reality.

FFmpeg never applies lowpass to LFE channels, unless you call lowpass
filter or similar filter on it.


>
> On Thu, Jun 23, 2022 at 12:55 PM Paul B Mahol  wrote:
>
> > On Thu, Jun 23, 2022 at 6:45 PM Jeremy F  wrote:
> >
> > > Hi I'm probably using ffmpeg in an edge-case way, but I simply want to
> > take
> > > 2 channels/stereo, and end up with 6 channels of audio, where I can
> > > apply/modify/filter each channel as I please. And I figured out the
> > ffmpeg
> > > magic to do this, but along my dive into this it appears that no matter
> > the
> > > method used to upmix (of which there are many such as "-ac 6",
> "asplit",
> > > "pan", "channelsplit") it appears no matter what, I'm forced to use the
> > > upmixing scheme that always sets channel 4 to a lowpass filter of
> 128hz,
> > > rendering it useless for my case.
> > >
> > > There doesn't appear to be a way to disable this that I can find, and
> it
> > > seems like there should be
> > >
> > > My current command I'm using, which works great except for channel 4
> > > (labeled r2 in here). No matter what filter I apply, it always ends up
> > > being a lowpass of 128.
> > >
> > > -err_detect ignore_err -filter_complex
> > >
> > >
> >
> [0:a]channelsplit[left][right];[left]asplit=3[l1][l2][l3];[l1]aecho=1.0:0.7:25|60:0.5|0.3[l1];[l2]lowpass=f=550[l2];[l3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[l3];[right]asplit=3[r1][r2][r3];[r1]aecho=1.0:0.7:25|60:0.5|0.3[r1];[r2]lowpass=f=550[r2];[r3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[r3];[l1][r1][l2][r2][l3][r3]amerge=inputs=6[a]
> > > -map 0:v -map [a] -acodec aac -c:v copy
> > >
> > >
> > > The code, at a glance, seems to corroborate this, but it's a bit beyond
> > my
> > > depth to do anything further (and I don't want to compile / make a
> custom
> > > version of ffmpeg)
> > >
> > >
> >
> https://github.com/FFmpeg/FFmpeg/blob/9aa20d28cdda0dcaa4daa2848670a6530c6ba26a/libavfilter/af_surround.c
> > >
> > > So, if possible, how can I disabled the upmixing scheme?
> > >
> >
> > The surround filter have nothing to do with that filtergraph above.
> >
> > And I really failed to understand what you are trying to do.
> >
> >
> >
> > > Thanks!
> > > --
> > > Sincerely,
> > >
> > > Jeremy
> > > ___
> > > 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 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".
> >
>
>
> --
> Sincerely,
>
> Jeremy
> ___
> 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 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] Forced upmixing scheme with no way to disable

2022-06-23 Thread Paul B Mahol
On Thu, Jun 23, 2022 at 6:45 PM Jeremy F  wrote:

> Hi I'm probably using ffmpeg in an edge-case way, but I simply want to take
> 2 channels/stereo, and end up with 6 channels of audio, where I can
> apply/modify/filter each channel as I please. And I figured out the ffmpeg
> magic to do this, but along my dive into this it appears that no matter the
> method used to upmix (of which there are many such as "-ac 6", "asplit",
> "pan", "channelsplit") it appears no matter what, I'm forced to use the
> upmixing scheme that always sets channel 4 to a lowpass filter of 128hz,
> rendering it useless for my case.
>
> There doesn't appear to be a way to disable this that I can find, and it
> seems like there should be
>
> My current command I'm using, which works great except for channel 4
> (labeled r2 in here). No matter what filter I apply, it always ends up
> being a lowpass of 128.
>
> -err_detect ignore_err -filter_complex
>
> [0:a]channelsplit[left][right];[left]asplit=3[l1][l2][l3];[l1]aecho=1.0:0.7:25|60:0.5|0.3[l1];[l2]lowpass=f=550[l2];[l3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[l3];[right]asplit=3[r1][r2][r3];[r1]aecho=1.0:0.7:25|60:0.5|0.3[r1];[r2]lowpass=f=550[r2];[r3]adelay=1,aecho=1.0:0.7:25|60:0.5|0.3[r3];[l1][r1][l2][r2][l3][r3]amerge=inputs=6[a]
> -map 0:v -map [a] -acodec aac -c:v copy
>
>
> The code, at a glance, seems to corroborate this, but it's a bit beyond my
> depth to do anything further (and I don't want to compile / make a custom
> version of ffmpeg)
>
> https://github.com/FFmpeg/FFmpeg/blob/9aa20d28cdda0dcaa4daa2848670a6530c6ba26a/libavfilter/af_surround.c
>
> So, if possible, how can I disabled the upmixing scheme?
>

The surround filter have nothing to do with that filtergraph above.

And I really failed to understand what you are trying to do.



> Thanks!
> --
> Sincerely,
>
> Jeremy
> ___
> 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 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] xfade

2022-06-21 Thread Paul B Mahol
On Tue, Jun 21, 2022 at 9:42 AM Michael Koch 
wrote:

> Hi,
>
> I don't understand the examples in https://trac.ffmpeg.org/wiki/Xfade
>
> If the first input has length 5s and the offset is 4.5s and the duration
> is 1s, then from where comes the first input between t=5s and t=5.5s?
>

It is error.


>
> Michael
>
> ___
> 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 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] concat audio files

2022-06-11 Thread Paul B Mahol
On Sat, Jun 11, 2022 at 12:02 PM Michael Koch 
wrote:

> Am 11.06.2022 um 11:46 schrieb Nicolas George:
> > Michael Koch (12022-06-11):
> >> I always get this error message:
> >> Stream specifier '' in filtergraph description [0][1]concat=n=2:a=1
> matches
> >> no streams.
> > Where did you find this "[number]" syntax, and has it ever worked for
> > you?
>
> yes, it works after I added v=0. Isn't this the normal syntax to specify
> the two inputs of the concat filter? In this case [0][1] could be
> omitted because there are only these two inputs. [0:0][1:0] does also work.
>
>
You should really use lavfi-preview, its GUI for libavfilter.


> Michael
>
> ___
> 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 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] Please increase the number of variables

2022-06-03 Thread Paul B Mahol
On Fri, Jun 3, 2022 at 5:05 PM Michael Koch 
wrote:

> Hello,
>
> I'd like to ask if the number of variables in expressions could be
> increased from 10 to 25 please. I mean the st() and ld() functions. I'm
> just programming a realtime wormhole simulation and the limitation to 10
> variables is becoming nasty. I did already begin to re-use the same
> variables for different things, but that makes debugging complicated. It
> would be so much easier to have more variables and use each one only for
> one thing.
> What you see below is only a small part of the code.
>

Why you doing that way, this is the most inefficient way to do it.


>
> Thanks,
> Michael
>
>
> ffmpeg -f lavfi -i nullsrc=size=%OUT_W%x%OUT_H% -vf
> format=pix_fmts=gray16le,geq='^
> st(0,PI/360*%OUT_H_FOV%*((2*X+1)/%OUT_W%-1));^
> st(1,PI/360*%OUT_V_FOV%*((2*Y+1)/%OUT_H%-1));^
> st(4,cos(ld(1))*sin(ld(0)));^
> st(5,sin(ld(1)));^
> st(6,cos(ld(1))*cos(ld(0)));^
> st(7,atan2(ld(5),ld(4)));^
> st(8,acos(ld(6)));^
> st(9,if(lte(ld(8),%RS%/180*PI),%OUT_W%,0));^
>
> st(8,if(gt(ld(8),%RS%/180*PI),ld(8)-(2*%RS%/180*PI/(ld(8)-%RS%/180*PI)),0));^
> st(4,sin(ld(8))*cos(ld(7)));^
> st(5,sin(ld(8))*sin(ld(7)));^
> st(6,cos(ld(8)));^
> st(7,atan2(ld(4),ld(6)));^
> st(8,asin(ld(5)));^
> ld(9)+0.5*%IN_W%*(1+ld(7)/%IN_H_FOV%*360/PI)' -frames 1 -y xmap.pgm
> ___
> 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 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] Multiple parts of a video

2022-05-31 Thread Paul B Mahol
On Tue, May 31, 2022 at 6:15 PM Bo Berglund  wrote:

> On Tue, 31 May 2022 13:15:02 +0200, Michael Koch <
> astroelectro...@t-online.de>
> wrote:
>
> >Am 31.05.2022 um 11:17 schrieb Bo Berglund:
> >> On Sun, 29 May 2022 13:17:55 +0200, Michael Koch <
> astroelectro...@t-online.de>
> >> wrote:
> > Using concat filter.
>  That is exactly what I already know: cutting the different parts.
>  Probably one command for each part and then concatenate them.
>  So n + 1 commands.
>  My question was: can it be done with one command?
> 
> >>> Please have a look at
> >>> https://trac.ffmpeg.org/wiki/Concatenate
> >>>
> >>> "Concat demuxer", "Concat protocol" and "Concat filter" are three
> >>> different things.
> >>> You did use the concat demuxer. Now if you want to do all in one line,
> >>> you must use the concat filter.
> >>>
> >>> Michael
> >> Stepping in here due to the interesting topic:
> >>
> >> I am daily using a tool I created myself to use ffmpeg to remove ads
> from
> >> recorded mp4 TV news videos.
> >> What I do is the following:
> >> - I manually scan the video to find the start/end times of the ads
> (seconds)
> >> - From this list the tool creates the ffmpeg commands to extract the
> parts
> >> *between* the ads as separate numbered mp4 files
> >> - Then a list of these small files is written to a file $JOINFILE
> >> - This is then used in an ffmpeg call like this:
> >>ffmpeg -f concat -safe 0 -i $JOINFILE -c copy $TARGETFILE
> >> - When this is done the small files and $JOINFILE are deleted
> >>
> >> So reading this thread I get the feeling that there is a way to use the
> list of
> >> cut times in a *single ffmpeg command* to create the output mp4 file
> *without*
> >> creating the list file and essentially doing everything in this single
> ffmpeg
> >> command.
> >
> >I have a short example in chapter 2.57 of my book:
> >http://www.astro-electronic.de/FFmpeg_Book.pdf
> >
>
> Michael, thanks a lot for your input!
>
> When using your book link I landed in a directory where I already had the
> April
> 25, 2021 version! Downloaded 13 months ago...
>
> This new version from May 28, 2022 is greatly expanded going from 553 to
> 821
> pages!
> Great work, thank you!
>
>
> So when I read the ch 2.57 I see that the sources of the concatenation
> operation
> are actual multiple video files.
>
> This is what I am already doing but it is a multiple-step process where
> there is
> one step where the short video files are created by cutting out of the main
> input video files based on start time and length for each cut. (Resolution:
> seconds.)
>
> Then these are pasted together using the concat with copy since they are
> cutouts
> from the same single input video and thus share the format.
>
> What has been asked in this thread is if there is a way to *combine* these
> operations such that there is no need for intermediate files...
>
> I.e. can ffmpeg be commanded to extract the sections to concatenate and
> feed
> them one after another into the concat operation without landing in a temp
> file
> inbetween?
>
> Further notes about your book example 2.57:
> ---
>
> The first line states:
> "In this example the concat filter is used for input videos of the same
> size and
> no audio."
>
> No audio is a non-starter for me.
>
> I need the audio to also be present in the output with preserved
> audio/video
> sync.
>
> It also says:
> "This filter does re-encode the videos, ..."
>
> Also something I want to avoid since it takes a long time to do and seems
> un-necessary since all of the parts being concatenated come from one and
> the
> same source video where parts are being edited out. Thus they share the
> same
> format.
>
> Basically when editing a single source video (with audio) the re-encoding
> should
> not be needed, right?
> Or am I missing something due to the use of compression?
>
> Every now and then some nob comes around with similar requests.

There is no straightforward bulletproof way to achieve this without
re-encoding and at same time using random videos as inputs,

Feel free to prove me wrong.


>
> --
> Bo Berglund
> Developer in Sweden
>
> ___
> 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 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] Multiple parts of a video

2022-05-29 Thread Paul B Mahol
On Sun, May 29, 2022 at 12:27 PM Cecil Westerhof  wrote:

> Paul B Mahol  writes:
>
> > On Sat, May 28, 2022 at 9:46 PM Cecil Westerhof via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> >
> >  Paul B Mahol  writes:
> >
> >  > On Sat, May 28, 2022 at 4:28 PM Cecil Westerhof via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> >  >
> >  >  When I just want to have a certain part of a video, I can do
> something
> >  >  like:
> >  >  ffmpeg -y -i input.MTS \
> >  > -ss 00:08   \
> >  > -to 00:17   \
> >  > -acodec copy\
> >  > -vcodec libx264 \
> >  > -preset veryfast\
> >  > output.mp4
> >  >
> >  >  But what if I want several parts of a video in my video?
> >  >  Do I need to cut the different parts out of the video and concatenate
> >  >  them, or is it possible to do it with one command?
> >  >
> >  > Using concat filter.
> >
> >  That is exactly what I already know: cutting the different parts.
> >  Probably one command for each part and then concatenate them.
> >  So n + 1 commands.
> >  My question was: can it be done with one command?
> >
> > This IS ONE command with concat FILTER.
>
> I am going to ignore you. You do not read my question and when I say
> that your reply does not answer my question you double down to 'prove'
> you are right.
>
> Before I CAN USE concat I have the create the n cuts I need to put
> into the concat.
>

And that can be used already, just specify  -ss for all inputs you gonna
use.
So you create cuts with ffmpeg all into single commad. Note that -c:a(v)
copy does not work precisely with most of lossy codecs.
So best and precise cut can be done inside all of libavfilter, by using
(a)trim filters.

I'm really sorry if you gonna ignore my constructive help.

If you want to still use -c copy with lossy codecs, than you have opened a
can of worms.



> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
>
___
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] Multiple parts of a video

2022-05-28 Thread Paul B Mahol
On Sat, May 28, 2022 at 9:46 PM Cecil Westerhof via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Paul B Mahol  writes:
>
> > On Sat, May 28, 2022 at 4:28 PM Cecil Westerhof via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
> >
> >  When I just want to have a certain part of a video, I can do something
> >  like:
> >  ffmpeg -y -i input.MTS \
> > -ss 00:08   \
> > -to 00:17   \
> > -acodec copy\
> > -vcodec libx264 \
> > -preset veryfast\
> > output.mp4
> >
> >  But what if I want several parts of a video in my video?
> >  Do I need to cut the different parts out of the video and concatenate
> >  them, or is it possible to do it with one command?
> >
> > Using concat filter.
>
> That is exactly what I already know: cutting the different parts.
> Probably one command for each part and then concatenate them.
> So n + 1 commands.
> My question was: can it be done with one command?
>

This IS ONE command with concat FILTER.

>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] Generate numbers when concatenating videos

2022-05-28 Thread Paul B Mahol
On Sat, May 28, 2022 at 9:34 PM Cecil Westerhof via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> I need to concatenate a series of files. It would be nice when every
> part would be preceded with its number.
> For example:
> - A white one on a black background.
> - Then the first video.
> - Then a white two on a black background.
> - Then the second video.
>   .
>   .
>   .
>
> Would that be possible, or do I want to much?
>

Use concat filter and drawtext on color filter source.


>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] Multiple parts of a video

2022-05-28 Thread Paul B Mahol
On Sat, May 28, 2022 at 4:28 PM Cecil Westerhof via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> When I just want to have a certain part of a video, I can do something
> like:
> ffmpeg -y -i input.MTS \
>-ss 00:08   \
>-to 00:17   \
>-acodec copy\
>-vcodec libx264 \
>-preset veryfast\
>output.mp4
>
> But what if I want several parts of a video in my video?
> Do I need to cut the different parts out of the video and concatenate
> them, or is it possible to do it with one command?
>

Using concat filter.


>
> --
> Cecil Westerhof
> Senior Software Engineer
> LinkedIn: http://www.linkedin.com/in/cecilwesterhof
> ___
> 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 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] force to decode with the special audio encoding

2022-05-28 Thread Paul B Mahol
On Sat, May 28, 2022 at 3:03 AM Bang He  wrote:

>  have a file which contains hevc and g711. when i run ffplay, it doesn't
> recognize the g711 encoding. can i force ffplay to decode with  g711  audio
> coder?
>

Please share file.


> ___
> 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 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] avsynctest

2022-05-12 Thread Paul B Mahol
On Thu, May 12, 2022 at 2:37 PM Bang He  wrote:

> hi all
> it seems avsynctest filter is helpful on my job. can you demo some command
> line?
>

ffplay -f lavfi -i avsynctest[out1]


> thanks.
>
> On Tue, Apr 19, 2022 at 5:10 PM Michael Koch 
> wrote:
>
> > Hello,
> >
> > it's unclear how the new "avsynctest" source is expected to work. The
> > most simple command line
> >
> > ffmpeg -f lavfi -i avsynctest=d=5 out.mov
> >
> > gives this error message:
> >
> > [lavfi @ 02741200efc0] Output pad "video" with type video of the
> > filter instance "Parsed_avsynctest_0" of avsynctest not connected to any
> > destination
> > avsynctest=d=5: Invalid argument
> >
> > The console output is below.
> >
> > Michael
> >
> >
> >
> > C:\Users\astro\Desktop>ffmpeg -f lavfi -i avsynctest=d=5 out.mov
> > ffmpeg version 2022-04-18-git-d5687236ab-full_build-www.gyan.dev
> > Copyright (c) 2000-2022 the FFmpeg developers
> >built with gcc 11.2.0 (Rev10, 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-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. 24.101 / 57. 24.101
> >libavcodec 59. 26.100 / 59. 26.100
> >libavformat59. 22.100 / 59. 22.100
> >libavdevice59.  6.100 / 59.  6.100
> >libavfilter 8. 33.100 /  8. 33.100
> >libswscale  6.  6.100 /  6.  6.100
> >libswresample   4.  6.100 /  4.  6.100
> >libpostproc56.  5.100 / 56.  5.100
> > [lavfi @ 02741200efc0] Output pad "video" with type video of the
> > filter instance "Parsed_avsynctest_0" of avsynctest not connected to any
> > destination
> > avsynctest=d=5: Invalid argument
> >
> > ___
> > 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 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 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 do I accelerate fisheye to hequirect conversion with cuda?

2022-05-10 Thread Paul B Mahol
On Tue, May 10, 2022 at 9:54 AM Alexander Winnig via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> This is my command
>
> ffmpeg -y -i in.mp4 -vf
> v360=input=sg:ih_fov=118.2:iv_fov=69.5:output=hequirect:w=2924:h=2924
> -b:v 102400k -bufsize 5000k -c:a copy out.mp4
>
> I tried|
> |
>
>
The closest hw accelerated filter you will get is program_opencl video
filter.
Where you need to code own transform for arbitrary input format to output
format.

There is no CUDA or any other hw accelerated version of v360 filter in
FFmpeg official code.


> |
> |
>
> |ffmpeg -y -hwaccel cuda -hwaccel_output_format cuda -i in.mp4 -vf
> v360=input=sg:ih_fov=118.2:iv_fov=69.5:output=hequirect:w=2924:h=2924
> -c:v h264_nvenc -preset slow -b:v 102400k -bufsize 5000k -c:a copy out.mp4|
> ||
>
> But this resulted in|||
> |
>
> |Impossible to convert between the formats supported by the filter
> 'graph 0 input from stream 0:0' and the filter 'auto_scale_0'
> Error reinitializing filters!
> Failed to inject frame into filter network: Function not implemented
> Error while processing the decoded data for stream #0:0|
> ||
> ___
> 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 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] vf_lut3d supports type 3 ?

2022-05-09 Thread Paul B Mahol
On Mon, May 9, 2022 at 8:00 PM Mahesh Pittala 
wrote:

> Hello Paul B Mohal,
>
> BBC has released different types of LUT's, attached the paper. Do you have
> any plans to add support ?
>

I will repeat one last time. CUBE specification have not types of lut.

There is only input/output range specification for CUBE files which to my
knowledge is properly supported.
Also lut3d filter operates and produce rgb only colorspace output.

So have you actually tried those luts with recent ffmpeg (not old one) and
reported your findings?



>
> Thanks,
> Mahesh
>
> On Mon, May 9, 2022 at 1:15 AM Paul B Mahol  wrote:
>
> > On Sun, May 8, 2022 at 9:28 PM Mahesh Pittala <
> mah...@multicorewareinc.com
> > >
> > wrote:
> >
> > > Hello,
> > >
> > > I am trying to convert HLG to SDR using 3D LUT cubes freely distributed
> > by
> > > NBCUniversal. (3-NBCU_HLG2SDR_DL_v1.1.cube
> > > <
> > >
> >
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/blob/main/LUTS_for_Hardware_Devices/3-NBCU_HLG2SDR_DL_v1.1.cube
> > > >
> > > )
> > >
> > >
> >
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/tree/main/LUTS_for_Hardware_Devices
> > >
> > > It seems the LUT conversion appears to be a modified “Type 1” which is
> > > mapping absolute signal peak to narrow range (10bit code value 940).
> > This
> > > value should allow code values all the way up to 1019
> > >
> > > Does ffmpeg's lut3d implementation support type 3 ?
> > >
> >
> > cube lut3d specification says nothing about type 3, whatever type and 3
> > means in this context.
> >
> >
> > >
> > > My CLI:
> > > ./ffmpeg  -i Input_hlg_422_10bit.mov -vcodec v210  -vf
> > > "lut3d=interp=tetrahedral:file= 3-NBCU_HLG2SDR_DL_v1.1.cube
> > > <
> > >
> >
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/blob/main/LUTS_for_Hardware_Devices/3-NBCU_HLG2SDR_DL_v1.1.cube
> > > >
> > > " -an  output_SDR_422.mov
> > >
> > > Thanks,
> > > Mahesh
> > > ___
> > > 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 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 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 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] vf_lut3d supports type 3 ?

2022-05-08 Thread Paul B Mahol
On Sun, May 8, 2022 at 9:28 PM Mahesh Pittala 
wrote:

> Hello,
>
> I am trying to convert HLG to SDR using 3D LUT cubes freely distributed by
> NBCUniversal. (3-NBCU_HLG2SDR_DL_v1.1.cube
> <
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/blob/main/LUTS_for_Hardware_Devices/3-NBCU_HLG2SDR_DL_v1.1.cube
> >
> )
>
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/tree/main/LUTS_for_Hardware_Devices
>
> It seems the LUT conversion appears to be a modified “Type 1” which is
> mapping absolute signal peak to narrow range (10bit code value 940).  This
> value should allow code values all the way up to 1019
>
> Does ffmpeg's lut3d implementation support type 3 ?
>

cube lut3d specification says nothing about type 3, whatever type and 3
means in this context.


>
> My CLI:
> ./ffmpeg  -i Input_hlg_422_10bit.mov -vcodec v210  -vf
> "lut3d=interp=tetrahedral:file= 3-NBCU_HLG2SDR_DL_v1.1.cube
> <
> https://github.com/digitaltvguy/NBCU-HDR-SDR-Single-Stream_Workflow_Recommendation/blob/main/LUTS_for_Hardware_Devices/3-NBCU_HLG2SDR_DL_v1.1.cube
> >
> " -an  output_SDR_422.mov
>
> Thanks,
> Mahesh
> ___
> 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 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] problem with fast seeking and splitting

2022-05-02 Thread Paul B Mahol
On Mon, May 2, 2022 at 9:54 AM Alexander Solonsky <
alexander.solon...@castlabs.com> wrote:

> Monday, May 2, 2022, 2:21:17 PM, you wrote:
>
>
>
>
> On Mon, May 2, 2022 at 7:27 AM Alexander Solonsky via ffmpeg-user <
> ffmpeg-user@ffmpeg.org> wrote:
>
>> Dear Experts,
>>
>> I'm trying to split an input file into 2 second chunks, transcode and
>> assemble using a concat muxer. And experiencing two problems:
>> major one:
>> 1) when using ffmpeg -ss 00:00:08 -t 2 -i  -c:v libx264 
>> instead of seeking to second 8, ffmpeg seeks somewhere to second 15 or so.
>> The first segments are correct, and then it start to go haywire.
>> Using accurate seek ffmpeg  -i  -ss 00:00:08 -t 2 -c:v
>> libx264   resolves the problem. But it is completely unusuble if you
>> want to split the whole file.
>> Minor one:
>> 2) when concatenating the resulting files - there happens a noticeable
>> break between the chunks. For both audio and video and is equal to 2
>> additional frame durations (e.g. prev chunk ends at 1.981333 and the next
>> chunk (after concat) while it should start at 2.023000 actually starts at
>> 2.095744 for 24 fps video, and for audio prev chunk ends at 1.927256 and
>> starts at 2.023220 while it should start at 1.950476).
>>
>> adding all additional flags like copyts, copytb, enctimebase, vsync
>> doesn't change anything. And it's really curious when using the hls demuxer
>> - it splits the file accurately and fast, without these breaks.
>>
>> Can you please help me fix those two problems or suggest to understand
>> which command like I could use to reproduce splitting behavior from the HLS
>> demuxer?
>>
>
> It can not be fixed. You can not seek and start decoding without key
> frames.
>
> Hi Paul,
>
>
>
> I cannot say that I fully understood your comment. In my input file key
> frames are 0  and then 250 then 431. FFMpeg seeks ok to frame 48, frame 96,
> frame 144,  frame 192, frame 240. Then when I am asking to seek to frame
> 288 and FFMpeg seeks to frame 538. Sane behavior in my understanding would
> be to locate the closest key frame happening before the requested frame and
> decode frames from there. And it is claimed that the fast seek should be
> accurate. And for this case I can't make sense of what is happening.
>

Where is claimed that fast seek is accurate? The FFmpeg source code tells
different.

It may be that when seeking it picks the closes key frame to target PTS
instead to closest one from past side in timeline.

Hard to guess when I do not know precise location of keyframes of your
input.

and there is the second issue with the gap
>
>
>
>
>
>>
>> Thanks,
>> Alexander
>> //
>>
>> ___
>> 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".
>>
>
> --
> Best regards,
> Alexander Solonsky
>
___
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] problem with fast seeking and splitting

2022-05-02 Thread Paul B Mahol
On Mon, May 2, 2022 at 7:27 AM Alexander Solonsky via ffmpeg-user <
ffmpeg-user@ffmpeg.org> wrote:

> Dear Experts,
>
> I'm trying to split an input file into 2 second chunks, transcode and
> assemble using a concat muxer. And experiencing two problems:
> major one:
> 1) when using ffmpeg -ss 00:00:08 -t 2 -i  -c:v libx264 
> instead of seeking to second 8, ffmpeg seeks somewhere to second 15 or so.
> The first segments are correct, and then it start to go haywire.
> Using accurate seek ffmpeg  -i  -ss 00:00:08 -t 2 -c:v libx264
>   resolves the problem. But it is completely unusuble if you want to
> split the whole file.
> Minor one:
> 2) when concatenating the resulting files - there happens a noticeable
> break between the chunks. For both audio and video and is equal to 2
> additional frame durations (e.g. prev chunk ends at 1.981333 and the next
> chunk (after concat) while it should start at 2.023000 actually starts at
> 2.095744 for 24 fps video, and for audio prev chunk ends at 1.927256 and
> starts at 2.023220 while it should start at 1.950476).
>
> adding all additional flags like copyts, copytb, enctimebase, vsync
> doesn't change anything. And it's really curious when using the hls demuxer
> - it splits the file accurately and fast, without these breaks.
>
> Can you please help me fix those two problems or suggest to understand
> which command like I could use to reproduce splitting behavior from the HLS
> demuxer?
>

It can not be fixed. You can not seek and start decoding without key frames.


>
> Thanks,
> Alexander
> //
>
> ___
> 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 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] Single-field deinterlace with nnedi

2022-05-01 Thread Paul B Mahol
On 4/30/22, Alexander Zhang  wrote:
>>> I'm trying to use nnedi to deinterlace a 29.97 fps video without
>>> doubling the frame rate. I added the fields=a option which I thought was
>>> supposed to make nnedi only use one of the two fields, but the output is
>>> still 59.94 fps. Is this a bug or am I misunderstanding something?
>>>
>>
>> Filter still produces same number of frames as input in field mode.
>> Just every second frame is duplicated in output file because of fixed
>> frame
>> rate.
>
> So should I just drop every other frame with an fps filter to get half
> the field rate?

Nope, filtering is fine. It just tires to match output frame rate.
___
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] Single-field deinterlace with nnedi

2022-04-30 Thread Paul B Mahol
On Sat, Apr 30, 2022 at 8:51 AM Alexander Zhang 
wrote:

> Hello,
>
> I'm trying to use nnedi to deinterlace a 29.97 fps video without
> doubling the frame rate. I added the fields=a option which I thought was
> supposed to make nnedi only use one of the two fields, but the output is
> still 59.94 fps. Is this a bug or am I misunderstanding something?
>

Filter still produces same number of frames as input in field mode.
Just every second frame is duplicated in output file because of fixed frame
rate.


>
> Here's the command and the output:
> $ ffmpeg -i foo.mkv -vf nnedi=weights=nnedi3_weights.bin:field=a bar.mkv
> ffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
>built with gcc 11 (GCC)
>configuration: --prefix=/usr --bindir=/usr/bin
> --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg
> --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man
> --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions
> -g -grecord-gcc-switches -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
> --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ' --extra-cflags='
> -I/usr/include/rav1e' --enable-libopencore-amrnb
> --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3
> --enable-bzlib --enable-chromaprint --disable-crystalhd
> --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls
> --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass
> --enable-libbluray --enable-libbs2b --enable-libcdio --enable-libdrm
> --enable-libjack --enable-libfreetype --enable-libfribidi
> --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa
> --enable-nvenc --enable-openal --enable-opencl --enable-opengl
> --enable-libopenjpeg --enable-libopenmpt --enable-libopus
> --enable-libpulse --enable-librsvg --enable-librav1e --enable-librtmp
> --enable-librubberband --enable-libsmbclient --enable-version3
> --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
> --enable-libssh --enable-libsvtav1 --enable-libtesseract
> --enable-libtheora --enable-libtwolame --enable-libvorbis
> --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3
> --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang
> --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid
> --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi
> --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug
> --enable-postproc --enable-pthreads --disable-static --enable-shared
> --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64
> --enable-lto --enable-libmfx --enable-runtime-cpudetect
>libavutil  56. 70.100 / 56. 70.100
>libavcodec 58.134.100 / 58.134.100
>libavformat58. 76.100 / 58. 76.100
>libavdevice58. 13.100 / 58. 13.100
>libavfilter 7.110.100 /  7.110.100
>libavresample   4.  0.  0 /  4.  0.  0
>libswscale  5.  9.100 /  5.  9.100
>libswresample   3.  9.100 /  3.  9.100
>libpostproc55.  9.100 / 55.  9.100
> Input #0, matroska,webm, from 'foo.mkv':
>Metadata:
>  ENCODER : Lavf58.76.100
>Duration: 00:00:15.02, start: 0.00, bitrate: 9479 kb/s
>Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, top coded first
> (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn,
> 59.94 tbc (default)
>  Metadata:
>DURATION: 00:00:15.01500
> Stream mapping:
>Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 0x55ee59541800] using SAR=1/1
> [libx264 @ 0x55ee59541800] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX FMA3 BMI2 AVX2
> [libx264 @ 0x55ee59541800] profile High, level 4.2, 4:2:0, 8-bit
> [libx264 @ 0x55ee59541800] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4
> AVC codec - Copyleft 2003-2021 - 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=6
> lookahead_threads=1 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=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
> aq=1:1.00
> Output #0, matroska, to 'bar.mkv':
>Metadata:
>  encoder : Lavf58.76.100
>Stream #0:0: Video: h264 (H264 / 0x34363248), 

Re: [FFmpeg-user] Fluorescent White Balance Video Filters

2022-04-27 Thread Paul B Mahol
On Tue, Apr 19, 2022 at 8:41 PM Carl Zwanzig  wrote:

> On 4/19/2022 11:37 AM, Paul B Mahol wrote:
> > colorcorrect filter operates in YUV colorspace and not RGB colorspace
> > So green tint can be adjusted with it.
>
> How would you do that when there are only parameters for R and B?
>
>
You seem to know very little about video and ffmpeg in general.

certain chroma blue and chroma red combinations can give green tint.

But I will refrain from helping aggressive users that like to name call
ffmpeg and ffmpeg developers stupid.


z!
> ___
> 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 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] Colorchart and colormap

2022-04-26 Thread Paul B Mahol
On Tue, Apr 26, 2022 at 6:48 PM Michael Koch 
wrote:

> I wrote a few examples for the workflow with "colorchart" source and
> "colormap" filter.
> This is a nice feature for making color corrections.
> See chapters 2.31 and 2.32 in
> http://www.astro-electronic.de/FFmpeg_Book.pdf


Also there is way to speed up filtering by using  haldclut(src) filter.

First you apply colormap filter to haldclutsrc frames and than use haldclut
filter with that frame as 2nd clut stream.

With level option one can control how precise will 3d mapping be.


>
>
> Michael
>
> ___
> 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 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] Colorchart and colormap

2022-04-26 Thread Paul B Mahol
On Tue, Apr 26, 2022 at 8:39 AM Michael Koch 
wrote:

> Am 25.04.2022 um 22:19 schrieb Paul B Mahol:
> > On Mon, Apr 25, 2022 at 10:06 PM Carl Zwanzig  wrote:
> >
> >> On 4/25/2022 12:49 PM, Michael Koch wrote:
> >>
> >>> Am 25.04.2022 um 21:41 schrieb Paul B Mahol:
> >>>> There is separate software for processing real world colorcharts.
> >>> If colormap isn't for processing of real world colorcharts, then what
> >> else
> >>> is its purpose?
> > Purpose is processing of processed real world colorcharts, not raw ones
> > straight from your photos.
>
> I did make a test where two of the 24 colors in the "source" image are
> identical. It's impossible to map one color to two different target
> colors. Shouldn't colormap throw an error message? Instead it quietly
> copies the input to the output.
>

It would be very slow to check if each source color is identical.


> Is it possible to print the RMS error (before and after mapping) to the
> console output?
>

You can see any error when setting first video stream to have source colors
or better just source colorchart,
than you will see what target colors are, it should be identical to target
colorchart stream.

The more important thing is what happens with midcolors. And that depends
on colorspace/kernel used.


>
> Michael
> ___
> 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 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] Colorchart and colormap

2022-04-25 Thread Paul B Mahol
On Mon, Apr 25, 2022 at 10:06 PM Carl Zwanzig  wrote:

> On 4/25/2022 12:49 PM, Michael Koch wrote:
>
> > Am 25.04.2022 um 21:41 schrieb Paul B Mahol:
> >> There is separate software for processing real world colorcharts.
>
> > If colormap isn't for processing of real world colorcharts, then what
> else
> > is its purpose?
>

Purpose is processing of processed real world colorcharts, not raw ones
straight from your photos.


>
> And what is that "separate software"?
>
> z!
>
> ___
> 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 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] Colorchart and colormap

2022-04-25 Thread Paul B Mahol
On Mon, Apr 25, 2022 at 9:16 PM Michael Koch 
wrote:

> Hi,
>
> I have some remarks and questions about the new "colorchart" source and
> "colormap" filter.
>
> In "colorchart" is a small error in the yellow field. It should be 231,
> 199, 31.
> Source:
> https://www.xritephoto.com/documents/literature/en/ColorData-1p_EN.pdf
>
> "colorchart" is missing in the table of contents of the documentation.
>
> Could you please also add an option for the chinese version which has
> slightly different colors?
> Source: https://www.aliexpress.com/item/32738129067.html
> The RGB values are shown in the 5th picture. Code is below.
>
> In "colormap" I'd like to know how the color from the "source" image is
> calculated. If a real image of a ColorChecker is used, then the borders
> between the fields must somehow be excluded.
>

Center pixel of patch is picked, that is fastest way.
There is separate software for processing real world colorcharts.
(Dealing with geometric transformation and color averaging)


> Is the average color over the whole 64x64 field used? Or is only one
> pixel used, from the center of the 64x64 field? Or is it the average
> color over a smaller area, for example the central 24x24 pixels?
>
> Michael
>
>
>
> static const uint8_t ref_china_colors[][3] = {
>  { 115,  82,  69 }, // dark skin
>  { 204, 161, 141 }, // light skin
>  { 101, 134, 179 }, // blue sky
>  {  89, 109,  61 }, // foliage
>  { 141, 137, 194 }, // blue flower
>  { 132, 228, 208 }, // bluish green
>
>  { 249, 118,  35 }, // orange
>  {  80,  91, 182 }, // purple red
>  { 222,  91, 125 }, // moderate red
>  {  91,  63, 123 }, // purple
>  { 173, 232,  91 }, // yellow green
>  { 255, 164,  26 }, // orange yellow
>
>  {  44,  56, 142 }, // blue
>  {  74, 148,  81 }, // green
>  { 179,  42,  50 }, // red
>  { 250, 226,  21 }, // yellow
>  { 191,  81, 160 }, // magenta
>  {   6, 142, 172 }, // cyan
>
>  { 252, 252, 252 }, // white
>  { 230, 230, 230 }, // neutral 8
>  { 200, 200, 200 }, // neutral 65
>  { 143, 143, 142 }, // neutral 5
>  { 100, 100, 100 }, // neutral 35
>  {  50,  50,  50 }, // black
> };
>
> ___
> 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 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] showvolume filter memory leak

2022-04-24 Thread Paul B Mahol
On Sun, Apr 24, 2022 at 3:25 PM Bang He  wrote:

> why do you use nut format? i think that is not popular.
>

Popular is not necessarily good.


>
> On Sat, Apr 23, 2022 at 7:06 AM ramon  wrote:
>
> > You were right, there is no memory leak in the showvolume. Vagrind does
> not
> > detect memory leaks and graphmonitor oscillates in green colour between 1
> > and 2 in the queue.
> > The problem I see is in the NUT output format.
> >
> > I need to generate a vumeter from the input stream and pipe to vlc. So, I
> > make a vumeter and use a rawvideo  cocdec without encoding and pipe in
> nut
> > format to VLC. This works fine with the memory leak problem.
> > I have tried "-syncpoints none" option for nut but VLC won't play it.
> Also
> > I tried rawvideo format output but it doesn't work either.
> >
> > Is there any other way to send a raw video output to vlc?
> >
> > Thank you,
> >
> > On Tue, Apr 19, 2022 at 7:00 PM Paul B Mahol  wrote:
> >
> > > On Tue, Apr 19, 2022 at 12:15 PM ramon  wrote:
> > >
> > > > OK I'll check the pts sync as you say.
> > > >
> > > > I am simply trying the following command based on
> > > >
> > > >
> > >
> >
> https://hhsprings.bitbucket.io/docs/programming/examples/ffmpeg/audio_visualization/_showvolume_.html
> > > > and I get memory leaks.,   I don't know the reason.
> > > >
> > > > ffmpeg -re -stream_loop -1 -i test.mp3 -filter_complex
> > > > "[0:a]showvolume,scale=1920:-1,pad=1920:1080:(ow-iw)/2:(oh-ih)/2[v]"
> > -map
> > > > [v] -map 0:a -c:a copy -f null -
> > > >
> > >
> > >
> > > Used valgrind and top with exact that line and spotted nothing out of
> > > normal.
> > >
> > >
> > > >
> > > >
> > > > On Mon, Apr 18, 2022 at 8:27 PM Paul B Mahol 
> wrote:
> > > >
> > > > > On Mon, Apr 18, 2022 at 8:13 PM Paul B Mahol 
> > wrote:
> > > > >
> > > > > >
> > > > > >
> > > > > > On Mon, Apr 18, 2022 at 7:00 PM ramon  wrote:
> > > > > >
> > > > > >> Yes, I used the master versión with your 24144af2 patch.
> > > > > >> Your patch corectec the leak if  dm (draw_persistent_duration) >
> > 0,
> > > > and
> > > > > >> the
> > > > > >> leak memory occurs also with dm=0.
> > > > > >>
> > > > > >
> > > > > > Does not leak here at all.
> > > > > >
> > > > >
> > > > > Do note that if PTS get out of sync it could start to keep yet not
> > used
> > > > > frames.
> > > > >
> > > > > Could you use graphmonitor filter after showvolume filter? The
> queue
> > > > items
> > > > > displayed in video should not reach red colored numbers.
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >>
> > > > > >>
> > > > > >>
> > > > > >> On Mon, Apr 18, 2022 at 5:51 PM Paul B Mahol 
> > > > wrote:
> > > > > >>
> > > > > >> > On Mon, Apr 18, 2022 at 5:32 PM ramon 
> > wrote:
> > > > > >> >
> > > > > >> > > Thanks,but not work.  The memory leak is the same.
> > > > > >> > > The init function is called only once.
> > > > > >> > >
> > > > > >> > >
> > > > > >> > Sorry, use master version of ffmpeg.
> > > > > >> >
> > > > > >> >
> > > > > >> > >
> > > > > >> > >
> > > > > >> > > On Wed, Apr 13, 2022 at 6:24 PM Paul B Mahol <
> > one...@gmail.com>
> > > > > >> wrote:
> > > > > >> > >
> > > > > >> > > > On Wed, Apr 13, 2022 at 5:58 PM ramon 
> > > > wrote:
> > > > > >> > > >
> > > > > >> > > > > I'm testing the showolume filter to generate a single
> > > vumeter
> > > > > >> from an
> > > > > >> > > > input
> > > > > >> > > > > stream.
> 

<    1   2   3   4   5   6   7   8   9   10   >