Re: [FFmpeg-user] ffmpeg reported fps different than actual file's

2017-08-01 Thread tasos

Hello and thanks for replying.
This is what ffprobe gives me(i should have mentioned it earlier)

Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, 
bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 5593 kb/s, 50 fps, 25 
tbr, 50 tbn, 50 tbc



On 8/2/2017 1:01 AM, Simon Brown wrote:

On 1 August 2017 at 22:59, tasos  wrote:


Hello.
I get a video file with

ffmpeg -y   -i /dev/dvb/adapter0/dvr0 -c:v copy -c:a copy   foo.avi
This file is displayed  on vlc  as a 50fps video file.

Input #0, mpegts, from '/dev/dvb/adapter0/dvr0':

   Duration: N/A, start: 7972.129344, bitrate: N/A
   Program 1
 Stream #0:0[0x6e]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25
tbr, 90k tbn, 50 tbc
 Stream #0:1[0x78]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
stereo, s16p, 128 kb/s
 Stream #0:2[0x82]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels,
s16p


25 fps,25 tbr.
So my question is,is this correct?
Thanks!

My guess is that VLC is misreporting it, and it's 50 fields per second,

interlaced, and so FFMpeg is reporting it as 25 frames per second correctly.

I have seen something similar myself between the two.
Regards,
Simon
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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



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

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

Re: [FFmpeg-user] ffmpeg reported fps different than actual file's

2017-08-01 Thread Simon Brown
On 1 August 2017 at 22:59, tasos  wrote:

> Hello.
> I get a video file with
>
> ffmpeg -y   -i /dev/dvb/adapter0/dvr0 -c:v copy -c:a copy   foo.avi
>>
> This file is displayed  on vlc  as a 50fps video file.
>
> Input #0, mpegts, from '/dev/dvb/adapter0/dvr0':
>>   Duration: N/A, start: 7972.129344, bitrate: N/A
>>   Program 1
>> Stream #0:0[0x6e]: Video: h264 (High) ([27][0][0][0] / 0x001B),
>> yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25
>> tbr, 90k tbn, 50 tbc
>> Stream #0:1[0x78]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz,
>> stereo, s16p, 128 kb/s
>> Stream #0:2[0x82]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels,
>> s16p
>>
> 25 fps,25 tbr.
> So my question is,is this correct?
> Thanks!
>
> My guess is that VLC is misreporting it, and it's 50 fields per second,
interlaced, and so FFMpeg is reporting it as 25 frames per second correctly.

I have seen something similar myself between the two.
Regards,
Simon
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

[FFmpeg-user] ffmpeg reported fps different than actual file's

2017-08-01 Thread tasos

Hello.
I get a video file with

ffmpeg -y   -i /dev/dvb/adapter0/dvr0 -c:v copy -c:a copy   foo.avi 

This file is displayed  on vlc  as a 50fps video file.


Input #0, mpegts, from '/dev/dvb/adapter0/dvr0':
  Duration: N/A, start: 7972.129344, bitrate: N/A
  Program 1
Stream #0:0[0x6e]: Video: h264 (High) ([27][0][0][0] / 0x001B), 
yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 
25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x78]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, 
stereo, s16p, 128 kb/s
Stream #0:2[0x82]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels, 
s16p

25 fps,25 tbr.
So my question is,is this correct?
Thanks!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] “edgedetect” with 4K resolution

2017-08-01 Thread Moritz Barsnick
On Tue, Aug 01, 2017 at 14:02:34 +, Koeck, Richard wrote:

> I have come across a problem which I am wondering if you can help me.
> I would like to run a video with 4K resolution — e.g. in RAW (.dng)
> or ProRES (.mov) format — through “edgededect”. I am interested of
> maintaining as much resolution as possible; however, which is where I
> ran into problems with the mpg compression.

> Is it possible to use a different container that “mpg” as output
> file? Or does anybody have another idea on how to process an
> “edgedetect” with 4K resolution with no or little compression.

> ffmpeg -i Body.mpg –vf “edgedetect=low=0.1:high=0.4” Body_Canny_Edge.mpg

I'm having a hard time understanding the problem. All you say is "I ran
into problems with the mpg compression". Is the quality too bad?

I can only guess: The output quality sucks, due to the fact that the
extension ".mpg" lets ffmpeg select an MPEG Program Stream (MPEG-TS)
format with the mpeg1video codec, with a bandwidth of 200 kbits/s. You
won't get any quality out of that.

Both that container and that codec are bad choices nowadays. What
container and codec are acceptable for you? How about H.264 in MP4?

