text:
Collapse Transformation not working in Adobe After Effects CC
I'm following a tutorial on AE and it is completely confusing to me as I cannot get the desired result.
Here are the steps in the tutorial:

Select a group of comps
Pre-compose them into new comp
Collapse transformations on the new pre-composed comp (press the starry button)

The desired result I want is the transformation view being snapped to just around the rocket, but somehow it doesn't work as I expected. What am I missing here? Screenshots below:

The area should fit just around the rocket but it doesn't.

I get the feeling you think collapse transformation means something that it doesn't.
What Collapse Transforms does is to leave all the transformation properties in the subcomp intact and available to the comp that it's nested in. It's basically like you've got all the layers still in the outside comp, just grouped into one layer for ease of organisation.
Without collapse transforms on the subcomp is pre-rendered and treated like a single piece of footage. So, for example if any of the layers of the sub-comp extend off the edge of the sub-comp's boundaries they won't be cropped with collapse transforms on.
Here are two subcomps, both contain text that extends past their outside edges:

And here they are in the outer comp. Top one is collapsed, bottom aint.

If you scale down a raster layer in the subcomp and then scale it up to its original size in the outer comp, without collapse transforms on it will be pixelated, because it gets pre-rendered to the resolution of the subcomp, and then scaled up in the outer comp.
Here they are scaled down in the subcomp:

And here's the outer comp with both layers scaled back up:

Another effect of collapsing transforms is that you lose the ability to change the transfer mode of the subcomp in the outer comp. The layers in a collapsed transform-ed subcomp apply whatever transfer mode they have inside the subcomp, again, like they were actually in the outer comp, just grouped together.

What Collapse transforms doesn't do is automatically crop the subcomp to fit its components. Is that what you were expecting?

kind of what I'm expecting. But if it is not, then it has to be some kind of inconsistence between versions of Adobe After Effects because in the tutorial I'm following it behaves like what I'm expecting

can you take a look at the tutorial? I'm sorry it's in Vietnamese, not English, but I think judging from the behaviors of the application is possible. The part I want explained is around 13:30 to 14:20
https://www.youtube.com/watch?v=Mct3wkTXApk

In that tutorial it behaves as normal: in the outer comp you'll see the layer handles shrink to fit the layers in the subcomp when collapse transforms is on, but the subcomp will stay the same size. You could resize the subcomp if you like, with CT on that won't make any difference anyway.


text:
Merge two transparent webm videos with FFmpeg
I'm trying to merge two transparent webm videos together while keeping their transparency using ffmpeg.
Main video:
https://s3.amazonaws.com/medlike/logo.webm
Overlay video:
https://s3.amazonaws.com/medlike/cortina.webm
Reading trough ffmpeg wiki and some stackexchange answers I made this:
ffmpeg -i logo.webm -i cortina.webm -filter_complex 'overlay=format=rgb' -vcodec libvpx output.webm

The result:
https://s3.amazonaws.com/medlike/output.webm
The desired output should look like this: https://s3.amazonaws.com/medlike/vinheta-completa.webm
ffmpeg output:
ffmpeg version 2.5.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 15 2015 22:16:36 with Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.5.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-libquvi --enable-libx265 --enable-nonfree --enable-vda
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'logo.webm':
  Metadata:
    encoder         : Lavf56.19.101
  Duration: 00:00:09.80, start: 0.000000, bitrate: 712 kb/s
    Stream #0:0: Video: vp8, yuv420p, 960x540, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      alpha_mode      : 1
Input #1, matroska,webm, from 'cortina.webm':
  Metadata:
    encoder         : Lavf56.19.101
  Duration: 00:00:09.80, start: 0.000000, bitrate: 436 kb/s
    Stream #1:0: Video: vp8, yuv420p, 960x540, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      alpha_mode      : 1
[swscaler @ 0x7f9512006800] No accelerated colorspace conversion found from yuv420p to argb.
[libvpx @ 0x7f9511827000] v1.3.0
Output #0, webm, to 'output.webm':
  Metadata:
    encoder         : Lavf56.15.102
    Stream #0:0: Video: vp8 (libvpx), yuv420p, 960x540 [SAR 1:1 DAR 16:9], q=-1--1, 200 kb/s, 25 fps, 1k tbn, 25 tbc (default)
    Metadata:
      encoder         : Lavc56.13.100 libvpx
Stream mapping:
  Stream #0:0 (vp8) -> overlay:main
  Stream #1:0 (vp8) -> overlay:overlay
  overlay -> Stream #0:0 (libvpx)
Press [q] to stop, [?] for help
frame=  245 fps=6.3 q=0.0 Lsize=     114kB time=00:00:09.80 bitrate=  95.6kbits/s
video:112kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.853043%

Thanks

Stream #1:0: Video: vp8, yuv420p Stream #0:0: Video: vp8, yuv420p Looks like your video doesn't have an alpha channel, if it did it would be yuva420p. See this post for more: http://bit.ly/1Es6KLK

That's what I thought, too.  metadata: alpha_mode: 1 is from libavformat/matroskadec.c.  It means the alpha flag was set in the input webm.  ffmpeg -h decoder=vp8 shows the vp8 decoder doesn't take any options, though.  So if it's not decoding to yuva420p, IDK how to change that.

Also, why are you telling overlay to output RGB?  I don't see anything in the docs about alpha-blending problems when operating in YUV space.

I wasn't able to solve the issue, instead, I rendered both videos using PNG codec and successfully merged them using the overlay ffmpeg filter, and than converted it to webm

Anyone make any progress? I have a non-transparent video and want to just force the video to not have transparency?

Since 2016-07-20, it's possible to decode properly a webm with alpha channel (VP8a or VP9a) but you need the -vcodec libvpx option. You must download an FFmpeg compiled after that date (or compile yourself with up-to-date commits) and use the following command:
ffmpeg -i logo.webm -vcodec libvpx -i cortina.webm -filter_complex overlay -vcodec libvpx output.webm

Note that -vcodec libvpx is before the input that needs to be read using the alpha planes (in this case, is cortina.webm the overlaid video, thus we put the option just before it).
(As Mulvya states, the format conversion should be avoided in this case.)

Why format=rgb? Unnecessary and lossy given that the inputs are YUV and vpx encodes to YUV.

You're right. I didn't notice it (just copied his command and added the option). I correct it.

source: Stack Exchange

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

sort: votes


text:
Photoshop: Video timeline - hide part of a layer
I have recently got into Video Timelines with Photoshop CC 2015.
I am trying to make a transition with text. I can rasterize it if needed. I am trying to make it so that only part of the text is showing and the other part is hidden. I want to do this for a transition. How can I do this without any additional layers?

In general, when you use a program as complex as Photoshop, you don't want to fight its idiomatic way of doing things, you want to use it instead.  The idiomatic way of hiding/revealing parts of an image (which, in turn, means parts of a layer or set of layers) is with a mask, which is typically its own layer.  The layering system of Photoshop is a major aspect of its functionality.  Don't fight it or try to not use it.  Learn it, master it, and then use it.

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


text:
Why does After Effects cut some last seconds of video in Timeline?
I have a video asset that is 1:57 long. When I import it to AE, in Project window it suddenly shows that video is only 1:49;15f long! Why does it happen and how can I get my extra 8 seconds back?
Those 8 hidden seconds contain sound that I need to work with.
UPD: here's all the data about this video asset (taken with MediaInfo software):

General
Complete name                            : D:\work\nuzhnapomosh\SPEC\Cage\thecage_elements_animated\Klekta trailer New Text v02.mov
Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt   2005.03 (qt  )
File size                                : 263 MiB
Duration                                 : 1 min
Overall bit rate                         : 18.8 Mb/s
Encoded date                             : UTC 2016-08-28 07:18:49
Tagged date                              : UTC 2016-08-28 07:19:04
Writing library                          : Apple QuickTime

Video
ID                                       : 3
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Main@L4
Format settings, CABAC                   : No
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=1, N=50
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 min
Bit rate                                 : 18.6 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.359
Stream size                              : 244 MiB (92%)
Language                                 : English
Encoded date                             : UTC 2016-08-28 07:18:49
Tagged date                              : UTC 2016-08-28 07:19:04
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Big
Format settings, Sign                    : Signed
Codec ID                                 : twos
Duration                                 : 1 min
Bit rate mode                            : Constant
Bit rate                                 : 1 411.2 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 kHz
Bit depth                                : 16 bits
Stream size                              : 19.7 MiB (8%)
Language                                 : English
Encoded date                             : UTC 2016-08-28 07:18:49
Tagged date                              : UTC 2016-08-28 07:19:04

Other
ID                                       : 4
Type                                     : Time code
Format                                   : QuickTime TC
Duration                                 : 1 min
Time code of first frame                 : 00:06:15:21
Time code, striped                       : Yes
Language                                 : English
Encoded date                             : UTC 2016-08-28 07:18:49
Tagged date                              : UTC 2016-08-28 07:19:04

Is it variable frame rate?

@Mulvya I don't know how to check it, could you please tell me? It seems that my video asset did not just changed its frame rate, but it lacks some seconds which were not empty

Check using mediainfo. Use View -> Text mode.

Nice soft, thanks! It tells me that the frame rate is "Constant" and equals 25fps

What duration does it show for audio and video?

It shows all Durations as only "1 min". Very strange rounding

Can you paste the output into the Q?

You mean "into the question"?

Yes, as code-formatted.

Let us continue this discussion in chat.

What settings are you using in the interpret footage dialog in AE?

Try converting the video to Quicktime ProRes format, or another format that doesn't have intra-frame compression before you import it into After Effects.

that doesn't have intra-frame compression --> doesn't ?


text:
How to record a live video of yourself with a transparent background?
I always watch and wonder how some youtubers have a little window on a corner of a gameplay or something...
My doubt isn't on how they get the image, my doubt is on how some youtubers get the video of themselves with a transparent background on top of the gameplay.
I know this requires a green screen, but I really want to know how this gets automatically edited. I have seen some live gameplay with the transparent effect.
How do the youtubers get a transparent background on a live feed?
What I am trying to achieve is, recording myself on a live feed, but with a transparent background... If you see what I mean...
Answers much appreciated,
Sid

