text:
How accurately can FFmpeg cut a video to a specific duration?
Can FFmpeg cut to a hundredth of a second?
When I try to cut a video using :
ffmpeg -i input.mov -ss 0.989 -t 0.238 -r 30 -y output.mov

The video duration of output.mov is 0.27 seconds and not 0.238 seconds.
Is this something that is limited by the video frame rate?
This is the input video data:
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf58.29.100
  Duration: 00:00:04.43, start: 0.000000, bitrate: 12070 kb/s
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 11995 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : Core Media Video
      encoder         : Lavc58.54.100 libx264
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 133 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio

This is the output video data:
 Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf58.29.100
  Duration: 00:00:00.27, start: 0.000000, bitrate: 15299 kb/s
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 15144 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : Core Media Video
      encoder         : Lavc58.54.100 libx264
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 123 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio

I believe you cannot cut less than a frame dealing with video streams.
With 30 fps a single frame is 0.033(3) seconds.
The closest value for your requested 0.238 is 0.233(3). But it is less than needed and to not miss any data ffmpeg takes one more frame which results in 0.266(6). When rounded it is exactly 0.27.

Is this something that is limited by the video frame rate?

Indirectly — if the input video stream has a fixed frame rate. The true reason is system of PTS.
Every frame has its so-called presentation time stamp (PTS), expressed as an integer number.
Your input video stream has probably these PTS:

What is the meaning of these integer numbers?
They are multiples of the unit time (a tick) for the stream.

In your case, the unit time is as small as 1/15360 of second, because it is a reciprocal value of the so-called time base, and the time base for your input stream is 15360
(see ..., 15360 tbn, ... in your listing).

Here are the same PTS values and calculated corresponding times:

PTS
0
512
1024
1536
2048

Presen-tation time in seconds
0*(1/15360)=0
1*(1/15360)=1/30
2*(1/15360)=2/30
3*(1/15360)=3/30
1*(1/15360)=4/30

Similar — but inverse — calculation is performed for your time values -ss 0.989 -t 0.238:

Required starting PTS
0.989 * 15360 = 15191

Required ending PTS
(0.989 + 0.238) * 15360 = 18847

But frames with such PTS values in your input video don't exist, so FFmpeg will select frames with PTS 15360 (=30 * 512) and 18944 (=37 * 512), i.e. frame № 30 as a start frame and frame № 37 as an end frame.
There are 8 frames between frames 30 and 37 (inclusive), so the duration will be 8 * (1/30) = 8/30 seconds. It is the exact value. Your 0.27 seconds is the rounded one.


text:
ffmpeg frame rate
I have several images and I am reproducing them in 78.7ms, I am creating like the 80s video effect.
But, I am unable to find the correct ms, and those images with the original videos are unsynced.
I dumped the video to images using this command => ffmpeg -i *.mp4 the80effect/img-%d.jpg
And now, I have 48622 frames.
The video FPS is 24.
So, 48622/24 = 2025 (±)
I cannot use 2025 ms since those images will load very slow. And the approximate value is 78.7ms per frame/image.
How can I find the correct value? The video duration in seconds is 2026. I have tried all math to find this but I'm failing. How many images (one frame) per ms. Could you help me? Thank you.

How long should each image be shown for?

For the time of a normal video. The same time.

1 image = 1 frame of the video

Frame rate is Frame per second (FPS)
1 sec has 1000ms
Each input frame (image) is 78.7ms such that is 12.7 FPS
The video output is 24 FPS not 23.97 FPS
Then the repetition of each frame will be calculated by ffmpeg if using command
ffmpeg -r 12.7 -i image_%d.jpg -vf fps=24 out_video.mp4
which is 24/12.7 = 1.8897 which is quite irregular
Hope I could help you understand your question better.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Need to stop looping in After Effects
I am new to After Effects. I need to stop the animation at the end of the timeline. I've read this article and tried this solution "Stop looping in after effect", however, when I get to Layer > Time, the only options I have are Time-Reverse Layer and Time Stretch. All the other ones are grayed out.
I'm guessing my settings are wrong somewhere. Any help would be greatly appreciated!

Can you add a screenshot of the layer you are having problems with? Select the layer and press "u" to reveal all the keyframes on the layer first.

Do you mean you don't want AE to loop playback when you're previewing?
Look in the Preview tab (Windows>Preview if it's not visible) and click the button that looks like a square loop symbol

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Put two or more images on video
According this I try to put two pictures on video
ffmpeg -i video.mp4 -i photo01.jpg -i photo02.jpg  -filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,10,20)';[0:v][2:v] overlay=25:25:enable='between(t,25,35)'" -pix_fmt yuv420p -c:a copy output.mp4

no errors, but it shows only the first image, and the second is not show up.

So i find solution, making a chain
ffmpeg -i video.mp4 -i image.png -i image2.png  -filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,1,10)'[1];[1][2:v] overlay=25:25:enable='between(t,15,25)'" -pix_fmt yuv420p -c:a copy output.mp4


text:
Changing up gamma with -lavfi and ffmpeg
This is my first time posting on this forum, so don't be too rough on me, haha.
I have recently started taking up FFmpeg as a side project for my media class, and I am facing some problems when it comes to changing up some aspects of gamma/contrast.
Whenever I use a command like this:
ffmpeg -i input.mp4 -lavfi colorcontrast=gm=-1:gmw=1 -y -c:a copy output.mp4
the problem I have is of playing the specific output video (the video is only available when it is played by QuickTime Player, yet when I try to open it on other video players or video editing programs a message appears that the video is unavailable).
I have already been using other FFmpeg commands for cropping, removing audio track etc., however this is my first time trying and/or having a problem of this kind for more complex changes of video track.
Thank you and have a great day!

The following video codec settings should be the most common for all devices
-c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p

H.264 baseline profile and level 3.0 settings require less resources.


text:
ffmpeg "-shortest" yielding a clip longer than audio file
I'm working on adding .mlp audio / TrueHD w/ Atmos content into an .mkv container (certain playback programs require a video track to bitstream audio).  I'm synthesizing a color background for the duration of the clip to serve as video track.  Strangely, the command below worked for a time, but now I'm getting a clip that is 12 minutes and 2 seconds, 2 minutes longer than the audio file.  The command is as follows:
ffmpeg -i test.mlp -f lavfi -i color=c=blue:s=640x480:r=15 -acodec copy -shortest output.mkv

ffprobe on the .mlp audio is as follows:
ffprobe version 2022-01-27-git-3c831847a8-full_build-www.gyan.dev Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev7, 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-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. 19.100 / 57. 19.100
  libavcodec     59. 20.100 / 59. 20.100
  libavformat    59. 17.101 / 59. 17.101
  libavdevice    59.  5.100 / 59.  5.100
  libavfilter     8. 26.101 /  8. 26.101
  libswscale      6.  5.100 /  6.  5.100
  libswresample   4.  4.100 /  4.  4.100
  libpostproc    56.  4.100 / 56.  4.100
Input #0, truehd, from 'C:\[]\[]\[]\test.mlp':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: truehd, 48000 Hz, 7.1, s32 (24 bit)

any idea how to force a true "shortest" output?  thanks!

Please include the output from your ffmpeg command, too.

From your ffprobe output:

Input #0, truehd, from 'C:\[]\[]\[]\test.mlp':
  Duration: N/A, start: 0.000000, bitrate: N/A

No duration, no bitrate in your .mlp file. MLP format (container) is raw, it doesn't contain metadata (as a duration and bitrate).
Moreover, -acodec copy in your ffmpeg command simply copies the mlp audio as a stream of bytes, obtaining no info beyond number of bytes.
So FFmpeg has hard time to estimate the duration of your audio

no direct info about duration,
no bitrate info for a fair estimation,
it has some info from your audio stream (as the sample rate and the bit depth),
it may know the size (in bytes) of your audio stream.

It means that the duration of your audio is guessed roughly enough, which results in such a difference (the -shortest option is based only on such an approximation).
One possibility how to fix it is using the -t option (for total time) instead of -shortest, for example
ffmpeg -i test.mlp -f lavfi -i color=c=blue:s=640x480:r=15 -acodec copy -t "10:02" output.mkv

(you may use apostrophes instead of quotes – it depends on your operating system, or simply express the time in seconds: -t 602).


text:
How to find out if the yuv420 video has full or limited color range?
I'm searching for a reliable way to distinguish between the

full-range (PC) and
limited range (TV)

pixel formats in a given video.
(Particularly, I will be satisfied with a solution for Y'UV 4:2:0 H.264 videos in the MP4 container.)
So my question is
     How to reliably determine whether a particular video is full-ranged or limited ranged?

Here is what I did to find a reliable way:
I created 3 testing videos with commands
ffmpeg -f lavfi -i testsrc2=d=1                             test1.mp4
ffmpeg -f lavfi -i testsrc2=d=1 -vf scale=out_range=full    test2.mp4
ffmpeg -f lavfi -i testsrc2=d=1 -vf scale=out_range=limited test3.mp4

which is the same as
ffmpeg -f lavfi -i testsrc2=d=1                             test1.mp4
ffmpeg -f lavfi -i testsrc2=d=1 -vf scale=out_range=pc      test2.mp4
ffmpeg -f lavfi -i testsrc2=d=1 -vf scale=out_range=tv      test3.mp4

They created these files:

test1.mp4  36,974 bytes
test2.mp4  40,178 bytes
test3.mp4  36,974 bytes

where test1.mp4 and test3.mp4 have not only the same size, but they are binary identical, too.
While processing these commands, FFmpeg shows this message in the appropriate line of Output #0 section (I show the message lines of these individual ffmpeg commands together, respectively, to see differences):

Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(progressive),     ...
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(pc, progressive), ...
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv420p(tv, progressive), ...

Using ffprobe after creating videos, the appropriate lines (now from the Input #0 section) will be

Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive),      ...
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, progressive), ...
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive),      ...

Note changes in lines 2 and 3:

