text:
How to time remap faster than 1000% in Premiere
Is there a quick and easy way to time remap faster than 1000% in Adobe Premiere CC 2017?

Try nested sequences.  Insert your video in a sequence, speed it up the maximum amount.  Insert that sequence into another and then speed up the original sequence.  Note that the impact will be multiplicative, so if you make the video 10 times faster and the sequence 3 times faster, you'll end up with footage 30 times faster than the original.

Not exactly a fix but I have a very simple work around that will allows me up to 10000x, simply change the 'speed/duration' setting of the clip to 1000%, then using the time remapping and ramping tools as normal. Make the normal speed areas 10% (10% of 1000 equals 100%, normal speed) and then speed up areas by what you want, 500 or 1000% will be equivalent to 5000 or 10000 percent. You just have to think of it all scaled down by a factor of ten. Hope this helps someone! I'm very happy with how simple this makes my edits and find this is fast enough speeds for my needs. Cheers, Bill

This is actually the correct answer that allows for smooth ramping, but this is really annoying, does anyone know if DaVinci allows this? Might be time to finally switch anyway..

Simply right click on the clip in your timeline, and select Speed/Duration... and in the dialog box that pulls up, simply enter the length you want the clip to be in the Duration: field.

From my experience, I have been able to go up to 10,000% without nesting, doing it this way.

While this does work, the limitation of the approach means you can't speed ramp or ease the time remapping at the beginning or end.


text:
What deinterlacing filter should I use to encode/compress a PAL MPEG-2 576i 25fps raw file?
I have a PAL MPEG-2 576i 25fps raw capture (presumably either straight from satellite or a DVD recorder) that I would like to encode to AVC.  I'd like to deinterlace the file during compression with either ffmpeg or some other tool (maybe a frontend like Handbrake?).
What deinterlacing filter should I use with PAL 576i raw footage?

I don't agree that the other answer is a good idea in general, because "-vf yadif" will drop half the frames, thus resulting in a poor substitute of the original footage. Here is the thing: 576i25 means that you have 50 interlaced fields per second, rendering motion of objects fluid and natural to the human eye. You can get a high speed video at 50 frames per second easily by means of this:
ffmpeg -i in.mpg -vf yadif=1 out.mp4

Please note the difference, i.e. yadif=1 is specified. If you don't give a value, the yadif filter defaults to yadif=0 which cuts the frame rate of TV footage in 2.
Some people think that, because 25 fps is close to the theatrical movie speed (24p), the resulting video should look better, right?. Big mistake. The director of any project for TV had in mind that the target medium was TV and acted accordingly, using different techniques and taking a different artistic approach, allowing for instance a lot of fast movement, pan and zoom, or a hand-held camera to give a more subjective point of view. Also, a higher shutter speed is usual in TV without producing the nasty stroboscopic look because the frame rate is high. But later, when that footage gets converted to half frame rate the result is not "cinema look" but simply bad TV footage with stroboscopic movement.