can you give us an example of what you are trying to achieve

Check the edit, what I am trying to do, is, I am trying to do a live video feed on twitch or something, but the background around be is transparent so I am like an over lay on the corner of the main gameplay...

I really want to know how this gets automatically edited.

The technique is called chroma key and consists of considering as transparent all pixels of the colors within a specified range. This is usually used with a bluescreen or a green background. The image is then simply layered over another background.
As you have noticed, chroma key is not limited to postprocessing: a lot of software products can do this in real-time for live streaming.
By the way, if you have used Google Hangouts, one of the effects consists of replacing the background by an image. Don't be mislead by this, since this has nothing to do with a bluescreen and doesn't require any specific color for the background; I imagine that Hangouts' algorithm rather assumes that parts that don't move are the actual background.

Ah, perfect, chroma key is what I was looking for! Thanks!


text:
extract parts of images from a video and save it to a file
I have a video of 2000 x 200 pixels in resolution
I need to grab two parts inside that video (cut into the image, not trimming).
I need to grab a piece of 500 x 200 pixels from coordinates (0,0) and another 500 x 200 pixels from coordinates (1000,0), then merge them side by side into a new 1000 x pixels video file.

is that possible ?

Sure. Command template is
ffmpeg -i video.mov -filter_complex "[0]crop=500:200:0:0[l];[0]crop=500:200:1000:0[r]; \
                                     [l][r]hstack" final.mov

Very nice @Mulvya ! I am very new to ffmpeg.
This is just perfect.
What a useful tool ffmpeg is ! Can you explain some details though ? - what are those [] tags ?

and what "hstack" stands for ? thanks a lot

hstack is a filter which stacks videos (of same height) horizontally. The brackets with a string are pads - read about them at https://ffmpeg.org/ffmpeg-filters.html#Filtergraph-syntax-1


text:
FFMPEG Calculate Hash After Encoding Before Writing
I am experimenting with losslessly compressing some raw video.  How can I perform a frame hash on the encoded output before or while writing it to the file system?  I want to make an original.hashes and a compressed.hashes.  (I will compare them with another tool later.)
ffmpeg -r 30 -start_number 0 -i "%IMAGES_DIRECTORY%\%%03d.png" ^
-filter_complex "split=3 [copyHash] [copyLossless] [otherIn]; [otherIn] {some filter here} [otherOut]" ^
-map [copyLossless] -c:v libx264rgb -qp 0 -pix_fmt rgb24 "%IMAGES_DIRECTORY%\lossless.avi" ^
-map [copyHash] -f framehash -hash SHA512 "%IMAGES_DIRECTORY%\original.hashes" ^
-map [otherOut] {some other encoding} someOtherFile.idc

ffmpeg -start_number 0 -i "%IMAGES_DIRECTORY%\lossless.avi" -pix_fmt rgb24 -f framehash -hash SHA512  "%IMAGES_DIRECTORY%\decoded.hashes"

comp original.hashes decoded.hashes

So above, I would like to avoid the second call to ffmpeg.  Like if I could split the lossless.avi output of the first call to two new streams:  One to the file system and one to a demuxer feeding the hash muxer.

First, a nitpick: you don't want to compute hashes on the encoded frame data before or while writing. You're testing the fidelity of the  lossless encoding so you need to compare the decoded frame of the x264 encode with the corresponding PNG.
So, first here's how to do what you specifically asked for.
Use the tee pseudo-muxer
ffmpeg -framerate 30 -start_number 0 -i "%IMAGES_DIRECTORY%\%%03d.png" ^
-filter_complex "[0]{some filter here}[otherOut]" ^
-map 0 -c:v libx264rgb -qp 0 -pix_fmt rgb24 -f tee "%IMAGES_DIRECTORY%\lossless.avi|[f=avi]pipe:" ^
-map 0 -f framehash -hash SHA512 "%IMAGES_DIRECTORY%\original.hashes" ^
-map [otherOut] {some other encoding} someOtherFile.idc | ffmpeg -f avi -i - -f framehash -hash SHA512 %IMAGES_DIRECTORY%\decoded.hashes"

If your end goal is to check the fidelity of the lossless encoding, use
ffmpeg -framerate 30 -start_number 0 -i "%IMAGES_DIRECTORY%\%%03d.png" ^
-filter_complex "[0]{some filter here}[otherOut]" ^
-map 0 -c:v libx264rgb -qp 0 -pix_fmt rgb24 "%IMAGES_DIRECTORY%\lossless.avi" ^
-map [otherOut] {some other encoding} someOtherFile.idc

and then
ffmpeg -framerate 30 -start_number 0 -i "%IMAGES_DIRECTORY%\%%03d.png" -i lossless.avi ^
-filter_complex "ssim" -f null -

If the result is lossless, the readout will say
SSIM R:1.000000 (inf) G:1.000000 (inf) B:1.000000 (inf) All:1.000000 (inf)

This answer made so many different things click for me (hash doesn't use raw input, -map 0 instead of split, and that's what a tee is for).  Thanks!  But it doesn't avoid the problem of reading lossless.avi off of the disk to decode/compare it.  In fact, you are also reading the original images off of the disk twice to compare them to the decoded image.

Is there no way to take encoded packets and fork them to a muxer and a decoder in the same FFMPEG instance?

No. Encoding occurs after decoding (and filtering), so that provision isn't there. Looks like you are concerned about disk I/O. What you could do is pipe lossless avi to another ffmpeg instance which computes hashes.

I've edited my first command, so that the AVI output is simultaneously piped to another ffmpeg instance which then computes hashes on the decoded frames.

And here I was looking up how to split outputs on the Windows command line.  (To send the lossless.avi to a file and a pipe.  Ugh.)  This much better, thanks!  The only issue was the output filename in the tee needed to be surrounded in single quotes.  Also, I'm not sure that I like SSIM, as it is much more computationally complex than a hash and the output is subject to rounding errors.  I'll do a quick performance comparison, but the ideal solution is to just do a bit-for-bit comparison as both streams are flowing through memory... but a hash is close enough.


text:
Interlaced Video Format 1080i (59.94)
I have a video project and the format is for Broadcast TV and needs to be interlaced NOT progressive video.
High Definition File

All High Definition content MUST be 1080i (59.94) format
All High Definition content should be 4:3 center-cut safe.
Video Format: 1080i, 29.9 frames/sec (59.94 fields/sec) HD File
Format(s)
File Format: XDCAM HD422: 4:2:2, at 50 Mbps MXF (OP1A, self
contained)
Video Codec: MPEG-2 Long GOP, Sony XDCAM compliant
Field Order: Upper Field first
Audio Format: 48 KHz sample rate, uncompressed
Operating Level: Peak program levels at -12 to -8dBfs, nominal
-10dBfs

I have never received / edited OR built / rendered out a 1080i (59.94) video before, always digital / progressive(.mp4 ).
I plan on using Adobe Premiere for any editing of the uncompressed footage and then for motion graphics / animation using After Effects.
My question is, how can I keep the format consistent, interlaced fields, across different applications and also what output format should be used for the final video / deliverables.
Can I apply my editing and motion graphics like normal with progressive, but @ 60 frames/sec, then at the very end export a rendered video that is 1080i?

About the output format, the spec you listed has it: MXF OP-1A XDCAMHD 4:2:2 at 50 Mbps. Note that this station hasn't updated their audio spec since the CALM Act went into effect. More important than the peak level they specified, make sure your audio hits a loudness target of -24 LKFS.

@ Michael Thanks for this information. All these varying formats are new to me and it is difficult to understand from the specifications which are describing what the video should be shot at, the raw footage which I will not have control over, and what is specifying the final output video needed. I will look inside Premiere for the MXF export option and see if I need to download a special codec.

No special codec is needed. Premiere has XDCAM HD presets already. XDCAM HD is just specific settings of MPEG-2. If you are submitting a final product like a commercial, a station's spec will never specify the shooting and production specs, only the specs for what they expect to receive.

@Michael good to know. Could you speak to what I asked Coin in the answer below. As far as my workflow I am hoping to work exclusively inside AE then export an uncompressed AVI / Quicktime. Bring that into PPro and export with the correct codec and Frame Blending as Coin recommended in his answer. When working inside AE should it be 60 f/s to give the 1080i the highest possible resolution when converted into interlaced video, giving each even / odd frames 30 f/s, still confused on this aspect.

I don't know enough about frame blending to answer your question. Sorry.

You're not going to be able to replicate the precise "look" of 59.94, even with special plugins. This, due to the fact that interlaced is in many ways like:
Double Frame Rate - Half Resolution.
Think of 59.94i at 1080 really as 119.88 at 540p.
Interlaced lines are scanned odd lines first, then even. So you technically have a first set of lines which are actually one frame, with the other set of lines missing. These lines are then displayed back to the viewer odd/even//odd/even//odd/even etc.
That said, you get smoother motion with i vs p. You are able to achieve better slow motion in post production with i vs p, however, p, is of course the preferred format to most. A single frame being a single frame.
NOW THAT SAID...
Looks aside, in order to output your video from PPro, all you will simply want to do is import the footage material in (original); right mouse click; new sequence from clip; make any edits/trims, etc.
It is really unnecessary to make any additional adjustments from the timeline in Premiere, because what you ultimately want to do is use Frame Blending when you export.
After you've made any adjustments, go to export, choose the format you need; 59.94i, whatever codecs they are requiring, many are already built in; others may need to be downloaded.
Ensure you turn on Frame Blending, IF your source material is progressive.
Frame Blending will force interpolation of the frames during the rendering of your new video outputs, using two side by side discreet progressive frames to create a new "quasi" interlaced frames, twice as many frames as your progressive source at the correct frame rate.
It isn't quite the same "look" wise as actual Interlaced source material; however, specification wise it should meet their needs; and to the average viewer most will not notice.
Do not however use Frame Blending if you are using Interlaced material. And do not double the effect by applying it to the clip in the timeline (which you can do by right clicking the clip; Under Frame Blending/Field Options); and then stack it with another Blend on export. Only one is necessary, and my recommendation is simply allow Adobe Media Encoder handle the p to i conversion.
Lastly, if you have material at lower resolution, AME will be upscaling it to get to 1080. If so, you can use the Use Maximum Render Quality Checkbox at the bottom of the export panel window.
Be advised this will likely increase your rendering time by multiple fold.
In regards to the audio; they have peaking requirements. You will need to apply a Dynamics and/or Limiter filter in the Audio Mixer Window Filter Dropdown. Limit to the specifications they have stated.
In regards to center safe, if you're given material that isn't center safe, you're going to need to talk with them about that, as you'll have to do a push in and do manual pan and scan using the motion filter, adjusting the frame position on the canvas to get it to 4:3 safe.