pixel format for full range changes from yuv420p to yuvj420p (which is strange, because developers of FFmpeg themselves discourage using this pixel format as an obsolete one),

limited range is not more mentioned (no “tv” in parentheses).

Now I will omit the test1.mp4, because it is the same as test3.mp4.
So I have 2 videos, test2.mp4 with full-range and test3.mp4 with limited range. The difference is visible (no such bright colors), as in these 2 screenshots placed one just below the other:

The difference in the ffprobe output is in the pixel format, as I already demonstrated: yuvj420p vs. yuv420p.
But the yuvj420p is an obsolete pixel format, so if I want to tell if the video is full range, I probably can't rely on its occurrence in the ffprobe output as an indicator of the full-range video.

I thank that a reliable way to distinguish between full-range and limited range is to find values outside of limited range, i.e.,

outside of interval [16, 235] for the luma component (Y'), or
outside of interval [16, 240] for color components (U, V).

So I used the signalstats filter as in this command
ffprobe -f lavfi movie='test3.mp4',signalstats \
        -show_entries frame_tags=lavfi.signalstats.YMIN,lavfi.signalstats.YMAX

and filtered the output to see only outliers.
The test2.mp4 video (full-ranged) gives me many of them:

TAG:lavfi.signalstats.YMIN=3
TAG:lavfi.signalstats.YMIN=6
TAG:lavfi.signalstats.YMIN=9
TAG:lavfi.signalstats.YMAX=237
TAG:lavfi.signalstats.YMIN=10
TAG:lavfi.signalstats.YMIN=10
TAG:lavfi.signalstats.YMIN=6
TAG:lavfi.signalstats.YMAX=240
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=0
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMAX=237
TAG:lavfi.signalstats.YMIN=1
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=5
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMIN=1
TAG:lavfi.signalstats.YMIN=4
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMAX=239
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMAX=239
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMAX=239
TAG:lavfi.signalstats.YMIN=4
TAG:lavfi.signalstats.YMIN=7
TAG:lavfi.signalstats.YMAX=239

But for my surprise, the test3.mp4 video with limited range gives me outliers, too:

TAG:lavfi.signalstats.YMIN=11
TAG:lavfi.signalstats.YMIN=11

So it is NOT a reliable way.
Let me repeat my question, accompanied by 2 secondary ones:
Main question:

How to reliably distinguish full-ranged and limited ranged videos?

Two tangential questions:

Why a video, created fully with FFmpeg, has an obsolete pixel format yuvj420p, discouraged by FFmpeg developers?

Why in a limited-range video are still values outside permitted range?

yuvj420p is not obsolete, the ffmpeg message is just misleading
Compression errors? It doesn't really matter - all values less than 16 will be 16. Same with values over 235.

As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.


text:
Fix screen recording in a prerecorded video
Since I can't find any answers elsewhere, I may as well ask here – I have a video in which there is screen tearing present in the recording, not having anything to do with my monitor or graphics card. Is there a way to fix this? I am familiar with FFmpeg and have access to Adobe editors if that helps.

I suppose that your video is 640×360. Then you may use the crop filter
ffmpeg -i "BTT jump - monk break 10.300.mp4" -vf crop=506:284:134:0 output.mp4

to cut out unused (black) part from the left and the bottom of video.
Note:
The cropdetect filter gave a little different values for width, high and x, y coordinates of the upper left corner:

... w:496 h:272 x:140 y:8 ...

i.e. it recommended to use crop=496:272:140:8. I manually adjusted these values.
Original:

Cropped:

I know how to crop the video; that's not the problem. I need to fix the screen tearing


text:
Which FFmpeg variable gives the total duration of a video?
I've spent hours searching the documentation and forums for a simple variable and it's driving me crazy. Can anyone tell me what the variable is that gives the total duration of a video, so that I can draw a progress bar on a video played by FFplay?
My filter is:
drawbox=x=0:y=ih-8:w=pts/duration*iw:h=8:color=green@0.5:t=fill

but duration is not recognised. I've tried t, time, total_time, dur, len, length, total_length, s, secs, stream_length, all to no avail. (A box does get drawn if I just put w=50, for example, so the rest is correct, but I need it to change over time.)
I'm amazed I haven't yet found a comprehensive list of these variables.
If anyone can help, I'd be super grateful. Thanks.

Total duration of video is a pretty complicated thing before the video itself is finished.;-) So there is no such a variable. An individual filter may obtain (from the previous) info such as the presentation time stamp or width, but not the total time.

That's true during streaming and encoding, but during ffplay playback the file is already complete and not being altered. I guess I'll need a whole routine just to probe the duration before playback. Pity, a single command line would've been so elegant.

FFplay also accept filters. - Anyway, there is not such a variable (for total duration), it is not such a simple thing even for a complete video. Media players only estimate the total time – in most cases with acceptable tolerance (say within 1-second interval). You have to deal with this fact, as did I and many other people.;-)

Not practical within a filterchain, sorry.
Filters are only passed information about each frame as they arrive. In fact, beside certain exceptions where side-data can be passed from the decoder to filters, a filter is completely blind to anything about the source video that isn't a decoded frame and metadata about that one frame. A filter only knows when the input has ended because it receives EOF from the stream.
You could probably come up with an ugly hack where you split the video, force it to be transparent, and draw text on one copy before passing it through reverse,select='eq(n,0)',loop=-1 to get the last frame and repeat it, which would have the total duration as text on an alpha background. You could then overlay it but that's ugly and would require keeping the entire stream in memory.

Thanks. I couldn't +1 because I've only got 11 rep.


text:
How do I mute my monitors while leaving headphones on?
Very simply, I want to be able disable my monitor speakers and leave the headphones on.  This is obviously important when recording in the same room.
All the mixers I have come across place the main level controls before the phones output, which have their own level control.  This seems like a missed opportunity.
Sounds simple enough, but the thread Home studio mixer/mic/monitor/headphone setup questions, which is the closest I've found to a statement of the question, never addresses it.

The biggest thing I am not sure how to do is set up my
  monitors/headphones on the mixer so that I can go back and forth when
  recording

Up to now, I have been driving my monitors from the 1&2 bus of a mixing console.  This allows me to turn down the speakers using the group faders.  But this console is broken, and I would like to replace it with something simpler that is strictly for monitoring (since I don't need the preamps or EQ, etc.)  It seems like a simple line mixer should be able to handle my requirements.  But even the line mixers with 2 aux buses don't have single faders for those sends.
What am I missing here?  How is this normally done?

Would be useful to know what kind of audio interface you're using.

I'm using the (discontinued) ART TubeFire 8, which has notoriously bad monitoring options.  In any case, I need more than just the output from the interface, as I also monitor audio from MIDI devices.

you are in the correct track: a small mixer would do the trick. Basically you have the pfl button that would get the specific channel(s)/souce(s) selected to your headhones jack (monitors) without modifying at all your master (and viceversa). Another option would be something like the Mackie Big Knob, made specifically for what you want, but in this case you can only select to monitor a source, not individual channels).

Thanks for the reply.  Can you give me an example of a "small" mixer that has such a feature?  I was looking for a rack unit, but I'm pretty sure I've checked all of those.  I did look at the Mackie Big Knob, but as you mention it doesn't do any mixing at all.

in just one or two RU? hmmm, nothing comes to my mind. Now I have  question for you: can't you do what you want via software? what recording software are you using? Now analyzing again the setup, a mixer wouldn't be any good. Unless you use it taking all the outputs from the ART. Let's say you have mains in outputs 1/2, drums in out 3, guitars in 4 ans so on. You can have those coming into a Mackie 1402 and 'solo'those channels to hear in your headphones. But that's NOT worth it ($400 for a monitoring device?). Again, let me know what software you are working with, so I may be more useful.

I'm using Cubase.  I was having problems with high latency, so I needed a direct monitoring configuration to work around this.  I will find out today if a system upgrade fixes this, but I think the problem remains.  I just want to control the speaker and headphones level separately.

The other thing you can do is to set a few aux outputs from the mixer you already have. How many channels you record at the same time? Forget about the 1402: it has no direct outs. The 2404 would cover your monitor issue completely and you can find something used for about $700. But the problem will arise again if you need to do overdub (latency from the prerecorded tracks).

The MOTU828 mk2 has separate levels for headphones and main out, I assume the mk3 does too.

but it will depend on how the computer behalves. The long latency was a problem before, so I think he prefers to do monitoring with analog gear before hitting the interface.

Pending some further research, I think the Samson SM-10 does everything I want.  The trick is the switch that allows you to select what goes to the phones mix, which can be Main or Monitor (as well as FX for the aux channel and "Mix B" which lets you hear the muted channels).  If I'm reading the manual right (unfortunately I couldn't find a block diagram), this will enable all kinds of configurations of interest with a clean workflow.

take into account the latency problems you had before!!! the mixer will not do anything against that.

@cbarg, thanks.  It appears that a system upgrade has fixed the latency issues.  I think I can still set up a zero-latency monitoring configuration by routing my recorded channels directly to the mixer; my experience was that the latency only affected channels being monitored through Cubase (I know, strange).  At any rate, I think this particular question is resolved.  +1 for the extra help.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Comments in script files
Is it possible to write comments into files specified by -filter_script and -filter_complex_script?

-filter_script and -filter_complex_script simply read a filtergraph from a file, and there is no support for comments within filtergraphs.


text:
Why would an ENG camera need 422 Chroma?
I can't believe it! 3CCD camcorders without the rolling shutter inferiority of the CMOS ones still exist and their sensors are even bigger!
But why does that particular camera have 422 chroma? How a field news-gathering camera designed for gathering news on the field would benefit from 422? Doesn't the consumers watch TV in 420 anyway?
I thought 4 44/22 was good for green screen applications and movie making. Why would some news van people need it?

As far as I understand, before broadcasting, your signal will be converted and changed which leads to further loss. So by providing 422, the broadcasting company has more leeway to convert/compress.
See Why is the “broadcast standard” 422 and should we be concerned about shooting 8 bit 420?


