Re: [FFmpeg-user] Basic Video Manipulation Qustions

2022-10-27 Thread pehache

Le 27/10/2022 à 17:46, John Van Ostrand a écrit :

Hi All,

The RAW video discussion had me thinking about resolution and bit rates for
video and I had some questions. These are not how-to questions but general
video questions. I'm an amateur so the contest of these questions is around
video for home movies and social media, stored and shared as data files,
and displayed on computers, tablets, and TVs.

1. Why does it make sense to convert from a lossy format to raw? You're not
gaining any more detail.


It can make sense for processing purpose



2. Does re-rendering video over and over at the same resolution, frame
rate, and bit rate cause degradation? For example, if I want to make
several changes to the video, like colour correction, splicing out
sections, transitions, titling, etc. should I be trying to do that all in
one command?


decompressing/recompressing with the exact same codec and exact same 
encoding parameters, and without making any change on the video, should 
not cause significant degradations. In all others cases degradations are 
possible.




3. I understand that -c copy is a great way to eliminate time and preserve
detail but what's the best way to do this when converting from one codec to
another, or when performing editing or other changes?


If the source had been encoded with a very high quality (say 
"transparent", or nearly), then you can consider if was like 
uncompressed. Then you can choose whatever quality you want on output.


Otherwise, if you want to maintain quality as far as possible, it's 
better to choose a slightly higher output quality than the one of the 
source video.




4. How important is it to keep standard resolutions, frame rates, and bit
rates? Do hardware decoders do better with those? Do software decoders
handle weird resolutions better?  Will strange decoding artifacts appear
more often with non-standard parameters?


This is a much too general question...

Some mobile and low power devices have restrictions, but rather linked 
to the power needed to decode the streams.



___
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-27 Thread pehache

Le 27/10/2022 à 13:31, Naveen.B a écrit :



one last question, any idea on how to know/measure how long the ffmpeg
takes to encode the file.


The answer depends on too many parameters.


i.e, basically I want to know how much time it takes to compress with
different presets and how much time it takes to encode for an uncompressed
RAW video.


Almost by definition, an truly uncompressed video is not encoded, it's 
just writing to the output the data that are in memory (well, almost... 
there's still possibly the conversion of the pixel format, from RGB to 
YUV420 for instance, but this is quite fast). What will limit the speed 
is the read/write performances on the disk you are using, and/or the 
time needed to decode the input video.


___
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 is a "pad" in the context of an "input pad", an "output pad" and a "filter pad"

2022-10-27 Thread Anatoly
On Thu, 27 Oct 2022 15:57:59 -0400
Clay via ffmpeg-user  wrote:

> Dumb ffmpeg question alert:
> 
> What is a "pad" in the context of an "input pad", an "output pad" and
> a "filter pad"?
> 
> I understand the concept of padding a video with horizontal or
> vertical bars, padding audio with dead air or some other audio, but
> this is different.
> Is there a technical description of the actual term "pad" used to
> describe command line items in the ffmpeg execution string?
https://en.wikipedia.org/wiki/Contact_pad

___
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 is a "pad" in the context of an "input pad", an "output pad" and a "filter pad"

2022-10-27 Thread Phil Rhodes via ffmpeg-user
 "Pad" in audio engineering usually means "to attenuate."
"Pad that down a bit," meaning "reduce the volume."
P
On Thursday, 27 October 2022 at 21:18:46 BST, Michael Koch 
 wrote:  
 
 Am 27.10.2022 um 21:57 schrieb Clay via ffmpeg-user:
> Dumb ffmpeg question alert:
>
> What is a "pad" in the context of an "input pad", an "output pad" and a
> "filter pad"?

"input pad" and "output pad" are described in chapter 32:
https://www.ffmpeg.org/ffmpeg-all.html#Filtergraph-description

"filter pad"? I don't know.

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] What is a "pad" in the context of an "input pad", an "output pad" and a "filter pad"

2022-10-27 Thread Michael Koch

Am 27.10.2022 um 21:57 schrieb Clay via ffmpeg-user:

Dumb ffmpeg question alert:

What is a "pad" in the context of an "input pad", an "output pad" and a
"filter pad"?


"input pad" and "output pad" are described in chapter 32:
https://www.ffmpeg.org/ffmpeg-all.html#Filtergraph-description

"filter pad"? I don't know.

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] What is a "pad" in the context of an "input pad", an "output pad" and a "filter pad"

2022-10-27 Thread Clay via ffmpeg-user
Dumb ffmpeg question alert:

What is a "pad" in the context of an "input pad", an "output pad" and a
"filter pad"?

I understand the concept of padding a video with horizontal or vertical
bars, padding audio with dead air or some other audio, but this is
different.
Is there a technical description of the actual term "pad" used to
describe command line items in the ffmpeg execution string?