Thank you for such a detailed answer, this really helps! I will be receiving the raw footage and storyboard either tomorrow or the next day. My hope is the source video is shot at the higher quality, so no need to be upscaled and I believe it will be interlaced but can't be sure at this time.

Based on the complexity of the storyboard / animation I would rather work inside After Effects, even for the editing / trims combined with Title work etc. But, I want to be clear. If I do all my work within AE and then export as an uncompressed AVI / Quicktime / High quality mp4 (slight compression) can I then bring in the AE footage into Premiere and export it as 1080i, with Frame Blending?


text:
browser rotates video
I use ffmpeg to convert a 3gp video to MP4. You can see a part of output of ffmpeg here:
ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers

...
Input #0,

...
    Metadata:
      rotate          : 90
      creation_time   : ...
      handler_name    : VideoHandle
      encoder         :
    Side data:
      displaymatrix: rotation of -90.00 degrees
    ...

I use noautorotate option in below command to avoid auto rotate based on metadata of file and it is successful:

ffmpeg -noautorotate -i $vid -qscale 0 -acodec libmp3lame -ar 44100 -ab 128k ../MP4/$(basename $vid).mp4

Then I tried this HTML code to open converted file in a browser(for example by Google Chrome):
<!DOCTYPE html>
<html>
<body>

<video width="320" height="240" controls>
  <source src="../videos/test.mp4" type="video/mp4">
</video>

</body>
</html>

But when I open that, video shown rotated. How I can solve this problem? Is there a tag or any other thing to disable autorotate in HTML?

Although noautorotate stops FFmpeg from rotating the video, it does not remove the rotation tag from the output. So, you have to set the tag manually.
ffmpeg -noautorotate -i $vid .....  -metadata:s:v rotate=0 output.mp4


text:
convert KAZAM video file to a file, playable in windows media player
I have some mp4 video files that are created by KAZAM in Linux. But I need to play those files on Microsoft Windows only by Windows Media Player (for example I can not install VLC media player). Also I can not use any codec. So I think converting propoerties of file (for example format of files) is the only solution. But I do not know which output format is best for video file

without losing quality
ability of playing result in Windows Media Player

Also I want to know how I can convert to that format?
Note:

I prefer to use VLC media player for converting video files, but ffmpeg is also appreciable.
Also do you know a simple, light software for screen casting and recording sounds from speaker in Linux-Ubuntu 14.04 which it's output is playable directly in Windows Media Player? I can replace KAZAM by this.

Edit:
I tested output by WMP 12 (for windows 7) and also MediaInfo says:
General
Complete name                            : /path/to/file/Screencast 2016-12-17 07:19:13.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42
File size                                : 314 KiB
Duration                                 : 3s 280ms
Overall bit rate                         : 783 Kbps
Encoded date                             : UTC 2016-12-17 03:48:54
Tagged date                              : UTC 2016-12-17 03:48:54
Writing application                      : x264

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive@L3.2
Format settings, CABAC                   : No
Format settings, ReFrames                : 1 frame
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 3s 280ms
Bit rate                                 : 744 Kbps
Width                                    : 1 366 pixels
Height                                   : 768 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:4:4
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.028
Stream size                              : 298 KiB (95%)
Writing library                          : x264 core 142 r2491 24e4fed
Encoding settings                        : cabac=0 / ref=1 / deblock=0:0:0 / analyse=0:0 / me=dia / subme=0 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=6 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=25 / scenecut=0 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=15 / ip_ratio=1.40 / aq=0
Language                                 : English
Encoded date                             : UTC 2016-12-17 03:48:54
Tagged date                              : UTC 2016-12-17 03:48:54

Audio
ID                                       : 2
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Codec ID                                 : 6B
Duration                                 : 3s 186ms
Bit rate mode                            : Constant
Bit rate                                 : 32.0 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 12.4 KiB (4%)
Writing library                          : LAME3.99.5
Language                                 : English
Encoded date                             : UTC 2016-12-17 03:48:54
Tagged date                              : UTC 2016-12-17 03:48:54

Need to know which version of WMP. And what does Mediainfo say about the file? Use View-Text mode

@Mulvya I added more details in Edit part of question. Please see that.

Your KAZAM video features YUV444P pixel format which WMP may not support without extra filters. Using ffmpeg, run
ffmpeg -i in.mp4 -pix_fmt yuv420p -c:a copy -movflags +faststart out.mp4

You can also use ffmpeg itself to capture screen and sound on linux. Basic syntax would be
ffmpeg -f v4l2 -i VIDEO -f alsa -i AUDIO -pix_fmt yuv420p -b:a 64k cap.mp4

where VIDEO is the name of the video device. See http://ffmpeg.org/ffmpeg-devices.html#video4linux2_002c-v4l2 for details.
AUDIO is the name of the audio device. See http://ffmpeg.org/ffmpeg-devices.html#alsa
You can also use x11grab to capture from the X-Window system. See http://ffmpeg.org/ffmpeg-devices.html#x11grab

:) thanks a lot for sharing the command. worked like a charm.

this saved my life today!

I left incognito mode and signed in, joined this community - just so I could upvote your answer @Gyan. Thanks for this amazing answer. God bless! :)

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


text:
Crop selected area in all videos
I have many videos in a folder which I want to crop in same way.
I want to remove 25px from the bottom part of all frames of all videos. All the videos are 1280x720p and have same format which is mp4.
How can I crop 25px from the bottom of the frames and save the output files as new separate files?
I am using ffmpeg cli on Linux but I don't mind using other tools on Windows or Linux. Is there a easy way of doing this in batch?

Basic command is
ffmpeg -i in.mp4 -vf crop=iw:ih-25:0:0 -c:a copy out.mp4

Note that MP4s usually require the dimensions to be even, so the command above will actually crop 26 pixels from the bottom.
On linux, using bash, the script would be
#!/bin/bash
# Usage: ./crop.sh

mkdir cropped
for file in *.mp4;
do
    ffmpeg -i "${file}" -vf crop=iw:ih-25:0:0 -c:a copy "./cropped/$file"
done


text:
Trying to resize a video by cropping the sides and adding height is it possible to do this with ffmpeg?
Basically, I want to convert an mp4 file that's in landscape to portrait.  It's a single image on a black background with no sound.  I want to keep the size and aspect ratio of the image intact and my plan is to convert it from 1280x720 to 720x1280.
I'm playing around with crop and padding, but I'm wondering if there's a way to get this done with one command, and if I need to reencode it.

Is the entire 1280x720 to be kept or is the area of interest smaller? A screenshot would help.

Much smaller. I'll send a screenshot in a moment.

I've added a screenshot

For a target size of 720x1280, you would use
ffmpeg -i img.png -vf scale=-1:1280:flags=lanczos,crop=720:1280:(iw-720)/2:0 out.png

Thanks, It looks like it only added the padding on top of the video, but that might actually work better for my needs.


text:
Set corners when cropping video
I took a video of a TV, and I want to crop it so that only the TV is in the video. My problem is that since my phone wasn't facing the TV at a perfect 90 degree angle, I can't simply crop it like a rectangle. Is there any way I can crop it so that I can set the corners?
This is similar to how scanner apps on smartphones work. You set the corners and it makes it look like you are directly looking at it. Sorry for my mediocre explanation. The app Genius Scan utilizes what I'm talking about.

Yes, you can. If you're in Final Cut Pro X you can use the "Distort" section of the inspector, or in Motion, you can use the "Four Corner" function in the Inspector when your video is selected. (In Motion it will be in the Properties tab.) The same functionality is available via the on-screen controls, which are easier to use than entering values by hand.
I believe that After Effects and Premiere have similar functionality, though I don't remember the details off the top of my head as it's been a few years since I used them regularly.

I'm on Windows, so I can't use Final Cut Pro X. I tried on a free trial in Premiere but couldn't figure it out. How would I go about doing it in After Effects?


text:
GoPro Hero 3 + Adobe Premiere Elements 14 black border
I have imported my videos into Elements as a test and tried a lot of different combinations to remove the black borders, but nothing seems to work.
The source file info it in the image below:

I'm unsure which settings to go for when setting up the project...

And I am also unsure of which to select in the export...

Project settings...

I can see that the file is 1280*960, but I cant seem to find this setting, any help would be greatly appreciated.

You need to select a Custom size, because 1280x960 is not an HD ratio (16:9) but something else (4:3).  The black borders are the program's way of telling you "the image aspect ratio doesn't fit the target aspect ratio, so I'm going to shrink it to fit".  YouTube, for example, will also do this to your video, as will any HDTV.  So unless you have a 4:3 end-to-end pipeline (which you might have if you are "projecting" the video onto a virtual 4:3 screen within some animation), something somewhere is going to have to crop or fill your image in ways you don't like.  The best alternative is for you to make the decision how you are going to fit it into a 16:9 world.

Is there a way to set that as a custom size, I can't seem to find any setting.

In your "Export" window, instead of selecting "Computer" (which is indicated by the reversed text) or TV or Mobile, select "Custom".  In your "Project" window, change 720 to 960, cross your fingers, and select "OK".

I will try this tonight and report back.  I noticed on a forum that I might need to get Premiere Pro


text:
Which web server is better for HLS streaming?
I am trying to create a server that streams HLS to client. I created .m3u8 file and for receive from client use Apache web server. Some times, changing the source of video takes more than usual time... I think that it refers to web server that responds to client with delay. Can anyone help me which web server is best to put m3u8 file in that and get client stream from that?
My m3u8 file is :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:11
#EXTINF:10.080000,
21.ts
#EXTINF:10.080000,
22.ts
#EXTINF:9.760000,
23.ts
#EXTINF:10.880000,
24.ts
#EXTINF:9.600000,
20.ts