Whatever you do: You need to set one of the quality options
higher/better. With H.264, I would let ffmpeg choose the default first
(which is VBR with CRF 23), which is often fine, and go from there. For
mpeg1video and mpeg2video, I believe the option is "-qscale", and lower
is better. Instead, you could also set a bitrate and see if that helps,
e.g. with "-b:v 20M" (depending on codec).

I recommend H.264/MP4:

$ ffmpeg -i Body.mpg –vf "edgedetect=low=0.1:high=0.4" Body_Canny_Edge.mp4
(If that doesn't choose the codec H.264 for you, you need to set "-c:v
libx264" as output option.)

To increase the quality for libx264, add e.g. "-crf 22". 23 is the
default, lower is better.

BTW, your input is most likely named "mpg" without being an MPEG-PS. We
would know, had you shown us the command's complete, uncut console
output.

Gruß,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

[FFmpeg-user] Contract work

2017-08-01 Thread Holger Jurna
Hi, I am offering a contract consulting job.

I am downloading files from a Hikvision surveillance camera's SD card an
merge them on my server using FFMPEG. Unfortunately the new - merged - file
has audio/picture problems. Can anyone help?

Best regards,

Holger Jurna
Jurna Publishing Ltd.
Colgne/Germany
0049 173 545 64 19
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Feeding encoder output to filter_complex

2017-08-01 Thread Nicolas George
Le quartidi 14 thermidor, an CCXXV, Nitish S Prabhu a écrit :
> I wanted to know if we can feed the output of an encode operation to a 
> "filter_complex" with a command like:

No, it is not possible.

Regards,

-- 
  Nicolas George


signature.asc
Description: Digital signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Libraries missing?

2017-08-01 Thread Michelle
Well...

Renaming the file does work.

Why kdenlive wouldn't accept it with a .MOD extension, but takes it
happily with a .mpg extension, I don't have a clue.

But it works !!!

Thank you so much for this solution.

Exactly what's going on, I'm not sure, because I'm running kdenlive on
Ubuntu... so it is loading a number of KDE libraries.

Wow. Who'd have thought that simply changing the extension would do it?
Doesn't anything look inside the headers any more?!?!

Thanks again.

Michelle.

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

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

[FFmpeg-user] Feeding encoder output to filter_complex

2017-08-01 Thread Nitish S Prabhu
Hi,

I wanted to know if we can feed the output of an encode operation to a 
"filter_complex" with a command like:
"ffmpeg -i input.mp4 -c:v libx264 -b:v 1k "[encoder-output-1]" \
-c:v libx264 -b:v 5000k "[encoder-output-2]" \
-c:v libx264 -b:v 2000k "[encoder-output-3]" \
-filter_complex "[encoder-output-1][0:v]psnr" -f null - \
-filter_complex "[encoder-output-2][0:v]psnr" -f null -\
-filter_complex "[encoder-output-3][0:v]psnr" -f null - "

If we can do something like this, I wanted to know how I need to name the 
output pad of the encoder, so that I can reference/map it in the filter_complex
If not, please let me know what is the easiest way to achieve something like 
this.

Note:
1. I want to use filter_complex here, rather than use the psnr x264 option, as 
I will be replacing the x264 encoder with something else (which doesn't support 
PSNR computation)
2. I don't want to dump the output of the encoder to a file and then feed it to 
another ffmpeg pipeline to compute psnr
3. I want to avoid using pipes, as I will be generating multiple bitrate 
streams from the encoder

Thanks,

Best Regards,
Nitish

This is confidential Ittiam property.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

[FFmpeg-user] “edgedetect” with 4K resolution

2017-08-01 Thread Koeck, Richard
Hi Everybody in the FFMPG User Community,

I have come across a problem which I am wondering if you can help me. I would 
like to run a video with 4K resolution — e.g. in RAW (.dng) or ProRES (.mov) 
format — through “edgededect”. I am interested of maintaining as much 
resolution as possible; however, which is where I ran into problems with the 
mpg compression.

Is it possible to use a different container that “mpg” as output file? Or does 
anybody have another idea on how to process an “edgedetect” with 4K resolution 
with no or little compression.

Thank you for your suggestions,
Richard



Hallo FFMPEG Community,

Ich hatte für Euch eine Frage. Mein Ausgangsmaterial ist ein video mit 4K 
Auflösung; zum Beispiel in den Formaten RAW (.dng) oder ProRES (.mov). Ist es 
möglich das FFMPEG Tool zu benutzen um eine “edgedetect” durchlaufen zu lassen, 
wobei mir es natürlich wichtig wäre so wenig wie möglich an Auflösung durch 
Kompression zu verlieren.

Ich hatte vor einiger Zeit Versuche gemacht, die allerdings nicht besonders 
erfolgreich waren; mit unten genannten Skript.

ffmpeg -i Body.mpg –vf “edgedetect=low=0.1:high=0.4” Body_Canny_Edge.mpg

Falls das mit FFMPEG nicht möglich ist (da .mpg), kennst ihr vielleicht ein 
andere Môglichkeit oder Werkzeug mit dem so etwas zu verwirklichen ist?

Mit freundlichen Gruessen,
Richard

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

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

Re: [FFmpeg-user] Color Channel Expression

2017-08-01 Thread Jon bae
2017-08-01 11:13 GMT+02:00 Paul B Mahol :

> On 8/1/17, Jon bae  wrote:
> > 2017-08-01 9:53 GMT+02:00 Paul B Mahol :
> >
> >> On 8/1/17, Jon bae  wrote:
> >> > 2017-07-31 22:16 GMT+02:00 Paul B Mahol :
> >> >
> >> >> On 7/31/17, Jonathan Baecker  wrote:
> >> >> >
> >> >> >
> >> >> > 2017-07-31 14:41 GMT+02:00 Paul B Mahol  >> >> > >:
> >> >> >
> >> >> > On 7/31/17, Jon bae  >> >> > >
> >> >> > wrote:
> >> >> >  > 2017-07-31 14:00 GMT+02:00 Paul B Mahol  >> >> > >:
> >> >> >  >
> >> >> >  >> On 7/31/17, Jon bae  >> >> > > wrote:
> >> >> >  >> > 2017-07-31 10:30 GMT+02:00 Paul B Mahol <
> one...@gmail.com
> >> >> > >:
> >> >> >  >> >>
> >> >> >  >> >>>
> >> >> >  >> >>> What exactly you tried?
> >> >> >  >> >>>
> >> >> >  >> >>> Perhaps you want premultiply filter?
> >> >> >  >> >>>
> >> >> >  >> >>> Yes I have a video and a lower third, and I want to
> >> overlay
> >> >> > the lower
> >> >> >  >> >> third. But my alpha channel from the lower third is not
> >> >> > pre-devided
> >> >> >  >> >> with
> >> >> >  >> >> the alpha channel, so  I need to do a channel division
> in
> >> >> > ffmpeg.
> >> >> >  >> >> Something like:
> >> >> >  >> >>
> >> >> >  >> >> ffmpeg -i video.mp4 -i lowerthird.png -filter_complex
> >> >> >  >> >> [1:v]geq=r=r/a:g=g/a:b=b/a[gq];[0:v][gq]overlay ...
> >> >> output.mp4
> >> >> >  >> >>
> >> >> >  >> >> I see that you wrote a filter for this, but can you
> please
> >> >> > give me an
> >> >> >  >> > example of how it works? I don't get it to run.
> >> >> >  >>
> >> >> >  >> "I don't get it to run" means nothing to me.
> >> >> >  >>
> >> >> >  >> I'm not sure if I use the filter correct... But with this:
> >> >> >  >
> >> >> >  > ffmpeg -i video.mp4 -i image.png -filter_complex
> >> >> >  > "[0:v]format=rgba[a];[1:v]format=rgba[b];[a][b]premultiply"
> >> >> >  >
> >> >> >  > My result is, that everything what had alpha = 0, in my
> image,
> >> >> > is
> >> >> > now
> >> >> >  > black. Mybe I understand the use case wrong, but how you
> would
> >> >> > use this
> >> >> >  > filter?
> >> >> >
> >> >> > Try harder to explain your use case?
> >> >> >
> >> >> > Sorry, my english is not so good, but I will try it. In the
> >> >> > attachment
> >> >> > you found 3 images. Universum.png is my original lower third, it
> >> >> > comes
> >> >> > out from blackmagic fusion. Universum-comp.jpg show the composite
> of
> >> >> > a
> >> >> > background video with the lower third, this is the correct result.
> >> >> > The
> >> >> > Universium-ffmpeg is the version from ffmpeg, as you see ffmpeg
> >> handles
> >> >> > the alpha channel different so the lower third is more dark.
> >> >> >
> >> >> > I can simulate the same effect, from ffmpeg, in my compositing
> >> program,
> >> >> > when I load the lower third image with the option "Post-Multiply by
> >> >> > Alpha". I guess this is what ffmpeg does in Background, when it
> load
> >> >> > images with alpha channel.
> >> >> > To get rid of this effect now in my composition program I have to
> >> >> > divide
> >> >> > the color channel from the lower third with its own alpha:
> >> >> > red/alpha;green/alpha;blue/alpha. Now I can overlay the lower
> third
> >> and
> >> >> > the result is correct.
> >> >> >
> >> >> > This division now I would need in ffmpeg. I though I can do it with
> >> >> > your
> >> >> > premultiply filter, but maybe not.
> >> >>
> >> >> Perhaps you want overlay filter?
> >> >>
> >> >
> >> > No the overlay filter don't handle the alpha channel correct, that is
> >> what
> >> > I was trying to say.
> >> >
> >> > You can try it by your own - get this 3 images and run this command:
> >> >
> >> > ffmpeg -loop 1 -f image2 -i backgroud.png -i multiplied-alpha.png
> >> > -filter_complex overlay -pix_fmt rgb24 -f sdl "multiplied alpha"
> >> >
> >> > ffmpeg -loop 1 -f image2 -i backgroud.png -i pre-divide-alpha.png
> >> > -filter_complex overlay -pix_fmt rgb24 -f sdl "divide alpha"
> >> >
> >> > The second one overlay the image correct. The first one overlay the
> >> > image
> >> > different, because the alpha channel is not the same.
> >> >
> >>
> >> I stll do not know what you are trying to tell me.
> >>
> >> Do you have equatition how should R/G/B be calculated with Alpha?
> >>
> >
> > I think to, that my hole description make it more complicate, then my
> > question to the begin. I was trying to tell you, that my image, what I
> want
> > to overlay, need to be process before, because its alpha channel is not
> in
> > a way ffmpeg needs it for the overlay filter.
> >
> > You know that there is different way how a image have its color
> calculated
> > with its own alpha channel. The color can be multiplied with the alpha,
> or
> > can be straight. (

Re: [FFmpeg-user] Libraries missing?

2017-08-01 Thread Evert Vorster
Hi there, Moritz.

I did read the entire thread, and I see that transcoding the file works for
her, but the solution seemed overly complex. Simply renaming the file seems
much simpler and less error prone.

This lady wants to edit the video in Kdenlive, and Kdenlive is able to edit
the video directly without a transcoding step.
The issue is that Kdenlive trusts the OS to pass the correct mimetype to it
for any file it tries to open.
So it does not open the .MOD file as a video, even when ignoring the
extentions. There does not seem to be a way around this.
Interestingly enough this would hint that I could use .MOD (the proper
ones) as backing audio for video. Changing the extention changes the
detected mimetipe in KDE. I doubt that this is something the the KDE devs
are going to change.

As I said, in her case the most simple thing to do would be to rename the
video to have a .mpg extention.

Then Kdenlive tries to open it as a video, and does the right thing from
then on. It even works when there is no extention to the file, as then it
uses the unix way and actually looks inside the file, but this does
introduce an extra step in the lady's workflow, as files with no extention
is not automatically detected as video files, and filtered out.
This course of action avoids the quality loss that comes with a transcode,
as well as the time element.

I agree that this is rather hackish, and completely off topic for an ffmpeg
thread, but it does solve the original poster's original problem.

Kind regards,
-Evert Vorster-

On 1 August 2017 at 08:57, Moritz Barsnick  wrote:

> On Tue, Aug 01, 2017 at 08:17:09 +0100, Evert Vorster wrote:
>
> > identifies a .MOD file as a MOD-TRACKER file, which I remember playing
> > around on with an 8086 somewhere in the 1990's.
> >
> > Using your file in the example , this works:
> >
> > ffplay -f mpeg -i MOV015.MOD
>
> Does anyone ever read the complete thread? Michelle reported that that
> was solved in this email:
> http://ffmpeg.org/pipermail/ffmpeg-user/2017-July/036829.html
>
> > You may also be able to tell the operating system to interpret the .MOD
> > files as video files, but this involves tinkering with the insides of a
> > system that is best not tinkered with unless you want to learn some very
> > deep and very limited-use knowledge.
>
> Really? You can tell ffmpeg with "-f mpeg". Applications that trust
> file extensions and file extensions only are so ... Windows.
>
> Moritz
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>



-- 
Evert Vorster
Isometrix Acquistion Superchief
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Color Channel Expression

2017-08-01 Thread Paul B Mahol
On 8/1/17, Jon bae  wrote:
> 2017-08-01 9:53 GMT+02:00 Paul B Mahol :
>
>> On 8/1/17, Jon bae  wrote:
>> > 2017-07-31 22:16 GMT+02:00 Paul B Mahol :
>> >
>> >> On 7/31/17, Jonathan Baecker  wrote:
>> >> >
>> >> >
>> >> > 2017-07-31 14:41 GMT+02:00 Paul B Mahol > >> > >:
>> >> >
>> >> > On 7/31/17, Jon bae > >> > >
>> >> > wrote:
>> >> >  > 2017-07-31 14:00 GMT+02:00 Paul B Mahol > >> > >:
>> >> >  >
>> >> >  >> On 7/31/17, Jon bae > >> > > wrote:
>> >> >  >> > 2017-07-31 10:30 GMT+02:00 Paul B Mahol > >> > >:
>> >> >  >> >>
>> >> >  >> >>>
>> >> >  >> >>> What exactly you tried?
>> >> >  >> >>>
>> >> >  >> >>> Perhaps you want premultiply filter?
>> >> >  >> >>>
>> >> >  >> >>> Yes I have a video and a lower third, and I want to
>> overlay
>> >> > the lower
>> >> >  >> >> third. But my alpha channel from the lower third is not
>> >> > pre-devided
>> >> >  >> >> with
>> >> >  >> >> the alpha channel, so  I need to do a channel division in
>> >> > ffmpeg.
>> >> >  >> >> Something like:
>> >> >  >> >>
>> >> >  >> >> ffmpeg -i video.mp4 -i lowerthird.png -filter_complex
>> >> >  >> >> [1:v]geq=r=r/a:g=g/a:b=b/a[gq];[0:v][gq]overlay ...
>> >> output.mp4
>> >> >  >> >>
>> >> >  >> >> I see that you wrote a filter for this, but can you please
>> >> > give me an
>> >> >  >> > example of how it works? I don't get it to run.
>> >> >  >>
>> >> >  >> "I don't get it to run" means nothing to me.
>> >> >  >>
>> >> >  >> I'm not sure if I use the filter correct... But with this:
>> >> >  >
>> >> >  > ffmpeg -i video.mp4 -i image.png -filter_complex
>> >> >  > "[0:v]format=rgba[a];[1:v]format=rgba[b];[a][b]premultiply"
>> >> >  >
>> >> >  > My result is, that everything what had alpha = 0, in my image,
>> >> > is
>> >> > now
>> >> >  > black. Mybe I understand the use case wrong, but how you would
>> >> > use this
>> >> >  > filter?
>> >> >
>> >> > Try harder to explain your use case?
>> >> >
>> >> > Sorry, my english is not so good, but I will try it. In the
>> >> > attachment
>> >> > you found 3 images. Universum.png is my original lower third, it
>> >> > comes
>> >> > out from blackmagic fusion. Universum-comp.jpg show the composite of
>> >> > a
>> >> > background video with the lower third, this is the correct result.
>> >> > The
>> >> > Universium-ffmpeg is the version from ffmpeg, as you see ffmpeg
>> handles
>> >> > the alpha channel different so the lower third is more dark.
>> >> >
>> >> > I can simulate the same effect, from ffmpeg, in my compositing
>> program,
>> >> > when I load the lower third image with the option "Post-Multiply by
>> >> > Alpha". I guess this is what ffmpeg does in Background, when it load
>> >> > images with alpha channel.
>> >> > To get rid of this effect now in my composition program I have to
>> >> > divide
>> >> > the color channel from the lower third with its own alpha:
>> >> > red/alpha;green/alpha;blue/alpha. Now I can overlay the lower third
>> and
>> >> > the result is correct.
>> >> >
>> >> > This division now I would need in ffmpeg. I though I can do it with
>> >> > your
>> >> > premultiply filter, but maybe not.
>> >>
>> >> Perhaps you want overlay filter?
>> >>
>> >
>> > No the overlay filter don't handle the alpha channel correct, that is
>> what
>> > I was trying to say.
>> >
>> > You can try it by your own - get this 3 images and run this command:
>> >
>> > ffmpeg -loop 1 -f image2 -i backgroud.png -i multiplied-alpha.png
>> > -filter_complex overlay -pix_fmt rgb24 -f sdl "multiplied alpha"
>> >
>> > ffmpeg -loop 1 -f image2 -i backgroud.png -i pre-divide-alpha.png
>> > -filter_complex overlay -pix_fmt rgb24 -f sdl "divide alpha"
>> >
>> > The second one overlay the image correct. The first one overlay the
>> > image
>> > different, because the alpha channel is not the same.
>> >
>>
>> I stll do not know what you are trying to tell me.
>>
>> Do you have equatition how should R/G/B be calculated with Alpha?
>>
>
> I think to, that my hole description make it more complicate, then my
> question to the begin. I was trying to tell you, that my image, what I want
> to overlay, need to be process before, because its alpha channel is not in
> a way ffmpeg needs it for the overlay filter.
>
> You know that there is different way how a image have its color calculated
> with its own alpha channel. The color can be multiplied with the alpha, or
> can be straight. (
> https://microsoft.github.io/Win2D/html/PremultipliedAlpha.htm )
>
> My image now have a multiplied alpha. To get a correct overlay I have to:
>
> *a.* unmultiply the alpha channel
>

I'm just writing this filter. But you could do this really slowly with
geq filter.


> ImageColor/ImageAlpha
> or:
>
> *b.* to overlay the image wi

Re: [FFmpeg-user] Color Channel Expression

2017-08-01 Thread Jon bae
2017-08-01 9:53 GMT+02:00 Paul B Mahol :

> On 8/1/17, Jon bae  wrote:
> > 2017-07-31 22:16 GMT+02:00 Paul B Mahol :
> >
> >> On 7/31/17, Jonathan Baecker  wrote:
> >> >
> >> >
> >> > 2017-07-31 14:41 GMT+02:00 Paul B Mahol  >> > >:
> >> >
> >> > On 7/31/17, Jon bae  >> > >
> >> > wrote:
> >> >  > 2017-07-31 14:00 GMT+02:00 Paul B Mahol  >> > >:
> >> >  >
> >> >  >> On 7/31/17, Jon bae  >> > > wrote:
> >> >  >> > 2017-07-31 10:30 GMT+02:00 Paul B Mahol  >> > >:
> >> >  >> >>
> >> >  >> >>>
> >> >  >> >>> What exactly you tried?
> >> >  >> >>>
> >> >  >> >>> Perhaps you want premultiply filter?
> >> >  >> >>>
> >> >  >> >>> Yes I have a video and a lower third, and I want to
> overlay
> >> > the lower
> >> >  >> >> third. But my alpha channel from the lower third is not
> >> > pre-devided
> >> >  >> >> with
> >> >  >> >> the alpha channel, so  I need to do a channel division in
> >> > ffmpeg.
> >> >  >> >> Something like:
> >> >  >> >>
> >> >  >> >> ffmpeg -i video.mp4 -i lowerthird.png -filter_complex
> >> >  >> >> [1:v]geq=r=r/a:g=g/a:b=b/a[gq];[0:v][gq]overlay ...
> >> output.mp4
> >> >  >> >>
> >> >  >> >> I see that you wrote a filter for this, but can you please
> >> > give me an
> >> >  >> > example of how it works? I don't get it to run.
> >> >  >>
> >> >  >> "I don't get it to run" means nothing to me.
> >> >  >>
> >> >  >> I'm not sure if I use the filter correct... But with this:
> >> >  >
> >> >  > ffmpeg -i video.mp4 -i image.png -filter_complex
> >> >  > "[0:v]format=rgba[a];[1:v]format=rgba[b];[a][b]premultiply"
> >> >  >
> >> >  > My result is, that everything what had alpha = 0, in my image,
> >> > is
> >> > now
> >> >  > black. Mybe I understand the use case wrong, but how you would
> >> > use this
> >> >  > filter?
> >> >
> >> > Try harder to explain your use case?
> >> >
> >> > Sorry, my english is not so good, but I will try it. In the attachment
> >> > you found 3 images. Universum.png is my original lower third, it comes
> >> > out from blackmagic fusion. Universum-comp.jpg show the composite of a
> >> > background video with the lower third, this is the correct result. The
> >> > Universium-ffmpeg is the version from ffmpeg, as you see ffmpeg
> handles
> >> > the alpha channel different so the lower third is more dark.
> >> >
> >> > I can simulate the same effect, from ffmpeg, in my compositing
> program,
> >> > when I load the lower third image with the option "Post-Multiply by
> >> > Alpha". I guess this is what ffmpeg does in Background, when it load
> >> > images with alpha channel.
> >> > To get rid of this effect now in my composition program I have to
> >> > divide
> >> > the color channel from the lower third with its own alpha:
> >> > red/alpha;green/alpha;blue/alpha. Now I can overlay the lower third
> and
> >> > the result is correct.
> >> >
> >> > This division now I would need in ffmpeg. I though I can do it with
> >> > your
> >> > premultiply filter, but maybe not.
> >>
> >> Perhaps you want overlay filter?
> >>
> >
> > No the overlay filter don't handle the alpha channel correct, that is
> what
> > I was trying to say.
> >
> > You can try it by your own - get this 3 images and run this command:
> >
> > ffmpeg -loop 1 -f image2 -i backgroud.png -i multiplied-alpha.png
> > -filter_complex overlay -pix_fmt rgb24 -f sdl "multiplied alpha"
> >
> > ffmpeg -loop 1 -f image2 -i backgroud.png -i pre-divide-alpha.png
> > -filter_complex overlay -pix_fmt rgb24 -f sdl "divide alpha"
> >
> > The second one overlay the image correct. The first one overlay the image
> > different, because the alpha channel is not the same.
> >
>
> I stll do not know what you are trying to tell me.
>
> Do you have equatition how should R/G/B be calculated with Alpha?
>

I think to, that my hole description make it more complicate, then my
question to the begin. I was trying to tell you, that my image, what I want
to overlay, need to be process before, because its alpha channel is not in
a way ffmpeg needs it for the overlay filter.

You know that there is different way how a image have its color calculated
with its own alpha channel. The color can be multiplied with the alpha, or
can be straight. (
https://microsoft.github.io/Win2D/html/PremultipliedAlpha.htm )

My image now have a multiplied alpha. To get a correct overlay I have to:

*a.* unmultiply the alpha channel

ImageColor/ImageAlpha
or:

*b.* to overlay the image with a different math operation:


foregroundColor + ( backgroundColor * ( 1 - foregroundAlpha ) )


I have make now more tests and it look like that method *a.* still not
working 100%, even when it should. But method *b.* works.


So my new question is: can ffmpeg combine images with a diffe

Re: [FFmpeg-user] Color Channel Expression

2017-08-01 Thread Gyan
> input > red/alpha , green/alpha , blue/alpha > output
> ffmpeg -i video.mp4 -i lowerthird.png -filter_complex
>[1:v]geq=r=r/a:g=g/a:b=b/a[gq];[0:v][gq]overlay ...
> >> output.mp4
>

Use

ffmpeg -i video.mp4 -i lowerthird.png -filter_complex
[1:v]geq=r='p(X,Y)/alpha(X,Y)':g='p(X,Y)/alpha(X,Y)':b='p(X,Y)/alpha(X,Y)':a='p(X,Y)'[gq];[0:v][gq]overlay
.. output.mp4
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Libraries missing?

2017-08-01 Thread Reto Kromer
Moritz Barsnick wrote:

>Does anyone ever read the complete thread? Michelle reported
>that that was solved in this email:
>http://ffmpeg.org/pipermail/ffmpeg-user/2017-July/036829.html

Yes, and as said two or three times, it actually does work well
with the current release (also without the "-strict -2" flag).

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

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

Re: [FFmpeg-user] Libraries missing?

2017-08-01 Thread Moritz Barsnick
On Tue, Aug 01, 2017 at 08:17:09 +0100, Evert Vorster wrote:

> identifies a .MOD file as a MOD-TRACKER file, which I remember playing
> around on with an 8086 somewhere in the 1990's.
> 
> Using your file in the example , this works:
> 
> ffplay -f mpeg -i MOV015.MOD

Does anyone ever read the complete thread? Michelle reported that that
was solved in this email:
http://ffmpeg.org/pipermail/ffmpeg-user/2017-July/036829.html

> You may also be able to tell the operating system to interpret the .MOD
> files as video files, but this involves tinkering with the insides of a
> system that is best not tinkered with unless you want to learn some very
> deep and very limited-use knowledge.

Really? You can tell ffmpeg with "-f mpeg". Applications that trust
file extensions and file extensions only are so ... Windows.

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

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

Re: [FFmpeg-user] Color Channel Expression

2017-08-01 Thread Paul B Mahol
On 8/1/17, Jon bae  wrote:
> 2017-07-31 22:16 GMT+02:00 Paul B Mahol :
>
>> On 7/31/17, Jonathan Baecker  wrote:
>> >
>> >
>> > 2017-07-31 14:41 GMT+02:00 Paul B Mahol > > >:
>> >
>> > On 7/31/17, Jon bae > > >
>> > wrote:
>> >  > 2017-07-31 14:00 GMT+02:00 Paul B Mahol > > >:
>> >  >
>> >  >> On 7/31/17, Jon bae > > > wrote:
>> >  >> > 2017-07-31 10:30 GMT+02:00 Paul B Mahol > > >:
>> >  >> >>
>> >  >> >>>
>> >  >> >>> What exactly you tried?
>> >  >> >>>
>> >  >> >>> Perhaps you want premultiply filter?
>> >  >> >>>
>> >  >> >>> Yes I have a video and a lower third, and I want to overlay
>> > the lower
>> >  >> >> third. But my alpha channel from the lower third is not
>> > pre-devided
>> >  >> >> with
>> >  >> >> the alpha channel, so  I need to do a channel division in
>> > ffmpeg.
>> >  >> >> Something like:
>> >  >> >>
>> >  >> >> ffmpeg -i video.mp4 -i lowerthird.png -filter_complex
>> >  >> >> [1:v]geq=r=r/a:g=g/a:b=b/a[gq];[0:v][gq]overlay ...
>> output.mp4
>> >  >> >>
>> >  >> >> I see that you wrote a filter for this, but can you please
>> > give me an
>> >  >> > example of how it works? I don't get it to run.
>> >  >>
>> >  >> "I don't get it to run" means nothing to me.
>> >  >>
>> >  >> I'm not sure if I use the filter correct... But with this:
>> >  >
>> >  > ffmpeg -i video.mp4 -i image.png -filter_complex
>> >  > "[0:v]format=rgba[a];[1:v]format=rgba[b];[a][b]premultiply"
>> >  >
>> >  > My result is, that everything what had alpha = 0, in my image,
>> > is
>> > now
>> >  > black. Mybe I understand the use case wrong, but how you would
>> > use this
>> >  > filter?
>> >
>> > Try harder to explain your use case?
>> >
>> > Sorry, my english is not so good, but I will try it. In the attachment
>> > you found 3 images. Universum.png is my original lower third, it comes
>> > out from blackmagic fusion. Universum-comp.jpg show the composite of a
>> > background video with the lower third, this is the correct result. The
>> > Universium-ffmpeg is the version from ffmpeg, as you see ffmpeg handles
>> > the alpha channel different so the lower third is more dark.
>> >
>> > I can simulate the same effect, from ffmpeg, in my compositing program,
>> > when I load the lower third image with the option "Post-Multiply by
>> > Alpha". I guess this is what ffmpeg does in Background, when it load
>> > images with alpha channel.
>> > To get rid of this effect now in my composition program I have to
>> > divide
>> > the color channel from the lower third with its own alpha:
>> > red/alpha;green/alpha;blue/alpha. Now I can overlay the lower third and
>> > the result is correct.
>> >
>> > This division now I would need in ffmpeg. I though I can do it with
>> > your
>> > premultiply filter, but maybe not.
>>
>> Perhaps you want overlay filter?
>>
>
> No the overlay filter don't handle the alpha channel correct, that is what
> I was trying to say.
>
> You can try it by your own - get this 3 images and run this command:
>
> ffmpeg -loop 1 -f image2 -i backgroud.png -i multiplied-alpha.png
> -filter_complex overlay -pix_fmt rgb24 -f sdl "multiplied alpha"
>
> ffmpeg -loop 1 -f image2 -i backgroud.png -i pre-divide-alpha.png
> -filter_complex overlay -pix_fmt rgb24 -f sdl "divide alpha"
>
> The second one overlay the image correct. The first one overlay the image
> different, because the alpha channel is not the same.
>

I stll do not know what you are trying to tell me.

Do you have equatition how should R/G/B be calculated with Alpha?
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: [FFmpeg-user] Libraries missing?

2017-08-01 Thread Evert Vorster
Hi there, Michelle.

The root of the problem for you is that your operating system rightly
identifies a .MOD file as a MOD-TRACKER file, which I remember playing
around on with an 8086 somewhere in the 1990's.

Using your file in the example , this works:

ffplay -f mpeg -i MOV015.MOD

Input #0, mpeg, from 'MOV015.MOD': 0KB vq=0KB sq=0B f=0/0
  Duration: 00:05:18.24, start: 0.227389, bitrate: 9294 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first),
720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 256 kb/s
   5.97 A-V: -0.041 fd=   7 aq=   34KB vq= 1285KB sq=0B f=0/0
-
From that, the video is definitely mpeg2video stream.

The simplest option for you is to rename the .MOD files to have a .mpg
extention and kdenlive can edit them directly with no loss of quality
through transcoding.
I have tested this on my system with the latest Kdenlive release, and it
works just fine with the renamed file.

You may also be able to tell the operating system to interpret the .MOD
files as video files, but this involves tinkering with the insides of a
system that is best not tinkered with unless you want to learn some very
deep and very limited-use knowledge.

Kind regards,
Evert


On 31 July 2017 at 17:30, Michelle  wrote:

> Hi Evert,
>
> Yes, I have a snippit here - http://msknight.com/bbc/videos/MOV015.MOD
>
> Hope it helps :-)
>
> On Mon, 2017-07-31 at 11:15 +0100, Evert Vorster wrote:
> > Hi there.
> >
> > I find it strange that Kdenlive does not read the footage directly in
> > the
> > first place, it can generally read anything that ffmpeg can.
> >
> > Do you have an example file available somewhere?
> >
> > On 30 July 2017 at 15:40, msknight  wrote:
> >
> > >
> > > >
> > > > Actually each one can compile with the specific options they
> > > > need, which is not possible with "classic" distributions.
> > > I wouldn't have a clue what options I need to compile.
> > >
> > > I need to take my camera footage and convert it into something
> > > KDEnlive is
> > > happy with... that's about the sum total of my technical knowledge
> > > when it
> > > comes to conversions.
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context: http://www.ffmpeg-archive.org/
> > > Libraries-missing-tp4680761p4680776.html
> > > Sent from the FFmpeg-users mailing list archive at Nabble.com.
> > > ___
> > > ffmpeg-user mailing list
> > > ffmpeg-user@ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > >
> > > To unsubscribe, visit link above, or email
> > > ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
> > >
> >
> >
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>



-- 
Evert Vorster
Isometrix Acquistion Superchief
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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