Thanks for the good answer.  So many articles on the web seem to get this wrong! To achieve the same thing in Handbrake, in the Filters tab you need to choose Deinterlace: Yadif and Deinterlace Preset: Bob. (Or you may also be able to choose Decomb + Bob, I'm not sure which is technically better.)

(Update to my previous comment: When using Decomb (as opposed to Yadif) it auto-detects the frames where interlacing is present and deinterlaces only those, although beware that it won't always get it correct.)

@SimonEast so does yadif (add deint=1).

The same as with any interlaced footage: yadif
ffmpeg -i in.mpg -vf yadif out.mp4

(I've skipped the encoding parameters)

Thanks, I'll test this answer as soon as I get back to my work machine.  Are there no special parameters to pass in to apply different filters?  I've done some compression before but am generally new to yadif.  What if the source was NTSC or film?  Wouldn't the interlacing be different?  How does yadif know the difference?

The video stream with its context (resolution, rate..etc) is passed along to a filter when executed.

If the source was film, it wouldn't be interlaced. The pulldown applied during telecine (24->30) can be reversed using the detelecine filter.

@JAL Other deinterlacing filters to try are nnedi and w3fdif.

@Mulvya I know you are an expert on ffmpeg, but I think your advice here may not be good, because you are giving the message that it is always the right thing to do to demote a 50 Hz footage to 25 Hz. Depending on the shutter speed and the amount of pan/zoom, the resulting 25 Hz can look really crappy. The yadif filter alone drops half of the fields. Without any more information, the OP is safer with -vf "yadif=1" that generates 50p from 50i, and not 25p like in your code. I have nothing to say if the footage is a TV render of a classic movie, but in any other case, 50i to 25p is disastrous.

@Mulvya And the footage is likely not a classic movie, otherwise the OP would have much better and easier ways to get a copy of it, than a SDTV capture... It is most likely TV footage: a documentary, a sitcom chapter, news, who knows. TV footage is meant to be shot at 50 fps (in Europe) and the director acts accordingly, using other artistic resources: fast zoom, pan, hand-held shaking camera for subjective views, high shutter speed, low or no depth of field... Dropping half of the frames demoting the footage to 25p gives very ugly results, nothing to to with "cinema look".

The filter settings can be tweaked based on the results. The answer is a basic template for which filter to use. If the OP had an issue with the results, they presumably would have gotten back with "this filter is crap". yadif is written by a German dev, i.e. someone lives in PAL territory, so I assume they chose defaults that work for the samples it was tested on.

source: Stack Exchange

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

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

sort: votes


text:
How to scale a rectangle along its length in one direction while keeping the stroke fixed in after effects?
I am animating a rectangle with a stroke and would like to it scale up and down along its length in only one direction while keeping the stroke fixed.
I have managed to either keep the stroke fixed but not scale it in one direction, or to scale it in one direction but not keep the stroke fixed. :(
I have learned that in order keep the stroke fixed I can create a shape layer and edit the "size" rather then the scale. The problem is that I can't get it to "scale" in one direction now. (I know while editing the scale I can move the anchor point to the side I would like to scale from but while editing the size moving the anchor point has no effect and I haven't been able to find a solution.
Any suggestions? :) Thanks!!

In this situation I would right-click on the path options in your rectangle and choose "convert to Bezier".  Then instead of adjusting the scale, I would keyframe the path, and change the shape of the path in this way.

@Jared, if it answers your question, mark the answer as correct, to help others with this question

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


text:
Combining wiggle with position AE
So I have a null controlled named "diamond_control", I'm trying to control position and wiggle using sliders, separately. This is the code that I have come up with, but it doesn't seem to work. The penultimate line seems to be overwritten by the last line:
x = thisComp.layer("diamond_control").effect("Horizontal")("Slider");
y = thisComp.layer("diamond_control").effect("Vertical")("Slider");

wiggle_x = thisComp.layer("diamond_control").effect("wiggle_x_pos")
("Slider");

wiggle_y = thisComp.layer("diamond_control").effect("wiggle_y_pos")
("Slider");

[wiggle(1 * wiggle_x/100, 1 * wiggle_x/10)[0], wiggle(1 * wiggle_y/100, 1 *
wiggle_y/10)[1]];

value + [x,y];

Is it not possible to control position and wiggle in one expression?
Thanks in advance.

Expressions can only ever return one result. In your expression the two last lines both return a result, so the last one is what the value will be.
Wiggle is a little bit confusing, in that it is not a function like Math.sin or random, that takes the value to be wiggled as a parameter. It is actually a method of the property, so when you call wiggle() in say, the position property, what you're actually calling is someLayer.transform.position.wiggle(). This returns a 'wiggly' value based on the value of the property, it doesn't actually change the value of the property itself.
So to use the result of the wiggle expression in combination with other values you have to get the result of the wiggle expression, and use that in your final result. There is no need to add value to the wiggle result, because it is already added. Also, there is no point multiplying it by 1, that does nothing.
ctrl = thisComp.layer("diamond_control"); //just for neatness
x = ctrl.effect("Horizontal")("Slider");
y = ctrl.effect("Vertical")("Slider");

wiggle_x = ctrl.effect("wiggle_x_pos")("Slider");
wiggle_y = ctrleffect("wiggle_y_pos")("Slider");

w = [wiggle(wiggle_x/100, wiggle_x/10)[0], wiggle(wiggle_y/100, wiggle_y/10)[1]];

w + [x,y];

I'm not sure why you use the wiggle_x_pos and wiggle_y_pos slider for both the amplitude and frequency parameter of the wiggle. The first two values you give to wiggle are the amount of wiggliness and the frequency of the wiggle. Your expression would increase both frequency and amplitude together, that might be what you want. In the expression above this would then be added to the value given by the horizontal and vertical slider, which would be an offset, so that if x and y are equal to 0 the layer would wiggle around its base position. This seems a bit back-to-front.
If you want a set of controls for the rest position, the amount and the frequency of the wiggle I'd set up the 'diamond_control' layer with two point expression control effects on it and one slider control. The adfvantage of using a point control is that you can control both parameters with a single control, right from the comp window. So given that setup you'd use this:
ctrl = thisComp.layer("diamond_control"); //just for neatness
amplitude = ctrl.effect("Amplitude")("Point");
basePos = ctrl.effect("Base Position")("Point");
freq = ctrl.effect("Freqquency")("Slider");
w = [wiggle(amplitude[0], freq)[0], wiggle(amplitude[1], freq)[1]) - value;

w + basePos;

You can see that on the second line I subtract value from the wiggle result, this means that it just returns the wiggle offset, not the original base position. So that means the base position will be only set by the Base Position effect control.


text:
Problematic video file for conversion ffmpeg
I have a video file acquired from Hikvision's NVR connected to IP cameras. The method used to download this video was Hikvision NVR's internal API that produced a flawed video file in several ways:

Duration of the video file is wrong (as seen in Mediainfo or VLC). My guess is this happens due to NVR storing video files in chunks and when attempting to download video by supplying specific start time and end time to NVR's API the software just creates a new video file in memory by extracting the needed parts from stored video and attaching the original video file's duration to the newly created one.
Audio cannot be played in most media players including VLC.

I have tried converting the video file using ffmpeg with different settings to try and fix these issues but the output video still has the same problems.
What's interesting is that ffmpeg's  ffplay is able to play the video file perfectly with sound and no disruptions. Therefore I figured there must be a way to convert the video file to normalize it for other players as well.
Mediainfo output of the video file in question:
General
CompleteName                     : C:\DownLoad\1.mp4
Format                           : MPEG-PS
FileSize/String                  : 8.60 MiB
Duration/String                  : 2 h 7 min
OverallBitRate/String            : 9 395 b/s
FileExtension_Invalid            : mpeg mpg m2p vob pss evo

Video
ID/String                        : 224 (0xE0)
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format_Profile                   : Baseline@L4
Format_Settings                  : 1 Ref Frames
Format_Settings_CABAC/String     : No
Format_Settings_RefFrames/String : 1 frame
Format_Settings_GOP              : M=1, N=30
Duration/String                  : 2 min 0 s
Width/String                     : 1 920 pixels
Height/String                    : 1 080 pixels
DisplayAspectRatio/String        : 16:9
FrameRate_Mode/String            : Variable
ColorSpace                       : YUV
ChromaSubsampling/String         : 4:2:0
BitDepth/String                  : 8 bits
ScanType/String                  : Progressive

Audio
ID/String                        : 192 (0xC0)
Format                           : MPEG Audio
Duration/String                  : 2 h 7 min
Compression_Mode/String          : Lossy
Video_Delay/String               : -33 min 40 s

Output of ffmpeg:
C:\ffmpeg\bin>ffmpeg -i C:\DownLoad\1.mp4  -c:v libx264 -preset fast -crf 30 -b:v 75k -c:a aac -strict experimental -movflags faststart -threads 0 C:\DownLoad\2.mp4
ffmpeg version N-86537-gae6f6d4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.1.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 66.100 / 55. 66.100
  libavcodec     57. 99.100 / 57. 99.100
  libavformat    57. 73.100 / 57. 73.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 94.100 /  6. 94.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, mpeg, from 'C:\DownLoad\1.mp4':
  Duration: 02:07:57.93, start: 789.820800, bitrate: 9 kb/s
    Stream #0:0[0x1e0]: Video: h264 (Baseline), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
File 'C:\DownLoad\2.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (pcm_mulaw (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0000000002cd0280] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
[libx264 @ 0000000002514c80] using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX XOP FMA4
[libx264 @ 0000000002514c80] profile High, level 4.0
[libx264 @ 0000000002514c80] 264 - core 150 r2833 df79067 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=30.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:\DownLoad\2.mp4':
  Metadata:
    encoder         : Lavf57.73.100
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1920x1080, q=-1--1, 75 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.99.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/75000 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 8000 Hz, mono, fltp, 48 kb/s
    Metadata:
      encoder         : Lavc57.99.100 aac
[mp4 @ 00000000010e9e00] Starting second pass: moving the moov atom to the beginning of the file speed= 116x
frame= 3269 fps= 66 q=-1.0 Lsize=   11086kB time=01:34:24.38 bitrate=  16.0kbits/s dup=269 drop=0 speed= 115x
video:10429kB audio:592kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.594114%
[libx264 @ 0000000002514c80] frame I:14    Avg QP:21.86  size: 59795
[libx264 @ 0000000002514c80] frame P:833   Avg QP:24.81  size:  8993
[libx264 @ 0000000002514c80] frame B:2422  Avg QP:28.70  size:   970
[libx264 @ 0000000002514c80] consecutive B-frames:  1.0%  0.2%  1.4% 97.4%
[libx264 @ 0000000002514c80] mb I  I16..4: 18.9% 66.3% 14.8%
[libx264 @ 0000000002514c80] mb P  I16..4:  4.0%  7.7%  0.4%  P16..4: 16.2%  2.0%  0.6%  0.0%  0.0%    skip:69.1%
[libx264 @ 0000000002514c80] mb B  I16..4:  0.6%  0.2%  0.0%  B16..8:  5.5%  0.1%  0.0%  direct: 0.7%  skip:92.9%  L0:44.0% L1:55.0% BI: 1.0%
[libx264 @ 0000000002514c80] 8x8 transform intra:59.0% inter:83.3%
[libx264 @ 0000000002514c80] coded y,uvDC,uvAC intra: 25.3% 36.1% 7.7% inter: 1.0% 2.3% 0.1%
[libx264 @ 0000000002514c80] i16 v,h,dc,p: 23% 24% 43% 10%
[libx264 @ 0000000002514c80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 37% 26% 23%  2%  2%  3%  2%  3%  3%
[libx264 @ 0000000002514c80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 43% 23% 12%  4%  4%  5%  4%  4%  2%
[libx264 @ 0000000002514c80] i8c dc,h,v,p: 81%  7%  9%  3%
[libx264 @ 0000000002514c80] Weighted P-Frames: Y:1.0% UV:0.0%
[libx264 @ 0000000002514c80] ref P L0: 73.6% 26.4%
[libx264 @ 0000000002514c80] ref B L0: 80.9% 19.1%
[libx264 @ 0000000002514c80] ref B L1: 90.0% 10.0%
[libx264 @ 0000000002514c80] kb/s:653.30
[aac @ 0000000002cd0280] Qavg: 64512.656

C:\ffmpeg\bin>

Download link to sample:
https://www.dropbox.com/s/9ccptsuiqk2ntsv/1.zip?dl=0
This sample is exactly 2 minutes long, but VLC will tell you otherwise.

All 2 minutes and 8 seconds play perfectly on VLC for Android. There's certainly some odd values reported by ffmpeg. Could we trouble you for an ffprobe output too? - The video is a bit blocky for the Bitrate but it plays without a hiccup.

@Rob I have actually solved the problem by extracting the audio from this file and then merging and converting it with the original video. I forgot to post the answer here, but I will do so now.

Good going. After some more testing it is permissible to mark your own answer to your question as correct.

I was able to produce a normalized video file by doing the following:

Extracting audio stream from my MPEG-PS video file using ffmpeg and using -acodec aac.
Removing audio stream from the original MPEG-PS video file using ffmpeg and -v:c copy and using -t option to specify the actual duration of the video.
Merging the two files together.

Result is a file that is playable in any video player. Tested on VLC, MPC-HC.

answered in detail https://stackoverflow.com/questions/47759599/hikvision-nvr-video-conversion-ffmpeg#answer-47771735


text:
Is there a way to record my handwriting and/or drawing as a transparent video in motion?
I would prefer to achieve this with my iPad, but I also have an iMac if necessary.
What I want is to record my own handwriting and put the resulting video in real time on top of another video. An app called Video Brush does this (by writing directly on the video), but the footage it exports is unusable due to being jumpy, like it had export issues. Another app called Write-on Video gets close, but the writing just appears. It doesn’t show the writing in motion.
There are a few apps that allow me to achieve this on a white background (VideoScribe, Adobe Sketch recording the screen, etc..)
TLDR; is there any way for me to either write directly on a video and make that writing part of the video or to write/draw on video with a transparent background?

I found a solution, beit a bit ineligant. I screen-record myself drawing in white on a green background using Adobe Sketch. Then use Filmaker Pro’s green screen feature to put in a different background.
Still let me know if you guys have any other ideas.

I think without going into using After Effects (or similar) to trace and animate paths and whatnot, that might be the best way of doing things. Do the programs you use allow different blending modes? You might just be able to screen record you writing in white on a black BG and using a screen mode to get rid of the black background as opposed to having to key anything.


text:
Subtitles do not match spoken dialogue. Why?
I have been watching a lot of shows on Netflix lately in French, (please note the original language is English, so it is dubbed) with French subtitles. I find that the subtitles rarely match what is actually being spoken!
Why is this?
For example someone will say 'bien sûr' orally, but the subtitles will say 'd'accord'.
That is one of many examples, long sentences will usually be completely different.

This is an educated guess as I'm not sure anyone can give a concrete answer as to this particular show's specific reason, but since it was dubbed, there's a solid possibility that the subtitles are a translation of the English subtitles while the voice over may have been translated by the dubbing team and potentially altered by what the voice over actors could deliver with a decent dub.
In my experience, not all shows are run with a strict adherence to the script.  Changes sometimes need to be made for actors to deliver naturally and there is often some flexibility in exact lines.  If the same flexibility was extended to the dub team, then it seems quite likely that they would deviate from the exact script translation.
If they are using the same subtitle timing for multiple languages, then it might not have been worth having someone sit through it and dictate the subtitles and try to align them to the proper markers vs simply directly translating the existing English subtitles.

The subtitles would have been done first. Then the dub. I would edit technical training films which had to be dubbed into 9 other (Indian) languages, and during the interview portions, the translation would sometimes have to be altered for lip-sync purposes. I presume there's a similar reason here.

@Mulvya - it depends on the way they approach the project.  Subtitling is a fairly late process thing since it can't be efficiently done prior to editing being done or at least mostly done.  If they intended a dub from the get go, they may have done it prior or concurrent to sub-titling, but if they dubbed after release as a localization, then the subtitles would be done as part of the translation, which would obviously have to occur before dubbing.  It would also depend if dubbing was done from script or from what actors actually said.

@AJHenderson It's very easy to edit your answer and then reply to my comment. Not impressed.

@cloud - that wasn't trying to be sneaky.  That was just trying to expand it a bit.  I wasn't sure if you were objecting to the length or the fact I was guessing or what.  I was honestly just trying to understand what your objection was.  I realized that putting a bit more about my background and reasoning would be helpful so I did so.  If you feel it is fine as it is now, I can cleanup the comment chain.

My comment presumed that the localization happened after original run i.e. the show wasn't pre-sold to foreign language markets.

You see the same thing with subtitled Japanese anime. Some of the original scripting would not be tolerated culturally by american and european audiences, so some lines are changed out of cultural sensitivity. Others are changed because the natural rhythms of the languages are different.


text:
Software for detecting Photosensitive Epilepsy content
As part of various broadcasters requests media provided for broadcasting environment must be PSE (Photosensitive Epilepsy) free. There should be not frames sequences that could trigger that symptoms.
I would like to know if there exists some free software for quality check media in mov, mp4 and mxf with dnxhd, h264 and prores codecs and if ffmpeg can do it showing the possible harmful patterns and passages.
Thanks!

Unfortunately, I don't know of any free software that checks for PSE. As of 2013, the test for PSE was only available closed source. However, all of the major commercial QC tools can check for it. (You would need to check with each vendor if it is supported for all of the codecs you need to QC.)

Interra Baton
Tektronix Aurora
Telestream Vidchecker
Venera Pulsar

I wrote an ffmpeg filter which attempts to do this. It's not perfect, but it does seem to work well with a good part of the test samples I was working with.
It has now been included into ffmpeg, and should be available in the next release.
With mpv, you can enable it with:
mpv video.mp4 --vf=photosensitivity

The filter can be made more or less strict by changing its parameters, e.g.:
mpv video.mp4 --vf=photosensitivity:threshold=0.5 # lower is stricter

To check how bad a video is from the command line, you can run the filter in bypass mode, and look at the verbose output:
ffmpeg -i video.mp4 -vf photosensitivity=bypass=1 -v verbose -f null  /dev/null

The output would have lines such as:
[photosensitivity @ 000000000929aa80] badness:  69183 ->  70173 /  15360 (456% - EXCEEDED)

For programmatic use, the filter also produces some frame metadata. You can ask ffmpeg to export it to a text file as follows:
ffmpeg -i video.mp4 -vf photosensitivity=bypass=1,metadata=print:file=photosensitivity-analysis.txt -f null /dev/null

The created photosensitivity-analysis.txt file will have one block of lines such as these per frame:
frame:300  pts:300     pts_time:10
lavfi.photosensitivity.badness=4.269336
lavfi.photosensitivity.fixed-badness=4.269336
lavfi.photosensitivity.frame-badness=0.459766
lavfi.photosensitivity.factor=1.000000

When badness is greater than one, the badness threshold has been exceeded.

Nice work! It always good to see new FLOSS video QC tools!

Some Broadcasters require a Harding Test which is patented and proprietary, it creates a Certificate; thus getting someone to accept liability isn't going to be free.
You can find a number of places online that will test a video file (or Game, Poster, Art, etc.) but those aren't free, the Harding website has authenticated tests and support.
Free software claiming to perform the same checks (so when you submit your work, it won't be rejected) is available from the University of Maryland in the form of PEAT, their Photosensitive Epilepsy Analysis Tool.

Note: Restrictions on use
The Photosensitive Epilepsy Analysis Tool (PEAT) was developed to provide a free resource for Web designers and computer software developers. Use of PEAT to assess material commercially produced for television broadcast, film, home entertainment, or gaming industries is prohibited. For broadcast, film, home entertainment, and gaming applications, the Harding FPA software should be employed.

To get the real thing, a Certificate, you'll need to pay. To get software that claims to do the same thing without accepting liability or providing the authentic Certificate is possible, I found that source with less than 10 min. of searching.

Actually I need a software being able to inspect and show me problems, I don't care about certifications because the checks are done into the broadcast company itself. I have the options of create a certificate and attach it with the media but I will not use it.


text:
Animating arcs waves
With I could create an animation using arcs in After Effects as the example of the link below.
Animation
I'm trying to animate only the region where the arcs are opening.
In After Effects I can not create arcs. My attempts were only with circles.

I think you can achieve this effect using the built in Radio Waves effect.
https://helpx.adobe.com/after-effects/using/generate-effects.html
I think you can restrict the arc size.  If you can't, you could always mask the areas of the circle you don't want to see.

Very close to what I needed...


text:
Why use Lumetri scopes?
I've never fully understood what histograms in LR/PS and Lumetri scopes in PP are telling me so perhaps this is why I don't understand the need for them but why can't I just look at the image and see what needs adjusting? I'm new to video but I've been doing it this way with photos for a long time and if there's a difference between the results I get and others' my eye isn't trained enough to see it. I don't have any formal education on the subjects though.

The scopes are objective and absolute measures of the levels in your image. They aren't susceptible to the vagaries of human perception—colours and levels looking different depending on context—and they work even on un-calibrated monitors.
Scopes are particularly important where viewing conditions aren't optimal - that's why pro cameras will usually have a histogram or scope function. If you're squinting at a monitor in bright daylight you'll have a very different idea of the exposure than if you're inside, and without an absolute measure of the levels it can be very hard to judge what's correctly exposed.
If your viewing setup is correctly set-up and calibrated you can certainly get away without them, but you might find that learning how to read them may give you an insight into the process that you don't get just from looking at the image.
Of course the scopes won't tell you when something looks good, that's your job, but they will ensure that what looks good for you will look good for others.

I hadn't thought about using them at capture time. I'm used to cameras with viewfinders. Video doesn't work that way though. I'll keep this in mind. Thanks!

Zebra stripes are another invaluable capture-time tool.

I was going to mention them too. A good discussion about scopes, stripes and exposure, particularly the difference in use between histograms and scopes here: https://vimeo.com/154627187


text:
How do you export higher resolution 360° VR footage from Adobe Premiere?
We have recently purchased a 6-lens 360° 8k camera. It is fantastic. However, I have only been able to find instructions on how to export video at a max width of 4096. This is half the size that we can record in. So if we can only export at 4096, what is the point of shooting 8k? Is there a way to export at the full resolution from Adobe Premiere?
Any feedback, suggestions or links on how to make use of the 8k footage would be appreciated. Thank you!

You can find more on this topic in a similar discussion How do I encode videos into h.264 at 8k resolution.

I did find this YouTube tutorial if anyone else is interested. It provides the best settings for exporting 8k video from Premiere.


text:
ffmpeg: How to list all possible video parameters for DNxHD dnxhr_lb profile?
If I don't put accepted video parameters for DNXHD profile, ffmpeg will list all the possible parameters like this. And I find this very helpful.
[swscaler @ 0x539a420] deprecated pixel format used, make sure you did set range correctly
[dnxhd @ 0x55afb60] video parameters incompatible with DNxHD. Valid DNxHD profiles:
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p10; framerate: 24000/1001
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p10; framerate: 25/1
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p10; framerate: 50/1
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p10; framerate: 60000/1001
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 115Mbps; pixel format: yuv422p; framerate: 24000/1001
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
[dnxhd @ 0x55afb60] Frame size: 1920x1080p; bitrate: 240Mbps; pixel .....

Is there a way to get this list for DNxHD codec dnxhr_lb or other DNxHD profiles below?
dnxhd
dnxhr_444
dnxhr_hqx
dnxhr_hq
dnxhr_sq
dnxhr_lb

The DNxHR profiles have simpler restrictions - only on pixel format and minimum frame size.
Accepted Pixel formats
LB:  YUV 4:2:2 (8-bit)
SQ:  YUV 4:2:2 (8-bit)
HQ:  YUV 4:2:2 (8-bit)
HQX: YUV 4:2:2 (10-bit)
444: YUV 4:4:4 or RGB (10-bit)
In addition, all HR profiles require the picture to be at least 256 x 120.

That's great. because DNxHD was rather very strict. Thank you Mulvya!

Yeah it's playing back in vlc 3+, surprisingly. Probably you are right and nuke's reader just can't handle it. I'm going to remove my comments to keep it clean here. Thanks again @Gyan

@p2or Nuke doesn't support DNxHR - https://learn.foundry.com/nuke/content/appendices/appendixc/supported_file_formats.html?tocpath=Appendices%7CAppendix%20C%3A%20File%20Formats%7C_____0


text:
Screen cast and capture video cam and show both on screen using ffmpeg
I'm using the following command to capture my screen cast and
laptop video camera at the same time. Video from the camera
appears in a smallish window in bottom right of the screen cast.
This works, however there is a snag; I can't see the video of
myself on screen while I'm recording and I want to be able
to see myself in the bottom right window so I can be sure I
align myself with the camera. How can I do this?
ffmpeg -f alsa -i default \
-f x11grab -s `xdpyinfo | grep 'dimensions:'|awk '{print $2}'` -r 25 \
-i :0.0 -f video4linux2 \
-i /dev/video0 -filter_complex '[2:v]scale=380:-1[cam];[1:v][cam]overlay=W-w-8:H-h-8' \
-c:a flac \
-qscale 0 screen_and_video_grab.mkv

Open the webcam stream with a player, such as ffplay -noborder /dev/video0, then record desktop.

@LordNeckbeard Thanks. That helped me get to the solution I have posted.

This solution works in Linux.
To screen cast with inset video of yourself on screen where you have a video camera that is located at /dev/video0, paste the following into a text file and name it start_recording.sh or something similar and make it executable
#!/bin/bash

#####  set variables below ####

location_dir=$HOME/Desktop

T="$(date +%d-%m-%Y-%H-%M-%S)".mkv

#echo $T

video_window_title="$T"

#echo $video_window_title

####  Place video camera on own screen & detach the process  ####
ffplay -window_title "$video_window_title" /dev/video0 &

####  Record everything on the screen  ####
ffmpeg -y -f x11grab -s \
`xdpyinfo | grep 'dimensions:'|awk '{print $2}'` \
-i :0.0 -f alsa \
-i default $HOME/$T

To stop recording, paste the following into a text file and name it stop_recording.sh or something similar and make it executable
#!/bin/bash

# kills the ffmpeg and ffplay processes
pkill ffmpeg && pkill ffplay

The below two line script will make your inset video the always on top window, or not. Simply put the below two lines below in a text file, call it something like toggle_video_inset_to_always_above_layer_or_normal_layer.sh or something you can remember, and make it executable.
#!/bin/bash

wmctrl -r $(wmctrl -lx | grep ffplay | grep -oE "[0-9a-z\._-]{20,25}$") -b toggle,above


text:
Transcode 5.1 audio in ffmpeg leads to incorrect audio mapping in output
I need to transcode some high res videos (prores or dnxhd files with 5.1 uncompressed 48kHz audio in MOV container) to their low res h264 with AAC keeping the audio still in 5.1 preserving their channel mapping.
In order to do so I tried to use this command:
ffmpeg -y -i input.mov -c:v libx264 -preset ultrafast -b:v 10000k -c:a libfdk_aac -afterburner 1 -cutoff 20000 -filter:v "scale=-1:720" output.mp4

The version I'm using is ffmpeg version N-87584-g47d6b02f6c-Reino a pretty new one.
What happens is that even if video processing is ok, for the audio part my channels are mapped incorrectly.. to better explain what happens I made a screenshot of before and after waveforms in Adobe Audition.
These are the waveform of the input file:

These instead are the waveforms of the transcoded file:

Again let me post the ffprobe parts related to the audio:
input file:
Stream #0:1(eng): Audio: pcm_s24le (lpcm / 0x6D63706C), 48000 Hz, 5.1, s32 (24 bit), 6912 kb/s (default)
Metadata:
  creation_time   : 2018-01-02T09:48:58.000000Z
  handler_name    : Apple Alias Data Handler
  timecode        : 00:00:00:00

transcoded file:
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 488 kb/s (default)
Metadata:
  handler_name    : SoundHandler

and for finish MediaInfo Lite
original file:
Audio
ID                          : 2
Format                      : PCM
Format settings             : Little / Signed
Format settings, Endianness : Little
Format settings, Sign       : Signed
Codec ID                    : lpcm
Duration                    : 1 h 30 min
Bit rate mode               : Constant
Bit rate                    : 6 912 kb/s
Channel(s)                  : 6 channels
Channel positions           : Front: L C R, Back: L R, LFE
Sampling rate               : 48.0 kHz
Bit depth                   : 24 bits
Stream size                 : 4.35 GiB (5%)
Language                    : English
Encoded date                : UTC 2018-01-02 09:48:58
Tagged date                 : UTC 2018-01-02 10:16:46

transcoded file:
Audio
ID                          : 2
Format                      : AAC
Format/Info                 : Advanced Audio Codec
Format profile              : LC
Codec ID                    : mp4a-40-2
Duration                    : 1 h 30 min
Duration_LastFrame          : -8 ms
Bit rate mode               : Constant
Bit rate                    : 489 kb/s
Channel(s)                  : 2 channels
Channel(s)_Original         : 6 channels
Channel positions           : Front: L C R, Side: L R, LFE
Sampling rate               : 48.0 kHz
Frame rate                  : 46.875 FPS (1024 SPF)
Compression mode            : Lossy
Stream size                 : 315 MiB (5%)
Language                    : English
Default                     : Yes
Alternate group             : 1

If you play the mp4 file with VLC you clearly hear that something is swapped badly.
I'm open to a solution ;)

FFmpeg assumes that the input's 5.1 channel mapping is the same as the one it uses. To correct that, use the channelmap filter to remap, add:
-af "channelmap=4|0|1|2|3|5:5.1"

(I based it off the channel labels on the right in your images)

I found working for my purposes: -af "channelmap=0|1|4|5|2|3:5.1"

Just a question, what I wonder is.. Why with ffmpeg I have to specify the channel order manually when instead a player like VLC that is based on libavcodec is able to determine it automatically ? Shouldn't ffmpeg do the same ? I can understand specifying manually the 5.1 channel flavour for the output but not for the input..

The channel layout is signaled by the demuxer to the decoder and VLC uses its own. In ffmpeg, the QT demuxer does recognize the layout in your MOV but ffmpeg internally has a single designation for 5.1, so it does not reorder when sending to encoder.

I see, this makes sense. There's no any kind of way to auto assign them so? Or at least a command with ffprobe to read the internal channel layout so that I could make a multi pass script ?


text:
How to do a camera projection in maya?
I have a video, which I have tracked and solved for camera movement, which I have imported into maya.
Now that I have this scene, I would like to do a camera projection on the objects, however, I can only get it to work with a single image.
How can I project a video on my geometry, instead of a photo?

To project a video instead of a photo:

convert your video to an image sequence (with Nuke, AfterFX, Premiere, whatever...)
load it into your file node, then click on 'Use Image Sequence'
scroll in the timeline, and Maya will load the according frame


text:
Syncing Multiple Audio Streams With One Video Stream (FFMPEG)
I'll try and keep this as simple as possible, and thanks for any help.
I have two PC's one that I'm gaming on, one that I'm recording on. I also have two RME audio cards (one in each respective PC) hooked up to each other to share audio between the PC's. My main display is hooked up to a displayport splitter that splits to my recording PC's capture card and I'm also routing my game audio from the sound card in my gaming PC to the capture PC's audio card.
I'm running discord on the capture PC and have my game audio, discord audio, and my personal mic all on separate input channels. I have the capture card video and the game audio channel output to the same MP4 file and then have my mic audio and the discord audio output to two separate WAV files. This way I can choose to omit the voices from the video so only game audio can be heard and or I can mix the volumes independently after recording. This way I can make sure the discord, my voice, or the game audio isn't overwhelming in the final product.
Everything seemed to be working great, until my capture card dropped a few frames over the course of 3 hours. The resulting footage had out of sync audio and video, the discord audio and my mic were also now out of sync with the game footage. After searching around for a very long time it seemed the solution was -vsync 1 but it didn't seem to work, here was my code for that:
ffmpeg -guess_layout_max 0 -y -f dshow -video_size 3440x1440 -rtbufsize 2147M -pixel_format nv12 -r 100.00 -vsync 1 ^
-i video="Video (00 Pro Capture HDMI 4K+)":audio="Analog (1+2) (RME Fireface UC)" -map 0:0 -map 0:1 ^
-codec:v h264_nvenc -pix_fmt nv12 -b:v 250M -maxrate 250M -bufsize 250M -b:a 320k -ac 2 ^
-segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\PC%02d.mp4 ^
-guess_layout_max 0 -f dshow -rtbufsize 100M -i audio="Analog (3+4) (RME Fireface UC)" -map 1:0 -b:a 320k -ac 2 ^
-segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\Voices\Theirs\TheirsPC%02d.wav ^
-guess_layout_max 0 -f dshow -rtbufsize 100M -i audio="Analog (5+6) (RME Fireface UC)" -map 2:0 -b:a 320k -ac 2 ^
-segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\Voices\Mine\MinePC%02d.wav

That's all one line of code, carrots are line breaks. But after playing for a while and dropping some frames the problems persisted. I was under the impression that -vsync 1 forced the desired frame rate, duplicating frames to make sure the audio stayed in-sync. So I thought maybe I had it in the wrong place and tried this:
ffmpeg -guess_layout_max 0 -y -f dshow -video_size 3440x1440 -rtbufsize 2147M -pixel_format nv12 -r 100.00 ^
-i video="Video (00 Pro Capture HDMI 4K+)":audio="Analog (1+2) (RME Fireface UC)" -vsync 1 -map 0:0,0:1 -map 0:1 ^
-codec:v h264_nvenc -pix_fmt nv12 -b:v 250M -maxrate 250M -bufsize 250M -b:a 320k -ac 2 ^
-segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\PC%02d.mp4 ^
-guess_layout_max 0 -f dshow -rtbufsize 100M -i audio="Analog (3+4) (RME Fireface UC)" -map 1:0 -b:a 320k -ac 2 ^
-segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\Voices\Theirs\TheirsPC%02d.wav ^
-guess_layout_max 0 -f dshow -rtbufsize 100M -i audio="Analog (5+6) (RME Fireface UC)" -map 2:0 -b:a 320k -ac 2 ^
-segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\Voices\Mine\MinePC%02d.wav

I actually have yet to drop a frame since then... is this my code causing this? With vsync working correctly would it no-longer display dropped frames in the console? Am I mapping correctly in conjunction with vsync? It almost seems like with -map 0:0,0:1 I'd be syncing the audio to the video but what I would really like is if I drop frames just take the last successful frame and duplicate it. That way (theoretically) the other two audio channels would stay in-sync too... I'm just trying to make sure that I don't screw up an important recording before it happens.
Thanks for any help.

The vsync 1 is redundant since that's the default value for MP4 output.

Oh really? Good to know, but wouldn't that mean if I were to drop 50 out of 100 frames in a second it would duplicate frames to keep it at 100? Because that's definitely not whats happening... In one case I dropped a lot of frames out of no-where (doesn't happen often) and when I went to play it back it was like the video was in hyper speed mode but the audio remained at a normal rate. After the drops sorted out the audio and video were off by several seconds. Per FFMPEG Docs: "1, cfr - Frames will be duplicated and dropped to achieve exactly the requested constant frame rate."

Depends when the frames are dropped - after ingestion into the ffmpeg processing pipeline or at the gate. Like if the rtbufsize is not large enough and nears overflow, frames will be dropped before intake - those aren't duplicated.

That is what's happening actually, but it's seemingly random. Even when lowering the Bitrate from 250M to 100M it sometimes drops frames due to the buffer being too full. Unfortunately 2147M is as large a buffer as the card will allow. Anyway to duplicated frames that are dropped like that? Or am I out of luck. Thanks a ton for the info and help much appreciated, already further than I was after Googling for 6 hours.

Can't test now, but maybe. I'll have to look into it.

Awesome, no obligations, thanks for the help thus far!

Just thought I'd let you guys know that I got this working.
I needed to use -framerate instead of -r to get it to duplicate dropped frames, the reason I wasn't using -framerate in the first place is because it would spam the message "past duration too large" and the video wouldn't play back after exiting the recording. I also used an audio filter to delay the other channels so they they would start at the the same time as the video. I had to use -af "adelay=200|200" instead of -filter_complex "[1:0] adelay=200|200 [1:0]" for some reason. Ended up being cleaner anyways and it worked but I don't understand why the -filter_complex wasn't working an the -af was. I went ahead and applied -vsync 1 and -async 1 but I'm not quite sure if that is default and therefore redundant. Lastly I used -preset llhp (low latency high performance) which seemed to decrease the amount of dropped frames. The result - everything stays in-sync even if I drop frames and all tracks "start" at the same time:
ffmpeg -guess_layout_max 0 -y -f dshow -video_size 3440x1440 -rtbufsize 2147.48M -pixel_format nv12 -framerate 200 ^
-i video="Video (00 Pro Capture HDMI 4K+)":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" -map 0:0,0:1 -map 0:1 ^
-preset: llhp -codec:v h264_nvenc -pix_fmt nv12 -b:v 250M -maxrate:v 250M -minrate:v 250M -bufsize:v 250M -b:a 320k ^
-ac 2 -r 100 -async 1 -vsync 1 -segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\PC%02d.mp4 ^
-guess_layout_max 0 -f dshow -rtbufsize 2000M -i audio="Analog (3+4) (RME Fireface UC)" -map 1:0 -b:a 320k -ac 2 ^
-af "adelay=200|200" -segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\Voices\Theirs\TPC%02d.wav ^
-guess_layout_max 0 -f dshow -rtbufsize 2000M -i audio="Analog (5+6) (RME Fireface UC)" -map 2:0 -b:a 320k -ac 2 ^
-af "adelay=825|825" -segment_time 600 -segment_wrap 9 -f segment C:\Users\djcim\Videos\PC\Voices\Mine\MPC%02d.wav

I was able to get the rid of the "past duration too large" warning by increasing the input framerate to 200, I have absolutely no idea why this would fix that message. Put -r 100 on the output to make sure it came out as 100FPS which is what I actually wanted the framerate to be. I am confused as to why several parts work the way they do and can’t find answers but nonetheless it’s working.


text:
How to use MELT or FFMPEG for layering of a video (i.e. shifting an overlay of the same video by one frame to remove flicerking from LEDs)?
I am looking for a possibility to remove the flickering from LEDs on a video under Linux on the commandline. To do that one would have to

Put the video on one track
Put the same video on a second track with 1-2 frames delay
Overlay the second track with 50% transparency
Use the audio from one of the tracks

Thanks a lot in advance!

You would carry that out, like this:
ffmpeg -i in.mp4 -filter_complex \
  "[0]split=2[base][shifted]; \
   [shifted]setpts=PTS+1/TB/FRAME_RATE,format=yuva444p,colorchannelmixer=aa=0.50[shifted]; \
   [base][shifted]overlay"   out.mp4

setpts=PTS+1/TB/FRAME_RATE delays the overlay by 1 frame. Change the 1 to adjust delay.
format=yuva444p makes sure there's an alpha channel.
colorchannelmixer=aa=0.50 sets the alpha to 50%.
I haven't specified any encoding parameters, so the defaults will be used.


text:
Using ffmpeg to convert to Photo Jpeg with minimal loss of quality
I've a 30-second clip, which is HD 1080p, 30fps, "Photo JPEG" compression, 480MB.
I've brought it into Fusion 9, made a small change, and rendered: but the Saver options (under Quicktime) are either uncompressed (which gives me a 5GB file!!), or DNxHD (e.g. "DNxHD HQ 1080p, 8 bit" gives me an 820MB file). (I think the lack of choices might be a limitation of the Linux version of Fusion 9?)
The next tool in the chain does not read DNxHD; I could work with the uncompressed file, but I'd like to avoid big files if I can. Can I use ffmpeg to convert it to the original "Photo JPEG" format?  (If not, is there something of similar quality and file size?)
("it" being either the uncompressed file or the DNxHD file)
I'd like to find the settings that give a nice file size reduction, but with no noticeable reduction in quality. I want to have my cake and eat it ;-)

DNxHD and JPEG are not the only game in town as far as intermediate codecs are concerned (intermediate codecs being high-quality, visually lossless codecs designed for moving media between steps in a post-production chain). Probably the most-used intermediate codec is Apple's prores 422, which can be encoded cross platform using ffmpeg thus:
ffmpeg -i uncompressed.mov -c:v prores -profile:v 3 -c:a pcm_s16le output.mov

One of the biggest advantages of prores is the support for 10-bit encoding, giving you much better colour fidelity. You can also use the prores 4444 variation to avoid chroma subsampling (reduction of the colour resolution) and alpha channel support.
Failing that you can use motion-JPEG, or even 2 flavours of lossless JPEG (I have no idea what the difference is). Oh and there's JPEG2000 if you really want, though it's not recommended. Substitute your codec of choice here:
ffmpeg -i uncompressed.mov -c:v CODEC -c:a pcm_s16le output.mov

where CODEC is one of:

jpegls - lossless JPEG (?)
ljpeg - another lossless JPEG (?)
mjpeg - motion JPEG
jpeg2000 - JPEG 2000

Since you're on linux I won't suggest Cineform, it's a good intermediate codec on win/mac but I don't think there's a CFHD codec for linux yet, and ffmpeg can only decode it (it's been open-sourced so that will probably change). There are a couple of more obscure ones like Grass Valley, huffyUV, dirac and so on, but if you can't use DNxHD it's unlikely these will be any use to you. Just as an aside, DNxHD is freely available from Avid, is it possible to install the codec on the target machine?

J2K isn't the best mezzanine format. It has some peculiarities that make it better suited to being a transport codec. In other words, it takes a lot of tuning for the application and in a mezzanine setting, you don't take advantage of the unique features of it that make the tuning worthwhile.

Good point, I just did ffmpeg -codecs|grep jpeg so I thought I'd add it for completeness. I've personally had nothing but trouble with jpeg2000.

Thanks, prores 422 seems to work well (giving a 1gb file). I tried using both uncompressed and DNxHD as the input, the latter running a bit quicker (14s vs. 18s). Their output is visually identical, as far as I can tell.


text:
ffplay - Is there a way to display a video and spectrogram in the same output?
I'm trying to analyze a spectrogram while simultaneously checking the video, without having to switch between them.  Something like this, but with the video combined in the same output:

The idea is to be able to scrub through both video and the spectrogram so that they're synced.  Most editing software only lets me see the waveforms.  The command I used for that is as follows:
ffplay -f lavfi 'amovie=/Users/hdl/Desktop/HDLS3K.mp4, asplit [a][out1];
[a] showspectrum=size=1280x512:mode=separate:slide=scroll [out0]'

Depending on what your user case is, you may want to have a look at QCTools.

Use
ffplay -f lavfi 'amovie=/Users/hdl/Desktop/HDLS3K.mp4:s=dv+da[v][a];[a]asplit[asp][out1];
   [asp]showspectrum=size=1280x512:mode=separate:slide=scroll[spect];
   [v]scale=640:-1[v];[v][spect]vstack[out0]'

amovie usually selects only one (audio) stream. dv+da gets it to extract the best video and the best audio stream. The video output is scaled so that the vstack works.

Thanks, this worked, but I did have to make a little change.  Apparently it wants the spectrum size and scale set to the same value, else it spits an error.  I set them both to 640 and that did it.

With this it seems like the spectrum visualization has a bit of a delay on it.  Any tips for improving that?


text:
Variable crop width/height over time
I am currently trying to have ffmpeg blur part of an input video, using boxes over 1/10 seconds frames from a previous part of the program.
The command is along these lines:
ffmpeg -y -i input.mp4 -pix_fmt yuv420p -filter_complex [0:v]crop='in_w*if(lt(t,0.1),0.23132270574569702,if(lt(t,0.2),0.21441733837127686,if(lt(t,0.30000000000000004),0.1499532163143158,if(lt(t,0.4),0.1259399652481079,if(lt(t,0.5),0.16647100448608398,if(lt(t,0.6),0.209006667137146,if(lt(t,0.7),0.19645869731903076,if(lt(t,0.7999999999999999),0.14811599254608154,if(lt(t,0.9),0.13625645637512207,if(lt(t,1.0),0.23812496662139893,if(lt(t,1.1),0.24143600463867188,if(lt(t,1.2000000000000002),0.21351194381713867,if(lt(t,1.3),0.15060842037200928,if(lt(t,1.4000000000000001),0.11908853054046631,if(lt(t,2.0),0.10922718048095703,0.5)))))))))))))))':'in_h*if(lt(t,0.1),0.7302078008651733,if(lt(t,0.2),0.72728231549263,if(lt(t,0.30000000000000004),0.7276445627212524,if(lt(t,0.4),0.7524535357952118,if(lt(t,0.5),0.7392034530639648,if(lt(t,0.6),0.7145015895366669,if(lt(t,0.7),0.6905231177806854,if(lt(t,0.7999999999999999),0.7224559783935547,if(lt(t,0.9),0.7534412145614624,if(lt(t,1.0),0.7607900202274323,if(lt(t,1.1),0.7299857437610626,if(lt(t,1.2000000000000002),0.7394903004169464,if(lt(t,1.3),0.7487046718597412,if(lt(t,1.4000000000000001),0.7166697978973389,if(lt(t,2.0),0.7316611707210541,0.5)))))))))))))))':'in_w*if(lt(t,0.1),0.3309709429740906,if(lt(t,0.2),0.357507586479187,if(lt(t,0.30000000000000004),0.44701889157295227,if(lt(t,0.4),0.5001536011695862,if(lt(t,0.5),0.5295754075050354,if(lt(t,0.6),0.5418452620506287,if(lt(t,0.7),0.5671597719192505,if(lt(t,0.7999999999999999),0.6490602493286133,if(lt(t,0.9),0.6897507905960083,if(lt(t,1.0),0.6941888928413391,if(lt(t,1.1),0.7210350036621094,if(lt(t,1.2000000000000002),0.7504343390464783,if(lt(t,1.3),0.8392617702484131,if(lt(t,1.4000000000000001),0.880531907081604,if(lt(t,2.0),0.890772819519043,0.5)))))))))))))))':'in_h*if(lt(t,0.1),0.24461424350738525,if(lt(t,0.2),0.255586713552475,if(lt(t,0.30000000000000004),0.2545440196990967,if(lt(t,0.4),0.2454611361026764,if(lt(t,0.5),0.25117623805999756,if(lt(t,0.6),0.2627399265766144,if(lt(t,0.7),0.275628000497818,if(lt(t,0.7999999999999999),0.25284475088119507,if(lt(t,0.9),0.2374727725982666,if(lt(t,1.0),0.23920997977256775,if(lt(t,1.1),0.25456926226615906,if(lt(t,1.2000000000000002),0.25374671816825867,if(lt(t,1.3),0.23654210567474365,if(lt(t,1.4000000000000001),0.25168418884277344,if(lt(t,2.0),0.2447432577610016,0.5)))))))))))))))',boxblur=12[fg];[0:v][fg]overlay='main_w*if(lt(t,0.1),0.3309709429740906,if(lt(t,0.2),0.357507586479187,if(lt(t,0.30000000000000004),0.44701889157295227,if(lt(t,0.4),0.5001536011695862,if(lt(t,0.5),0.5295754075050354,if(lt(t,0.6),0.5418452620506287,if(lt(t,0.7),0.5671597719192505,if(lt(t,0.7999999999999999),0.6490602493286133,if(lt(t,0.9),0.6897507905960083,if(lt(t,1.0),0.6941888928413391,if(lt(t,1.1),0.7210350036621094,if(lt(t,1.2000000000000002),0.7504343390464783,if(lt(t,1.3),0.8392617702484131,if(lt(t,1.4000000000000001),0.880531907081604,if(lt(t,2.0),0.890772819519043,0.5)))))))))))))))':'main_h*if(lt(t,0.1),0.24461424350738525,if(lt(t,0.2),0.255586713552475,if(lt(t,0.30000000000000004),0.2545440196990967,if(lt(t,0.4),0.2454611361026764,if(lt(t,0.5),0.25117623805999756,if(lt(t,0.6),0.2627399265766144,if(lt(t,0.7),0.275628000497818,if(lt(t,0.7999999999999999),0.25284475088119507,if(lt(t,0.9),0.2374727725982666,if(lt(t,1.0),0.23920997977256775,if(lt(t,1.1),0.25456926226615906,if(lt(t,1.2000000000000002),0.25374671816825867,if(lt(t,1.3),0.23654210567474365,if(lt(t,1.4000000000000001),0.25168418884277344,if(lt(t,2.0),0.2447432577610016,0.5)))))))))))))))':enable='between(t,-0.5,1.9)'[v] -map [v] -map 0:a? output.mp4

The general idea being to build "brackets" for width,height,x,y for every tenth of a second, and use the box coordinates to fill in the values.
While this works fine for the "overlay" part, for the "crop" part the width and height of the cropped region is only evaluated once (as the documentation mentions: https://ffmpeg.org/ffmpeg-filters.html#crop).
Using 't' directly in a width expression outright results in a Invalid argument error.
Is there a way to force ffmpeg to recalculate crop dimensions every frame, or another approach to the issue?

The crop filter doesn't accept variable dimensions for output. But the end goal of blurring a variable region of the input and superimposing that on the original input can be achieved using a different route. Since your original list of conditions will be too long to make for a clear and short presentation, I've used fewer conditionals. But you should be able to easily expand it.
ffmpeg -i input.mp4 -filter_complex
  "[0]split=3[orig][blur][alpha];
   [blur]boxblur=12[blur];
   [alpha]format=gray,drawbox=color=black:t=fill,
   drawbox=w='iw*0.231':h='ih*0.730':x='iw*0.330':y='ih*0.244':t=fill:color=white:enable='between(t,0,0.1)',
   drawbox=w='iw*0.214':h='ih*0.727':x='iw*0.357':y='ih*0.255':t=fill:color=white:enable='between(t,0.1,0.2)',
   drawbox=w='iw*0.149':h='ih*0.727':x='iw*0.447':y='ih*0.254':t=fill:color=white:enable='between(t,0.2,0.3)'[alpha];
   [blur][alpha]alphamerge[blurred];
   [orig][blurred]overlay" -c:a copy output.mp4

The gist of the method is to
1)blur a copy of the full frame of the input.
2)Black out a 2nd copy of the input. Then draw a white box at the co-ordinates you wish to keep.
3)Merge this 3rd copy as an alpha plane with the blurred copy.
4)Overlay the blurred stream onto the original. When the overlay has an alpha plane, the filter blends the two inputs using the alpha as a key. The overlay region where the alpha is black becomes invisible, and where the alpha is white, remains opaque.
If you have an older version of ffmpeg, you will have to use max in place of fill  in drawbox.


text:
Maya Python - How to create shaderOverride?
Using python in Maya 2017, I'm able to reproduce the structure of my render_setup (layers, collections and overrides) except for shaderOverride.
For a classic override, I use the instance function : maya.app.renderSetup.model.collection.Collection.createOverride()
Is there a similar command to create a shader override or do you add some specific attributes?
Thanks

You need the MTypeId of the override you want to create. Find typeIDs.py in your Maya installation folder (.../lib/python2.7/site-packages/maya/app/renderSetup/model/typeIDs.py)
As you can see, the MTypeId of a shader override is 0x58000386.
Then, just create a layer and a collection, and call your createOverride method:
from maya.app import renderSetup
import maya.api.OpenMaya as OpenMaya

renderSetup.model.renderSetup.initialize()
rs = renderSetup.model.renderSetup.instance()

# Create layer
rsLayer = rs.createRenderLayer('MyFirstLayer')
# Create collection
rsColl = rsLayer.createCollection('MyFirstCollection')
# Create shading override
over_obj = rsColl.createOverride('MyFirstOverride', OpenMaya.MTypeId(0x58000386))

If you want to create another override, just find the according MTypeId.
Thanks to Fabrice that answered this question here: https://stackoverflow.com/questions/48305522/maya-python-how-to-create-shaderoverride


text:
ffmpeg transpose=clock rotates 180 degrees instead 90
I have 2 similar videos created on the same mobile. The first one can be downloaded here.
If I'm using the following command the result is correctly rotated by 90 degrees:
ffmpeg -i 20180114_193135.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180114_193135_2.mp4

But if I'm using the same command for the second video it is rotated by 180 degrees instead 90:
ffmpeg -i 20180115_111730.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180115_111730_2.mp4

Can somebody explain, why? I can not rotate the second video with ffmpeg.

FFmpeg, by default, autorotates videos if a rotation tag is detected. The output video will be oriented upright and have no rotation tag. During processing, this step happens before any filtering is done.
So, in this case, you can simply run
ffmpeg -i 20180115_111730.mp4 -r 30 -acodec copy 20180115_111730_2.mp4

Alternatively, to perform manual rotation, you can suppress auto-rotation
ffmpeg -noautorotate -i 20180115_111730.mp4 -vf "transpose=clock" -r 30 -acodec copy 20180115_111730_2.mp4


text:
ffmpeg cut same video to multiple pieces
For the project that I'm working on I have to cut some parts of same video with some subtitles. So I made a bash file that executes multiple ffmpeg commands like this.
ffmpeg -i input.mp4 -vf scale="w=640:h=-2",drawtext="fontfile=/usr/share/fonts/truetype/msttcorefonts/verdana.ttf: textfile='1.txt': fontcolor=white: fontsize=20: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=((h-text_h)/2)+90:" -ss 00:00:45.674 -to 00:00:50.093 -async 1 ./out/1.mp4

ffmpeg -i input.mp4 -vf scale="w=640:h=-2",drawtext="fontfile=/usr/share/fonts/truetype/msttcorefonts/verdana.ttf: textfile='2.txt': fontcolor=white: fontsize=20: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=((h-text_h)/2)+90:" -ss 00:00:49.344 -to 00:00:52.971 -async 1 ./out/2.mp4

but it fast for first times (start) of the input file, it gets slower if I want to start seeking from middle or near end of input. So it gets nearly 7-8 minutes for 22. minute of the input file...
ffmpeg -i input.mp4 -vf scale="w=640:h=-2",drawtext="fontfile=/usr/share/fonts/truetype/msttcorefonts/verdana.ttf: textfile='226.txt': fontcolor=white: fontsize=20: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=((h-text_h)/2)+90:" -ss 00:22:23.345 -to 00:22:25.846 -async 1 ./out/226.mp4

Anybody knows better way to do that?
Can I do that without seeking file each time? (Because it seems this is a seeking problem to me....)

Use ss/to as input options. This seeks at the demuxer stage, which is much faster.
ffmpeg -ss 00:22:23.345 -to 00:22:25.846 -i input.mp4 ...

You'll need a very recent build of ffmpeg (> Nov 19 2017)

I have already, should I move them before input file as parameter to executable?

-ss must be before the input file to be applied at the read-stage like the example shows

I'll try to build with recent source... Current ffmpeg under ubuntu is not accepting like this.

-ss as demuxer option is old, but -to wasn't implemented till the date stated.

can't make it working with ffmpe3
Option to (record or transcode stop time) cannot be applied to input url input.mp4 -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to.
Error parsing options for input file input.mp4.
Error opening input files: Invalid argument

Use the git version from https://www.johnvansickle.com/ffmpeg/


text:
How do I change the center of a 360 video within Adobe Premiere so that there is always a front side (or main point of interest) in each video?
I am trying to make my video so that the main point of interest is always in the same direction. How do I chose which area of the video is in front for each scene?

Go to Effects > Immersive Video > VR Projection > Pan.
Here you can change "pan" to whatever point you want to focus on.


text:
Frame difference mask
What editing software for MacOS allows mask selection based on frame difference?
I have video footage taken from a tripod and I wish to create a tracking mask covering people and cars moving about the frame, using a frame without the people in it as reference.
Ideally I would like the software to ignore the objects that were already in the reference frame but moved away from it later (i.e., objects that are not part of the background).
Is this is a common feature in video-editing software or perhaps there is a plugin available for it?

Welcome to Video.SE! And thank you for asking a specific, well thought out software recommendation question!

The effect is known as a "difference" key. It's also known as a "not very good" key, because unless your footage is shot on a rock-solid locked off tripod and you're shooting uncompressed 4:4:4, it works a lot less well than you'd think.
After effects has a Colour Difference Key effect, as does Premiere, and this forum post explains how to do it in Apple Motion - though the principle will work in most compositing applications.
And of course, if you're after free as in speech as well as in beer Blender has a difference key node too.


text:
How do I keep from losing the color when I "Convert Shapes from Vector Layer" in AfterEffects?
I often design everything in Illustrator, then import the file into AfterEffects as a composition, apply "Convert Shapes from Vector Files" to each layer so that I am working with vector, and then animate the new shapes.
However, I just ran into an issue where I convert a compound shape (with solid color), and after I apply "Convert Shapes from Vector Layer", it shows up as transparent. The layer is there, and I can modify the vector points, but I don't see it.  When I click on the shape, it still shows white in the Fill. Opacity is at 100%.
Any thoughts?

It could be another path within that layer in the Illustrator file. Check there first and make sure there isn't a mask of any kind.
You can also try looking in the layer within After Effects, click the Contents dropdown, and then the Group dropdown, and check for another Group under your paths. If you see another Group, change the visibility for the Group to see if your shape color returns.


text:
How to add a transition to all layers in VSDC video editor instead of having to it one by one?
I'm using VSDC video editor. I have an image that last some seconds in each layer and I want to add to them a transformation effect to all of them at the end instead of having to do it one by one. Is there any way to do this?

VSDC team member is here. If you're talking about the transition effects, you can add them using the wizard. Although, you'll still have to drag each one for each transition.
However, if you need to copy any other effects, we have a how-to video for you: How to apply the same effect to different objects with VSDC Free Video Editor.
I hope this helps!


text:
Select every second clip in Premiere Pro
After setting the cuts in a sequence, is there an easy way to select every second clip to delete them all at once.

You could use the kyboard shortcut sequence down-arrow,  down-arrow, shift+delete, repeat. That should delete every second clip. You could use something like autohotkey to do this (on windows).

Using Autohotkey for Windows I could solve the Problem. If I had known this program before, I would have saved so much time!
After installing Autohotkey I just wrote a small script:
^+m::
    WinActivate, Adobe Premiere
    Send, d
    Send, +{del}
    Send, {Down}
Return

and saved it as premiere.ahk and double clicked it. Now I can use Ctrl+Shift+m to select the clip under the playhead and ripple delete it and move playhead to the next clip.
So now I just need to press Ctrl+Shift+m multiple times to delete every second clip. This is so much more convenient. You obviously can set the hotkey as you like. It doesn't have to be Ctrl+Shift+m.
I needed it on Windows, if someone needs alternatives for Autohotkey on macOS maybe you find something here.

When I'm editing my YouTube videos, my footage comprises silence, then a shot I want, then silence, then a shot I want, etc.  I do this as follows:

Select the whole clip.
Click on the timeline where I want to cut.
Press Ctrl-K to cut there.
Press Shit-Delete to delete the first part of clip.
Click on the clip again to select it.
Click on the timeline where I want to cut.
Press Ctrl-K to cut there.
Click on the clip to the right.
Click on the timeline where I want to cut.
Press Ctrl-K to cut there.
Press Shift-Delete to delete the clip to the left (the currently-selected clip).
Repeat.

This isn't exactly what you want, but it sounds as though our workflows are similar.  I just delete the clips I don't want as I'm making my cuts, by using Shift-Delete.

You can trim the start or end of a clip in 1 keystroke. Park the playheads where you want the in-point to be and hit the letter q This will ripple delete all of the selected clip from the start up to the current time. The letter w will trim the end to the current playhead position, doing a ripple edit as it does.


text:
How to swap sides of side-by-side video chat interview?
I recorded a video interview using Zoom Cloud Meetings, and the 2 participants appear to be looking away from each other instead of towards each other:

How can I swap the sides?
The resolution is 1920x1080, and I want to keep the black bars on the top and bottom.
I have FFmpeg and Adobe Premiere Pro CC 2017 and other tools available.
P.S. This has nothing to do with a similarly-titled question relating to 3D Vision.

Using ffmpeg,
ffmpeg -i recording.mp4
  -filter_complex
     "[0]split[a][b];
      [a]crop=iw/2:ih:0:0[r];
      [b]crop=iw/2:ih:iw/2:0[l];
      [l][r]hstack"
  -c:a copy switched.mp4

Two crops of the video are made and then joined in opposite order.

Using swaprect filter,
ffmpeg -i recording.mp4 -vf "swaprect=w/2:h:0:0:w/2:0" -c:a copy switched.mp4

You are a genius! Wow! I appreciate your help so much. It worked.

@PaulB.Mahol That would make a good answer.

In Premiere Pro, duplicate your footage (excluding audio) and place it directly on a track directly above or below.
In the Effects Panel, set the one position of one clip to 0px and the second clip to the exact width of your frame (which in this case would be 1920px).
If you wish to make additional edits to both clips, you should 'nest' both the video clips by right-clicking on the two videos clips and selecting 'Nest...'.
You should also re-link the audio to the nested clip.


text:
Correct "stripes" in VHS record
Recently I recorded my old VHS tapes to my hard disk. There is one thing bothering me concerning the video quality. Whenever the camera moves, the motion produces visible "stripes" in the picture:

It seems like each line is shifted. Can this be corrected by a filter? If yes, what filter can I use? I prefer virtualdub for editing.

Those are interlacing artifacts. They become visible when the motion in the video is faster than the field rate, so that when both fields are combined into a progressive scan image, the movement is visible in a single frame. They can be removed with a de-interlace filter. I've never personally used one with Virtualdub, but several are available:

MSU
Smart Deinterlace
vddeint
Various older ones


text:
Vegas pro file size explosion - having to use Handbrake currently
I am currently screen recording with OBS and then editing the resulting mp4 in vegas pro
Here is what happened last time i screen recorded as an example
35min screen record at 1920*1080 resulted in 260MB
After importing into Vegas and adding intro/outtro and editing mistakes then rendering as the sony mp4 using standard settings, the file came out to be 2.4GB
I then passed it through Handbrake which compressed it back to 375MB
Im obviously doing something wrong but I have no idea where to start my research. Is there settings in vegas that can render better to get it down to what Handbrake can do?

The easy answer is to analyze the resulting files in order to determine what's happening. mediainfo is a multi-platform open source tool that will help you do exactly that. Handbrake is likely using a much lower bitrate by default than Sony Vegas Pro. If I'm not mistaken, the standard settings for SVP are pretty high. You can prove this to yourself with the aforementioned mediainfo tool, and then solve it by adjusting the SVP bitrate settings accordingly.


text:
What technique is used: Falling Whistles video
Off topic question, but I'm wondering is there a name for the technique being used in this Falling Whistles: Be a Whistleblower for Peace video? It has a stop motion animation feel to it.
Link: https://vimeo.com/7351545
More specific:

How are they animating the text
How are they doing the rotate in and out transitions (Are they
rotating in the entire precomp file?)

Any help would be appreciated.

It has a stop motion animation feel to it.

With standard keyframes, motion is interpolated between two points smoothly.
The 'stop motion' effect is achieved by using hold keyframes instead.

How are they animating the text

Usually the answer to these questions are keyframes, lots and lots of keyframes. Specifically keyframes on scale, position, rotation and occasionally opacity.
The timewriter effect applied to individual characters or words can be easily achieved in After Effects using the 'Animate Text' effect.

The subtle 3D text effect at 00:35 can be achieved using the 'Basic 3D' effect. In the current version of AE the effect is listed as obsolete but it's easy to use.
Also most of the text are used as masks on top of photographs to add a texture.

How are they doing the rotate in and out transitions (Are they
  rotating in the entire precomp file?)

It's likely that individual elements such as text and images are being rotated individually with the rotation offset of each element at different places.


text:
FFMPEG: Loop video to the length of audio
E.g. if video is 1 minute, but audio is 1 hour. Make video loop throughout for 1 hour of the audio track.
I use this solution to loop image through the lenght of the audio
ffmpeg -y -loop 1 -r 6 -i image.jpg -i audio.mp3 -shortest -c:v libx264 -preset ultrafast -tune stillimage -pix_fmt yuv420p -c:a copy output.mp4

But it doesn't work for video, replacing image.jpg with video.mp4 will give error no loop found.

For video, stream_loop option should be used.
ffmpeg -y -stream_loop -1 -i video -i audio.mp3 -fflags +shortest -max_interleave_delta 50000 -c copy output.mp4

You'll have to use a very recent version of ffmpeg (> Nov '17) as stream_loop had a bug, only recently fixed.
Since video encoding is expensive in terms of time and CPU, I've used streamcopy. For most videos, this is fine. Else, you'll have to re-encode.

Edit: another bug related to stream_loop, see workaround below
ffmpeg  -stream_loop -1 -i 1.mp4 -c copy -v 0 -f nut - | ffmpeg -thread_queue_size 10K -i - -i 1.mp3 -c copy -map 0:v -map 1:a -shortest -y out.mp4

Hello. This just strips the audio to the length of video, I meant opposite. Loop video throughout to the length of the audio. For now I'm using solution at https://video.stackexchange.com/questions/12905/repeat-loop-input-video-with-ffmpeg

Use edited command.

I set the video part to video.mp4, video plays until it's original length and stops while audio keeps going, video just stills last frame throughout.

Share full log.

https://pastebin.com/nEcsD7H7 included MediaInfo, as you can see video and audio lengths differ.

See new command at end

Well, now the default behavior of current/latest ffmpeg via:
c:\sbin\ffmpeg.exe -i "D:\video.m4s" -i "\audio.m4s" -c:v copy -c:a copy "D:\combined.mp4"

is padding/looping the last frame of the video until audio.length === video.length.
See if this is acceptable for you.
For details behavior:

if (audio.length < video.length), then pad the audio with silent, so that audio.length === video.length
if (audio.length > video.length), then pad the video with the last frame of this video, so that audio.length === video.length


text:
How to Record Screen in 4K on 1920x1080 monitor? (OBS Studio)
Is it possible to record in 4K when you have 1920x1080 monitor?
I am currently using OBS Software.
If so, please let me know how?
In my obs setting the Base Resolution and Output Resolution at maximum show 1920x1080

One possibility is using Virtual Super Resolution for AMD GPUs or DSR for Nvidia. This allows you to set your screen to 4K, for example, and this is recognised in games, apps, Windows resolution, etc. This may help, even if just as a workaround.

The easiest way I think would be to set up a virtual machine. I use VMWare Workstation 12. However Virtualbox is free. Youd have to install your OS and screen capture software (such as Bandicam which I use and recommend) on the Virtual Machine.
But you could run the VM at 4K resolution and use it to record at 4K even on a 1920x1080 host machine without issue provided you have enough RAM and CPU power to do so. (Most machines should).
Another upside is you could minimze the virtual machine while its capturing and still use your computer without interfering with your screen capture.


text:
Can you smoothly change speed of video in FCPX
I know it's easy to change a part of a video to be slow-motion or time-lapse by using "speed" setting. But what if I'd like to gradually slow down or speed up over the course of two-three seconds?
I know I can cut the video 5 times and change the speed of individual sub-parts, but maybe there's a better way?

Next to your speed marker are greyish areas. These areas can be adjusted and you can use that to make the transition to the speed change as long as you want.


text:
Lossless and lossy compression techniques
Are MPEG and  H.264  Lossless??
I need a brief explanation about lossy and lossles... And which compression technique is generally using in CCTV Surveillance applications of video??

Those formats could be practically lossless but the filesize would be unreasonable. A brief explanation would be: Lossy makes the most changes to the image favoring a smaller sized file at the cost of most small details and some larger detail (like adding block noise) whereas lossless attempts some compression while avoiding any change in the original; practically lossless means more compression but you can't see the degradation. One of the best compression techniques for CCTV (best image, high compression, mostly static scenes) is h265+: https://video.stackexchange.com/a/22145/18314 .

OK, MPEG is the Motion Picture Experts Group, it's a group of people who decide stuff about moving picture standards. Some of these standards are well known, such as MPEG2 which includes the standards for video on DVDs and digital television. There are also lots of MPEG standards that no-one has ever heard of like MPEG-M and MPEG-21.
One standard you have probably used is MPEG4, the standard used widely to compress video for the web. The MPEG4 standard includes the compression-decompression standard MPEG-4 Part 10 (most commonly known as H.264, but also known as MPEG4 AVC).
MPEG-2 is lossy. MPEG-4 files can be lossless, but more commonly they're lossy.H.264 is a far more efficient codec than MPEG-2, so the quality for a given bit-rate is much higher, and in many cases is visually lossless, i.e. you won't see the difference.
Surveillance may use either or neither of these standards, it totally depends on the equipment.

Thank you for your explanation...Can you please suggest me a best link or pdf to better understand  MPEG and H.264 VIDEO COMPRESSION  techniques. It's very urgent to me..

This is the best link I've found so far: https://duckduckgo.com/?q=understanding+h.264+compression&t=ffab&ia=web


text:
ffmpeg not creating exact duration clip
I am trying to create small clips from video file using ffmpeg3. The type of clip and video will be same i.e. mp4 to mp4 only. Below is command, which is being used for same.
ffmpeg -ss 00:07:00.000 -t 0:00:02.000 -i source.mp4 -codec copy -y output.mp4

The duration for clips generated is not same, they always have additional seconds with them i.e. 4,5 or 6 seconds. I have tried this on multiple videos and behavior is same.
Since, the output and input type is same. So I am not using any encoding or decoding, as it will be time consuming process.
Please share suggestions on same.

For videos with codecs that use temporal compression, it's not possible All frames that are required for decoding will be included in the output. So, if your inpoint isn't a keyframe, output duration will be longer. You need to re-encode to be assured of output duration.

You are right, we need to re-encode

correct, I was using -c copy while creating a clip from MKV using ffmpeg. When clip duration is small like 2seconds or 10 seconds then it was not picking up video stream. When duration is bigger like 35econds or 1minute then it produces audio+video streams in output file. Now, I have removed -c copy so it re-encodes and even 1second. 2second clips are fine now. thanks bunch!

So looked into ffmpeg documentation and found that by changing position of -ss decodes and then creates the clip, which is way more faster than command posted in question
ffmpeg -i source.mp4 -ss 0:14:42.000 -codec copy -t 0:00:02.000 -y output.mp4

Since you're copying, it doesn't matter, since there's no decoding but it's the other way around. ss before i is much faster,

It does decoding, but it does not tries to re-encode. Please see documentation.

If frames were decoded, then they would be saved as raw uncompressed frames, if not re-encoded. That's not what happens with -codec copy.

The help for seeking using ffmpeg explains the problem.

Seeking while doing a codec copy
Using -ss as input option together with -c:v copy might not be accurate since ffmpeg is forced to only use/split on i-frames. Though it will—if possible—adjust the start time of the stream to a negative value to compensate for that. Basically, if you specify "second 157" and there is no key frame until second 159, it will include two seconds of audio (with no video) at the start, then will start from the first key frame. So be careful when splitting and doing codec copy.

If you transcode (not copy) then:

As of FFmpeg 2.1, when transcoding with ffmpeg (i.e. not just stream copying), -ss is now also "frame-accurate" even when used as an input option.

Your options are:

Accept splits on i-frames and work with the output as-is, based on the options used. This is what you have now.
Recompress:
Fast Input Seeking: The -ss parameter needs to be specified somewhere before -i. The input will be parsed using keyframes, which is very fast.

ffmpeg -ss 00:23:00 -i Mononoke.Hime.mkv -frames:v 30 out1.mkv

Slow Output Seeking: The -ss parameter needs to be specified after -i. This will be done very slowly, frame by frame. As of FFmpeg 2.1, the main advantage is that when applying filters to the output stream, the timestamps aren't reset prior to filtering (i.e. when burning subtitles into a video, you don't need to modify the subtitle timestamps), but the drawback is that it will take a lot of time until it finally reaches that time point.

ffmpeg -i Mononoke.Hime.mkv -ss 00:23:00 -frames:v 30 out2.mkv

Adjust the start time forward so that when it ends on an i-frame the total duration is close to the desired duration.
Slow Combined Seeking: For this we specify the -ss parameter before and after -i. This approach uses keyframes to seek until 00:22:30, and then seeks frame-by-frame until it reaches 00:00:30 (00:22:30 + 00:00:01), continue increasing the second -ss option until the duration is short enough; unfortunately you'll lose an exact start and end time and the duration may only be approximately close to the desired amount.

ffmpeg -ss 00:22:30 -i Mononoke.Hime.mkv -ss 00:00:01 -frames:v 30 out3.mkv

Note: Cutting small sections

To extract only a small segment in the middle of a movie, it can be used in combination with -t which specifies the duration, like -ss 60 -t 10 to capture from second 60 to 70. Or you can use the -to option to specify an out point, like -ss 60 -to 70 to capture from second 60 to 70. -t and -to are mutually exclusive. If you use both, -t will be used.
If you specify -ss before -i only, the timestamps will be reset to zero, so -t and -to have not the same effect. If you want to keep the original timestamps, add the -copytsoption.
Cut from 00:01:00 to 00:03:00 (in the original), using the faster seek:

  ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy cut.mp4

Cut from 00:01:00 to 00:02:00, as intended, using the slower seek:

  ffmpeg -i video.mp4 -ss 00:01:00 -to 00:02:00 -c copy cut.mp4

Cut from 00:01:00 to 00:02:00, as intended, using the faster seek:

  ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy -copyts cut.mp4

If you cut with stream copy (-c copy) you need to use the -avoid_negative_ts 1 option if you want to use that segment with the concat demuxer. Example:

  ffmpeg -ss 00:03:00 -i video.mp4 -t 60 -c copy -avoid_negative_ts 1 cut.mp4

Valid values for the avoid_negative_ts variable are:

avoid_negative_ts integer (output)
‘make_non_negative’

Shift timestamps to make them non-negative. Also note that this affects only
leading negative timestamps, and not non-monotonic negative timestamps.

‘make_zero’

Shift timestamps so that the first timestamp is 0.

‘auto’ (default)

Enables shifting when required by the target format.

‘disabled’

Disables shifting of timestamp.

When shifting is enabled, all output timestamps are shifted by the same
amount. Audio, video, and subtitles desynching and relative timestamp
differences are preserved compared to how they would have been without
Shifting.


text:
Grouping multiple objects
I'm using After Effects cc2017 and I am wondering if it is possible to group two or more objects in order to align them to the composition? I have two graphics I wish to center. You can do this in other Adobe software applications such as Illustrator by going to the object menu and selecting group**.**

Yes- you can connect objects together using something called parenting.
There’s a tutorial here
https://www.surfacedstudio.com/tutorials/adobe-effects-basics-tutorial-parenting
You could also pre-comp the objects together.
https://greyscalegorilla.com/tutorials/fun-with-precomping-in-after-effects/
Parenting is like one object controlling another (or one object controlling many other objects). Precomping is more like making a new video and placing your objects inside it (sometimes called nesting in video editors).


text:
Final Cut Pro X multiple audio channels auto muting
I have a recording with two audio channels, one is a lapel mic for my audio and the other is someone else sitting across the table from me (we do this because we're recording in a fairly echoey room so a single mic in the middle would sound echoey and I wasn't sure that there was an easy way to solve that and thought this would do...).
The problem I have is that I can be heard on the other mic and vice versa to a lesser extent, and when I add both audio channel to the video this slight alignment issue then recreates the echoey effect, is there a way to get FCPX to automatically mute one audio channel when the first is louder?
Or is there a better way in software of handling this that I'm missing (aside from better kit/soundproofing or moving one person to another room, the only one of which I could possibly do there is mayb slightly better microphones)

To my knowledge, there is no feature or even a plugin what can monitor one audio channel and adjust another. I would see that as it is the job of the editor or sound engineer. That's the reason you get paid the big bucks I guess.
Better microphones definitely can help. If you get microphones which have a very distinct range you can limit the echo effect. You might consider asking in sound engineer group what microphone would be best for your situation.

Big bucks?!  I wish, I'm doing all this for the fun of it in my spare time   I do enjoy it but its a bit tiresome hence hoping for an automated solution, thanks I'll give them a try cheers!


text:
After Effects: Make beam effect go over end/beginning
The beam effect is a plugin in AE in which I can basically decide a "beginning" or "ending"-coordinate and AE will draw a line between these two coordinates, the line can be customized but that irrelevant for now.
The beam effect also has the property "length", which is a percentage that decides how long the line is. lets say length is 80%, which means the length will be 10% shorter on each side. 100% means the line fully reaches the beginning and ending coordinates.
My problem is the following: How do I make the line extend the end/beginning coordinates? The beam would then basically be a line with a two fixed points.
I might be missing something, but is this possible? I googled every possible combination of "extend beam line in ae" or "line with fixed point" but couldnt find anything relevant. Help is greatly appreciated, thanks!

You can't do it with the beam effect as it stands. But…
A workaround would be to move your start and end points further out along the line that they define. A bit of maths and an expression will do that for you. Don't worry, skip to the tl;dr section at the bottom if you are allergic to maths (Though if you do, note that that look on my face is pity, not scorn, really it is).
The maths
Two points can be thought about as defining a vector, i.e. a line with direction and magnitude. The cool thing is that you can multiply vectors by scalars (normal numbers with just a magnitude) very easily. So what you need to do is to take the vector defined by the two points, then multiply by magnitudes smaller than 0% or greater than 100% to extend the vector off to infinity and beyond.
To get the vector without the initial offset, simply subtract one point from the other. This leaves us with a single value that contains the magnitude and direction of the end point, as seen from the start point. This is basically our line. Any points on that line can be found by multiplying this vector.
Since this vector is from the starting point, once we've multiplied it we need to add back the position of the starting point, so that we're using the comp co-ordinates. So any point along the line is expressed as starting point + distance along the line * (end point - starting point)
Just to show this works, consider when the length along the line is zero. The point will be starting point + 0 * (end point - starting point) = starting point, and when the lenght along the line is 100% its co-ordinates will be starting point + 100/100 * (end point - starting point) = end point. Now any percentages smaller than 0 or greater than 100% will extend the line further.
the setup
to control this effect we need a slider that can go below 0 and above 100 for the start and the end point of the beam. Since the beam length slider won't let us do that, use an expression control slider to do the job. So apply the Effects>Expression Controls>Slider effect, and for the sake of your own sanity rename the effect to length. So that the beam will be initially visible as we set up the expression, set the slider to 100% or thereabouts.
Obviously you'll also need the Beam effect applied. Set up the position of the Starting Point and Ending point now, once we apply the expression you can still edit them using the value controls, but you have to turn the expression off to edit them visually in the comp window. Since we're using the expression to fake the length, set the Length property to 100%.

the expression
So this is where the maths rubber hits the javascript road. First we'll do the expression for the start point. alt-click the beam Starting Point stopwatch to set an expression for that property.
Start by creating variables linked to the original values (use the pick whip near the expressions editor to pick the Starting Point and Ending Point property to get the correct syntax. Your line should look like this (don't forget the ; at the end of every line. Expressions will sometimes work without them, but other times you'll get hard to trace errors):
var startPt = effect("Beam")("Starting Point");
var endPt = effect("Beam")("Ending Point");

We also need a variable linked to the length slider effect we made earlier.
var percentage = 1 - effect("length")("Slider") / 100;

We divide it by 100 because it's a percentage. You could omit this and just use a slider value of 1 to mean 100%, this just makes it a bit easier to use.
We subtract the percentage from 1 because we're applying it to the start point. When the length is 100% the starting point will be at 0 on the vector (and the end point will be at 1).
Note that the "length" bit relates to whatever you named it. If you were lazy it will just say effect("Slider Control")("Slider").

So we've got the beginning, end and percentage all defined. Now like we said, we subtract the beginning from the end, multiply that by the percentage and add it back to the beginning. In Javascript this looks like:
percentage * (endPt - startPt) + startPt

Wow, that was easy. Because you can add vectors to other vectors, and you can multiply vectors by scalars we never need to expand the components out into their individual dimensions (took me years to discover that, I'm embarrassed to say). Note that since it's the last line, where we return the value we don't need an = or var or anything—expressions just use the last line that evaluates as the value for the property.
Now for the end point we repeat the process, but we don't subtract the slider control from 1. So the line above looks like
var percentage = effect("length")("Slider") / 100;

I'll let you work out the rest of code for that yourself.
Oh, ok, stop sobbing, here's the expression for both, for your copy-pasting pleasure:
tl;dr
Starting Point property
var startPt = effect("Beam")("Starting Point");
var endPt = effect("Beam")("Ending Point");
var percentage = 1 - effect("length")("Slider") / 100;
percentage * (endPt - startPt) + startPt

Ending Point property
var startPt = effect("Beam")("Starting Point");
var endPt = effect("Beam")("Ending Point");
var percentage = effect("length")("Slider") / 100;
percentage * (endPt - startPt) + startPt

Now using the slider control you can set your length to whatever you like, and the beam will extend along the line described by the original points.

wow, what a quality answer! Thank you!


text:
Premiere: Waveforms missing on nested sequences
So, I have nested some audio tracks and now the nested sequences look like this:

How do I get premiere to display my waveforms in the timeline again? Because this is not very helpful ... to say the least.

When you nest a sequence with more than one audio clip, your nested sequence will not have a single waveform to reference.
To generate the waveforms you must select the nested sequence and go to Sequence > Render Audio in the top menu bar.

is there some way to do that in the background? Premiere wants me to sit there for 1,5 h ...

Not that I know of, sorry. You might want to check the bitrate of your track audio and project audio match as Premiere will spend extra time converting the bitrate with 'Audio Render'.

In the newer Premiere versions doesnt happen - you might get a waveform visible even with more nested layers inside - BUT the point is NOT TO HAVE ANY EFFECTS APPLIED ON THEM. In this case you have to render and that makes sense. Apply effects only on the whole nested sequnces.
cheers