It could also depend on the segment size. Depending on the implementation, the quality switch may only happen once the current segment is done playing. If your segments are really long, there can be a long delay depending on where in the segment you switched quality.

@MattiVirkkunen i add my m3u8 file to question, duration is 11 second and apple recommend to set it around 10 sec, so i think it not refer to size, whats your opinion?

I don't understand what you mean by "i think it not refer to size". Does switching quality sometimes take longer than 10 seconds for you?

no it take maximum 5 or 6 seccond

as you say if i set TARGETDURATION to lower value such as 2 second changing time is faster?

If it takes less than 10 seconds I don't think it's a problem with your web server. Either user a shorter segment size (this increases overhead though), or use a player that supports switching at the middle of a segment by redownloading a segment (there may be no point in doing this in practice). Personally I think <10 seconds is a perfectly reasonable delay.

and its not refer to web server?

I have no idea what that means.

Why is EXT-X-MEDIA-SEQUENCE set to 11?

i think its not a important value... i test with value '5' but nothing change

The problem you're facing is the high latency of HLS, which causes a longer delay for viewers to see new content when switching live content, such as changing cameras or restarting the stream. In simple terms: How to reduce the end-to-end latency of HLS.
Generally, HLS latency is around 30 seconds. This is because TS segments are typically set to 10 seconds per TS file, and the window (number of TS files) is set to 6, resulting in a total duration of 60 seconds for TS files in the M3U8 playlist. If the player starts requesting segments from the middle position, i.e., from the third-to-last segment, the latency will naturally be around 30 seconds.
You can reduce these two parameters, for example, by changing the TS file duration to 2 seconds, which will result in a latency of 6 to 8 seconds. Due to the HLS segment and window mechanism, it is difficult to optimize the latency to less than 8 seconds, as players may encounter network delays, segment loading failures, and retries, with different behaviors for different players. For more details, please refer to SRS HLS Latency. The config for SRS media server:
vhost __defaultVhost__ {
    hls {
        enabled  on;
        hls_fragment 2;
        hls_window 10;
    }
}

If you want to reduce the latency to within 3 seconds, you need to change the streaming protocol to HTTP-FLV. For more information, please refer to SRS FLV. Since iOS Safari does not yet support MSE, you still need to use HLS or WebRTC protocol. The config for SRS media server:
vhost __defaultVhost__ {
    http_remux {
        enabled on;
    }
}

If you want to reduce the latency to within 1 second or achieve low latency on iOS Safari, you can use the WebRTC protocol. For more information, please refer to SRS WebRTC. The config for SRS media server:
rtc_server {
    enabled on;
}
vhost __defaultVhost__ {
    rtc {
        enabled on;
        rtmp_to_rtc on;
    }
}

The root cause of this problem is not the Nginx distribution server, but the HLS segmentation mechanism and streaming protocol. It is recommended to switch to the SRS media server, which supports all these protocols and has the following workflow:
OBS/FFmpeg --RTMP--> SRS Media Server ---+--HTTP-FLV----> Browser
                                         +--HLS/WebRTC--> iOS Safari

Note: WebRTC is generally used in the online conferencing field and is gradually being applied in low-latency broadcasting. The protocol used to push streams with WebRTC is called WHIP, similar to RTMP, and the protocol used to play streams with WebRTC is called WHEP, similar to HLS.

Any properly configured and performant web server is fine.  The choice of web server software has no direct bearing on HLS, any more or less than it does for any other kind of files.  That's the whole point of a segmented protocol... to re-use existing web infrastructure as streaming servers by turning a stream into a pile of files.

Some times, changing the source of video takes more than usual time

It's not clear specifically what you mean by this.  It really could be anything.  I'd assume that you're saying it is taking awhile to buffer video.  This probably has more to do with available bandwidth, latency from the client to the server, and perhaps encoding parameters as well.  None of that is directly related to your choice of web server.
If quick load times matter to you, consider using a CDN.

I'm working in a Live Streaming company in Singapore, and we use Nginx as the web server for HLS. Since Nginx is way better at processing static files. You never need to worry about the performance, nginx can utilize the 10G network card easily.

Nginx is great, but Apache can be performant too if you really want it to be.  The point being, HLS requires nothing particularly special of the server.


text:
Low latency Camera Live Feed
What (if possible) is the best solution (or product) a Camera (or webcam) to get a Video Live Feed in low resolution (640x480 or if possible 960x720) but with extremely low latency (it must be the lowest possible, I hope <20ms) The connection must be any type of Wireless connection (not necessary wifi/BT any type of RF)
I need to get the feed on a computer to process it using opencv
Currently I'm doing some tests using my android phone and an IPWebcam app but the best result I can get is around 20fps (50ms video latency and 4ms of video processing) and that is not enough.
I hope to get 30+ fps
The camera will be mounted on a RC robot that can will run fast (not very fast about 2m/sec^2) so a quick autofocus should be useful


text:
Creating instagram stories in premiere pro
I want to upload a short video to Instagram stories. What sequence/export settings should I use in premiere pro?
I tried a lot of video tutorials on this theme, but I end up in endless "processing" when I try to upload the story. Videos shot directly from phone have no issues. It might be android only issue...
To clarify, I open Instagram, click upload story button, I can select and play the video I exported from premiere pro, but it won't upload. Tried to lower bit rate so the result video file would fit under 1mb. Tried different resolutions and aspect ratios...
Phone: Samsung Galaxy S6


text:
How do I remove night footage from 300 days of Time lapse video
I want to remove night footage from a Timelapse video of construction over 300 days. So I want to remove 300 nights from this video. How do I do it in an easier way? Is there a option to cut video at predefined frame/points after regular intervals in one single command? I want to avoid manual labor. I am using adobe premier pro cc 2014

Is it a fixed camera and an area of the frame show the sky? Actually, can you share a frame from night time?

It's a fixed Timelapse camera. It shows progress of the whole day in 3 secs. I want to slice out middle 1 sec from it. But the problem is footage is continuous for 300 days.. so i need to slice out every third second starting from 2nd sec i.e. 2nd,5th,8th,11th and so on. This is very tedious to do individually. Is there any option by which i can set formula like.. slice out 2to3sec, 2+3to3+3sex, 2+3n to 3+3n sec and so on until the end of video, all at once?

If you are OK with using a command line tool (ffmpeg), I'll supply a command in the morning to do this.

I haven't used it yet but you send me a command, i'll learn to use commands.

Using ffmpeg, a command line tool, you can use
ffmpeg -i in.mp4 -vf select='trunc(mod(t+2,3))',setpts=N/FRAME_RATE/TB -crf 23 out.mp4

The select filter is used on the video stream. This filter evaluates the supplied expression on each frame and keeps the frame if the expression evaluates to a non-zero value.
The expression used is trunc(mod(t+2,3)). The modulo function returns the remainder of the first operand when divided by the second. The first operand here is the timestamp of the evaluated frame. The truncate function truncates that result to an integer. If it is zero, the frame is discarded, else kept.
e.g. for a 25 fps video
t       t+2      mod(t+2,3)       trunc(mod(t+2,3))    select
0.00    2.00     2.00                    2             KEEP
0.04    2.04     2.04                    2             KEEP
...
0.96    2.96     2.96                    2             KEEP
1.00    3.00     0.00                    0             CUT
1.04    3.04     0.04                    0             CUT
...
1.96    3.96     0.96                    0             CUT
2.00    4.00     1.00                    1             KEEP
...
3.00    5.00     2.00                    2             KEEP
...
4.40    6.40     0.40                    0             CUT
...

Since you want to 'collapse' the video by removing the night time portions, the setpts filter is added to make all the kept frames continuous i.e. after the frame at 0.96, the next kept frame (2.00) will have the new timestamp of 1.00.
The video has to be recompressed since a filter has been used. For MP4s, default codec is H.264 and default encoder is libx264. The -crf 23 sets the bitrate control method (CRF) and value (23). Lower values retain more of the source quality at the expense of larger size. 18 to 28 are typical values.
You can get a ffmpeg binary for your platform from https://ffmpeg.org/download.html. Always get the latest nightly or snapshot build.

FYI you have to add a backslash before the comma in the select function to make it work (at least on Linux), ie:
ffmpeg -i in.mp4 -vf select='trunc(mod(t+2\,3))',setpts=N/FRAME_RATE/TB -crf 23 out.mp4

Otherwise, you will get a "too many arguments" error.

I have a modified setup where I took a timelapse every 1 hour for 30 days. I want to remove 12 hours of night. I had modified Gyan's select with the following:
select='trunc(mod(t*30-2\,24)/12)'

Here I am multiplying t by my frame rate of 30 to convert time to a frame number. Then I provide a frame offset of -2 to start at a different frame. Next I take the mod 24 since I have 24 frames in 1 day. Finally, I divide by 12 and trunc since I want to remove 12 frames of each day. And here is the final code.
ffmpeg -i in.mp4 -vf select='trunc(mod(t*30-2\,24)/12)',setpts=N/FRAME_RATE/TB -crf 23 out.mp4


text:
Tracking in Premiere Pro: Keep an object in a zoomed-in video in place
I am working with Premiere Pro and am trying to use tracking to keep an object in frame.
I'm zooming in on a video that has a moving object; in this case it's the neck of a guitar.
Because the guitarist is moving around, the neck goes up and down.
Sometimes it will move out of its frame (the zoomed-in image).
I'd like to keep the neck in the frame; thus move the zoomed frame.
Is this at all possible with tracking?
I've seen some amazing tracking effects like blurring a moving face or car license plate.
Of course I can do this manually, by moving the frame around.
But man..... would this save me a lot of work :-)

You'll need to use AfterEffects to effectively track camera or object motion.
There are tutorials on YouTube, my advice is do the tracking last, so you only track the footage frames used in your project.
Put all the shots you plan to track on a dedicated track in premiere while editing.
Export that video track with all other tracks off and import that video into AE, then track the sections that appear in the video.
Or you can use Bridge with Dynamic Link.
I say this because the tracking feature in AE is "intelligent" and will do a lot of the work for you, to a point, but many times you have to make corrections, do manual frame by frame track points... It's time consuming.
Hope that helps.