There are a few references in the main ffmpeg documentation
(https://ffmpeg.org/documentation.html) and a search of the ffmpeg-user
archives brings many usages of the term, yet no actual description (385
hits:
https://www.mail-archive.com/search?l=ffmpeg-user%40ffmpeg.org=+pad+).

While I can infer the meaning, it would be great to get a meaningfully
pedantic description from someone intheknow.

On the interwebs I found this description:

PAD [https://www.computerhope.com/jargon/p/pad.htm]
Updated: 10/17/2017 by Computer Hope

PAD may refer to any of the following:
1. When referring to a network, PAD, short for packet
assembler/disassembler, is a device capable of converting from one
packet into another. 

...I presume this means to describe a device that converts packetized
data from one packet format into another packet format while preserving
the data [or information] contained within the original packet.
...This seems a little bit like converting a stream/file from one codec
(e.g. h.264) into another (e.g. h.265) but that doesn't quite match the
inference. 

___
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] Basic Video Manipulation Qustions

2022-10-27 Thread Phil Rhodes via ffmpeg-user
 I suppose there's a couple of other things to be said about raw video, or in 
fact any less-complex codec.
First, it requires less CPU time to play it back. If for some reason you're 
storage-rich but CPU poor in some very specific application, especially some 
piece of embedded electronics where you're playing back a fairly low-resolution 
animated icon, or some short loop of video, then it may be worthwhile 
allocating more storage for something in order to have it play back quickly 
with low effort. Low effort can mean low cost hardware, low power consumption, 
and so on. Storage is generally more expensive than CPU time, but depending on 
the specifics of certain projects may not always be.
Second, and leading on from that, including a codec can involve a lot more 
complexity in some piece of software or firmware. Using someone else's API to 
decode a bit of video can involve a lot of extremely expensive software 
engineering time, as well as engaging licensing issues that you may not want to 
deal with.
This is why things like raw video, as well as old, outdated codecs, still get 
used.
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".


Re: [FFmpeg-user] Basic Video Manipulation Qustions

2022-10-27 Thread Clay

Carl's comments are great.  I try to carve out duplicate content, but
this Q format may allow for leaving Carl's initial reply inline.
>> 1. Why does it make sense to convert from a lossy format to raw?
>> You're not
>> gaining any more detail.
>
> It doesn't, unless you need raw for some further processing (that's
> what happens in the ffmpeg pipeline- demux, decode, filter/transform,
> encode, mux, see https://ffmpeg.org/ffmpeg.html#Detailed-description).
>
>> 2. Does re-rendering video over and over at the same resolution, frame
>> rate, and bit rate cause degradation? For example, if I want to make
>> several changes to the video, like colour correction, splicing out
>> sections, transitions, titling, etc. should I be trying to do that
>> all in
>> one command?
>
> It can, and yes or store the intermediate files in a lossless format
> (which could be raw frames in a container); I prefer intermediate
> files as the command lines can get complex and if I mess something up
> or don't like it, part of the work has already been done (as an
> ancient IT person, keeping backups of each step is assumed).
>
> Or use some ffmpeg library based software that allows for you to
> effectively script/render the output.
The stacked command-line ability of ffmpeg is a blessing and a curse;
python-ffmpeg (and other) wrappers really help to harness the
complexity. There are several python wrapper efforts, here are two of
the most popular: https://github.com/PyAV-Org/PyAV and
https://github.com/kkroening/ffmpeg-python (doing a search on github
illuminates 850 repos)
>> 3. I understand that -c copy is a great way to eliminate time and
>> preserve
>> detail but what's the best way to do this when converting from one
>> codec to
>> another, or when performing editing or other changes?
>
> Copy does just that, it copies; changing the
> encoding/size/pixel-format/etc requires going through an
> uncompressed/raw state (the pipeline).
We use Copy to preserve quality between various ffmpeg actions when
possible.
>
>> 4. How important is it to keep standard resolutions, frame rates, and
>> bit
>> rates? Do hardware decoders do better with those? Do software decoders
>> handle weird resolutions better?  Will strange decoding artifacts appear
>> more often with non-standard parameters?
>
> Importance is relative. If the final output must be played on a wide
> varieties of player, then stick to the standards and it's more likely
> to work. Bit rates- AFAIK there are no "standards" for compressed
> video & audio, only conventions or guidelines to use a certain max
> rate to get a given quality (and some media, like dvd/bluray, can only
> go so fast). I can't answer for how s/w decoders play with
> non-standard resolutions. And as I understand, some decoders get wonky
> the resolution isn't divisible by 8.
HLS (http packaged mp4) has some Apple recommended bitrates and sizes. 
For example, they recommend 2mbps avg-bitrate for wifi streaming and
730kbps for cellular streaming along with a slew of pixel
recommendations
(https://developer.apple.com/documentation/http_live_streaming/http_live_streaming_hls_authoring_specification_for_apple_devices).

___
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] Basic Video Manipulation Qustions

2022-10-27 Thread Carl Zwanzig

[knocking off a quick answer]

On 10/27/2022 8:46 AM, John Van Ostrand wrote:

1. Why does it make sense to convert from a lossy format to raw? You're not
gaining any more detail.


It doesn't, unless you need raw for some further processing (that's what 
happens in the ffmpeg pipeline- demux, decode, filter/transform, encode, 
mux, see https://ffmpeg.org/ffmpeg.html#Detailed-description).