text:
Recording a two speaker event with large audience
We are doing regular events with two speakers on the floor who have their own presentations in parallel.
The event is a live hacking presentation, one speaker is the moderator and victim, the other one is the attacker who shows his virtual machines on his screen.
Until now, we have recorded those sessions with a single camera and without external microphones.
The audio quality is therefore quite bad, especially when there's much noise from the audience.
The presentations are also not very good readable because the camera is set up in an odd angle to catch the speakers without interfering with the audience.
What would be the best setup to catch such events?
I was thinking of recording both speakers with an external microphone on the floor and two cameras for each presentation.
Is this feasible?
Should we also do a screen capture to cut them in, synchronized with the speakers?

If I was doing it I would probably give both speakers a wireless lavalier (lapel) mic, and record each to a separate channel. I would have two cameras (at least), one generally staying wide (which can be a static camera if you don't have more than one operator), and one getting close shots, and following on the action or dialogue, so when one of the speakers is speaking it focuses on them.

You use the wide footage to cover the times when the close-up camera is switching back and forth. If there's a lot of to-and-fro dialogue between the two you could use a third camera, or frame the closer shot as a two-shot. If you can shoot in 4k and you're releasing in HD you can also shoot wider and use cropping to get close-ups.
You could also get audience reaction shots and as you said, the feed from any AV presentations should be recorded too. Keeping the cameras out of the way of the audience can be tricky, if you have long lenses that helps, because you can move them to the back, but it depends on the geometry of the auditorium and the gear you have available.
Lastly, the best way to edit the separate streams is to use the multicamera editing capabilities of your NLE. Premier, FCP, resolve all can do multicamera editing, and so do most of the other major NLEs. Using multicamera means that once you've synched the cameras (use the on-board sound from each camera to do this) you can watch them all playing simultaneously, and choose which angle to cut to with the keyboard, a bit like a live vision mixer. It means you can edit at close to real-time once you get the hang of it.


text:
Premiere Pro takes several minutes to render six seconds
I'm having an issue with the latest version of Premiere Pro (v13.1). I am trying to watch a 6-second video but the video does not play in the program panel. When I try rendering in to out, it takes a little longer than 3 minutes to render. After rending, I can view the video normally.
This is my first time using Premiere Pro in a long time but I have not had this issue in the past on this PC. I tried installing it on my laptop and added the same video in sequence and it works like it's supposed to. I can scrub normally and render in to out takes a couple of seconds.
I tried reinstalling the current version of Premiere Pro on my desktop but I still have the same issues. Both my laptop and desktop have the default settings for Premiere and I did not change anything after reinstalling fresh on both devices. In task manager, Premiere uses only 10% of my CPU and under GPU I see that it jumps between 0-10% GPU usage with the used GPU Engine column saying that it's not using any Pu except occasionally for decoding, but only for half a second here and there. I'm not sure if that information helps for I am using Mercury CUDA as my Playback Engine. Again the default settings. Also, both devices use SSDs.
Note that both my desktop and laptop have fresh installs of Premier Pro.
Desktop specs:
Intel i7 8th gen
32 GB RAM
RTX 2070
GTX 1070

Laptop Specs:
Intel i7 9th gen
16 GB RAM
GTX 1660ti

Enter settings and fiddle with graphics settings a little bit? I remember after effects having ray tracing settings.

What is in the six seconds?

I managed to figure out my problem. I decided to try disabling my video adapters to see if that fixed my problem thinking that there was an issue with having two dedicated GPUs. I found no problem with having two GPUs but I discovered that disabling Intel graphics on my 8th gen i7 instantly fixed my problem. I'm not sure why that was causing an issue but disabling Intel UHD 630 graphics fixes the problem.


text:
Prores ffmpeg questions
I am trying to understand how to use Prores Kostya with FFmpeg, and I have a few questions regarding this:

I have a Panasonic G85 and Gopro Hero 7 black which I used to shoot 4k in.  For 4k footage, the Panasonic records at 4:2:0 8-bit at 100 Mbps, and the Gopro 8 bit 4:2:0 at 78 Mbps.  With this in mind is there any point in selecting a Prores profile other than ProRes 422 LT?  The reason I say this is because the LT profile has 102 Mb/s, which exceeds the source footage from both cameras.
I have read that the qscale command is not needed, and a user can just select a profile which will define a standard bit rate (for LT this is 102  Mb/s). I have seen people saying that ProRes is a profile-based codec, meaning that when you select one of the profiles, it does a fixed amount of compression, defined in the spec. If you want a different compression level, you're supposed to choose a different profile, rather than change a quality setting with the qscale command, as this may result in a violation of the standard, and have the potential to cause playback issues (particularly with hardware decoders).  So with this in mind is it better to miss out the qscale command?
Why is it necessary to specify the -pix_fmt, as I thought all the 422 profiles defaulted to yuv422p10le and all the  4444 profiles defaulted to yuv4444p10le. So why is there a need to specify this value?

1) your Panasonic footage will be H.264; GoPro may be H.264 or H.265. These are inter-frame codecs whereas ProRes is an intra-frame codec (each frame is coded standalone and doesn't depend on other frames for decoding). So, you should consider a higher bitrate to maintain source quality.
2) FFmpeg does allow you to set a custom quantizer but by default it will use a fixed quality setting per profile. For custom quant, use -global_quality N.
3) FFmpeg has to convert to the given pixel format which is what output -pix_fmt will do. The encoder only encodes i.e. takes in raw uncompressed input frames and delivers coded data.

Thanks for your reply.  I just want to clarify a couple of thing: 1) You say I should consider a higher bitrate to maintain source quality.  But what is a good profile to go for to balance quality against file size?  My Panasonic footage and GoPro footage only starts out at 100Mbps and 78Mbps respectably.  So it's not very high to begin with.    2) I understand about the custom quantizer, but is there any point in using it? For comparability why not just rely on the default for that profile and if you want higher select a different profile?

Use standard. 2) No, profile default is fine.

Thanks for clarifying points 1 and 2.  With respect to point 3, why is it necessary to specify the -pix_fmt if using a ProRes 422 profile (422 HQ, ProRess 422, ProRes 422 LT, ProRes 422 Proxy) Just by selecting a 422 profile, it is obvious that the footage is to be encoded as 422.  Therefore there should be no need to tell it you want a 422 colour space.   The same as if you choose a ProRes 444 profile, I don't see why it is then necessary to tell the encoder you want the footage encoded as 444. This should be obvious based on the profile you select.  Am I missing something?

FFmpeg is modular - pix_fmt is meant for the scaler library, profile is a private instruction to the encoder. The reason there's no automatic management across the pipeline is because there are hundreds of encoders and dozens of scaler configurations, not to mention parameters for other modules so there's no non-convoluted way to make it happen by 'magic'.

Thank you very much you have answered all my questions.  Just one other thing as you seem to be very knowledgeable - Do you know what the maximum supported frame rates are when encoding to Prores and DNxHR? I read DNxHD only goes to 60fps.  But what is the limit for Prores and DNxHR?  Is is 120fps?

@tommydog35 Avid High-Resolution Workflows Guide (p 111) only shows up to 60 fps, but ffmpeg will likely encode any arbitrary rate. Some more info in How to convert a video with ffmpeg into the DNxHD / DNxHR format?

That's what I suspected that ffmpeg would work for any fps even though it is not part of the official spec.  I know this the case for Prores, so would assume this for DNxHR as well.

One final thing - If I don't set a qscale for Prores and just use profile default, will ffmpeg still produce a video with a variable bitrate?  Or does it produce a video with a constant bit rate?

Variable bitrate. A default quantization matrix is used, so encoded frame size will depend on what the visual content is.


text:
ffmpeg colormatrix operations only for 8bpc?
Unless I'm bad at reading, this page states that colormatrix is only good for 8 bpc.
From Colorspace support in FFmpeg:

... colormatrix produces horrible quality for anything > 8bpc (8-bit per component)

Backstory.  One of my typical workflows is to convert 16bit tiffs and 10bit DPX frames into 10bit prores.  However, I think the input colorspace of the frames is assumed to be bt601 and I would always get encodes that looks just slightly off from my originals.  I solved this by adding:
-vf colormatrix=bt601:bt709
And it looks fine visually.  The difference between the source and encode I always just assumed was the lossy compression.
So can someone chime in on if the colormatrix=bt601:bt709 operation is 'supposed' to be bad when the source and encode are >10bpc?  Or is the info on that page outdated?  Or should I be doing it a different way?

Yes, as it says a couple of lines above, colormatrix supports only 8bpc (8-bit per component) pixel formats. So, when a 16-bit input is filtered with colormatrix, it will be converted to 8-bits. And won't get converted back to 16-bit unless manually done or auto-converted due to output encoder limitations. But that's pointless anyway, as the precision has been lost.
Use the colorspace filter.
-vf colorspace=all=bt709:range=tv:format=yuv422p10:iall=bt601:irange=tv

Depending on your use case, format may need to be yuv444p10. Depending in your input, irange may need to be pc.

Sorry, it's bt601-6-525 for NTSC or bt601-6-625 for PAL.

Yep I'm noticing colormatrix vs colorspace in 10bit encodes.  The colormatrix conversions all look noisier in gradients.  It's not hugely perceptible to the naked eye but I can see it while boosting/enhancing a still frame.  But the other detriment is that the added noise of colormatrix was making the prores file bigger by roughly 35% for even less quality.


text:
How to add timestamp of N mins between photos on a video combined from photos?
I have a set of few hundreds of photos taken every 30 minutes. I combine them into a single video. How can I put a timestamp presenting real time difference between each photo ?
Right now I use timecode filter with the following settings:
ffmpeg -i %04d.png -vf format=yuv420p,scale=1650x1180,fps=24,drawtext="fontsize=15:fontfile=/Library/Fonts/DroidSansMono.ttf:timecode='00\:00\:00\:00':rate=24:text='time\:':fontsize=72:fontcolor='white':x=860-text_w/2:y=960" out_24fps.mp4