text:
How to annotate specific parts of video in pre-production?
When working in pre-production I usually have a lot of video material which I all subsequently place on the timeline and cut specific parts which I will/can use.
Then when starting to work on production I move all the cut original videos to the right and edit on the left of the timeline, scrolling left and right to pick videoparts.
Is there a way, before putting on the timeline, to annotate/mark specific intervals in the original videos with the possibility to only place those specified parts on the timeline?
I work with adobe.

If you're using Adobe, place a marker at your desired intervals. I believe the keyboard shortcut is 'M'. You can use this function in the 'Source' window as well as the timeline. Hit 'M' twice to add notes...

Disclaimer: You didn't specify what program you are working with, so I assume you are using the current version of Premiere Pro.

Assembly Workflow
Your workflow is a common one for beginners. Back when I gave Premiere Pro introductory courses, I noticed many students start out like this, basically doing the assembly, cutting and arrangement of the footage completely in the timeline. While there's nothing wrong with that approach, you can significantly speed up your workflow by seperating the initial material assembly/screening1 and the actual cutting.
The assembly is where you look through your material, sort and rate/tag it so you know what you are working with and can find specific parts of your material quickly. Mastering the project panel and all the sorting/marking options is a large subject on it's own, so I'm just gonna give you an overview of my workflow and the sorting options I find useful.

Workspace. Under Window → Workspaces, select Assembly. This workspace is optimized for assembly and material screening, it's just easier to work with. You can also rearrange the panels and save it as a custom workspace.
Bins. You can create bins to sort your footage into by pressing CTRL + B while the project panel is in focus. They work similarly to folders on your computer, you can drag your video clips and other assets into them for sorting. For example, you can create seperate folders for every scene in your movie, a seperate folder for B-roll material, a folder for music and other non-video assets et c. You will have a much easier time finding specific clips after you have sorted them in this way.
Color labels, Star Ratings & Keywords. You can use several variants of marking systems if you use the Metadata Display options. For example, I like to use colors labels to mark the best clips and the rejects. Once you have set those up, you can also use filters or sort by color labels to find the good stuff quickly. Other options include Star Ratings (that you can assign shortcuts to), Keywording and several other editable metadata options. I've already written some other answers on this, so ...

Quick setup for Star Ratings
Setting up Keywords and other Metadata options

List and Thumbnail Views. On the bottom left of the project panel, you can switch between the two views and adjust the size of the item display. While in List view, you can rename your assets from the generic filename (like MVI_0817.mov) to something more useful. I like to use a consistent naming scheme so I see what every clip contains at one glance. For example, if you name your clips [scene]_[shot]_[angle] (e.g. garden_establishing_panorama), you can find a specific clip without even looking at it.
The thumbnail view is useful to get a feeling of your material and quickly stitch clips together that fit. I usually open a second instance of the project panel, set it to thumbnail view and put it on my second monitor. It's great for quickly sifting through your clips and finding the right one for your scene.
In- & Out-Point, Markers. This is the most important part of this workflow, and the answer to your initial question (got a bit carried away with my answer). You can mark the In- and Out-Point of each clip by pressing the I (In) and O (Out) Keys respectively. This will add those points at the current playback position in the source panel (they are not temporary, so you can add In- and Out-Points to each clip in your project without dropping any of them in the timeline). If you have set up those points for a clip, only the portion of that clip between them will appear in your timeline when you add it to your sequence (you can of course adjust the start and end point in the sequence using the cutting tools as usual). More information on In- and Out-Points and quick ways of adding clips to the timeline can be found in my answer here.
One problem with this method is that you can only use one In- and Out-Point per clip. So if you have one clip that contains two parts you want to use in your movie, you have a problem. There are two ways to deal with this.

Markers. You can add markers to your master clips in the source panel by pressing M. The marker is added at the current playback position, you can change it's color and other attributes by right-clicking on it and selecting Edit Marker… from the context menu. However, this option is somewhat limited, since you will still have to manually adjust the clip length in the timeline, the marker only provides a visual aid.
Subclips. If you have set an In- and Out-Point for a clip, you can create a Subclip from that. Right-click on the clip in the project panel and select Make Subclip from the context-menu. This will create another instance of that masterclip in the project panel limited to the boundaries marked by the In- and Out-Point. This way, you can split up a large clip into several subclips, each containing only the portions that you need. The downside of this is that it's somewhat tedious if you have many long clips.

This workflow works best if you film your material in a certain way, which will also avoid the problems with In- and Out-Points mentioned above. This leads me to the following point.
Good filming habits
In general, try to film in a way that will make the assembly/screening of the material much easier and streamlined. This mainly means two things:

Press the record button only after you have composed the shot. If you point the camera in some random direction, press record and then compose your shot (i.e. position your camera/subject), you will have a few seconds of unusable material to cut from every single clip. And, even worse, the thumbnail view of the project panel will be mostly useless, since the thumbnails won't show the actual shot. If you start the recording after you are done composing your shot, the thumbnails will show you at one glance what every clip contains, allowing you to cut much faster.
Start a seperate recording for each shot. Many beginners make the mistake of just letting the camera run while they film, resulting in long files that are tedious to check and cut. Try to seperate the video files by stopping the recording and starting a new one for every shot/angle. This way, you only have one relevant part per clip/video file, allowing you to work faster with In- and Out-Points and the other Metadata Display options mentioned above. Also, try to make each recording only as long as you need it to be. For example, if you shoot a couple of B-roll shots from the same vantage points, do not just press record and proceed to point your camera at everything. Instead, compose the first shot, press record and record for 5~10 seconds (no longer for B-Roll). Then stop the recording, compose the second shot et c. This way, you end up with a couple of short, concise clips that you can assemble and add to your movie quickly.

This is all I can think of at the moment, though there's definitely more to say about this subject. I haven't even touched the actual rough and fine cutting yet ... but this answer is really getting too long, so I'll leave it at that. If I forgot anything important, feel free to inquire in the comments or ask a seperate question, I will be happy to edit my answer or add a new one if necessary.

1 Not sure what the right term is. In German it's called (Material-)Sichtung, which translates to sighting or screening of the material.

I'd say the best term in US English would be "shot logging".


text:
Workflow for Adobe Premiere?
I'm new to editing. I'm from a photography background, using Lightroom. I've a set workflow for processing my images there, taking them from initially applying metadata, through triaging into folders and then preparing for display.
I'm looking for a workflow process for premiere. I'm aware of how to capture my footage, but then what? In brief please summarise your Adobe Premiere workflow. I'm not asking how to do each step but rather indicators of steps I can then go and research myself.
I'm asking about 'workflow' process in the vein of http://ericscouten.com/blog/2012/03/05/lightroom-technique-how-i-organize-my-catalog-and-why-2012-edition - not the full details just the steps.

This question is a little vague. Are you asking about how to prepare your files, or the process of editing?

@stib Please think about it and create a better title for this. BTW: If the OP accepts an edit it's not friendly to simply roll back :)

@poor I'm confused .....

Sorry @AndrewWelch :) Maybe at least we can add the kind of workflow to the question?.

You'll have to elaborate some examples of kinds of workflow...

Thanks @poor. Sorry, I couldn't think of a better way of describing the post, given the info in the post.