2. Does re-rendering video over and over at the same resolution, frame
rate, and bit rate cause degradation? For example, if I want to make
several changes to the video, like colour correction, splicing out
sections, transitions, titling, etc. should I be trying to do that all in
one command?


It can, and yes or store the intermediate files in a lossless format (which 
could be raw frames in a container); I prefer intermediate files as the 
command lines can get complex and if I mess something up or don't like it, 
part of the work has already been done (as an ancient IT person, keeping 
backups of each step is assumed).


Or use some ffmpeg library based software that allows for you to effectively 
script/render the output.



3. I understand that -c copy is a great way to eliminate time and preserve
detail but what's the best way to do this when converting from one codec to
another, or when performing editing or other changes?


Copy does just that, it copies; changing the encoding/size/pixel-format/etc 
requires going through an uncompressed/raw state (the pipeline).




4. How important is it to keep standard resolutions, frame rates, and bit
rates? Do hardware decoders do better with those? Do software decoders
handle weird resolutions better?  Will strange decoding artifacts appear
more often with non-standard parameters?


Importance is relative. If the final output must be played on a wide 
varieties of player, then stick to the standards and it's more likely to 
work. Bit rates- AFAIK there are no "standards" for compressed video & 
audio, only conventions or guidelines to use a certain max rate to get a 
given quality (and some media, like dvd/bluray, can only go so fast). I 
can't answer for how s/w decoders play with non-standard resolutions. And as 
I understand, some decoders get wonky the resolution isn't divisible by 8.


Hope that helps, it's a bit shy on technical rigor.

Later,

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] Basic Video Manipulation Qustions

2022-10-27 Thread John Van Ostrand
Hi All,

The RAW video discussion had me thinking about resolution and bit rates for
video and I had some questions. These are not how-to questions but general
video questions. I'm an amateur so the contest of these questions is around
video for home movies and social media, stored and shared as data files,
and displayed on computers, tablets, and TVs.

1. Why does it make sense to convert from a lossy format to raw? You're not
gaining any more detail.

2. Does re-rendering video over and over at the same resolution, frame
rate, and bit rate cause degradation? For example, if I want to make
several changes to the video, like colour correction, splicing out
sections, transitions, titling, etc. should I be trying to do that all in
one command?

3. I understand that -c copy is a great way to eliminate time and preserve
detail but what's the best way to do this when converting from one codec to
another, or when performing editing or other changes?

4. How important is it to keep standard resolutions, frame rates, and bit
rates? Do hardware decoders do better with those? Do software decoders
handle weird resolutions better?  Will strange decoding artifacts appear
more often with non-standard parameters?

Thanks
-- 
John Van Ostrand
At large on sabbatical
___
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-27 Thread Carl Zwanzig

On 10/27/2022 4:31 AM, Naveen.B wrote:

one last question, any idea on how to know/measure how long the ffmpeg
takes to encode the file.
i.e, basically I want to know how much time it takes to compress with
different presets and how much time it takes to encode for an uncompressed
RAW video.


By timing it yourself, but I'm not sure where "presets" comes in because raw 
frames to raw frames isn't going to take much time.


And we'd still like to know why you need raw output frames and a raw (no 
container) output file; that all seems to be an artificial constraint.


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".


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".


[FFmpeg-user] “Brick wall” high pass filter

2022-10-27 Thread Benjamin Houtman
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
-- 
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".


Re: [FFmpeg-user] encode to RAW video

2022-10-27 Thread Naveen.B
>
> > I tried by giving the input with -pix_fmt, it's the same error.
> >
> > Yes, I want raw video. I have converted RAW files to .mp4 successfully
> with
> > uncompressed, the size of the .mp4 format video was less comparatively.
> > I have 30 RAW files with each file is around 4Mbps (so, 30 RAW
> > filesx4Mbps=180Mbps for one second), the output of the video file size
> > (.mp4) is coming around 18 Mbps, so I am assuming .mp4 video format is
> > doing some compression and hence I need to try this with RAW video.
> >
> > This is the command I tried for .mp4 file video which is coming 18Mbps as
> > output video file size,
> > *ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i
> CapturedImage-%03d.raw
> > -c:v libx264 -pix_fmt yuv420p -preset fast -profile:v main -level:v 4.0
> > -crf 1 raw_video.mp4*
> >
>
> Try this :
>
> ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i
> CapturedImage-%03d.raw -c:v rawvideo -pix_fmt yuv420p -f rawvideo
> output.raw
>
> Alternatively you can put the raw video stream in a container such as MKV:
>
> ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i
> CapturedImage-%03d.raw -c:v rawvideo -pix_fmt yuv420p output.mkv
>
> In either case I'm not sure it will easy to read the output file with
> classical players.
>
> fantastic, it worked, thanks a lot for your support!

one last question, any idea on how to know/measure how long the ffmpeg
takes to encode the file.
i.e, basically I want to know how much time it takes to compress with
different presets and how much time it takes to encode for an uncompressed
RAW video.

Kind Regards,
Naveen B.
___
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".