This creates timestamp showing the length of the video which takes ~7 seconds. I'd like the timestamp to show that how long it took to record the whole video rather than how long it takes to replay it (difference of 30 minutes between each photo).
Or perhaps is it possible to take a timestamp from each file used to combine the video?

Timecode isn't suitable for this. It assumes real-time footage. You can use the eif and n functions to increment the text counter to advance by 30 mins for each frame i.e.
ffmpeg -framerate 24 -i %04d.png -vf format=yuv420p,scale=1650x1180,drawtext="fontsize=15:fontfile=/Library/Fonts/DroidSansMono.ttf:text='time\: %{eif\:n*(30/60)\:d} h %{eif\:mod(n*30\,60)\:d\:2} m':fontsize=72:fontcolor='white':x=860-text_w/2:y=960" out_24fps.mp4
(BTW, framerates for image sequences should be set on the input. Using fps filter here will cause ffmpeg to drop one frame from each second.)


text:
Is it possible to use DaVinci Resolve without any GPU AT ALL?
I have some plan to get servers that are powered by Intel Atom C2750: Intel Atom® Processor C2750.
... and they don't have any GPU at all.
Is it possible to render at this CPU? Render time isn't the problem. Just ... is it even possible?

It is free. Download it, install it, test it.

@Rafael - it's difficult to download hardware.

@AJHenderson LOOOOOL HAHAHAHAHA but you could https://downloadmoreram.com/ though

From DaVinci Resolve System Requirements, in the “Resolve Minimum System Requirements FAQ” part:

... your GPU will determine if Resolve will run at all on your system ...

So yes, you need a GPU, and even not just any GPU.

From the same source:

It’s ALL About The GPU

Your GPU is everything! It is more important than your CPU or system RAM (both of which should be up to the task too).

DaVinci Resolve offloads intensive image processing to the GPU. It also employs YRGB 32-bit floating point processing for exceptional color precision.

and

GPU Memory

Of course GPU cores matter, but GPU memory matters more when looking at minimum requirements  .
512MB – Forget about it.

1GB   – You’ll be okay with basic HD ProRes work, checking RAW files but avoid
        noise reduction and optical flow.
1.5GB  – Approaching the absolute minimum to use Resolve with some level of complexity in HD.
         Noise reduction and optical flow will still be problematic.
  2GB  – A comfortable HD experience, limited 4K work.
  4GB  – Minimum for comfortable 4K work.
  6GB  – You can tackle pretty much everything a project is likely to require.
  8GB+ – You can actually tackle everything any project is likely to require.

Bottom line, if you’re looking at a new system on a budget and you’re working mostly in HD, I’d recommend an absolute minimum of 2GB GPU memory, really 4GB is a more realistic minimum. Performance also depends on the resolution of your media, the resolution of your timeline and the codecs of the media you are using.

I wish I could render with just CPU, not editing on it.

I'm afraid I don't understand you - rendering what? Something edited in other computer but not yet rendered?

correct. I like to have whole project synced to google drive file stream, to render somewhere else. As of today, I usually render on alibaba cloud, but way too expensive because of the gpu. If only I could use cpu only ...

I'm not totally sure, so I tell you only my opinion. Rendering itself is still such complex, computational-intensive process, so I'm not able to realize it without GPU. Even if it would be possible, it would be too slow even for you — I suppose 100+ times slower than with GPU (i.e. 1 month without GPU instead of 7 hours with GPU).

When i open dxdiag on a windows machine i see 3 different valiues for the graphic card memory:  1-total  approx memory,  2-VRAM, 3-Shared memory, which one are you refering to in your post ?

It is possible to run Resolve as a headless render client, which may alleviate some of the GPU workload, but I think you'll probably still need one.  You'd also need a postgresql Resolve database setup, preferably networked to an editing machine and metadata server, though those aren't strictly necessary.  Search the user manual for "headless" for instructions.  It's on page 3202 of the March 2020 R16 manual, though that will be outdated soon.

It should eventually be possible to run Resolve without a GPU by using MESA. Windows builds recently began supporting OpenCL GPU emulation via CPU (using llvmpipe). However, OpenCL is still not working properly on Windows via MESA. Watch this space! --> https://github.com/pal1000/mesa-dist-win

It's all a question on who much worth is your own time: I Had a 4-core 3.2GHz AMD CPU with EDIUS that took up to 8 hours to render a FHD video of about 90 minutes length. My current 4-core 4GHz Intel CPU can do it (with a low-end GPU) in less than 3 hours (depending on effects used).

I've tried running DaVinci Resolve 17 on my ThinkPad X1C with Mesa Intel UHD Graphics 620, and it complained about the GPU configuration. After unchecking the checkboxes to use some "auto" GPU, it complained about having to set some media location. After setting that, it exited silently.
Turned out that choosing a media location made it exit silently in the first place, so I can't see what happens if I uncheck those checkboxes with a media location set, but I suspect it won't run anyway.
This 2018 forum post says that "most modern AMD, Intel and NVIDIA GPUs that support OpenCL 1.2 or CUDA 3.0 compute capability will operate with Resolve" and that "INTEL(R) HD GRAPHICS 3000 does support OPENCL 1.2".


text:
Using 60 fps footage on 23.976 sequence without slowing down or dropping frames
I just recorded a 4k 60 fps clip from my GoPro and dropped it with some other clips on a timeline which is 23.976 fps, and the 60 fps clip looks really weird and glittery.
Is there a way to play this real time without dropping frames? I'm using Adobe Premiere Pro.

Remember that the preview you see when editing is not the same as what gets exported at the end. Try exporting a test to see how it looks at full quality.

You can not. You have contradicting parameters.
You need to make some decisions. Either:

Leave your project at 29.97 and drop 1 every 2 frames of your 60fps clip.
Leave your project at 29.97 and use all the frames of the 60 fps clip making it slow-motion 2x.
Change the project speed to 60fps and render twice every frame of the other footage.
Change the project speed to 60fps and make a timewarp filter on the 29.97 footage, what it does is inventing new pixels to the new frames, making it look smoother if the program used is a good one.
Preparing separated projects and making a strange arrangement of projectors projecting two framerates at some cinema screen... Nop, let us discard this idea and just keep the other 4 in mind.

Indeed, a very clear answer! Thanks!!

Yes. Set your sequence to 60fps.

Thanks! But no! There are some clips in the timeline which is in 23.976fps. So, they will look weird.

I'm really new to Video Editing. I'm not even sure if what I asked is against Video Editing principals. So if higher framerate is added to a lower framerate timeline, the only solution to play them realtime is dropping frames. Right?


text:
Complex filtergraph
Here is what I am trying to accomplish in one FFmpeg process:

A. Take in 3 inputs
B. Overlay input 1 over input 0 (input 1 has an alpha channel)
C. Take the result of step B and concatenate input 3 at the end

Reading up on the documentation I was able to accomplish B and C independently, but when I try chaining them together into a complex filter I can accomplish overlaying input 0-1 but the concatenation does not seem to work.
What it does is just freezing frame on the end of the overlaid clip, for the duration of input 3. In other words the output file has the correct duration, but instead of seeing input 3 at the end I just get a frozen frame at the end of input 2. Hopefully that is clear...
Here is the command I am using:
-loop 1 -r 29.97 -i input0.png -r 29.97 -i input1_%04d.png -i input2.mov \
    -c:v libx264 -crf 18 -filter_complex "[0][1]overlay=shortest=1;[1][2]concat=n=2:v=1"
     output.mov

I believe I am close enough, so hopefully this is just a simple tweak!

You have to add a pad with a label to the result of the overlay and feed that to concat. The [1] fed to concat refers to the source frames of the image sequence. And since the overlay result isn't labelled. It is included as the first output stream, with the wrong concat result being the 2nd.
Use
-loop 1 -framerate 30000/1001 -i input0.png
        -framerate 30000/1001 -i input1_%04d.png
                              -i input2.mov
-filter_complex "[0][1]overlay=shortest=1[ovl];[ovl][2]concat=n=2:v=1"
-c:v libx264 -crf 18 output.mov

See http://ffmpeg.org/ffmpeg-filters.html#Filtergraph-description and  http://ffmpeg.org/ffmpeg.html#Stream-selection

Thanks a bunch Gyan, this is just what I needed.

@Spencer You need to think of [0] and [1] as variables, which must be sent to another variable if you run a filter on them then want to run further filters on the result. Gyan named that variable [ov1]. FFmpeg needs to be able to reference the output of any used filter if you want to run other filters on it, otherwise it will try to send it directly into the output file.

@DigiVisionMedia thanks, makes sense


text:
error editing a long video using VirtualDub2
I have several long video files that I need to edit (remove some initial parts, breaks and dead moments) and I always got errors when I try to save / export the edited file in mp4. The

pcm_f32le: codec not currently supported in container mp4

message shows when I try to save the edited file in VirtualDub2 (the original file was converted from wmv by VirtualDub2). I can edit an avi file (with 4:26 minutes and 914 Mb) but the edited avi is bigger (3:22 minutes and 2.3 Gb).
I have several Webex sessions (each with 4 – 5 hours) in arf and wmv format (I export using cisco Network Recording Player application).
The WMV files have the ASF (Active Streaming Format) container format, video 1440×768, 25 fps wmv3 video codec, yuv420p, 1000 Kb/sec bitrate. The audio is in stereo s16p, 44.100 Hz, 1152 kb/sec bitrate.
I also can convert the files with VirtualDub2 to mpg4 or Xvid minconverter to avi.
If I use VirtualDub2, the mp4 have the QuickTime/Mov container format, video 1440×768, with h264 video codec, 2.29 fps average, yuv420p (709) and the aac audio codec, stereo fltp, 33 kHz, 50 kb/sec bitrate.
If I use Xvid, the avi (Audio Video Interleaved) container have video 1440×768, mpeg4 video codec, yuv420p, 5 fps and mp3 audio, stereo s16p, 44.100 Hz, 128 kb/sec bitrate.
The unedited video export sizes are similar:
304 Mb arf is converted in a 801 Mb wmv that is compressed into a 509 mb avi or a 506 mb mp4 file.
What is wrong? What settings / log files should i preset/check/validate?