It depends on the type of production. If it's say, a documentary where you have hours of unscripted footage; a drama where the shots are organised by scene, shot and take and you are working to a script; or a short-form piece like a TVC where you are cutting a small amount of footage down to 30 seconds.
That said, the process of editing is basically one of organisation, and it involves getting to know your footage, and then making decisions about what helps the story and what doesn't.
Getting to know your footage can involve any or all of these steps: logging - actually going through and taking notes of what happens when in the footage, choosing good or NG takes and marking them up in your project, sorting into bins, and even just naming your clips in the project. Actually, I find that naming your clips is one of the best things you can do to get your edit started. The more time you spend watching and organising your rushes the easier it is to cut them.
From there you need to start deciding what's in or out. An assembly edit is the first step – where you put in all the shots in rough story order, without worrying too much about matching cuts or sound or any finesse. At the end of the assembly you'll have a good idea of what your coverage is like, and this can sometimes be the point where you decide to shoot more footage if you can. At this stage the timeline is usually way longer than the final cut.
Then it's a process of finessing the cut, starting with the rough cut. This is where you focus on what shots are needed to tell the story. You may go back to your rushes to find extra angles, or cut-ins and cut-aways to help the cuts work or to improve the storytelling. You won't be doing any sound or colour tweaking, titles, effects or any other malarky at this stage. You may be using placeholders for effects shots etc.
From there it's a matter of making the editing seamless; making good motivated cuts, watching the pacing and rhythm. This is your fine cut, and it's the last stage before you lock down your edit and start doing the online stuff. If you're cutting to a set time this is when you might be making hard decisions about what's not absolutely necessary, and tightening up the cuts.
The "online stuff" includes adding graphics and effects, titles, music, and lastly colour grade and sound mix. Colour grading is where you firstly balance the colours between shots, and then give your shots the look that you want. Sound mixing is similar: you try to make the sound seamless between shots in a scene first, and then add other sound elements like sound effects atmos and music.
In reality there's really not hard division between the assembly, rough and fine cuts, they flow into each other. The trick is not to start worrying about getting a cut exactly right in the assembly edit because you might want to lose the shot altogether later on, so you'll be wasting your time. The idea of the assembly and the rough cuts is to focus on the whole piece without getting bogged down into individual shots.
I find that non-linear editing does make it very easy to get sidetracked into doing fine cutting too soon (when you cut on film you didn't want to cut scenes too short too soon, because it was a damn nightmare finding those one-frame trims in your trim bin and sticky-taping them back on).
There is usually a boundary between editing and stages like colour grading. You want to have your shots "locked off" before you start grading or you'll waste a whole lot of time going back and forth. Though recently colour grading packages have started to have the ability to dynamically respect edits that you make after starting the grade, so you now have the option of grading and cutting in parallel.
Effects too will often require the edit to be locked off, so that you don't waste time doing work on parts of shots that aren't used. But again, you may have to do a bit of to-and-fro between effects and edit. Packages like After Effects and Premiere work well together: if you have shots in your sequence that require effects work you can export them from the timeline via dynamic linking, so that you can watch the effect in your edit without having to render out to file.
There is no set-in-stone way of doing this, everyone and every project needs an individual approach, but this should give you a general idea of the way I like to do things.

My video editing process is actually kind of similar to my photo editing process.  First I scan quickly through my footage to find interesting images or clips which I think may be useful.
Next, I make a finer toothed path to verify more carefully that the clips will work for my needs and make basic corrections like rough color and sound work that may be needed to get a good rough cut.
I then work on a rough cut that positions clips approximately where they should be in the finished video, but without much concern to transitions between them or fine tuning the flow.  This may either be following a pre-determined plan if shooting an organized video or may be determined based on the available clips for montage or event work where a script wasn't possible to work from.
Next, after a rough idea of the video has come together, I make a pass to work on blending the clips together and putting more post production touches in as needed to make the clips fit the needs of the video.
Finally, I make a finishing pass through the video to make sure it is consistent from start to finish.  This may involve additional steps like final color grading and sound work, or those steps may have been handled in the previous step depending on how much work there was to do and how critical it was in my editing process.

authors: Δημήτρης Τζανετακης


text:
Best way to capture audio at an event
I am getting starting with video and I have a question about audio. I am going to be doing my first event (wedding) where audio is going to be critical. I have done other shoots, where the audio was not as important.
I have a Zoom H1 Recorder. There is going to be someone at the event taking care of sound, mics, etc.

Should I see if the sound guy will give me a 3.5mm output? I could then use that as an input to the Zoom H1 and record based on that.

Disadvantage: If one of the mics is off/disconnected, I wouldn't
get any audio?

Should I place the Zoom H1 in the room somewhere or attach it to the camera?

Disadvantage: Not as good audio quality as what you could get from the mics?

What is the best way to get good quality, reliable audio?

You'll get the best audio by connecting directly to the board the sound guy is using. As you mentioned, the risk involved there is that you lean heavily on the sound guy and hope he doesn't screw up.
If it's an option (depending on what kind of setup he has), sometimes he can record all the audio to a CD for you. This would almost certainly be possible if the wedding is being held in a church or similar venue with a permanent sound booth setup. If that's possible, have him record his audio to a CD (which he can give to you at the end of the day) and use the H1 elsewhere in the room.
Slight side note on this: you might also be able to get a smartphone app that lets you record in through the 3.5mm headphone jack of the phone, freeing up your H1 to use the external mics.
If you do want to keep the H1 separate from the sound board (and recording to a CD isn't an option), I'd try and find a good place in the venue to stick it. Putting it directly on your camera is an option but can be risky as it could pick up whatever noise you/your camera makes throughout the event. I usually try to keep my audio recorder/mics a slight distance from myself/camera so that I don't influence the recording at all. Sometimes it's possible to stick it very close to the bride/groom - tape it under a podium, hide it behind a bouquet, etc. It all really depends on what the actual stage setup looks like.


text:
How to zoom in on (or pop out) particular screen area's
I would like to know how to zoom in (or pop out)on a particular boxed screen area (like menu and mouse movements) just like this guy did in this linked video. I wanted to make same thing for my Youtube tutorial series.
Video Link -

I think the person in the tutorial recorded, cropped and placed each individual element in his video.
You could give "ZoomIt" a try. It's a tool from Microsoft that lets you zoom while recording your screen.

Thanks Bruno.. Can it be achieved in after effects? Could you please guide me.

You should check out this  video


text:
Adobe Premiere crop one side - then fill the frame -
I've got Adobe Premiere Pro; I don't see where I can crop just one side (as opposed to all locked proportionally) - and then fill the frame with the cropped image, as I can in other programs - I'm thinking you must be able to do it in premiere pro, but I don't see how - help is appreciated -

To crop just one side of a clip, select the clip in the timeline and open the Effects panel. Search for 'crop' (in the current version of Premiere Pro, the effect can be found under Video Effects → Transform). Double-click the effect with that name to apply it to your clip. Then open the Effect Controls panel, there you will find the effect settings for the crop effect with allow you to specify a crop amount in percent for each side.
To have the cropped image fill the frame, use the effect controls of the Motion effect that is applied to all clips in the timeline by default. Use the Position and Scale controls to adjust the clip's position and size to your liking.


text:
Facebook Live Stream crash
I am using OBS to stream on facebook.
I could connect to facebook with OBS and see preview at facebook (audio and video is streaming in preview mode at facebook). When I go live it stop working.
What can be the issue? Thanks

First try to identify the error with their "OBS Log Analyzer" to check for configuration problems, incorrect settings, network issues and many other diagnostics.
After that you should be able to start a "OBS Live Chat". A copy of your OBS log file will likely be very useful.
In the meanwhile you can always look through their FAQ.

Reason why I could not login was that I was in rights setting.
I had admin right to the facebook fun page but as employee of business facebook account. I had to same admin rights but not as employee.


text:
How to Achieve Slow Motion Effect in After Effects as seen in Kygo's Firestone Video
This effect should be simple to achieve, however I'm having difficulty with time-remapping (should I be using this function at all?)
The effect happens right after 1:45

It is called the "Time Warp" effect. You should check out this video from "Fenchel & Janisch" for a tutorial on how to apply this effect.


text:
Change Output file name in AfterFX .jsx script
I am rendering a project several times, and use a script to change some of the input. However, I have not figured out how to change the name of the output file in the script.
This is basically my script. I left the details of my modifying function out as they are irrelevant.
app.beginSuppressDialogs();
{
    var projectFile File("C:\\AfterFX\\MyProject.aep");
    app.open(projectFile);
    MyCustomDataExchangeFunction();
    app.executeCommand(3800);
}

In case anybody is wondering, app.executeCommand(3800) sends the composition to the Adobe media encoder.

I found the right property that has to be changed and wrote a function that does the job:
function renameComposition(newName) {
    var curComp = null;
    for (var i = 1; i < app.project.numItems +1; i++) {
        if(app.project.item(i) instanceof CompItem) {
            curComp = app.project.item(i);
            curComp.name = newName;
        }
    }
}

Beware, though, that this changes teh names of every composition in your project to newName. That does not matter in my case, just fyi.


text:
How to create and add video overlays like this?
I saw this overlay and want to reproduce it, but wonder how to do this:

It was slightly animated / synchronized with the video.

How do I reproduce this on my own videos?
Which software is ideally suited for this task?

I currently use Adobe Premiere.
Thank you!

The tool doesn't matter in this case.
For some kind of artistic or individual approach I'd suggest use a light table or graphics tablet. Draw the shapes 20-50 times by hand to get some nice variation and place all the drawings on top of each other like classic/traditional animation does in the old days.
Otherwise you can either use:

Any kind of pixel or vector based graphics package (Photoshop, Gimp, Affinity Designer etc.) together with Premiere or After Effects for additional tracking capabilities
A 2D Animation package which allows to draw directly on the plates
Or even Blender's grease pencil feature  along with its tracking capabilities

Beginner's tutorial on How to Scribble Over a Video in Blender?

You would probably find it easiest to use a motion graphics application. There are many. Since you're using Premiere, you might find Adobe After Effects familiar. If you're on a Mac, you might also like Apple's Motion. Both apps allow you to create shapes, use text, and animate it. The above type of graphics should be fairly easy to produce in either app.


text:
How to light a video properly?
I need to light a video for a project, I am making a movie trailer for a book I like and need to light a large space (It is an action book and there is running in the trailer.) Simply, I have to light an action video and I don't want to spend lots of money on this one project. Also, if there is a program that can edit the lighting and contrast after you record, please tell. So how would I do this?

For action, you're probably going to need flat, even lighting. Builders' work lamps, bounced off white walls or reflectors, are probably the most cost-effective way of lighting large spaces.
You can make some changes to lighting and contrast when you edit, though it's no substitute for lighting your film properly. It's called colour correction. You can also apply an overall colour 'look' to your film, which is called grading. Most editing programs (e.g. iMovie) allow you to apply basic effects and corrections. Programs like Final Cut Pro X, the open source Da Vinci Resolve (free lite version), and (steep learning curve) Adobe After Effects let you do professional correction and grading.

I have a work lamp, but is there a way to make a deflector? If you know a video that specifically talks about lighting large spaces, please tell.

Pretty sure Da Vinci Resolve isn't open source.  The lite version is free, however.

Yeah, Da Vinci costs about $1K if you want the full version.

A reflector can be made out of literally anything white. Popular cheapo reflectors include polystyrene sheets, bedsheets hung from walls, pieces of white cardboard, and white walls.

All of those are good ideas. You can also buy affordable folding five-in-one reflector/diffusers which are more convenient to carry around.

You could visit this website for some DIY video's to set-up your own film lighting and this website for some more information about which lights to use.
You should also make a thoughtful decision on the camera/lens you are about to use. More info can be found here.


text:
Downscaling 4K YUV420 to 1080p YUV444 with ffmpeg introduces red tint
I am downscaling 4K YUV420 video from the Panasonic LX100 to Full HD YUV444 using the ffmpeg console in Windows, and a script provided by user karl on the Personal View forum, modified for outputting H265 video at constant rate factor 18:
ffmpeg -i "input_path.MP4" -filter_complex "extractplanes=y+u+v[y][u][v]; [u] scale=w=3840:h=2160:flags=print_info+neighbor+bitexact [us]; [v] scale=w=3840:h=2160:flags=print_info+neighbor+bitexact [vs]; [y][us][vs]mergeplanes=0x001020:yuv444p,format=pix_fmts=yuv444p10le,scale=w=1920:h=1080:flags=print_info+bicubic+full_chroma_inp+full_chroma_int" -sws_dither none  -c:v libx265 -preset medium -crf 18 -c:a copy  -c:s copy -c:d copy  -map 0 "output_path.mp4"

The result, VLC tells me, is a 1080p yuv444 video, and I can see excellent color resolution, so far so good. However, the image has a slight red tint compared to the original.
What could cause that?
The full console output is:
ffmpeg -i "input.MP4" -filter_complex "extractplanes=y+u+v[y][u][v]; [u] scale=w=3840:h=2160:flags=print_info+neighbor+bitexact [us]; [v] scale=w=3840:h=2160:flags=print_info+neighbor+bitexact [vs]; [y
][us][vs]mergeplanes=0x001020:yuv444p,format=pix_fmts=yuv444p10le,scale=w=1920:h
=1080:flags=print_info+bicubic+full_chroma_inp+full_chroma_int" -sws_dither none
  -c:v libx265 -preset medium -crf 18 -c:a copy  -c:s copy -c:d copy  -map 0 "output.mp4"
ffmpeg version N-82080-g6969bed Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dx
va2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-lib
ebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --ena
ble-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfree
type --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enab
le-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-lib
openh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschr
oedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheor
a --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvo
rbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --ena
ble-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --e
nable-decklink --enable-zlib
  libavutil      55. 32.100 / 55. 32.100
  libavcodec     57. 63.103 / 57. 63.103
  libavformat    57. 53.100 / 57. 53.100
  libavdevice    57.  0.103 / 57.  0.103
  libavfilter     6. 64.100 /  6. 64.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  2.100 /  2.  2.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.MP4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    creation_time   : 2015-06-27T21:42:33.000000Z
  Duration: 00:00:16.02, start: 0.000000, bitrate: 95327 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709)
, 3840x2160 [SAR 1:1 DAR 16:9], 95071 kb/s, 23.98 fps, 23.98 tbr, 360k tbn, 47.9
5 tbc (default)
    Metadata:
      creation_time   : 2015-06-27T21:42:33.000000Z
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, flt
p, 124 kb/s (default)
    Metadata:
      creation_time   : 2015-06-27T21:42:33.000000Z
File 'output.mp4' already exists. Overwrite ? [y/N] y
[swscaler @ 00000000041193c0] nearest neighbor / point scaler, from gray to gray
 using MMXEXT
[swscaler @ 0000000000556720] nearest neighbor / point scaler, from gray to gray
 using MMXEXT
[swscaler @ 000000000418cd60] bicubic scaler, from yuv444p10le to yuv444p using
MMXEXT
x265 [info]: HEVC encoder version 0.0
x265 [info]: build info [Windows][GCC 5.4.0][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main 4:4:4 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut       : 23 / 250 / 40
x265 [info]: Cb/Cr QP Offset                     : 6 / 6
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock sao
Output #0, mp4, to 'G:\darrask\Pics\2015.06 Goettingen\P1340763_karl3.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    encoder         : Lavf57.53.100
    Stream #0:0: Video: hevc (libx265) ([35][0][0][0] / 0x0023), yuv444p, 1920x1
080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 24k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.63.103 libx265
    Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 124 kb/s (default)
    Metadata:
      creation_time   : 2015-06-27T21:42:33.000000Z
Stream mapping:
  Stream #0:0 (h264) -> extractplanes
  scale -> Stream #0:0 (libx265)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[swscaler @ 00000000041b9da0] bicubic scaler, from yuv444p10le to yuv444p using MMXEXT
frame=    7 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=
frame=   17 fps= 16 q=0.0 size=       0kB time=00:00:00.49 bitrate=   0.7kbits/s
frame=   25 fps= 16 q=0.0 size=       0kB time=00:00:00.98 bitrate=   0.4kbits/s
frame=   29 fps= 14 q=-0.0 size=      61kB time=00:00:00.98 bitrate= 508.0kbits/
frame=   30 fps= 11 q=-0.0 size=      95kB time=00:00:00.98 bitrate= 795.6kbits/
frame=   31 fps=9.7 q=-0.0 size=     112kB time=00:00:01.00 bitrate= 918.1kbits/
...console output truncated by user...
frame=  377 fps=3.9 q=-0.0 size=    7017kB time=00:00:15.50 bitrate=3706.4kbits/
frame=  379 fps=3.9 q=-0.0 size=    7048kB time=00:00:15.53 bitrate=3717.4kbits/
frame=  383 fps=3.9 q=-0.0 size=    7131kB time=00:00:16.00 bitrate=3650.8kbits/
frame=  384 fps=3.7 q=-0.0 Lsize=    7561kB time=00:00:16.00 bitrate=3871.5kbits
/s speed=0.156x
video:7304kB audio:244kB subtitle:0kB other streams:0kB global headers:1kB muxin
g overhead: 0.169810%
x265 [info]: frame I:      2, Avg QP:18.71  kb/s: 16117.16
x265 [info]: frame P:     86, Avg QP:19.53  kb/s: 8568.68
x265 [info]: frame B:    296, Avg QP:23.40  kb/s: 2247.32
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 2.3% 0.0% 9.1% 36.4% 52.3%

encoded 384 frames in 102.81s (3.73 fps), 3735.28 kb/s, Avg QP:22.51

output_path
>

Note it also has a red tint when I export to Prores with the original script by karl, and also when pix_fmts=yuv444p10le is not used (thus I presume 8 bits per pixel are used).

Show the full console output.

Done and edited.

I dug further and after reading the entire topic at Personal View, I found that user willyfan suggested to add in_range=full to both first scale arguments to correct a color shift that he also observed. And it works. So here is the full ffmpeg code, adapted from karl's script, for windows:
ffmpeg -i "input.MP4" -filter_complex "extractplanes=y+u+v[y][u][v]; [u] scale=w=3840:h=2160:in_range=full:flags=print_info+neighbor+bitexact [us]; [v] scale=w=3840:h=2160:in_range=full:flags=print_info+neighbor+bitexact [vs]; [y][us][vs]mergeplanes=0x001020:yuv444p,format=pix_fmts=yuv444p10le,scale=w=1920:h=1080:flags=print_info+bicubic+full_chroma_inp+full_chroma_int" -sws_dither none  -c:v libx265 -preset medium -crf 18 -c:a copy  -c:s copy -c:d copy  -map 0 "output.mp4"

So it seems that this is a good working script for converting 4K YUV420 footage to 1080p YUV444 footage with amazing results! My files are 5-10% the original size and have incredibly little quality loss.
PS: note that user karl says:

But if you use "in_rage=full:out_range=full", that should be fine with
  material recorded in the 0-255 value range. [...] You could try to use
  "in_range=full:out_range=mpeg" and see if that helps.

huh?
I would just use ffmpeg v4.x now and just use a command like
ffmpeg -i "infile" -c:v libx265 -pix_fmt yuv444p -crf 18 "outfile"

this is not what is needed. We need to go from 4K YUK420 to 1080p YUV444 and this does not even downscale.


text:
FFmpeg BMP to YUV x264 color shift
When I encode a particular sequence of BMP image files to AVC/H.264, the colors get shifted. Why does this happen?
But if I convert the BMPs to PNGs before running ffmpeg, the video conversion appears correct. My source material is in BMPs, and would prefer not to manually convert everything to PNGs to perform the workaround.

For the purpose of this question, I took the sequence of images and summarized them into these main colors being used:

First attempt at encoding (the pure white becomes noticeably green): ffmpeg -i 000.bmp -pix_fmt yuv420p -vcodec libx264 -profile:v main -crf 16 first.mp4

Second attempt (even worse): ffmpeg -i 000.bmp -vf "colormatrix=bt601:bt709" -pix_fmt yuv420p -vcodec libx264 -profile:v main -crf 16 second.mp4

Third attempt (too bright): ffmpeg -i 000.bmp -vf "scale=in_range=full:in_color_matrix=bt709:out_range=full:out_color_matrix=bt709" -pix_fmt yuv420p -vcodec libx264 -profile:v main -crf 16 third.mp4

However, using a PNG version of the same input image works great: ffmpeg -i 000.png -pix_fmt yuv420p -vcodec libx264 -profile:v main -crf 16 fourth.mp4

I am using the latest FFmpeg Windows x86-64 build (2016-11-22 Git d316b21):
C:\Temp> ffmpeg.exe -version
ffmpeg version N-82597-gd316b21 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --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-libschroedinger
    --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-decklink --enable-zlib
libavutil      55. 40.100 / 55. 40.100
libavcodec     57. 66.106 / 57. 66.106
libavformat    57. 58.100 / 57. 58.100
libavdevice    57.  2.100 / 57.  2.100
libavfilter     6. 67.100 /  6. 67.100
libswscale      4.  3.101 /  4.  3.101
libswresample   2.  4.100 /  2.  4.100
libpostproc    54.  2.100 / 54.  2.100

To rephrase my question, how can I convert the sequence of BMP images to an H.264 video without unwanted color shifts?

I'm note sure, so please confirm before I consider this as an answer. Please try with '-vcodec libx264rgb' instead of '-vcodec libx264'

Given that the title of the question is about a color shift when encoding to YUV format, how will encoding to RGB address the issue. The issue here is to correctly and fully specify the attributes of the source, so that swscale can correctly transform it. Also needed is to flag the output stream for lazy/sloppy players.

To the OP. how did you convert BMPs to PNG? And how were the BMPs generated?

@Mulvya For my MCVE in this question, I generated the BMPs by hand in MS Paint. I converted to PNG using IrfanView. Looking at the files in a hex editor, the BMP has no color profile or related metadata. The PNG appears to have a gAMA chunk and sRGB chunk added by default.

@RawBean Interesting suggestion. Using -vcodec libx264rgb -profile:v high444 (minus -pix_fmt), I get a video with perfect colors with zero deviation. However it is only playable in MPC-HC, not Windows Explorer or Mozilla Firefox. I think it would be good to stay within H.264 main profile.

@RawBean Aftertrying different things for several hours, using libx264rgb instread of libx264 fixed the issue for me. Thanks so much!!

Apparently FFmpeg doesn't set input color attributes correctly for BMP input (probably because the file doesn't contain that metadata) and the BMP decoder doesn't check for manually flagged attributes. However, we can force it using the format filter.
ffmpeg -i 000.bmp -vf format=rgb24 -pix_fmt yuv420p -vcodec libx264 -profile:v main -crf 16 first.mp4

This works perfectly! It gets the same result as using a PNG input. Thank you so much! Still, this is kinda crazy because BMP files can only be RGB24, nothing else...