I am using windows 10 64 bits

Issue is with the audio track, which needs to be converted/compressed.
See
https://sourceforge.net/p/vdfiltermod/tickets/162/
for steps on how to avoid this issue.

I already see the ticket 162, having written a comment on 2019-09-05 (17 days ago). I understand that direct copy always decodes audio as PCM https://sourceforge.net/p/vdfiltermod/wiki/direct_copy/

Accepted as answer

For me, the solution was exactly as mentioned in the link in the second answer, all kudos to that site. I'll put the answer here explicitly to make sure it won't be lost:
You get pcm_f32 [error] because source audio is decoded in raw pcm (float).
To save audio in mp4 you need to select compatible compression:

select Audio->Full processing mode
select Audio->Compression->FFMpeg AAC or FFMpeg Lame MP3


text:
Audio and Video out of sync when slowing down
I want to make a video play at 75% speed, so I used the following command:
ffmpeg -i combinedfullspeed.mp4 \
   -filter_complex "[0:v]setpts=1.25*PTS[v];[0:a]atempo=0.75[a]" \
   -map "[v]" -map "[a]" slow3.mp4

However, the video and audio are way out of sync. Any idea why?

The reciprocal of 75% i.e. 0.75 is 4/3 or 1.3333, so
ffmpeg -i combinedfullspeed.mp4 -filter_complex "[0:v]setpts=(4/3)*PTS[v];[0:a]atempo=0.75[a]" -map "[v]" -map "[a]" slow3.mp4


text:
Is VAAPI the same as hardware encoding?
I don't know if this is the place to ask, it's a bit of a hybrid video/IT/developer question, so my apologies if it is not.  I scoured the entire internet and can't find an answer to this question!
I'm re-encoding a bunch of videos, and I don't want to lose too much quality, but I don't want it to take three years.  I'm avoiding traditional GPU “hardware encoding”, as that always has quality trade-offs for the purpose of being real-time for live streaming and such.
Then I got to thinking: “Couldn't you just offload some of the software encoding tasks to CUDA or OpenCL to speed them up?  But still not really be 'hardware encoding' per se?”, so I did some digging and ended up with a VAAPI encoder which is going 8x as fast as straight CPU encoding, which is great — my question though, is, is it doing the same traditional “hardware encoding” which is going to bring quality issues?  Or is it in fact doing what I describe above and just using the GPU as a co-processor of sorts?

Couldn't you just offload some of the software encoding tasks to CUDA or OpenCL to speed them up?

No. Video encoding is very difficult to parallelize. And even in software adding threads has a quality impact. GPUs run small, simple programs. Their speed comes from being able to run thousands of copies of these small programs at the same time. All forms of compression work by reducing entropy from a stream. Meaning it needs to have knowledge of what data it has encountered in the past. If the past is running on another core, it must wait for it to finish (eliminating the benefits of multi core) or proceed without that information (hurting compression ratios)
VAAPI uses intel QuickSync.


text:
How can you use ffmpeg's afftdn -sn flag to sample noise from a reference noise file?
The FFmpeg documentation for the afftdn audio filter says for the -sn flag:

sample_noise, sn
  Start or stop measuring noise profile. Syntax for the command is : "start" or "stop" string. After measuring noise profile is stopped it will be automatically applied in filtering.

It's a little unclear as to the basic implementation of the start/stop values in the sample_noise -sn flag. I tried:
ffmpeg -i inputfile.wav -af afftdn=nt=c:bn=sn=start=0=stop=1 noiseout.wav

as an attempt to sample the first second of sound as a noise profile, which errors with

[afftdn @ 0x7fefbb800000] Custom band noise must be integer.

So the questions are:

What's the correct input format for sample_noise?
Is there a way to sample the noise from a noise reference .wav file that I have, e.g. noiseprofile.wav?

Commands are instructions sent from an interface external to the filter, usually an external program using a ZMQ protocol. There is a filter that can execute commands which is what I'll use here.
Base syntax is
ffmpeg -i in -af "asendcmd=c='0.0 afftdn@n sn start; 1.0 afftdn@n sn stop',afftdn@n" noiseout.wav

To use another source for noise profile, you'll have to append it, measure noise, and then remove it.
ffmpeg -i in -i profile -filter_complex "[1][0]concat=n=2:v=0:a=1,asendcmd=c='0.0 afftdn@n sn start; 1.0 afftdn@n sn stop',afftdn@n,atrim=1,asetpts=PTS-STARTPTS" noiseout.wav

Above, I assume the profile is 1 second long, which is removed with atrim after denoising.

This worked beautifully, many thanks to @Gyan.
Just to add to the accepted answer, as I needed to do this for a large number of mp3 audio files with similar noise profiles and with a naming scheme of 001_somefile.mp3. I wrote myself a batch script to do so. The -y confirms overwrite and the || pause causes the script to halt if the command was bad. I don't know if there's any available constants to automagically obtain the length of the noise_profile.mp3 input, so I hard-coded the 0.89 seconds length:
@echo off

for /F "usebackq delims=" %%f in (`dir /B ???_*.mp3`) do (
   ffmpeg -y -i "%%f" -i noise_sample.mp3 -filter_complex "[1][0]concat=n=2:v=0:a=1,asendcmd=c='0.0 afftdn@n sn start; 0.89 afftdn@n sn stop',afftdn@n,atrim=0.89,asetpts=PTS-STARTPTS" "0%%f" || pause
)


text:
How can I export RGB + Alpha in Adobe After Effects with Adobe Media Encoder (2020)
I have built out a few little animations in After Effects. I'm trying to export them — and pull them into ScreenFlow.
When I export > add-to-media-queue I get a .mov that won't open in QuickTime — and that is “messed up” (for lack of understanding) when I try to use it in ScreenFlow.

It's supposed to look like this:

but it looks like this:

I've been able to export it with Adobe Media Encoder — but it has a black background and I can't find how to ensure it comes out with alpha.

Media encoder is being really buggy - and I'm curious is there are problems with the latest releases?
How can a regular ol guy, who's trying to get a basic RGB + Alpha animation, get the job done — the simplest way? I don't even want to know what a codec is... if possible. I plan on staying in the hobbies zone.

Click the output mode in the render queue, by default it says lossless:

use these settings, format: quicktime, video output channels: RGB + Alpha:

click format options and choose Apple ProRes 4444. The 4th 4 is the indicator that the codec has an alpha channel (this only applies to the Apple ProRes codec naming scheme).

That should fix your problem.
Edit: This was also fixable without changing the codec to Apple ProRes 4444, and could have been accomplished with opening one less window by just switching the color channel to Straight (Unmatted), however...

...knowing whether to choose Straight (no baked-in black) or Premultiplied (baked-in black) is somewhat abstract, and importing video with the default animation codec + aplha into other programs is just weird sometimes.
I've found that ProRes 4444 hits the "it just works" goal more often, and remembering that 4444 corresponds with RGBA(lpha) is easier to recall than the difference between matted vs. unmatted.

That does the trick! but a little more info - for anyone else coming along would make an even better answer. Why is this the correct codec? Why doesn't the default "just work".

3 Steps! I was having issues and was able to solve it by rendering in Adobe Media Encoder with the following settings/steps:

When ready to export, in AE go to "File > Export > Add to Media Encoder Queue". Media Encoder should automatically open (if not already open) and add your AE file to it's queue.

In the Media Encoder queue where your AE file is listed there are two sections with drop down arrows next to them. Click the first arrow and pick "Quicktime" from the drop down menu.

Then click the second drop down arrow and pick "Apple ProRes 4444 with Alpha" from that drop down menu.

Done! You can click the file path to the right to name your rendered file and choose where it will be saved.

I actually just did this again today for the first time in months. I ticked rgba though. Did you have to do that?

The preset I mentioned worked without having to change any export settings. In that preset the Video Codec is "Apple ProRes 4444" and in Basic Video Settings the Depth is "8-bpc + alpha". I imagine that if you choose a depth without "+ alpha" that you'll get black instead of transparent. In the "Apple ProRes 4444 with Alpha" preset there is not a "rgba" box to tick, although I've seen that in other preset settings. Seems like it's a good bet to tick that as the "a" stands for "alpha", which is the transparent part.


text:
Export multiple clips from one video as separate files
I'm looking for video editing software with a GUI that will fit my needs.
I've downloaded the video of the public comments from our most recent local city council meeting. 17 people gave public comments.
Here's basically what I want to do:

Create 16 breakpoints, separating each individual's comments.
Select/highlight those 17 clips.
Click 'export selected clips to directory'.
Choose the directory and click 'save'.
Go to the grocery store .
Get home & go to the folder on my computer with 17 files named comment-1.mp4, comment-2.mp4, comment-3.mp4, ... comment-17.mp4.
Upload them to my site / youtube / whatever.

I'm using Ubuntu 19.10.

I have tried Kdenlive, which just froze when adding a 30-minute video, and I don't know if it has batch export anyway
I tried Blender, and couldn't figure out a way to batch export like this. I was able to export clips one at a time, but it was extremely cumberson
I'm now using Shotcut, which has made exporting clips one at a time super easy, but I can't figure out how to (or if I can do) a batch export as described above

I've looked at several different articles about editing software, and I can't seem to find this functionality listed. I'm not sure I'm searching with the correct terms.

Is there software for linux / ubuntu that will do what I want (with a GUI)? Which software?
If Shotcut can do it, how?

My preference is open source software. Free, too.

I don't need it to go to the grocery store or upload them for me, though that would be great! lol

Shotcut does it pretty easily https://forum.shotcut.org/t/export-one-track/7503/3 Just hadn't found the right search terms yet!

I did it with shotcut. Credit to: https://forum.shotcut.org/t/export-one-track/7503/3
Steps

Load video into shotcut
click+drag video down to timeline
move playhead to desired position & Split at Playead (S)
click on a clip I want to export, then Copy (C)
Open Playlist view (from top bar)
press the plus (+) button in the bottom left, at the bottom of the playlist view
Click the export tab
In the 'From' dropdown (where it says Timeline or Source), I choose 'Each Playlist Item'
Click 'Export File'
Choose location, file name, and click 'Save'


text:
Errors in FFmpegSource2 plugin source filter for AviSynth
I was unable to read MTS or MP4 files in AviSynth. Can AviSynth handle MTS files? pointed to the FFmpegSource2 filter, with information on the wiki. I downloaded the plugin and pointed to it from the first line
LoadPlugin("C:\path\to\ffms2\x64\ffms2.dll")
DirectShowSource("\path\to\MP4\file")

This threw error 0xc1. This thread mentioned different architectures, so I tried the x86 folder (C:\Program Files (x86)\AviSynth\plugins).
After a little while, Windows Media Player opens a dialog with this text (translated to English):
Windows Media Player is unable to open the file. It's possible that Media Player
does not support this type of file or that you need a codec that is not
installed. [Close] [Help online]

How can I enable FFmpegSource2 plugin in AviSynth?

The short answer, if you're familiar with AviSynth
You don't need to use LoadPlugin(), if you copy the four files in the plugin:
FFMS2.avsi
ffms2.dll
ffms2.lib
ffmsindex.exe

to the plugins directory of your AviSynth installation (see below for its location).
That's all. Then you directly use it in your AviSynth script calling its function(s), mostly the function
FFmpegSource2()

(or FFMS2(), which is the same, or FFMS2("your_file.ts", atrack=-1)) in concordance with documentation, but not DirectShowSource().

The long answer
If you're beginning with AviSynth, the rest of the answer will walk you through the pitfalls.
AviSynth versus AviSynth+
AviSynth has two versions, denoted AviSynth and AviSynth+, at the homepage:

Official builds
  v.2.6.0 ST, 32-bit at SourceForge
  ...
Forks
  AviSynth+: new features, backward compatible.

AviSynth 2.6.0 is a very old version, in spite of its title as an "Official build". You're better off with the new version for FFMS2. Download it from the official Github repo pointed to from the homepage.
The directory of plugins for AviSynth+
When you install the Github fork of AviSynth+, check the box Customize plugins directory to find the paths without changing them. Copy the four plugin files mentioned above to C:\Program Files (x86)\AviSynth+\plugins+ or to C:\Program Files (x86)\AviSynth+\plugins64+, depending on your version of Windows. The + at the end of the directory is for AviSynth+ instead of AviSynth.
The file FFMS2.avsi in the FFMS2 plugin is the same for both architectures.
If you copy it to the wrong directory, you may see this in Windows Media Player:

Cannot load a 64 bit DLL in 32 bit Avisynth:
    'C:/Program Files (x86)/AviSynth+/plugins+/ffms2.dll'

which means that you should move those files to C:\Program Files (x86)\AviSynth+\plugins64+\.
Choose the appropriate media player
If you play the .avs file with Windows Media Player, you may see  a .MP4.ffindex file for each file that you use with FFMS2() and the .avs file shows no image and no sound, only a musical note that looks like standard Windows.
Windows Media Player is not able to play back .avs files. Use Media Player Classic — you may get it with very useful K-Lite Mega Codec Pack — simply download and install it. Be sure to select the Mega pack, because the Basic pack doesn't contain the player.
Convert the script to a media file
Another possibility is to convert the .avs file into a media file, for example with FFmpeg:
ffmpeg -i your.avs output.mp4

FFmpeg chooses appropriate codecs automatically by the extension of the output file) and play back the result in (almost) any media player.
You may download the ready-to-use FFmpeg from Zeranoe's page — just unpack the downloaded archive file and add the path to ffmpeg.exe into your PATH environment variable.

You still used DirectShowSource filter. Use FFMS2 instead: FFMS2(your_file.ts, atrack=-1). You needn't use LoadPlugin(), it will be autoloaded by using FFMS2.

It means that the directory into your copied file is NOT an autoload directory. I don't know which version of AviSynth do you use — see e.g. Plugin Autoloader. If you have a very old version, consider to download a newer one: Avisynth+ r2772-MT 64-bit + 32-bit (download links are at the end), or AviSynth+ 3.4.0 (only 32-bit IMHO).

No, AviSynth+ 3.4.0 is both 64-bit + 32-bit, too.

Which version of AviSynth do you have? (Put the version as a single row in your text editor, save it as version.avs and play it back.)

It's very old version, in spite it's an "Official build" one. Use "Forks -> Latest release" (which is the same 3.4.0 as I already wrote in my previous comment) and download the .exe file (the installer).

See my extended answer — all things are now good, only Windows Media Player is not appropriate for .avs files.

@miguelmorin, it will be nice from you and helpful for other people. Feel free to edit it.

@miguelmorin, other possibility is to write the summary of the discussion as your own answer, and I will it vote up (and maybe other people, too). Yes, you may answer your own question.

@miguelmorin — yes, it would be better to make it as a new question, because 1. you will have a larger space to express your problem, 2. if I will not answer your question, other people may do it, 3. everyone may vote your answer.

I added a new question about 32-bit AviSynth+ https://video.stackexchange.com/questions/30042/how-to-install-avisynth-32-bit


text:
What to do in order to avoid noises on records from DSLR for greenscreen?
I am an amateur, but I would love to record myself at video and then cut the background, so I can paste myself on top of prepared slides.
Unfortunately each time I record a video there is a noise at this video.
Even it is more noisy after green background is cut.
I use DaVinci Resolver to cut green background by adding new layer and make delta keyer. I do same as they suggest in the video How to Turn Green Screen into Replacement Background | DaVinci Resolve 16 Tutorial.
I am recording myself with Nikon D5200 DSLr at automatic mode at 720 HD format.
I bought a green screen from the shop so it is kind of proper one I guess.
The light is not well at my room, but I try to do my best. So I took off lampshade from my lamp at the top (ceiling). And I set two small lamps on both sides of me. Or the other setup I did was one small lamp under me and one small lamp in front of me. This way I got 1250 ISO at automatic mode.
I tried also to set manually lower ISO, but then colours are ugly.
What should I do to record myself properly so after I can cut green screen behind me and paste myself at the top of slides. But I would like to be shown without such a noise. Can you recommend me something in my situation?

Well, the noise has little to do with the green screen, with the probable exception that you can now compare your image vs a clean background.
The only way to reduce the noise is by having more light.
Try to open the aperture to the max, you can or lowering your shutter speed, (But if you are making rapid moves this could have issues)
Making the ISO Higher will give you more noise, so, if you can not do the previous two options, you need to buy a stronger light. Fluorescent lamps are a decent option, they are not as expensive as led lights.
If the noise is on the background, you need either put more light on it or probably have a smoother background.
Do not use auto mode, learn how to set up manual mode, so the image does not change in brightness as you move.

I presume what you call noise is caused by uneven lightning, so when your NLE removes green, you see splotches or brighter or darker green that it did not remove.
The first and foremost task is to light the green background brightly and evenly. Make a shot of your background and bring it to your editing tool and check the levels - ideally you should see a thin horizontal line. If if curves or not thin, then you need to fix the background lightning first.
Move farther from the background to avoid excessive green spill.
Set exposure so that both you and the background are well exposed.


text:
FFmpeg scale video filter does not working as expected
I am confused a bit. scale video filter does not scales the video to specified dimensions but doing something different.
For example:

$ youtube-dl -f 134 https://youtu.be/aqz-KE-bpKQ -o 1.mp4 # download file 640x360    360p  723k , avc1.4d401e, 30fps, video only, 24.87MiB
$ ffmpeg -i 1.mp4 -vf scale=2000:100 2.mp4
$ ffplay 1.mp4 & ffplay 2.mp4 &

I am awaiting that the second video will be deformed as wide and narrow at height, but:

Here is output of ffprobe for both files:

$ ffprobe 1.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2018-12-12T10:08:34.000000Z
  Duration: 00:10:34.57, start: 0.000000, bitrate: 328 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 0 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2018-12-12T10:08:34.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 12/12/2018.
$ ffprobe 2.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100
  Duration: 00:10:34.57, start: 0.000000, bitrate: 443 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 2000x100 [SAR 4:45 DAR 16:9], 440 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler

So, I missed something or video filter works in wrong way? How to fix this?
PS:

$ ffmpeg -version
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libavresample   3.  7.  0 /  3.  7.  0
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100

The scale filter will adjust the sample aspect ratio to maintain the original display aspect ratio, which is 16:9 for your input. Use the SAR filter to reset the SAR after scaling.
ffmpeg -i 1.mp4 -vf scale=2000:100,setsar=1 2.mp4

@Abelisto, you may see this answer, too, for detailed description of SAR, PAR, and DAR.


text:
What kind of effect is that? How can I replicate it?
I'm trying to replicate this effect on the logo whose it starts with a fade and then these “bubbles” filling the logo until complete.
Demo:

Well, the fade effect I can replicate :D. But this other effect I can't find anything like that in after effects. Any tips?

This is a very simple animation, actually. Here's how you could do it the easy and cheap way:

Create a solid with the size of your composition
apply "fractal noise" to it
Set the transform, brightness and contrast of fractal noise so that you have small drops instead of large shapes. You might want to set the complexity to one and experiment with the settings until you like the look.
Click the stopwatch on the brightness and lower it so much that the solid is completely black
go forward about 2 seconds and raise the brightness so that the entire solid is completely white.
Now create a text-layer under the solid and type your text
Set the "Track Matte" of your text-layer so that it takes a luma-mask from the solid above