According to the decoder, BMPs can have pixel format of an 8-bit palette or 5-bit RGB or 6-bit G..etc (also, can have alpha). But yes, colorspace is RGB. The decoder is originally from 2005 and its the decoder's job to populate the AVFrame struct passed on to filters with relevant attributes. Since BMP hasn't changed much & isn't used much, no one's bothered to retrofit the code with new flags added since.


text:
360 Degree Video Encoding for Playstation Media Player and PSVR
PlayStation 4's Media Player is very picky in terms of supported video formats, codecs, and resolutions. This becomes specifically difficult when converting high-quality virtual reality content for PS4's Media player to play it with the PSVR.
I wonder: What is the best format and quality to bring 360 degree videos to PlayStation 4?
I found this help page from Sony that shows the supported formats (version October 27th, 2016 for Media Player v2.5).
To my knowledge the best format in the list for my purpose is
MP4 file format with:

Video: H.264/MPEG-4 AVC High Profile Level4.2
Audio: AAC LC

I have also tested different resolutions, but for the current version 2.5 of Media Player, it accepts 1080p Full HD max.
The current version of Media Player allows 360 degree videos in VR mode, however, I found no way to play stereoscopic videos (side-by-side, or top/bottom).
Yet, the best ffmpeg command to convert videos for the PlayStation 4 I found is:
ffmpeg -i file.mp4 -an -vcodec libx264 -profile:v high -level:v 4.2 -s 1920x1080 -preset slow -crf 18 -c:a libfdk_aac -vbr 5 file_ps4.mp4

Any suggestions or hints are welcome!

Did anyone test whether the Media Player running on an PS4 Pro accepts higher resolutions?

I tried a few 4k videos with Media Player v2.51 on a PS4 Pro - no luck unfortunately :(

Thank you, David. During your test, did you have a 4k display connected? I did read somewhere that the ps4 pro only enables 4k when a 4k display is connected.

I know it may not be what you’re after, but you may have more success encoding for Littlstar VR on PS4/Pro.

When I looked at Littlestar a while ago, it was a cloud service and I would have to upload videos, correct? As I create the videos on my own, I do not want to share it anywhere, so I keep the copyright. Therefore Littlestar is not an option.

A new Playstation Media Player has been released. As of version 5.0, more possibilities exist for media. At least photos worked very good so far, I watch equirectangular 360° images that I took with my Xiaomi Mi Sphere camera, stitched with the camera's software. But it didn't play any videos I tried.
However, I managed to watch videos that I took in 3.5k (3456x1728) with the Xiaomi Mi Sphere, stitched with the camera's software and then converted with "Littlstar PSVR Encoder" by Stormware: http://stormwave.uk/#downloads. It even kept the original resolution of 3456px width, but the result still doesn't look awesome. For macOS and Linux, you can try littlestar's official ffmpeg wrapper tool: https://github.com/littlstar/ls-psvr-encoder, I haven't tried it so far.
Littlstar will play stereoscopic videos, too. You can read more on "sideloading" in Littlstar (means: Not streamed from the Littlstar cloud) here: https://medium.com/@littlstarmedia/side-loading-now-available-on-the-ps-vr-app-fe362f6c3e94
I used a PS4 Slim, so a PS4 Pro is not required. I dunno whether the results might be any better on a PS4 Pro.

PSVR resolution is 1920×1080 that is maximum resolution that include both eyes.
There is no need 4k because psvr only have 1920×1080 it will downscale it anyway IF WORK lol. (So for videos need be 1920×1080 for PSVR) if you stream from internet 4k content it is just downscaled its not 44 it maximum that you can see lol
evem ps4 pro can 4k. psvr only show 1920×1080 spilled for eyes.
Same if your PC monitor is 1920×1080 it not makes any better quality watch 4k videos. EVEN can. You need change monitor 4k too LOL, but 1920×1080 is good and fast and no need resources. Who baking PC and play 4k? Who like watch small fonts?


text:
How many NVIDIA NVENC engines a particular GPU have?
There is a NVIDIA VIDEO CODEC SDK APPLICATION NOTE - ENCODER in which we can read the following:

While Kepler and first generation Maxwell GPUs had one NVENC engine, certain
  variants of the second generation Maxwell GPUs and Pascal Generation GPUs have two/three NVENC engines physically present on the silicon.

So, does anyone know how to determine the number of NVENC engines in a GPU or already know the numbers? Because there is no information in NVIDIA datasheets and they are annoyingly silent in their own developer forums.

Agreed with you on "They are annoyingly silent in their own developer forums"!

Why do you want to know the number of NVENC engines? is it for estimating the impact on the performances ?

Sure. And this is also a budget question. For example, let's assume that all GeForce cards have only one engine. It means there is no sense in buying high-end card as the low-end cards contain the same chip (not sure about impact of memory performance, which are different, but I think the bottleneck is going to be in disk to memory operations not in memory to encoder).

In fact I has the same question than you. I bought one GTX 1060 and one GTX 1080. I benchmakred the two. It was part of my paid work so I can't share all the results publicly.

NVIDIA have just published Video Encode and Decode GPU Support Matrix that contains number of NVENC chips for Pro-level cards.

Since you are actually more interested in performance (Frame Per Second) than in the NVENC engines count, please consider my below rounded up figures.
I've compared GTX 1060 and GTX 1080 only.

H264, GTX 1080 encodes 70%  faster than GTX 1060
HEVC, GTX 1080 encodes 140% faster than GTX 1060

1/2. Thanks for sharing publicly. By performance I didn't mean FPS of encoding of just one video but, for example, number of encoded video clips per day. To maximize the value I need to run several encoding tasks in parallel. In case of 2 engines the second parallel clip should be available like 'for free' in comparison with a card with only one engine. In my current GTX 650 setup a clip gets encoded with 68 FPS, two parallel clips with ~34 FPS which proves that the engine is in fact the only one.

2/2. Unfortunately I don't know if the driver can split one encoding task between several engines so we can't figure out number of engines from the numbers you provided. The source of 70/140% improvement can be in simply faster memory configuration.


text:
CPU Selection for video encoding
I have been perusing this page:
https://openbenchmarking.org/showdown/pts/ffmpeg
Something doesn't make sense to me, I am looking at the following CPU's:
Intel® Xeon® Processor E5-2650L v3 (30M Cache, 1.80 GHz)
Intel® Xeon® Processor E5-2690 v3 (30M Cache, 2.60 GHz)
Intel® Xeon® Processor E5-2640 v3 (20M Cache, 2.60 GHz)
Intel® Xeon® Processor E5-2670 v3 (30M Cache, 2.30 GHz)

According to the benchmarking, the ideal processor is the E5-2640 from that list. I don't see the correlation between the benchmark numbers and the CPU specs, Now the page didn't specify which version of that particular model, so I picked a pretty new one that is almost identical to the newest v4.
I would have assumed that when picking a CPU for video encoding I would be looking the either the:

Highest base frequency
Largest onboard cache
Fastest bus speed

Or some other common metric. What is your experience?

a) That pts test is using an old version of ffmpeg b) it's encoding to DV, which is an intraframe codec. Not sure how much that taxes modern CPUs. It'll tax disk I/O a lot more.

I had wondered about the disk I/O issue considering all these CPUs can't be on the same system. While yes it is an old version, the comparative numbers between CPUs seemed like it should be similar across all ffmpeg versions.

do your own testing... I have a quad core E3 v5 being 4 times faster than a quad code E5 v2 at x264 encoding. Ram isn't the reason as the DD3 is 1866 while the dd4 is 2100. I don't get it either.

The DV encoder used in the cited test is useless for gauging modern CPUs.
I ran the test command with the referenced media on a 4-core i5 and the difference between -threads 4 and -threads 3 is 0.5% and with -threads 2 is 1%. I see a much larger variance when I use H.264 encoding.
Of course, the bigger flaw is that the command is resizing the video. FFmpeg's internal scaler isn't multi-threaded!

A big question is will your encoder use multithreading.
I have a dual E5-2697 v2 System, 48 Cores.
So if I need to just encode video which does not or cannot, due to effects applied, use the GPU (cuda); then encoding in AE rather than PPro is much faster, as it can thread up to 32 cores, and render much faster.
Otherwise; go with a processor that can be overclocked to the highest level. If your encoder can only use 1 core, you want the fastest clock speed possible... not more cores.


text:
Cropping a Video Panorama
Summary: How do I get VideoStitch Studio, AutoPano Video, or any other video stitcher to properly crop an equirectangular or cylindrical projection?
Details: I am creating a wide-angle video from two GoPro (120° HFoV each) overlapped by about 50%. The desired end result is about 190° horizontal, 45° vertical. When I bring two (synchronized) video frames into Hugin as pictures, I can set up a stitch and projection and crop…

(Ignore the phantom hand and unblended screenshot)
…and Hugin produces the result I want:

However, when I bring the two videos into either VideoStitch Studio or AutoPano Video I can get the two videos synchronized and calibrated, but I cannot figure out how to crop the projection to include the region of interest. (With VideoStitch Studio I even load the Hugin .pto file; I thought this should include the crop.) The videos they produce are always a small region of the video inside a sea of black:

Using either of these two video-stitchers—or any other process—how can I get Hugin-like cropping of my videos?
(The final video dimensions will be very high resolution, on the order of 6k horizontal pixels, so I'd strongly prefer not to say "Just render it extra extra big and then use After Effects to crop out the center.")

I do know that there are several stitching artifacts, both in the "result I want" image and the screenshot of the video. At this point I'm trying to figure out the proper production pipeline—which software to buy—and so I'm not yet spending a lot of time getting really good control points set up in any package.

Getting closer: in AutoPano Video I can open the Preview pane, click on the tiny "Authoring" tab in the Timeline pane, and then the projection mode can be changed and I can drag and zoom the view. I still can't set an arbitrary aspect ratio, nor crop asymmetrically around the 'horizon'.

Support from VideoStitch Studio wrote: "Right you will only be able to create a full sphere is Studio in an equirectangular projection (no zoom, no crop) but it will enable you to bypass the template options.
In my opinion, stitching 2 videos might not be the best option for what you are trying to do as they will be stitched in a full sphere (using a wider lens on your camera might be better)." So: VideoStitch Studio cannot produce the output.