Now, the luminance of your animated solid determines the alpha-channel of your text-layer, making it appear piece by piece. However, the effect looks sort of cheap in my opinion. For a better result, I would recommend you try to use a particle simulation (such as particular, not a free plugin unfortunately) and use the text layer as your emitter. You let the Text dissolve into dust like in avengers, and simply reverse the sequence, so that the text is being built from dust.
I hope I was able to help, have a wonderful day :)


text:
How to convert single image to video in infinite loop and set duration of 15 seconds using FFMPEG
Can anyone help me with a command line for the below scenario please using FFmpeg?
Convert single image.jpg to output.mp4 for 15 seconds.
Thank you.

ffmpeg -loop 1 -i https://thumbs.dreamstime.com/z/cartoon-weather-images-16836392.jpg -t 15 output.mp4

FFprobe result:

ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':   Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.83.100   Duration: 00:00:15.00, start: 0.000000, bitrate: 188 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1182x1300 [SAR 1:1 DAR 591:650], 186 kb/s, 25 fps, 25
tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler

Thank you @xer-rex. I used ffmpeg -loop 1 -i image.jpg -vcodec libx264 -crf 25  -pix_fmt yuv420p -t 15  video.mp4


text:
ffmpeg setting not working for x264 compatibility in television
I'm having some files in MKV format (x264). Some files work flawlessly in my non-smart TV, but others are not even opened at all or crashing.
I tried the following command in FFmpeg to convert it to the mp4 format since it has wide platform compatibility in TVs.
ffmpeg -i input.mkv out.mp4

But its still not playing in my TV, please help me with the correct ffmpeg parameters.

Your TV manual should have some specs for acceptable video (profile, level, B-frames, container..etc)

@Gyan I misplaced the manual, but I'm having some files that works flawlessly in my TV. How can I use the same settings in ffmpeg?

What's the model no.?

@Gyan Its a Sanyo TV. I searched in the web for the manual, but in vain!

Share the readout of ffmpeg -i file for a couple of working files.

@Gyan: Not working MKV: https://pastebin.com/Ddk72RGw Working: https://pastebin.com/bTFBTyVU

notworking.mkv is 10-bit H.264 (yuv420p10le). I'm guessing the TV can't play that. You'll have to re-encode to the more common yuv420p for the TV to be able to play it. Basic example:
ffmpeg -i notworking.mkv -map 0 -c copy -c:v libx264 -vf format=yuv420p output.mkv


text:
Is video stabilization during recording better than stabilizing a shot in post-production?
To save CPU overhead on my Hero 5 Session GoPro I'm debating to disable stabilization and run a stabilization after the recording is completed on the video on a PC.
Are there benefits to performing stabilization on a device like this at record time versus in post-production? Or is standalone stabilization on a PC perhaps even more effective?
I'm not sure if the stabilization is purely based on the image or uses any sort of gyro sensors.
Thank you!

I would decide by running some recording tests, and deciding which image you actually prefer - the on-board stabilisation, or doing it in post on the PC. There will be pros and cons both ways - although I wouldn't worry about things like CPU overhead, unless you've actually read somewhere of this being an issue?
This article gives a little bit of a run down of the stabilisation feature, if you haven't seen it.
https://havecamerawilltravel.com/gopro/gopro-hero5-video-stabilization/
Based on the article, it looks like the stabilisation is being done in the sensor. In a lot of cameras, the full sensor isn't used for recording, certainly not in all recording modes. For stabilisation, these cameras sample a larger area of sensor elements than what is being recorded, work out where your image has moved between frames, and record the area/window they consider to be your intended image, smoothing out your movements.
The article notes that you can't record a full resolution image in some modes when using the stabilisation, so it's almost certainly sampling the full sensor, and then stabilising by reducing the number of sensor elements being recorded, changing where the recording window is, based on your movement. Note with this method that the camera might not always stabilise in a way you consider to be "correct", and you'd have no control over that.
Stabilising with the PC will give you more control over what is done, but the PC software will also be interpolating (educated guessing) where required to create extra image data for your stabilised image. If you don't need the highest camera resolution, the stabilised visual data from the GoPro might be preferable to stabilisation corrections generated in PC software. But if you want to record in the highest resolutions, you'll be cropping images from the GoPro to do that, which may not be ideal - taking the unstabilised GoPro image and stabilising on a PC may be the better option for some resolutions.
Like I said, I would test both, and see what you think of the results for yourself. It's useful to know how both stabilisation techniques work, and other than that there's no correct answer for everyone - it will depend on exactly what you're recording, what quality it needs to be recorded in, and which method produces the best looking result to you when completed. If you don't need full resolution, and you're happy with how the stabilised GoPro image looks, I'd probably go with the camera stabilisation - but it was certainly noted in the article above that in some cases the stabilised image didn't look that great, so I'd definitely test it on what you're doing first.

For best results, the first thing you need to do is physically stabilize the gopro itself, as best as you can.  Neither the gopro's built-in stabilization nor post processing stabilization can remove A) motion blur caused by excessive rotational movement or B) parallax introduced by rotational and translational movement. These two factors are the main reasons post-stabilization looks unnatural.
Think about this: Your left and right eye are distant enough from each other to give your brain a three-dimensional view of the world.  Your brain constructs that model (mostly) from the parallax difference between the left and right eye; a few centimeters is all it takes.  If your GoPro is bouncing up and down more than that, no amount of post-processing is going to fix it -- at least until computer vision, and machine learning algorithms catch up.  But as of 2020, software and on-sensor stabilization work by translating, rotating, and perspective warping the image.  We're starting to see AI advancements like "Content Aware Fill" that can paint in the missing pieces, but we still have a way to go before they can correct deep movement on the fly**.  Expect to see the feature first in cell phones, which are in their infancy with respect to depth processing.
So, for BEST results, use gimballs, shock mounts, tripods, monopods, dollys, jibs, or whatever you can to stabilize the camera first.  Even duct-taping the thing to a brick is enough to dampen its rotational inertia (some).  After that, you can decide whether you value the extra pixels enough to forgo the built-in stabilization, but time is money, and "fix-it-in-post" is usually more trouble than it's worth.
**It's only April 2020, and there's already machine learning advancements towards this goal.  See https://github.com/sniklaus/3d-ken-burns for example.


text:
Do i really need a Super-Computer to edit Videos?
I wanted to edit a video and encountered some severe lag and preview stuttering.
I started looking around on the internet, but I'm just not getting any definitive and practical information on anything.
You'll read about how you need at least 32 GB of RAM and a 4 figures CPU to edit at all.
And others on forums say they edit HD videos on old machines with 2 GB RAM with no issues.
I'm running Windows on a SSD drive with an Intel i5 quad core (2.8 GHz), 8 GB of RAM, and an NVIDIA 1050Ti 4 GB GPU.
The videos I'm trying to edit are 1920×1080 30 fps (captured with a USB capture card from PS4 and
encoded with Handbrake) they are 1-2 h long (I have many of these videos and I also put them together in a few videos that are like 10 hours long but I don't know if I should use them to edit; I don't know if it makes a difference if a have many small files or one huge one)
I used DaVinci Resolve, Lightworks, VSDC and Shotcut and every time its unusable. On shotcut just playing back a clip and looking through it works kinda ok most of the time but when I cut together some clips and want to see how it looks it starts to lag beyond being usable.
I know that Video editing takes a lot of horsepower, but is it really THAT much?
I can't imagine that everyone, every student or just your average Joe who's doing their gaming montages and stuff for YouTube in their free time is sitting on a 2000 bucks high-end PC.
I've read about “Proxy files” for editing, but mostly when people are using 4k videos and even if not, creating lower quality versions every time for every video seems so unpractical.
I don't know, I really didn't think Video editing is so inaccessible.
To add to my confusion:
A view months ago I was editing videos with almost the same specs, the only difference, they were captured from switch, on the exact same PC. But at that time I was running Linux. And I used DaVinci Resolve and I don't remember having any issues at all. And I didn't use anything like proxy files or reducing playback quality, etc...
I think maybe somethings wrong with my windows but with all that conflicting information I just don't know and I hope someone can help me here.
One thing I want to add: these Videos are kind of big. 2h long video with 8 GB, and they have a bitrate of around 9000.
I don't know much about video stuff, I know bitrates influence quality, but that's it, is 9000 much? Or can you reduce it without a huge quality loss?
Thank you very much!

9000 kbps is on the high side if you're talking about 1920x1080 h.264, but you could be talking about 4K or h.265, or a combination, or none of the above.  Plus, the level of detail and the amount of motion in the video will affect this number.  This is a discussion in and of itself, and is addressed multiple times elsewhere in this forum.

Hi @Gin-Tonic - unlike discussion forums, here we need to focus on a specific question, so that specific answers can be posted for it. If you have new questions, use the Ask a Question button again. And if answers help you, you can upvote any that help, and accept the one that solved your issue.

Most likely, the issue is with the codec you're trying to edit.  Temporal compression schemes require a lot of on-the-fly processing to decode.  Players are optimized to do this sequential decode, but by definition, NLE's are non-linear.
All of the talk you see about proxies is really about converting temporally compressed formats into either uncompressed or spatially compressed formats such as proRes, or Avid DNx.
Some modern hardware, combined with the right editing package and operating system, can handle temporally compressed codecs.  Some combinations don't work so well.  In cases where editing is cumbersome, video professionals will transcode to a format which is easier on the hardware.  This is still common practice in 2020 because even as computer processing power increases, so does the efficiency of compression algorithms, the computation necessary to decode them, and therefore latency in editing applications.
H.265 HEVC, for example, is a relatively new codec, and is supported by a lot of consumer devices for recording.  It's popular because it's very efficient, supports larger resolutions and higher detail than older codecs at the same bitrate.  But this codec is notoriously difficult to decode on the fly, and is a prime candidate for proxy workflow.
See this wikipedia article for information on intraframe vs interframe codecs: https://en.wikipedia.org/wiki/Intra-frame_coding
DaVinci Resolve does have some fairly hefty system requirements, though, and 8GB of ram does not meet the minimum system requirements as described in the release notes.

Research how to use proxies. Proxies are copies of your original footage encoded at lower resolution, lower quality, or just in a less processor-intensive codec. You use them while you're working on your project, and then swap back the high quality files when you do your final export. A bit like offline and online video editing from the days when dinosaurs ruled the earth.
In your case for example, avoiding h.264 will probably speed things up. H.264 does a good job of making really small files at high visual quality, but it's awful for editing. So if you encode in an all-I-frame low-bandwidth codec, e.g. ProRes Proxy, or DNxHR LB the performance should increase markedly.
You can get away with much lower-powered hardware by using proxies, and you don't lose any quality in the process, because you go back to your originals at the end. A good guide, specific to the Resolve workflow, can be found here.


text:
How can I copy/paste multiple key-frames in After Effects from different layers?
Is there a shortcut key to copy and paste After Effects keyframes? No, I don't want any kind of script to do so. I just want to move selected keyframes (they're multiple, not one, and they are in different layers) from a time to another time. But when I copy and paste them, AE pastes the whole layers!
Is there a way to copy them without copying the layers? Or at least a way to show only the keyframes in the timeline, so I can copy them?

There is no way to copy-n-paste keyframes from multiple layers without using a script.
You can show the keyframes in a layer by hitting the u key. And then you can copy those keys layer by layer.
I'm not sure why you're opposed to using a script. I wrote one that can copy and paste keys from multiple layers in a single click (including copy-pasting with time reversal), and which is free and open source, you can download it here.


text:
"Unable to open key file" error when remuxing a set of encrypted .ts files (as a .m3u8 playlist) into .mp4 with FFmpeg
I'm trying to remux a set of encrypted .ts files (as a .m3u8 playlist) into a single .mp4 file with the next command:
"C:\Users\~\Desktop\test\ffmpeg.exe" -allowed_extensions ALL \
    -i "C:\Users\~\Desktop\test\chunklist.m3u8" -c:v copy -c:a copy \
    "C:\Users\~\Desktop\test\output.mp4"

but getting the

Unable to open key file

error. I tried the URI as “key” with and without quotes as well as the key in hex format but the error is still there... What I'm doing wrong?
Here is the cmd output:
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
      built with gcc 8.2.1 (GCC) 20181017
      configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
      libavutil      56. 22.100 / 56. 22.100
      libavcodec     58. 35.100 / 58. 35.100
      libavformat    58. 20.100 / 58. 20.100
      libavdevice    58.  5.100 / 58.  5.100
      libavfilter     7. 40.101 /  7. 40.101
      libswscale      5.  3.100 /  5.  3.100
      libswresample   3.  3.100 /  3.  3.100
      libpostproc    55.  3.100 / 55.  3.100
    [hls,applehttp @ 00000215fa3a9f00] Opening 'key' for reading
    Unable to open key file key
    [hls,applehttp @ 00000215fa3a9f00] Opening 'crypto:media_b6000000_0.ts' for reading
    [crypto @ 00000215fa3c6f80] Unable to open resource: media_b6000000_0.ts
    [hls,applehttp @ 00000215fa3a9f00] Failed to open segment 0 of playlist 0
    [hls,applehttp @ 00000215fa3a9f00] Opening 'crypto:media_b6000000_1.ts' for reading
    [crypto @ 00000215fa3c6f80] Unable to open resource: media_b6000000_1.ts
    [hls,applehttp @ 00000215fa3a9f00] Failed to open segment 1 of playlist 0
    [hls,applehttp @ 00000215fa3a9f00] Opening 'crypto:media_b6000000_2.ts' for reading
    [crypto @ 00000215fa3c6f00] Unable to open resource: media_b6000000_2.ts
    [hls,applehttp @ 00000215fa3a9f00] Failed to open segment 2 of playlist 0
    [hls,applehttp @ 00000215fa3a9f00] Error when loading first segment 'media_b6000000_0.ts'
    C:\Users\~\Desktop\test\chunklist.m3u8: Invalid data found when processing input

The files I'm working with are in the test.zip archive.
(The original playlist has more .ts files but I've included only first three, it shouldn't matter anyway).
Any help will be appreciated. Thanks!

Ok, looks like I solved the problem... Basically, I used relative paths in a couple of places where I should have used absolute ones instead.


text:
lavfi virtual device - the same parameters for ffmpeg and ffplay
The command
ffplay -f lavfi -graph testsrc2=d=1[out0];sine=d=1[out1] test.mp4

works fine. But the same arguments for ffmpeg (instead of ffplay)
ffmpeg -f lavfi -graph testsrc2=d=1[out0];sine=d=1[out1] test.mp4

produce only the error

[NULL @ 00000000006934c0] Requested output format 'lavfi' is not a suitable output format
test.mp4: Invalid argument

What's wrong with it?

Note:
From the FFmpeg documentation for the lavfi:

Currently only video data is supported.

It seems that's not true nowadays, at least ffplay works fine with audio (see my first command).
Or I incorrectly interpret this sentence?
But just in case I tried using the filtergraph testsrc2=d=1[out0];testsrc=d=1[out1] instead, with the same results — ffplay — OK, ffmpeg — the same error.

The ffmpeg tool can work with multiple inputs and outputs so the parser looks for -i to demarcate input options. The lavfi device will read the graph from the input argument
Use
ffmpeg -f lavfi -i "testsrc2=d=1[out0];sine=d=1[out1]" test.mp4

Thanks for your answer, it works, I new this — IMHO — workaround. The base of my question was a little other (my flaw for not state it clearly) — is the documentation for lavfi inappropriate / incomplete / obsolete? Is the parser for the ffmpeg command different from the one for ffplay (for the lavfi device)?

Yes, ffmpeg, ffplay and ffprobe each has its own parser. The lavfi device is a component within the libavdevice library which may be used by other frontends, so the interface will depend on the frontend.


text:
How to change value in After Effects when passing marker
I am running into an issue where I want to change the value of my slider controller (just adding 1) each time it passes by a marker. This is my current code
if (marker.numKeys > 0) {
    value = marker.nearestKey(time).index;
}
However, the issue I am running into is that midway between markers it changes value.

You just need to check if the nearest marker is in the past or the future. If it's in the future, just subtract 1 from its index. This avoids the use of a loop.
if (marker.numKeys > 0) {
    nearestMarker = marker.nearestKey(time);
    if (nearestMarker.time > time){
        nearestMarker.index - 1;
    } else {
        nearestMarker.index;
    }
}

You can shorten this using a ternary operator—at the cost of readability—to
if (marker.numKeys > 0) {
    nearestMarker = marker.nearestKey(time);
    nearestMarker.index - ((nearestMarker.time > time)? 1 : 0 )
}

marker.nearestKey picks the closest marker - even if it is in the future.
A simple solution would be to iterate over the markers with a for loop instead:
if (marker.numKeys > 0) {
    let i;
    for (i = 0; i < marker.numKeys; i++) { // For every marker we have, add 1 to i
        if (marker.key(i+1).time > time)   // If the marker is past current time,
            break;                         // stop the loop
    }
    i; // Return i value
}

If anyone is interested, here is a solution from the Adobe forums:
m = marker;
val = 0;
if(m.numKeys > 0){
  n = m.nearestKey(time).index;
  if (time >= m.key(n).time) n = Math.min(m.numKeys,n+1);
  t = m.key(n).time - time;
  val = linear(t,0,framesToTime(5),n,n-1);
}
val


text:
Live stream with changeable overlay
My point is to create a continuous video stream with overlay that will change depending on external events. Like YouTube radio channels, where the song name is changing depends on which track is currently playing.
I saw one of the interesting ways with using several ffmpeg instances and local streams for audio and video: one ffmpeg is playing audio to local port, and other combining it with video, taking the audio source from local audio stream. So I can change the audio during the stream without restarting it.
My question is, can I use the same scene for changing the overlay. Let's say I need to change the song name on the screen, is there any ways to do so with ffmpeg?

You might also want to look at avisynth+ http://avs-plus.net/

I'd suggest taking a look at "streamlabs" or "obs", which are made specifically for those instances.

Thanks, Florian! But I'm using headless server, and OBS needs access to the GPU. It does not work even over VNC with installed linux GUI like Gnome or KDE. So i need to use only software that does not uses GPU for streaming.

drawtext filter
If you just want to update some text on the screen the easiest method is to use the drawtext filter with the textfile and reload options.
ffmpeg -i input -vf "drawtext=textfile=songs.txt:reload=1" output

songs.txt will be reloaded once per frame. Be sure to update it atomically, or it may be read partially, or even fail.
overlay filter
If you prefer an image instead of text you have to manually select the image demuxer, loop the image, and replace overlay.png atomically whenever you want it to be updated.
ffmpeg -i input -f image2 -loop 1 -i overlay.png -filter_complex overlay output

Thanks a lot! This is exactly what I was looking for.

A slightly better solution in terms of CPU usage is to use -stream_loop -1 instead of -loop 1 and define a lower framerate (-framerate 1 to read the image once a second):
ffmpeg -i input -f image2 -stream_loop -1 -framerate 1 -i overlay.png -filter_complex overlay output


text:
What type of 360 format is this?
I want to download this video and view it in Premiere Pro:

After downloading and scrubbing through the video, it appears to be two (seemingly identical) scenes stacked on top of each other.
This seems to be very different from the equirectangular footage I output with my GoPro Max after converting from .360, for instance.
Question
How do I get  360 videos from YouTube into equirectangular format and view them in Premiere like on most GoPro Max workflows?
Namely, I want to change the tilt and zoom to create the “tiny planet” effect. I can make that effect easily with equirectangular videos, but when I tried with the above video, it didn't work at all.