text:
How does HDR relate to color space and bit depth?
I'm not a photographer, but I'm struggling to understand HDR technology as it relates to TVs and monitors, so I thought this would be a good place to ask.
First, I got a good understanding of the terms "color space" and "bit depth" by reading this excellent answer.
How does HDR technology relate to these terms? Is HDR simply a combination of a 10-bit color depth and really wide color space, or is there something more to it?
In the marketing language, certain areas of the screen (such as the rising sun) are said to be "brighter" than other areas of the screen on a HDR display. What does "brighter" actually mean here — does it just mean "farther to the edge of the color space"?
I currently have a DELL U2410 monitor, which, as I understand, has a 12-bit internal processor and an 8-bit panel with FRC dithering, and supports an Adobe RGB color space. Even though this is not true 10-bit, will it produce a result similar to HDR if I use a device which can output HDR? I currently set the color space to "sRGB" since Adobe RGB looks too oversaturated. Could this be because my graphics card does not support a 10-bit output?
EDIT: I am talking about "HDR" specifically as it relates to how the term is used in modern 4K TVs.

"HDR" means a lot of different things to a lot of different people. In terms of bit depth, HDR usually refers to a 32-bit floating point light map that isn't viewable on any monitor in existence. To view an HDR image it must be tone mapped (or otherwise interpolated) to squeeze those 32 bits into an 8 or 10 bit capable output device.

The problem with bit depth is that it has absolutely nothing to do with the size of a color space. You could have a very high bit depth in a very narrow color space where the steps between each gradation are very fine. You could also have a fairly low bit depth in a very wide color space where the steps between each gradation are much coarser.

"Could this be because my graphics card does not support a 10-bit output?" It's probably much more likely your monitor's saturation is just turned up too high. Most screens come from the factory way too bright, way too saturated, and way too cool (high color temperature). Have you calibrated and profiled your system with a colorimeter?

Related: What's the difference between “Fake HDR” and real, bracketed exposure HDR?

Related: What's the point of capturing 14 bit images and editing on 8 bit monitors?

HDR as is normally used in still photography is not the same thing as HDR when used to describe 4K TVs. The reason we have more content containing the expression 'HDR' is probably because it's been around still photography for about 165 years and is a relatively new term with regard to video screens.

It doesn't mean much of anything. The extra bit depth can be used for finer gradations between the same 'darkest' and 'brightest' emissions that can be simultaneously displayed or the extra bit depth can be used to increase the difference between the 'darkest' and 'brightest' emissions that can be simultaneously displayed. But neither choice is anywhere remotely near the range that can be contained in a 32-bit floating point light map that is what 'HDR' has come to mean in the context of digital still imaging.

TV technology and video encoding is in principle outside the scope of this site.
Still, as photographers we are presumably interested in new display standards that promise both more dynamic range and wider color gamut. HDR computer monitors are coming, so it probably won't be long before photographers too will be interested in HDR displays.
HDR by itself just means High Dynamic Range. Dynamic range is the brightness ratio between the brightest and the darkest parts. "High" is relative to what the sensor can capture or to what a standard display can show.
HDR video is one of several standards for video encoding. They have names like HDR10, Dolby Vision, and Hybrid Log-Gamma. They all support higher bit depth (10-12 bits), wider color gamut (Rec. 2020 and/or DCI-P3), higher dynamic range, and 4k resolution. They are not compatible with each other, but some devices support more than one HDR standard.
"HDR TV" doesn't necessarily mean much, except that it will accept a HDR video signal and display an image. It does not necessarily mean that it can display the wider gamut and higher dynamic range, just that it can read the signals and show something, even if what it shows is plain sRGB with a mundane dynamic range.
"UHD Premium" is a certification standard for displays that can actually show HDR. Requirements include:

minimum 10 bit color
minimum 90% of the DCI-P3 color gamut
use a HDR transfer function (The transfer function for sRGB is called 'gamma', it translates bit value to brightness value. HDR uses a different function so it can cover a larger dynamic range with a small increase in the number of bits)
either: Minimum 1,000 nits brightness and max 0.05 nits black level, contrast ratio 20,000:1 or better (for LCD displays)
or: Minimum 540 nits brightness and max 0.0005 nits black level, contrast ratio 1,080,000:1 or better (for OLED displays, they can't go as bright but have better black levels)

Standard displays are 200-400 nits and rarely go beyond 1,000:1 contrast ratio. So a "Premium" HDR display has significantly higher peak brightness as well as an order of magnitude better contrast.
Brighter highlights, higher contrast ratios, and a different "bits to brightness" encoding/decoding all combine to enable the "high dynamic range" part of a HDR TV.
Color space and bit depth is only related to HDR in the sense that they are part of the same standards. Yes, you need more bits to represent a higher dynamic range without banding. But the larger color space is a different decision, it's more a matter of including enough improvements to make a new video standard worth the trouble. (4k is also part of the standard, and 4k is not related to HDR either.)
"The sun looks brighter on a HDR display" means that a) the display emits more light in the brightest parts of the scene, and b) it may look even brighter because the rest of the scene can be dimmer without losing detail.
So it's a real improvement; the wider color gamut and higher dynamic range can  contribute to more vivid photos and video.
The caveat is that TVs/monitors may be sold as "HDR compatible" without any actual HDR capability in the display. The content needs to be made specifically for HDR to make use of the new capabilities. And for computer monitors, you need a graphics card that supports HDR output.

HDR doesn't relate to color space at all, as it stands for "High Dynamic Range", ie. brightness, not color, contrast.
Traditional TV signals had a rather low contrast ratio, as old TV sets had a contrast of only 30:1. Modern displays can produce a lot more, 1000:1 or more with dynamic backlight (local dimming).
"HDR" displays are just a marketing term for displays with a very high contrast ratio.
But using this high contrast will require a higher bit depth signal or you'll have only a few steps spread out over the whole range which may introduce a kind of banding just like in the color domain.
You can't squeeze 1000:1 into an 8 bit brightness signal, so you need a higher bit depth. 10 bit can encode 1024 steps, which still isn't that high really, but better than 256.
Calling those displays "HDR" is, from a photography perspective, still laughable, as HDR photos are encoded in 32 bit floating point values with near infinite steps, but the dynamic range is higher than that of a traditional CRT TV or the standard NTSC/PAL signal. (Note that you need an "HDR" signal source to actually enjoy that capacity.)

@Vikram With two dimensional color gamut maps both the x and y coordinates specify a particular hue (color). Brightness is not represented at all. If brightness were included the map would need a third z axis perpendicular to the plane formed by the x and y axes.Keep in mind that most color gamut maps you see aren't the actual colors. If that were the case you couldn't view the edges of an Adobe RGB color map on an sRGB device, much less a printed piece of paper. You wouldn't be able to see anything outside the gamut lines even on an Adobe RGB monitor.

HDR in the modern TV sense refers to one of several different HDR specifications for color.  To understand what High Dynamic Range means, we first need to understand what dynamic range is.
Dynamic Range is the difference between the highest and lowest values in a signal or display.  A high dynamic range TV generally means that there is a large amount of brightness levels between the darkest and lightest possible portions of the display that can be shown at the same time.
The HDR specifications specify more than just the max and min brightness levels that must be able to be displayed though.  They also specify that a relatively high bit depth must be possible.  This allows for a video to have a greater number of levels of brightness within it, which also means that more subtle variations in color can be created and thus better use of the increased range of brightness that can be produced.  The higher the dynamic range, the more change in color between each value at a particular bit depth, but you can have fairly low dynamic range displays or fairly high dynamic range displays that still have a high bit depth.
There is also requirements for contrast ratio.  Contrast ratio is similar to dynamic range, but not exactly the same thing.  Contrast ratio is the relationship, in absolute light level, between the darkest and brightest values the display can simultaneously display.  It is dependent both on how bright the display can get and how well it can block light.  The contrast ratio determines how well a bright and dark portion of a scene can co-exist at the same time.  Static contrast ratio is the meaningful value as it is what the display can really do.  Dynamic doesn't mean a whole lot because it depends on being able to do adjustments that aren't at a pixel level and don't really produce an ideal image quality.

To comment two well-known statements here:
"You could also have a fairly low bit depth in a very wide color space where the steps between each gradation are much coarser."
"Color space and bit depth is only related to HDR in the sense that they are part of the same standards. Yes, you need more bits to represent a higher dynamic range without banding."
Both don't take dithering into account. In the absence of dither, the statements are correct but with dither applied, in theory, a smooth gradient would be even possible with only one bit, although it's extremely noisy when applying spatial dithering.
If one accepts a lower SNR, there won't be banding regardless of the bit depth.
If it is true that bit depth and colour space are not related (which makes sense as any colour space could exist in a purely analog domain as well without any bits to consider at all), then the logical conclusion would be: theoretical perfect dithering techniques assumed, a given bit depth - analog to audio - only limits the achievable signal to noise ratio and thereas the dynamic range as the noise will mask the lower end, however not the possible amount of colors, not any banding and no brightest whites or whatever.

Sure, but then you are sacrificing resolution for color and it only works to a point because if you don't have enough pixels to dither over, it becomes noticeable to the eye.  Also,. to the best of my knowledge, most displays aren't applying dithering on the fly to compensate for something like this, they are just displaying pixel values provided, so dithering doesn't make much of a practical difference in relation to things like the various HDR tv specs.

@AJ Henderson:
thanks for your reply. You are right that many practical implementations lead to effects, which the oversimplified and - from the signal theory's point of view incorrect - assumptions suggest.
However, the fact alone that practical implementations are so often so bad, doesn't make the oversimplified assumptions correct vice-versa, either.
I can't prove it yet either, but I doubt that dithering in fact reduces resolution as I think most people confuse resolution and signal-to-noise ratio and these are two different parameters determining the quality.

One can beautifully test this on one's own by using the renderer "madVR" under Windows (recommended in conjunction with the player MPC, but it should work with others, too) which supports several great implementations of dither.
Using "randomised dither", one can reduce the bit depth to even only 1-bit per color channel (leading to 8 distinct colors only in total) and still have all the colors and no banding.

The image is very noisy (just like a bad analog TV signal back in the days) and certain detail is lost in the noise of course, but the nominal frequency response of the image (resolution) seems to remain unaffected which can be indirectly proven by the absence of introduced aliasing which would be to be expected if the real resolution frequency-wise would be lowered by the dithering.
In the audio domain, it's also exactly the same. There dither definitely does NOT reduce or limit the frequency response in any way, but depending on the bit depth it will raise the overall noise floor.

Video resolution equals audio frequency response.
Hence from my understanding, it is correct to talk about a higher dynamic range and lower noise floor with a higher bit depth (one bit giving about 6dB of additional SNR), but not about "finer resolution of colors" or even a higher color space as all these assumptions are wrong in the audio domain and a video signal could always also be interpreted as a high frequency audio signal too so all parameters logically have to have a 1:1 expression (which they seem to have in practise too).

Hence, we might not necessarily need more data, but a better implementation in practise when it comes to video applications.

Sorry, forgot another important remark. You wrote "Also, to the best of my knowledge, most displays aren't applying dithering on the fly to compensate for something like this". Actually, that isn't the display's task anyway just like it wouldn't be a D/A-converter for audio to apply dither either. The dither is supposed to be part of the image so to say. The only exception is that if some render device accepts a higher bit depth and has to reduce it "on the fly" due to its own limitations. Otherwise, the dither is part of the image so the pixels are displayed 1:1 at the given color depth.

HDR is high dynamic range. The older technology is SDR - standard dynamic range. When we talk about colorspaces, there are also colorspaces specifically designed for HDR like ICtCp. ICtCp is derived from IPT (a colorspace for SDR) by using a different function for lightness.
Standard colorspaces are usually poorly defined for highlights and dark tones. This means highlights would be most likely encoded as a small region around pure white (i.e. loose precision/data/information there). Similar with shadows.
So, HDR in the colorspace terms is: a different lightness function (HLG - hybrid log or PQ function) + better defined color information for highlights and shadows.
Using HDR colorspace is only relevant for editing/storing when you deal with SDR content (that is why you can recover shadows/highlights when editing RAW files). When you deal with HDR content - you would have to use a colorspace for HDR content.
A lot of research papers clearly say that SDR colorspaces (i.e. CIECAM02, Lab) were only tested for illuminant around 100 nits. Higher illuminant or extreme changes in lightness and SDR colorspaces enter an "uncharted" territory. They could work fine, but less optimal as colorspaces defined for HDR.


text:
How to insert an image in video that changes its bounds to fit in chosen area?
I have a video template of an advert for a mobile app and all I want is to insert an image to that video that will fit in bounds of the phone in advertisement, in that video the phone rotates and changes its position so it is important for image to adjust.

This is not a video production question as defined by the guidelines of the board.  A mere video screen does not make something a video production.  Story, characters, lighting, sound, sound design, music, editing, costumes, makeup, sets, special effects, cameras, lenses, etc.  Those make for video production.

I'm voting to close this question as off-topic because this is about programming and display, not video production.

It sounds like you are looking for a way to Match Movement of the photo (picturing screen contents) to the movement of the actual mobile phone in the video.
This is usually done through Motion Tracking tools within your video editing software.
The specific ways of achieving this would different depending on the software you use. For example, this part of the official documentation explains how you could achieve that in Motion
This video covers your specific example with a mobile phone screen in After Effects

source: Stack Exchange

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

sort: votes


text:
Converting to Uncompressed Video Files
I'm looking for a method to convert compressed video files (like h.264) into uncompressed formats for editing.
What are the best options to look at?

The answer to your question depends on the software you will use for editing.
Uncompressed RAW video is rarely used for editing for performance reasons. If you have actually recorded your media in 10-bit RAW format (some cameras can do that), then it can be subsequently used for processes that require as much colour information as possible (colour grading, for example).
Modern non-linear editors can be capable of working with H.264 (see Adobe Premiere and its Mercury engine), but you waste a lot of processing power that way.
At the time of writing, the most widely used codecs in the broadcast industry are:

Avid DNxHD
Apple ProRes HQ
AVC-intra

So depending on your operating system and software you may want to transcode to one of these codecs and then re-link your edit to the source H.264 files, to ensure that you get the maximum quality.
Additionally, if you don't have a powerful machine for video editing, you can convert your media to a low resolution codec (to make the edit with it), to later re-link the sequence to high-res media. This process is explained here

Strictly speaking, true, but H.264 is fine for editing depending on the profile (AVC-Intra is an example of that). Transcode to baseline profile with a low GOP size and decent bitrate and one should be fine.

@Mulvya I understand and agree with the core message of your comment (like I said, some editors can work with H.264). Also, apologies for the pun but AVC-Intra is "Intra", meaning it doesn't have a GOP concept (I-frames only). That's why it is good for video editing (editor doesn't have to calculate the frame using the neighbouring frames), and that is why AVC-Intra isn't a good example of H.264. Just adding this for the benefit of Jammer, as you must know this already ;)

But it's not predicted frames per-se that's responsible for sluggish editing performance. It's the reference count, transform block sizes, entropy coding used..etc. Baseline profile alleviates most of these that contribute to the lag without giving up the efficiency of motion compensation altogether. Which is sort of the raison d'etre of H.26x codecs.

Thanks for the info, I have files recorded at 1080p h.264 and I was looking at the viability of using DNxHD but I can't find a converter app.  I've installed the Avid Codecs on my Mac and Windows 10 PC but looking for a method of transcoding seems to be alluding me at the moment.

@Jammer Adobe Media Encoder can definitely do that for you

@Mulvya, didn't know that Baseline profile has such benefits, thank you for the explanation!

@TonySepia I don't have access to any Adobe software.

What will you be editing in?

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


text:
Android apk for (nearly) professional video edit
Is there any better aplication for nearly professional video edit than PowerDirector Video Editor ?
I've tried many, also Premiere which I'm also using on my desktop, but nothing was that profesional that above mentioned app. I need quality output rather than fancy effects.
Thank you :)

Is it the Adobe Premiere Clip apk you said you used, or is it Premiere on desktop?
For professional video edits it is recommended you use the desktop as most of the Video Editing apps come with tons of effects,fancy items for quick, easy use. I personally would recommend to try out Quik Video Editor over below mentioned Video Editors,when it comes to Android.
Quik Video Editor features:

Free
Photos and Videos limit - 75
Carefully designed Video transitions and graphics
Beat sync transitions
Output quality ( 1080p/720p)
Video styles (Raw/stylish )
The other Apps that you can use (Not recommended - but you can try)
FilmoraGo Video Editor
Viva Video editor
Kine Master
Magisto Video Editor & Maker (Second suggestion)
Adobe Premiere Clip

All of the aforementioned apps offer basic video-editing features. Some excel at social media integration, some are clearly designed to be a desktop replacement. Which one works best for you will depend on your needs which is "Professional video edit and quality output".
The best thing is that all of the apps mentioned are either completely free or offer a free version. Give them a try and see which is the best fit for you.
For a fact: "Since some apps are clearly designed to be a desktop replacement,we cannot expect desktop quality professional edits,outputs (codecs,fps) from the apps which come for the mobile devices"

Thank you for complex reply. Well, I just need to put together videos, so I was currious about quality over any fancy video effects for social networks.
My main target is youtube and as I'm constantly travelling, I appriciate to have apk despite I know that on PC it's simply better. On PC I use Adobe Premiere Pro which is fantastic...
/// I've found another interesting apk called KineMaster, will also try it out

It is recommended to use Magisto Video editor if you are going for social networks such as Facebook.If its youtube you can try out Quik video,and FilmoraGo. KineMaster also has good features ,effects and transitions.Cheers and Good luck on you carrier!


text:
ffmpeg multiple filters not working
I am trying to specify multiple filters for ffmpeg and I am getting an error output.
I am trying to do an audio and video fade in and a resolution scale.
my command is as follows...
ffmpeg -i 00021.MTS -c:v libx264 -preset ultrafast -crf 0 -vf fade=in:0:500, afade=in:0:300, scale=384:218, scaled.avi

and the error it gives me is as follows.....

[NULL @ 0xb72ce0] Unable to find a suitable output format for 'afade=in:0:300,'
  afade=in:0:300,: Invalid argument

Audio and video filters are invoked in separate chains. And without enclosing quotes, whitespace will break the chain.
ffmpeg -i 00021.MTS -c:v libx264 -preset ultrafast -crf 0 -vf "fade=in:0:500, scale=384:218" -af afade=in:0:300 scaled.avi


text:
ffmpeg concat error
I am trying to concatenate two video files using ffmpeg, and am receiving and error.
Two eliminate compatibility issues between the two videos, I am been concatenating the same video with itself, and the same error persists.
ffmpeg -f concat -safe 0 -i intro_prepped.avi intro_prepped.avi -c copy concat.avi

And the error output I receive is....

[concat @ 0x220d420] Line 1: unknown keyword 'RIFFf�?'
  intro_prepped.avi: Invalid data found when processing input

I have tried various combinations of concat flags and have not been able to get it to work. Has anyone seen this error before?

The concat demuxer expects a text file as input.
ffmpeg -f concat -safe 0 -i list.txt -c copy concat.avi

where list.txt is
file 'intro_prepped.avi'
file 'intro_prepped.avi'


text:
Recursively Check MKV with ffprobe
The basic of what I'm trying to do is to run through my old encodes recursively and output the results of ffprobe to a file so I can review it.
This is what I am trying and it is not working...
for /d /r "D:\Video\TEST" %%a in *.mkv do if exist "%%a" echo ffprobe.exe -i "%%a" -hide_banner >> results.txt

Also, Ideally I would like to exclude any "trailer.mkv" file.

/D is for processing directories, not contents of directories.
for /r D:\Video\TEST %%a in (*.mkv) do (
  if "%%~nxa" neq "trailer.mkv" ffprobe.exe -i "%%a" -hide_banner 2>> results.txt )

Works great, thank you!  Now I get to figure out how to parse all of it so I can remove the extra audio and subtitles! :D


text:
Why does FFmpeg's stream_loop option add a pause?
I have tested several files with the added option
-fflags +genpts -stream_loop -1

to make them loop, but all have a slight pause just before they loop (250 ms or so). The loop filter does not have this issue, but it has other issues.

Did you manage to solve this? I am facing this for audio loops

See comments below, it's been fixed.

This is a known bug with stream_loop. See https://trac.ffmpeg.org/ticket/5719
Wrapping to MKV or TS and then looping may work. Re-encoding your video as intraframe is the safest option.

Wow, reported 11 months ago already and it's still there.. Re-encoding is not an option for me unfortunately, clients have pre-made loops.

Do you intend to 'live-stream' the looped output?

It is processed live, so I guess that is a 'yes'. So it's not possible to cut out pauses, if that's where you're heading..

BTW: wrapping in ts (no difference) or mkv (shorter pause) is no fix either. Neither is re-encoding to intraframe. The very visible pause remains present.

Strange. Can you upload your sample?

https://drive.google.com/open?id=0B0YATlG4DeOdd0RURUNJUG9mVFE
Note visually this is not a loop, this is just something to test audio sync.

Before I check this further, let me confirm that in the original file, the flash of the black box happens when the OSD says 1:52:12 and the beep happens at 1:52:16

I have no idea, someone else made this file. It's just a loop someone whipped up for me a long time ago to check for obvious issues. Served me well to find this issue and of all videos I have this is  nice and small.

Ok, but when you play it, is the timing of the beep like I see it?

I don't see why this is relevant to the issue at hand, but I checked in VirtualDub and audio is 3 frames late. So the first beep is at 1:52:15.

I'm checking if the timestamps or stream frame order is wonky. In a video editor, I get the beep at 1:52:13. What the stream_loop bugs relates to, is generating continuous timestamps, but stream quirks can affect this.

Just so you know I can reproduce the bug with lots of videos, all from different sources.
Interesting about your editor. I have always used VirtualDub as a reference, this is the first time I have any reason to doubt.

I wonder if converting it to uncompressed A+V or even separate images and sound track would overcome the bug? Have you tried anything with the sample I uploaded for you? I don't think they will ever fix this btw.

Images will work as there is a dedicated loop option (and code): -loop 1

I'll look into your sample sometime during the next few days.

Yeah, but the documentation is lacking and I get the idea it is just for images, not audio. Remember the loop filter already works fine for just video, it's when audio needs to be included that issues start to happen.
Oh, I just get a warning that we're apparently not supposed to use comments for discussions and we need to move this to chat.

Any updates? I have pause about 15-20seconds between loops. That's disgusting

Are you using current version of ffmpeg? The ticket is marked as fixed in Nov '17.

Working for me in latest version of FFMPEG. Doesn't work with the version packaged with Ubuntu 18.04 currently (3.4.4)

I am streaming a looping video and was struggling with pauses in-between loops too. What I discovered was that I was streaming at 24 FPS, but my input video was 23.97. Re-encoding the video at 24 FPS with the FPS filter fps=fps=24 resolved the issue.
See https://trac.ffmpeg.org/wiki/ChangingFrameRate for more information on changing the frame rate with FFmpeg.

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


text:
How do you bring up the effects settings window?
Rank beginner with fcpx here. I keep having trouble using the effects. Sometimes I move my cursor into the little window for a given effect, and I can scrub back and forth, and sometimes I can edit the parameters of the effect, but it seems I can never do both.
As a concrete example, in this screenshot, I've moved my cursor into the "censor" effect which pixelates a circle in the center of the picture.
When I did this previously, the circle of pixelation had handles on it so I could drag it and resize it, and the inspector had a number of settings I could change.
Now I'm in a state where I can't preview the effect, the inspector isn't showing the settings, and more often than not, double-clicking the effect has no effect.
Is there some sort of mode switch or setting I'm missing?

By scrubbing the thumbnail you're only previewing the effect. To add it to the clip, drag the thumbnail to the clip on the timeline in your project. The effect is then added to the effects in the thumbnail (at the top of your screenshot) and controls are available in the inspector and the viewer for manipulating the effect.

Thanks; I definitely made progress. Sigh; the UI is just so inconsistent. Normally, moving the cursor around in the timeline causes scrubbing. But just now it didn't. I switched to the Position tool, and then scrubbing worked again. Then I switched back to the Select tool and scrubbing kept working? Why did it stop; who knows? Currently, moving the cursor to the effect does not give the usual preview.


text:
FFMPEG stop converting from TrueHD to PCM
I'm trying to convert a TrueHD 7.1 soundtrack to PCM format but ffmpeg give me an error and stopped. Here's the output of ffmpeg:
user:~$ ffmpeg -i source.thd -c:a pcm_s24le -ar 48000 output.wav
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
      built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
      configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
      libavutil      54. 31.100 / 54. 31.100
      libavcodec     56. 60.100 / 56. 60.100
      libavformat    56. 40.101 / 56. 40.101
      libavdevice    56.  4.100 / 56.  4.100
      libavfilter     5. 40.101 /  5. 40.101
      libavresample   2.  1.  0 /  2.  1.  0
      libswscale      3.  1.101 /  3.  1.101
      libswresample   1.  2.101 /  1.  2.101
      libpostproc    53.  3.100 / 53.  3.100
    Input #0, truehd, from 'source.thd':
      Duration: N/A, start: 0.000000, bitrate: N/A
        Stream #0:0: Audio: truehd, 48000 Hz, 7.1, s32 (24 bit)
    Output #0, wav, to 'output.wav':
      Metadata:
        ISFT            : Lavf56.40.101
        Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, 7.1, s32 (24 bit), 9216 kb/s
        Metadata:
          encoder         : Lavc56.60.100 pcm_s24le
    Stream mapping:
      Stream #0:0 -> #0:0 (truehd (native) -> pcm_s24le (native))
    Press [q] to stop, [?] for help
    [wav @ 0x206a2e0] Filesize 9129246822 invalid for wav, output file will be broken
    size= 8915280kB time=02:12:04.69 bitrate=9216.0kbits/s
    video:0kB audio:8915280kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000001%

How can I make to conversion successful?

The WAV header is typically 32-bits. Your output will need 64 bits.
ffmpeg -i source.thd -c:a pcm_s24le -ar 48000 -rf64 auto output.wav

Can you explain more what -rf64 auto does? I search the official document but I can't find it explanation.

If the size of the output file is larger than 2^32-1, the WAV header needs to be 64-bits large. By default, ffmpeg will only write 32-bit headers. With the auto option, ffmpeg will use the variant that works.


text:
Recording Hi8 SD NTSC home movies ideal quality with ffmpeg?
I have a Dazzle DVC 100 that I'm using to connect an old 8mm camcorder up to in an attempt to digitize all our home movies.
The videos are all NTSC SD I believe and I've had the best success at recording with FFmpeg.
I wonder about the video size and framerates as I want the ideal recording.
Should the ratio be 720x480? From what I read 720x480 is NTSC DV but some others said it should be 640x480 (based on the pixels being square) or 720x486 NTSC SD.
Also is there any advantage in recording at a higher framerate? NTSC SD is 29.97 is it worth doubling the framerate to 59.94? The file size doubles due to the fact of recording two times the standard frames in a second. Is it just duplicating frames at that point and meaningless?
ffmpeg -thread_queue_size 1024 -f alsa -t 1500 -i hw:2 -f video4linux2 -video_size 720x480 -i /dev/video0 -framerate 29.97 -c:v mpeg2video -flags +ilme+ildct movie_0001.mpg

I would suggest encoding to H264 in MP4. Making it square-pixel is fine, Deinterlace first. Doubling framerate has no use here (Exception would be if you used an interpolation filter to generate full frames for each existing field, but that's not needed here).
ffmpeg -f alsa -thread_queue_size 1024 -t 1500 -i hw:2
       -f video4linux2 -video_size 720x480 -framerate 30000/1001 -i /dev/video0
       -vf yadif,scale=640:480,setsar=1
       -c:v libx264 -crf 21 movie_0001.mp4

That did give me a better quality image. Do you know if there is a way to link the -t filter for both inputs? I noticed that the audio cut out but the video kept playing due to the -t being in front of the audio input.

Place the -t after all the inputs.

@LF4 I wouldn't bother with the scale+setsar. I think a sane player should handle it fine as is. If the video is noisy consider adding a denoising filter such as hqdn3d after yadif: as a side effect it will help compression. If it's analog, such as from Video8, you can use the crop filter to remove any annoying video head noise (the ~10px crap at the bottom of screen).


text:
Screen capture at more than 1000 FPS
i would like to know if there is a hardware device, a software that would produce PC screen capture at more than 1000 FPS ?
The highest i could get under Linux with a custom program is around 400 FPS.
I suppose there is several hardware/software limitations, if there is no hardware or software, any hints on how can this be achieved ?
Thank you.

Is your screen even outputting that high of a frame rate?  The data rates you are talking about at 1000fps are staggering.  At 8 bit color and 1080p video, that's over 6GB per second of data to deal with for 1000fps.

I don't think it have to do with the screen output except on the hardware side depending on how the screen is grabbed, my question is quite generic thus i just wonder if > 1000 FPS is possible either in pure software or hardware (from GPU or from display)

What is the purpose behind your question?

I can't rule out specialized hardware devices that might be able to, but 1080p video at 1000fps produces 6GBps of raw data at 8 bit color.  That's 48 gbps, which exceeds the highest standards of most current connectors.  Display port 1.4 is just shy of 26gbps and barely covers half of the needed data rate for a 1000fps 1080p data stream.
You might be able to pull it off with a quad-link 12G-SDI setup, but I'm not aware of any hardware that can work with quad link 12G-SDI.
As far as handling it internally, no modern single SSD can handle the raw data rate.  An ultra top-end PCI express SSD can still only write around 2GBps, so you'd need over 3 of them working in parallel to keep up with the raw data rate.  At PCI express 3 speeds, you'd need 7 lanes minimum for the data transfer alone, so you could theoretically handle it with a PCI-E 3.0 x8 card, but you also need to take in to account the data that needs to be sent to the card for rendering at that rate as well.
You might be able to reduce this a bit by processing in CUDA on the card itself, but that's still an extremely high amount of processing to be doing while also trying to render whatever it is you are rendering at 1000fps, which, btw, you can't even display at 1000fps because there's no way to get a 1000fps feed out of the computer or display it.
Overall, I suspect the reason you don't find any software to do this is that it simply isn't possible or practical to do at this time.  Limits are probably set based on what seems like rational limitations for the capabilities of current hardware.

Thank for your answer, this made me think that I did not precise the images resolution, I am perfectly fine with 720p or even something like 640x480 or even less in width

@grz - what are you actually trying to accomplish?  That might help us provide better input.  Altering things like color depth might also be a possibility to simplify things greatly.

The color depth could be altered but i absolutely need two color components (red/green for example), this is for audio experiments, the human ear events resolution is on the microseconds scale

@grz - ok, why does it need to be a screen capture then?  Why can't it be a visualization that is produced to correspond with timing data?  If you are trying to form a visualization of some type, it seems like there are likely better ways to accomplish it.

Because it will be audio events in the end and not visualizations, there is no need of displaying it, the data will be used for audio concerns

@grz right, but I'm trying to understand what you are trying to capture.  A screen capture might not be the best option for what you are trying to do.


text:
Final Cut - unable to set clip duration to a fraction of a second
When I select a clip in Final Cut Pro, and press ctrld to edit the duration, I can enter 100 then enter and it will make the clip 1:00 second long. However if I try to do 30, it still rounds it up to 1:00 second long. Why won't it let me make a clip appear for a fraction of a second?

What is the frame rate of the sequence?

:30 is 1s at 30fps, so FCPX rounds it to 1s. For half a second on a 30fps project, enter :15.


text:
Cut out an animation of a video clip and insert into an other
I have a video clip with a character animation, for example the character swings his hand.
I want to cut out the whole animation which is ~ 3 sec long and insert it into an other clip.
For this I need somehow to mark the character, so I can cut him out.
How can I achieve this? Do I need to cut out frame by frame? Which programm is able to do it? I have premiere element 15 from adobe, but i cant find how to do it and its hard to search for, I only get topics on how to cut general video parts.
I could probably do this in photoshop frame by frame and save as gif with transparent BG.

When you create a mask around a part of a video it is called rotoscoping. Premiere elements doesn't have the capabilities to do rotoscoping but there are other free pieces of software which do. The following bits of software are composting software which are designed for composting clips together.
The first software is Blackmagic fusion https://www.blackmagicdesign.com/uk/products/fusion. Here is a simple tutorial showing you how to rotoscope in it

.
The other option is http://natron.fr/. Here is a tutorial on how to rotoscope with it

. This tutorial is for a slightly different software but should work fine.
Once you have made the clip in either of these bits of software then export it and import it into premiere elements as a new video file.


text:
Adding blurred background to portrait videos with ffmpeg
I have a lot of videos that are either 720x1280 or 1280x720. I want to convert all of them to 1280x720, but for the ones that are portrait I would like to show the full video with the remaining space to the left and right being a darkened, blurred version of the video.
I think this is pretty close to that, but it seems to go on forever (maybe because the color keeps providing frames?)
ffmpeg -i video.mp4 -lavfi "\
    color=color=black@.3:size=720x405[dark];
    [0:v]crop=720:405[blurbase];
    [blurbase]boxblur=lr='min(h,w)/20':lp=1:cr='min(cw,ch)/20':cp=1[blurred];
    [blurred][dark]overlay[darkened];
    [darkened]scale=1280:720[bg];
    [0:v]scale=-1:720[fg];
    [bg][fg]overlay=(W-w)/2:(H-h)/2" \
    -vb 800K video_out.mp4

You can see that it just starts adding duplicate frames after it hits the end of the video (in the logging below the video is ~24 sec):
Stream mapping:
  Stream #0:0 (h264) -> crop (graph 0)
  Stream #0:0 (h264) -> scale (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
...
Past duration 0.999992 too large    2256kB time=00:00:24.33 bitrate= 759.4kbits/s dup=1 drop=0 speed=1.36x
Past duration 0.799995 too large
frame= 3177 fps=101 q=-1.0 Lsize=    3797kB time=00:01:45.80 bitrate= 294.0kbits/s dup=407 drop=0 speed=3.37x

How do I fix the issue of the encoding not completing when the end of the video file is reached?
Also, is there a way to conditionally only do the blurred background work if the video is portrait so landscape videos don't spend a lot of unnecessary CPU on blurring the video?

Just a suggestion: Instead of a target bitrate (-vb 800k), use a target quality value, e.g. -crf 18, or two-pass encoding. This will provide an overall better quality / bitrate efficiency. See https://trac.ffmpeg.org/wiki/Encode/H.264

@slhck Thank you! I'll change that, appreciate it!

Limit the color output to a few frames. In the first overlay, it will repeat the last frame of the color once that stream ends. So,   color=black@.3:size=720x405:d=1[dark];

Filters can't be executed conditionally, so you will need to probe the input in a separate command beforehand and then execute a command with the filters or one without.
The command below
ffprobe in.mp4 -show_entries stream=display_aspect_ratio -of compact=p=0:nk=1 -v 0

will produce an output like this:
16:9

Just wrap a script to check that value.

Thanks! For me, since my video was from Zoom Cloud Recordings and had black bars on the sides, I first needed to crop it to actual portrait mode with ffmpeg -i input.mp4 -vf "crop=270:360" portrait_cropped.mp4 and then ran ffmpeg -i portrait_cropped.mp4 -lavfi "color=color=black@.5:size=270x360:d=1[dark];[0:v]crop=270:360[blurbase];    [blurbase]boxblur=luma_radius='min(h,w)/20':luma_power=1:chroma_radius='min(cw,ch)/20':chroma_power=1[blurred];  [blurred][dark]overlay[darkened]; [darkened]scale=640:360[bg];    [0:v]scale=-1:360[fg]; [bg][fg]overlay=(W-w)/2:(H-h)/2" with_dark_blur.mp4


text:
I am trying to generate Speech with audition but option is not visible
I am trying to generate Speech with audition but option is not visible on mac pro system please see image for reference click here
Version: audition cc 2014
for system speech ref:

Generate Speech was added in Audition CC 2015.1. You will need to update to use that feature.

and what about  Audition  CS6 ?  for me its not available in cs6 also

CS6 is older. You need to be using Audition CC at the 2015.1 release or newer to use the Generate Speech feature.


text:
what is the name of this effect?

Hello do you know the name of this effect please?
thank you

It appears to be an aged film effect.  There are a great many different aged film effects available.

thank you for your answer the effect is applied in this video https://www.youtube.com/watch?v=LPuKknqnVfg   at 2:28


text:
Upwards particle effect in After Effects
I'm getting started with After Effect and I want to make some simple music videos.
How can I achieve the subtle effect of this video video which shows semi-transparent upwards particles in a loop?

Do you specifically want it to be a repeat or do you want to just have random particles drifting up and expanding and going away?  They are very different answers depending on which you want.

I think it would be more visually appealing with random particles drifting up and fading away.

I don't have time to write up a full answer right now, but Particle Playground is the effect you want to look in to.  I'll try to do a write up if I get time, but my free time for answer writing has been pretty limited lately, so not sure when I'll be able to get to it.

Thank you for the answer. If you have time to write up an answer I'll be glad to give you the bounty.

There are numerous options for particles in AE, without needing any 3rd party plugins. For example the CC Particle Systems II effect which is included with AE CS and later. A PDF manual for the cycore effects (all the CC-something effects that are included with AE) are here
If you add it to a layer you'll see this:

By default the effect produces particles exploding from a small spot, and they fall as if effected by gravity. We're going to change it to look more like what you posted.

rendered version on YT
First, open up the effects control window, and work though the settings.
Change the producer size. This is the area from which the particles are produced. We'll mke it the width of the comp, without making it any taller vertically. So the Radius X will be 1920 for a HD comp. You might also want to wind down the birth rate, to say something like 0.1. Since we're making the particles move more slowly we'll need to increase their longevity. 15-20 seconds might be in the ball park for gently drifting particles.
They're shooting out of the producer at this point, so we'll turn that off. You do this in the Physics section, using the Animation drop-down. This sets the initial motion for the particles. For a more interesting movement you might try twirly. Twirly adds some random directional velocity, explosion adds velocity away from the producer, vortex makes them swirl around.
You probably want to turn the Velocity right down, maybe 0.1 or thereabouts.  For a gentle drift we'll turn Gravity right down, and make it negative. I ended up using -0.25, see how you go.
Resistance acts like friction, slowing the particles down from their initial velocity. A little bit is probably good, but if you want the particles to all have random velocity you can leave it quite low, like 1 or 2.
Play with the physics until you get it to look right. Reading the manual is a start, but fiddling with the controls to see how they work is the best way. Once you've got them drifting gently upwards you might want to move the position of the producer down below the bottom of the frame, e.g a bit more than 1080px. Also, if you want the particles to be there at the start of the comp, slide the start of the layer a few seconds before the start of the comp.
Next change the particle from the default line, to something else. I've chosen lens to create flat circles. Lens uses the original colour of the layer it's on, in this case it's a solid. You can muck around with colours, how the particle looks over time, and change the particle type here.
Remember you can also add more effects before or after the particles to change how they look, eg, blurs, colour correction, distortion, and so on. You can change the opacity of the layer as well as its Blending Mode to change how it interacts with other layers. Go nuts!
Here's a screenie of settings that produce a good gentle swirling particle effect. Don't just copy them though, they literally took me like five minutes, so you could easily refine them. Try twiddling the knobs, just to get a feel for what they do.

Thank you for your answer. I will try to replicate this in AE.

You should probably have a play with the other particle effects too. Particle playground, for e.g., despite being rather elderly has lots of scope for interesting motion, and the ability to use other layers to affect the motion of the particles.

The plugin Particular would do this. It's by Trapcode.

Thank you. Could you elaborate more on this? A full answer might be also useful for future users.

The information is already out there; Visit RedGiant's Trapcode's website:  http://www.redgiant.com/products/trapcode-particular/   They have all the information on the plugin; demo videos; tutorials; and I think you can even trial the plugin.  But essentially Particular is a particle generator- simple as that, with about 1000 parameters, making millions of possible "outcomes" in terms of what those particles do... From the particle itself, how they are emitted, taking into effect velocity, gravity; turbulence, etc. The videos on the Trapcode website are good, check youtube as well.

Is there a free alternative to this plugin?


text:
What does a Cube LUT offer over a PNG HALD?
Basically what the title says.
My current view: The Cube LUT appears to be a bulky, uncompressed text file with little more to offer than what is can be encoded in a lossless PNG. That the main difference is the Cube's 17 times larger size (based on a single comparison with 64 dimensions), and that the Cube is more computationally demanding to parse than the PNG.
In addition, the PNG is a visual representation which gives the user an impression of the LUT even without importing it into an editor.
Why I think I'm wrong: The sheer number of LUT formats out there suggests that they offer more than what a PNG, or a combination of a PNG and a metadata file, can provide.
What am I missing?

In addition to what @Geordie said, keep in mind that LUT files can contain floating point values which means that they can describe values that would be between the 8-bit values in a PNG file. Additionally, they can describe values above 1 or below 0 for HDR workflows.

They're essentially the same thing with different storage layouts.  A 2D LUT is just slices of a 3D LUT laid out in an image.  People use formats like Cube becasue that's what the software supports.  Because formats like Cube were invented before hardware acceleration it was probably just easier to load data already stored as 3D because the color transform was all done on CPU anyway.  You need extra math to transform an RGB value in 2D space instead of just a 3D array lookup: LUT[R][G][B] plus you have to interpolate between 3D points of your LUT is smnaller than your color space.  The file size difference is mostly due to cube files being ascii not binary.
LUTs are also used extensively in Game development to apply looks in realtime using the GPU.  Here LUTs can be stored as 3D (volume) images.  An advantage to 3D image storage is you can take advantage of hardware pixel interpolation in 3D.  I suspect any video editing/compositing/coloring software with hardware acceleration would transcode Cube/Hald LUTs to 3D images for the actual lookup on the GPU.
Look here for info on hardware color conversion.


text:
Video Editors Supporting 5.1 Surround Sound?
Now that I've found a way to record in surround sound I'd like to keep surround intact while editing the files. Features I need include trimming, appending, and adding narration to paused frames.
Ease of use and cost (less than $100) are my primary concerns. There is no need for special effects or advanced transitions.
So far I've tried Windows Movie Maker and Vegas Movie Studio Platinum. The latter looks promising, but it won't detect the audio in my 5.1 channel video files. (Windows Media Player does play the files back in surround sound.)
EDIT: For reference, Windows lists the audio in the files as 4608kbps, 6 channel, and 48kHz.

I would suspect any full featured video editor can take in as many audio channels as you need.

Davinci Resolve 14 would definitely do this as it has all new audio, otherwise Adobe Premier will work

Thanks for the recommendation. Still, $300 is a steep price especially when there is no trial or demo version to test first.

Davinci resolve is free and a paid version. Both are the same but the paid version has more pro features. Adobe premier has a 30 day trail and then it is a monthly subscription. The only one I know which costs $300 is FCPX which i didn't recommend as you are running windows but again that does have a trail of you are on a Mac

https://www.blackmagicdesign.com/uk/products/davinciresolve/#

https://creative.adobe.com/products/download/premiere

Davinci Resolve does indeed have a free version. I hadn't read far enough. Sadly it won't import my videos at all, it just silently fails.


text:
Can a 1D LUT be used in ffmpeg using lutrgb?
I am using ffmpeg and trying to change the color of certain pixels in a video stream using the lutrgb filter. The aim is to change any pixel with a green value greater than 145 to a white pixel.
So far I have tried the following commands:
-vf lutrgb=r='if((g > 145),255,val)':g='if(val > 145, 255, val)':b='if(g > 145, 255, val)'
-vf lutrgb=g='if(val>145,255,val)':r=255:b=255
-vf lutrgb=r='if(gt(val,145),255,val)':g='if(val>145,255,val)':b='if(gt(val,145),255,val)'
However, these are not delivering the desired result.
Is it possible to have ffmpeg use a 1D LUT where the input values for r, g and b can be set based on a condition, for example, if r=ANY, g>145 and b=ANY, then r=255, g=255 and b=255?
Any insight to whether this is possible is much appreciated.

The LUT filters don't have cross-referencing of channels. Use geq instead
geq=r='if(gt(g(X,Y),145),255,p(X,Y))':g='if(gt(g(X,Y),145),255,p(X,Y))':b='if(gt(g(X,Y),145),255,p(X,Y))'

Mulvya, thank you very much. This works exactly as it was intended.


text:
How to invert the color of a text layer with a sliding adjustment layer
So I'm trying to recreate the effects used in this Envato video
https://videohive.net/item/sport-life-fast-dynamic-slideshow/19632953
This is what I have so far https://gfycat.com/RichAstonishingDalmatian
What I basically want to do is to have a single text layer (selected comp) but I want it to be white on the color footage and black once the pink overlays it. Essentially, I don't want to maintain multiple copies of the text animation (or any other layer). If I change it once in one place it has to be able to cascade to all other places.
As it stands now it stays white and I can't quite figure out how to keep the layer/comp usage to a minimum while still changing the color of the text with the pink overlay.
P.S. Yeah Mark is a crazy guy!

Make the text only once inside one comp, but duplicate multiple copies of it in your main comp, so you will only need to create the text once.
Then set one of them to be inverted or whatever other colour setting you want.
Then make a layer that contains your moving mattes, and add a track matte to each of the text layers, pointing to your moving matte layer.
Mark does indeed look crazy :)


text:
ffmpeg scale and overlay then output yuv got corrupted video
I wanted to scale a video input (1.webm) and keeping it's aspect ratio,
then overlay to make it centered, with following command:

ffmpeg -y -hide_banner -i 1.webm -filter_complex "color=color=Black:size=640x480:d=7.420[bg];[0:0]scale=w='iwmin(640/iw,480/ih)':h='ihmin(640/iw,480/ih)'[scaled];[bg][scaled]overlay=x=(W-w)/2:y=(H-h)/2" -an -f rawvideo -c:v rawvideo -s:v 640x480 -pixel_format yuv420p 1.yuv

the output seem corrupted, dark area in original video turns purple or pink, and it's blinking.
I edited the command to remove the overlay filter, with following command:

ffmpeg -y -hide_banner -i 1.webm -filter_complex "[0:0]scale=w='iwmin(640/iw,480/ih)':h='ihmin(640/iw,480/ih)'" -an -f rawvideo -c:v rawvideo -s:v 640x480 -pixel_format yuv420p 1.yuv

this time, the output seem fine.
I can't figure out what is going wrong, please help.

updates: I found that, after adding format filter right after color, the output seems fine, with following command:
ffmpeg -y -hide_banner -i 1.webm -filter_complex "color=color=Black:size=640x480:d=7.420,format=pix_fmts=yuv420p[bg];[0:0]scale=w='iwmin(640/iw,480/ih)':h='ihmin(640/iw,480/ih)'[scaled];[bg][scaled]overlay=x=(W-w)/2:y=(H-h)/2" -an -f rawvideo -c:v rawvideo -s:v 640x480 -pixel_format yuv420p 1.yuv

I suspect this has to do with lack 1-1 correspondence between the frame timings in the color and video, but in any case, you can just run
ffmpeg -y -hide_banner -i 1.webm
       -vf "scale=w=640:h=480:force_original_aspect_ratio=decrease,
            pad=640:480:(ow-iw)/2:(oh-ih)/2"
       -an -f rawvideo -pix_fmt yuv420p 1.yuv

Mulvya, your command works like a charm, thanks.
And, nice formatting, will format my command line next time.


text:
Export .mov 1080i60 (59.94i) 29.97 fps Adobe Premiere
I've done this before in an older version of adobe premiere but I can't seem to remember how to get the export settings correct.
I need to export in:
1080i at 29.97fps with resolution 1920x1080 as a .mov file
I found these settings under H.264 and HD1080i 29.97 but it forces a .mp4 file. Under quicktime I don't seem to have the 1080i presets. Am I missing the settings or is there something I can do to make this work?
Here is a chart for the standards I'm trying to follow:

Download Quicktime to enable missing codecs
In export settings select "Quicktime" for format
Ignore preset, scroll down to video codec and select H.264


text:
mov to mp4 conversion produces grainy results
I am using handbrake to compress 250mb of 3d animation stored in .mov. This is how the mov looks:

The compressed version has some artifacts. Like it doesn't have enough shades of grey:

How can I avoid that? Should I render in a .mov file in the first place?

You need to remember that compressing is "Lossy" and you are removing information to make it smaller.

Is there some compression method for video that would be suitable for what I am trying to achieve?

well the best quality is going to be what you export from. have you tried exporting using a different codec from the app you are using ? Otherwise you can play with the settings (bit rate mainly I believe) in handbrake to achieve a better result

You are indeed right about shades of grey. You're encoding in 8-bit 4:2:0 (standard h.264 settings) which means that there are only 256 possible shades of grey. Think about it. If your RGB* values go from [0, 0, 0] to [255, 255, 255] and the red green and blue channels are equal, because grey, then your pixels will be one of these values: [0,0,0], [1,1,1], [2,2,2]… [255,255,255]. Meaning 256 possible colours.
If your gradient went from full black to full white and was 256 pixels across there would be one pixel per colour, so you'd be fine. But if it was say, 1024px wide, then there would have to be four pixels of each colour next to each other, meaning bands. And that's a gradient going from full black to full white—a subtle gradient from 45% grey to 55% grey might only have 25 possible values available–it's going to be banding city.
And just to explain what is going on in your image–especially in the middle–there's an unfortunate optical illusion that makes those bands super obvious, by making the squares where the same colour is repeated look like gradients going the opposite way.
Two possible workarounds:

You can encode using 10 bit h.264, but a lot fewer people will be able to play it back, and you'll need to get a 10 bit build of ffmpeg or x.264 (I don't know of any other 10-bit h.264 software)
You can add some noise. Sounds crazy, but it will break up the bands into fuzz so they'll be less noticeable. Justify it to yourself by believing it gives it a more filmy look. It's called dithering, it was a big thing back in the days of 8-bit colour.

*Actually it's YUV, but that's not important right now.

Thanks for a detailed answer. I plan to use this clips on youtube, which uses h.264 encoding. I haven't been able to identify how many bits they use for color encoding https://support.google.com/youtube/answer/1722171?hl=en. I am using cinema 4d to redner this clips. There is a checkbox: enable 8-bit dithering, and it is already turned on.

Youtube will be 8-bit. Browsers don't yet support 10-bit  h.264. I'm not sure about the cinema4d thing, but you might want to try extra noise in post.


text:
How can I create proxy videos from Ursa Mini CinemaDNG sequences?
I am currently working on a web series where we are shooting in RAW image sequences with a Black Magic Design Ursa Mini 4k.  We have a mixed post production environment where the editor is working in Premiere CC on a Mac and I'm doing the final color pass on a PC with Resolve 14, using a Final Cut XML as our intermediary timeline format.
Since the editor's disk space and processing power is limited and he is working in Premiere, working with the native RAW image sequence is not an option.  I need to output a proxy that he can use for editing that I can then import back into Resolve.  We'd previously been using a manual process with Resolve 12.5 on his computer to convert to a ProRes video, but this process was very slow and inefficient, both in terms of manual effort and in terms of the processing power I have on my systems vs his.
I need to determine a workflow to encode the RAW sequences in to a good proxy option.  I'm currently leaning towards DNxHD for the proxy format, but I'm open to any good option for NLE use.  Preferably I'm also down-converting to 1080p for editing to give the editor an easier time working with the footage.  I'm able to modify the Final Cut XML as necessary to account for format changes even if Resolve can't natively handle the adjustment.

I shoot on a BMCC 2.5K and this is my process: I do a one-light grade of the dng sequence in Resolve, spit out DNxHD proxies as individual clips named the same as the dng sequences, then once the edit is done bring it back to resolve and use the 'replace source folder' function to point back to the original dngs and do the final grade.

@stib - I found a better option in Resolve 14.  Check out the answer.

Apparently I was just missing the setting.  While Optimize Media has been changed in such a way it will not work, there is now a Media Management function that will handle this perfectly.  It is available under the File menu I believe it was.
Media Management allows moving, copying and transcoding of all footage in the project, all footage in a timeline or particular clips.  You can also choose to work on only the footage in the project that is actually used (useful for discarding unused clips after final editing is done).  You also have the option to relink or not to the newly created files.
Scaling it to another resolution is also an option.
In my case, I through all new clips that needed to be transcoded in a timeline, selected to export all clips from that timeline and setup the output settings and ran the transcode.  It pushed through 2.5 TB of footage in about 4-5 hours and produced 130GB or so of proxies.


text:
Export Markers From Vegas Studio 14?
The videos below show how to export markers from v12 and v13, but I don't have the View -> Window -> Edit Details options they're showing in v14.

Anyone know how to do it in v14?

Movie Studio does not have many of the features that Vegas Pro has. I guess you can't do it in VMS

After some experimenting it's clear this is a feature only available in Vegas Pro (Edit or better). Thankfully there is a trial version which I was able to use to confirm this is the case.


text:
Spec sheet requires checksums, How should these be formatted?
I'm doing some audio deliverables for a feature film's TV package. The spec sheet I'm working from says that all media has to be provided with an MD5 checksum.
I know how to compute MD5 checksums for files but is there a specific format for checksum's that's customary?  Could I use the MD5 feature of mtree(1)? Or do you do a $FILENAME.md5 for each file? Or something else?

The spec should include how they want to receive the checksums. There is no industry standard. If the spec didn't include it, I would contact the studio.

Can you give any examples of how you've done them in the past?

I never delivered to a destination that required it. I only know of one US broadcaster who asked for checksums and they required you use their software to package the files. I don't think DPP/AS-11 requires it and I couldn't find a requirement in Netflix's spec's for checksums, either.

@MichaelLiebman Thanks I consider this answer complete.

Glad to help. I put that all in to an answer.

There is no standard used by US broadcasters for how to format checksums. I've never delivered to a broadcaster that requires it, but I've mostly been involved in delivering commercials. DPP/AS-11 doesn't specify anything about checksums and neither does Netflix. I only know of one US broadcaster that does require checksums and they require using their proprietary software to build up the delivery package.


text:
Custom formula for keyframe automation - Adobe Premiere Pro
Is it possible to enter custom math/scripting formulas for keyframe animation inside Premiere Pro?

Not from within premiere. You would need to do that in AfterEffects.
AfterEffects is better suited to do animation regardless. Once you've set up your compositions, you can then import them directly into premiere and lay them into a sequence using Bridge.
This way you can easily jump back and forth between AE and PPro and any changes made to your AE Comp will immediately update in PPro provided you have Bridge and the Dynamic Link Option enabled.

wish, there was a way to do it in premiere too.

Depending on what they are trying to do, it is quite likely that the Motion effect in Premiere can handle this.  After Effects is certainly much more powerful, but basic keyframing and position effects are perfectly doable (if more of a pain) in Premiere directly.

Also worth mentioning that you can export from premiere timelines. Select the clips and right-click and choose replace with after effects composition and they'll be turned into an AE comp. There you can use expressions to do exactly what you want to do.

Depending on what exactly you are trying to accomplish you actually could do this by making images of the portions you want to animate and using the Motion effect on the various layers, however it will be pretty tedious to do.
As Martin Andrews mentioned, After Effects is much better equipped for handling this kind of thing, but depending on your specific goals for the animation, it is likely possible in Premiere.


text:
Why does FFMPeg sit at 00:00:00.00 if I start cutting a video a long ways into the file?
I'm cutting audio out of files, and I'm running into an issue. When I run FFMPeg with this command

FFMPEG.exe -i in.webm -q:a 0 -map a -ss hh:mm:ss -to hh:mm:ss -y out.mp3

If the -ss parameter is rather large (lets say 00:30:00), it takes a long time before it even starts cutting -- It just sits on the below statement for a long time before finally starting.

size=       0kB time=00:00:00.00 bitrate=N/A

Does anyone know why it would do this and how I could fix it?

-ss after the input name performs a slow seek where ffmpeg decodes all frames but discards till it reaches the seek point.
With -ss before -i, ffmpeg performs a fast seek.
FFMPEG.exe -ss hh:mm:ss -i in.webm -q:a 0 -map a -t hh:mm:ss -y out.mp3

But you'll have to specify a duration instead of to with most formats.

I only use FFMPEG every few years, but it always amazes me how much it is the embodiment of the power/complexity trade-off.


text:
Import Sony FS5 MXF into CS5.5?
Long story short, I've been given some footage from a Sony FS5 which is in MXF. Like anything Sony working with this stuff is a nightmare. Nothing I've tried can open these files. People keep saying to just use Content Browser in PPro to import but even with file structure straight off the card I get a "generic error".
Sony's own Raw Viewer doesn't work either, it detects the MXF files but won't play any of them much less transcode. They have a RAW plugin on their site but it's only for CS6 and up.
Can anyone help please??

The RAW viewer may not be working as it doesn't appear that the FS5 does RAW internally.  It supports RAW export via SDI to an external recorder, but only with a paid software upgrade.  Internally, it will be some other format in the MXF wrapper.  If you can specify what format you were recording in within the MXF container, then it might help with more direct suggestions for fixes, though I suspect Resolve (mentioned in my answer below) will probably open whatever it is.

You've hit the very unfortunate planned obsolescence issue.  Adobe only updates their software for a limited amount of time, so when working in RAW formats, you eventually hit a point where the old software simply will not work with the footage from new cameras anymore.
Your options are unfortunately a bit limited.  You can either update to a newer version of your editing software or use a different software for transcoding.  I'm not particularly familiar with Sony's workflow as I use an Ursa Mini (which uses CinemaDNG), but I'd suspect there to be at least a few options available for ingesting and transcoding MXF as Sony is a significant enough player in the space.
Looking at the documentation for Black Magic's DaVinci Resolve, it looks like you might be able to use that.  I can see from their documentation that MXF is a container format, so it's going to largely depend on what the video format within the MXF is, but DaVinci Resolve has a pretty long list of supported MXF codecs.  If it does support it, Resolve has a free version that could likely be used to do your transcode for you.  In the beta of Resolve 14, you can simply add the files to a project, go to Media Management (under the File menu) and it will let you transcode all videos in the project to another format of your choice.


text:
Moving image from left to right stutters
I am using Adobe After Effect and created a simple transition that moves an image from left to right, simply by using 2 keyframes for the position attribute of the image.

The problem is that the movement does not look smooth. The image looks very noisy and the movement stutters. You can find an example here

My composition uses 29,97 frames per second. I tried to increase it to 40, but it did not change anything. I rendered the movie in avi and quicktime but for both outputs the transition of the image stutters. I also used MovieMaker to save compress it as a very small video file, but it still stutters.
What am I doing wrong and how can I fix it?

Based on my observation it has nothing to do with Render Settings
Your video has a total of 270 frames (9 seconds x 30 FPS).
You photo moves for 1920 pixels (based on the video).
So the speed is 7 pixels per 1 frame (1920/270=7.1) which is very high and movement wont be smooth. and that's what causes the stutter.
Solution:

Increase Frame rate to 60. then the photo will move 3.5 pixels per 1 frame.
keep frame rate as it is and move the photo for half the distance only.

It seems smooth to me.  I can see some of the resolution loss you are talking about, but I think that is probably due to multiple encoding passes and using too low of bandwidth levels rather than too high.  I unfortunately don't have a large screen available at the moment to check it at full resolution.
The video in question has many small images, which is typically bad for compression as the image doesn't have large areas that can be easily described, but it also has extremely regular motion, which is good for compression as the change between frames can be described clearly.
Using multiple compressions, particularly with any low bandwidth compressions, is likely to lose the motion accuracy and result in drastically reduced compression quality.  Effectively, what happens is that the first encoding, if it handles motion well, will do a good job, but still produce some noise.  The second pass, however, will not see it as purely fixed motion, but will instead see the noise as well and try to encode that information.  That then causes the second encoding to have to spend more data on encoding the random noise and thus ends up spending less data on the hard to describe sea of faces.
Another possible issue that could be going on is drift between keyframes.  That may explain the stutter you are seeing.  One of the ways that modern compression achieves such good compression levels is that it doesn't always describe the full image.  A limited number of frames describe the complete frame.  The rest either describe themselves in relation to the image before them or in relation to the image before and after them.  The keyframe interval is the length of time between full frames being used and defines the length of a "group of pictures", which is all the frames dependent on a particular keyframe.
With very regular motion, if the compression isn't completely accurate in it's motion adjustments, it's possible that the image has to jump an extra couple pixels to get synced back up with the keyframe when it reaches the next one.  You could try reducing the keyframe interval to see if that reduced the amount of jump occurring (lower keyframe intervals is generally a good idea on high motion clips.)
Certainly I would stop trying to improve it with a Movie Maker pass or using non-standard framerates.  Both of these are counter productive as the extra encoding will just further degrade quality since you already have your initial compression and the transcode pass that YouTube does.  Using a non-standard framerate will just result in YouTube trying to do a pulldown (change the framerate) to get it to a standard framerate and will introduce other motion issues related to frame timings not being perfect.


text:
Is there a way to add text captions/subtitles to my videos on MacOS? (burn in)
I'm looking for a way to burn captions into videos without using Adobe Premiere (too expensive).
Any tips?

Video Caption Maker is free (with watermark). Otherwise you can hack together title screens and png's in iMovie which takes a bit of work.


text:
Echo duration of video in seconds without decimals
If I use ffprobe to output the duration of a video file with:
ffprobe -i input.mkv -show_entries format=duration -v quiet -of csv="p=0"

I will get something like
3658.342000

How can I get the output in second only without the decimals? I do not mind if ffmpeg or Mediainfo has a better function for this. I just need to get the output in seconds.
I am using CMD in Win10.

I am unaware of an option within ffprobe to do what you want, but you can truncate or round the duration value using your preferred shell or scripting language.

With cmd you have to write your own rounding function. https://stackoverflow.com/questions/23116014/batch-rounding-a-number Have you considered using Powershell? Then it's just [math]::round(x). Note that you'll have to extract the number from ffprobe's output somehow.

[math]::round((ffprobe 'input.mkv' -show_entries format=duration -v quiet -of csv="p=0")) works in powershell. Note the double brackets.

Ended up using a batch file to export the timings to a text file and then turncate the value as a set variable.
ffprobe -i {filepath$} -show_entries format=duration -v quiet -of csv="p=0" >> duration.txt
setlocal enabledelayedexpansion
for /f "tokens=1,2,3,8 delims=\ " %%a in (duration.txt) do (
  for /f "tokens=1 delims=." %%i in ("%%a") do set _stime=%%i
)

You've gotta try powershell some time. You won't regret it.


text:
set scale in pixels in After Effects using Expressions
You can right click on a scale, hit Edit, and then enter scale in Pixels, inches , % of Comp, of source....
I would like to set the scale in pixels. How can set the units using expressions?
I tried returning ["200px","200px"], but that is an error.

The size in pixels is easily computed as the source's original dimensions multiplied by the scale. Or in other words
p = d × s

where p=pixel dimensions required, d=source dimensions, s=scale.
So to set the scale so that it takes a given source and makes it conform to a desired dimensions:
s = p / d

In an expression on the scale property you'd use
var p = [123, 456]; / desired output dimension
[ p[0] / width, p[1] / height ] * 100; // the *100 is because scale is a percentage

To be really fancy you could repurpose the scale value input so that it controlled the pixel dimensions. This means if you want the layer's dimension to be [123,456] you'd just dial it in in the scale control:
var d = value; //returns the pre-expression value of the property
[ p[0] / width, p[1] / height ] * 100


text:
Are ffmpeg prores files reliable enough to be used in production/broadcast environment?
Recently I'm transcoding a lot of material that I wish to use in broadcast and production environment where they use all sort of macs and apple software.
I'm not very fan of apple computers and I already own various pc to carry out normal jobs.
What I wonder about is.. is ffmpeg or ffmbc or libav good in producing prores? I mean good enough (producing high compatible files) to make me not in the need of use an apple only for produce pro res files for my customers ?
What documented glitch, issues or problems people who use my ffmpeg prores on final cut or other apple softwares can experience ?

I've had no problems producing prores 422 HQ .mov files with ffmpeg on my Windows machine for Mac-encumbered clients, including delivery to TV Networks for broadcast. I have had some problems with prores 4444 but only when the files have alpha channels, however that bug seems to have been fixed recently.
I don't know if anyone has done any head to head tests with the results you get out of ffmpeg vs a native apple app or something like adobe media encoder. That would certainly be worth doing.

Thanks for your contribution, I will definitively start using it into my workflow. Just for the info, which software do you use in conjunction of ffmpeg? Premiere, After Effects ?

Mostly my production chain involves Resolve, then Premiere + AE then ffmpeg for delivery.

I Agree.Both ProRes and DNxHD are ideal for both post-production and final delivery of TV shows and commercials.

If you're looking for cross-platforms alternatives to ProRes for intermediate codecs it's also worth considering Cineform. It supports high bit depths and can support alpha channels, is similar in quality, and is gaining increasing adoption in professional workflows.


text:
Swapping videos on YouTube
I have some videos on YouTube with a series of views that I do not want to miss but that are not in the quality I want. I am improving some videos with the intention of changing some already existing in the site.
The question is: Can I change these videos without losing my views?

No, you can't. You can use the built-in features of the platform such as adding cards or applying 'Enhancements' (Youtube's terminology, not mine), but there's no way to replace the video itself. From the official documentation:

You can’t replace a video because any new video you upload to YouTube
  will get a new URL. Instead, you can make changes to an existing
  video:

Enhance your video: You can make some editorial changes to the video using YouTube Video Enhancements. You can trim parts of your
  video, auto-fix lighting and color, blur parts of the video, apply a
  filter, and more.
Add cards to your video: You can use cards to change elements of your videos. You can point viewers to a specific URL (from a list of
  eligible sites) and show customized images, titles, and calls to
  action, depending on the card type.
Change your video's title and description: You can organize and make changes to your video's title, category, description, and privacy
  settings.

If video replacement is a feature you deem necessary for whatever content you are producing, you might consider switching to a hosting platform that allows you to do this. For example, replacing the original video file while keeping views, comments et c. intact is possible on Vimeo (documentation, as of August 2017).

I already imagined that it would not be possible. But the idea of Vimeo is feasible.

The part of the question "not the quality you want" is open as to what would constitute a 'repair'. I believe that YouTube's Editor allows you to add new Music, crop the ends of the Video, apply Filters (gimmicky coloring) or Stabilize the Video AND save the new copy over the old one, thus preserving the views. I'd test it with a short "Private" upload to determine if it has the ability still, or if they've changed the Editor.


text:
Replacing/changing video background
How could I replace the background of a video such as the one in the picture

to a bright white? I have iMovie, is it of any use here?

Quickest way will be to reshoot it.

That's a tricky one since the background color is the same as the shirt shes wearing. This can be achieved Manually by masking your subject frame by frame, if there is no much movement and duration is little then this shouldn't be a problem, although you might have some difficulty with the hair.
Note: masking should not be very accurate in this case, make a fast one then feather it and increase the brightness of the layer behind "background" until it becomes bright white and see if you like the result.

That said, if all the OP has is iMovie, good luck to him.  This is super time consuming under the best of circumstances, I'm not sure if iMovie even has the facilities to deal with this slowly.


text:
ffmpeg -to option acting like -t option?
The following command is producing a video of the exact length of the -to parameter:
ffmpeg -ss 00:06:26 -i fftestinput.mp4 -to 00:06:38 -r 29.97 fftestoutput.mp4

Again, the final product is a very nice video of length 6:38.

Yes, it does. -to looks at the timestamps. And input ss resets them to zero from the seek point. Either use -ss as output option (after -i) or calculate and use duration -t. The former will slow operation, as it performs a slow seek (decode and discard till inpoint).

Thank you, Mulvya.  That now makes sense.  I should have my code calculate the duration and do it that way.


text:
ffmpeg: how to add several subtitle streams
I tried to add 2 .srt subtitles to a video, but the resulting file has only the first subtitle. This is the command I used:
ffmpeg -i $movie.mov -i $sub_en.srt -i $sub_de.srt \
-c:v copy -c:a copy \
-c:s:0 srt -metadata:s:s:0 language=eng \
-c:s:1 srt -metadata:s:s:1 language=ger \
$output.mkv

The full output below also shows it only encodes 1 subtitle (I replaced the long file names with the variables used above for clarity):
ffmpeg version 3.3.2-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.1 (Debian 5.4.1-11) 20170519
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '$movie.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2017-08-23T15:33:19.000000Z
  Duration: 00:56:34.92, start: 0.000000, bitrate: 20807 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 20546 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2017-08-23T15:33:20.000000Z
      handler_name    : Core Media Data Handler
      encoder         : H.264
      timecode        : 01:00:00:00
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 255 kb/s (default)
    Metadata:
      creation_time   : 2017-08-23T15:33:20.000000Z
      handler_name    : Core Media Data Handler
    Stream #0:2(und): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      creation_time   : 2017-08-23T15:33:20.000000Z
      handler_name    : Core Media Data Handler
      timecode        : 01:00:00:00
Input #1, srt, from '$sub_en.srt':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: subrip
Input #2, srt, from '$sub_de.srt':
  Duration: N/A, bitrate: N/A
    Stream #2:0: Subtitle: subrip
Output #0, matroska, to '$output.mkv':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    encoder         : Lavf57.71.100
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 20546 kb/s, 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2017-08-23T15:33:20.000000Z
      timecode        : 01:00:00:00
      handler_name    : Core Media Data Handler
      encoder         : H.264
    Stream #0:1(ger): Audio: aac (LC) ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, fltp, 255 kb/s (default)
    Metadata:
      creation_time   : 2017-08-23T15:33:20.000000Z
      handler_name    : Core Media Data Handler
    Stream #0:2: Subtitle: subrip (srt)
    Metadata:
      encoder         : Lavc57.89.100 srt
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (subrip (srt) -> subrip (srt))
Press [q] to stop, [?] for help
frame=20372 fps=236 q=-1.0 Lsize= 2091417kB time=00:13:35.78 bitrate=21001.7kbits/s speed=9.45x
video:2065455kB audio:25494kB subtitle:8kB other streams:0kB global headers:0kB muxing overhead: 0.022014%
Exiting normally, received signal 2.

I know that in this particular case I can use mkvmerge, but it wouldn't work for .mp4 mov_text (.ttxt) subtitles, and anyway I would like to understand what is wrong with my ffmpeg command.

Whenever's there's multiple inputs fed to ffmpeg, and you need one more than video/audio/subtitle stream sent to the output, -map statements are needed.
ffmpeg -i $movie.mov -i $sub_en.srt -i $sub_de.srt \
-map 0:v -map 0:a -map 1 -map 2 \
-c:v copy -c:a copy -c:s srt \
-metadata:s:s:0 language=eng -metadata:s:s:1 language=ger \
$output.mkv

Since the subtitles are SRT, you can just do -c:s copy.

If I need to add 20 languages subtitles to all my videos, I'll have to -map number 20 times. Do you have another solution ?


text:
Final Cut Pro Picture in Picture template
I want to try and create a video with one main camera angle that will be used throughout, but on occasions I want to bring up a second camera angle or picture inside the first.
This is all fairly easy to achieve in itself, but I want to make sure that, assuming the dimensions are the same for the secondary picture/video, that it's always in the same place on the screen.  Is there a way to implement a template/anchor point that I can just put these extra pictures/videos into whenever I want?

if you have Apple Motion you could make a template which would be easy enough and just drop it on when you need it in the video and then drop the additional image onto the motion template.
OR
(I am going to assume you know how to place 2 layers of video (top one being the PiP one))
the first time you want your PiP get it placed where you want it with all the sizing, placement etc. Then when you want to do it again in the next section just copy and paste the attributes from the first one onto the second one and it should place it in exactly the same place.

ooo nice how do you copy and paste attributes!?  I havent got apple motion but will look into that too, cheers.

After you have made all your changes to the clip, select the clip and copy (cmd key + C). Move to the clip you want to paste them to and select it then clip edit > paste attributes ( shift+cmd key+V ). This should make the clip the same as the other one.

ah cool I'll try that then, cheers! :)


text:
mp4 file expands wildly when shortening clip
noob here,
I took a video of myself for a wedding greeting with my phone (LG Nexus 5 [Android]) sitting (the phone that is) in a windshield suction holder.
The video is 3'42" long and when downloaded to my PC from Google Photos it was 55 MB, more or less as expected.
I then wanted to edit out the beginning and end of the clip where I stand up from my chair to start at stop the video shooting.
At first I downloaded Lightworks, cut out the beginning and end and exported the sequence (for YouTube 720. My only other option not having the pro version was for Vimeo). The new file being 5% shorter took up 181 MB.
OK, so clearly there is some format/compression thing going on that I'm trying to avoid going too deep into.
Instead I found out I could just cut the beginning and on my phone hoping to preserve the native  formatting/compression. The editing tools there were rather coarse but it did the job. It then took forever to save the edited video. The new shortened video (still 5% shrunken) takes up 905 MB of space.
My question is. Is there a simple (and free) way to simply cut down the length of a video clip while preserving the formatting and compression so that the file will just shrink in size proportionally to the shrinkage of duration?
Looking forward to you advice.
Thanks
Simon

Not sure what's happening, but, when you export your edited film, keep an eye on the data rate. That's really how you keep files small. The lower the data rate is, the lesser the quality of the video image though.
So, when you export:

For a 720p final file, make sure your data rate is no smaller than 5
Mbps.
For a 1080p final file, make sure your data rate is no smaller than
10 Mbps.
Codec: H264.
Field order: progressive usually (depending on your raw footage).
Aspect: square pixel usually (depending on your raw footage).
Audio: AAC, 4100Hz, Maximum Bitrate.

Note: I'm not familiar with Lightworks' settings, so some of the options mentioned above might not be available to you when you set up your export.
Let us know if this keeps your file small.


text:
PCIe video capture card
Is it better to go with a video capture card with h.264 encoding or just a raw input port? I have powerful pc but not sure best card to use for high quality image, reliability, and ease of install.

Hardware encoders used for best performance, not quality. So, if you don't need realtime, I suggest to use software encoder with many options.


text:
How do I transition objects individually?
How do I do this? the way the objects appear is just so cool
Video:

Use a 3d animation package and animate the surface textures of the objects. That's how I've done similar effects, and I'd be willing to bet that's how the makers of that clip did it, even though it doesn't look like 3D animation.
You can use Non-Photo-Real (or NPR) rendering to get the anime look. "Toon shading" is what it used to be called, haven't kept up with the current nomenclature, but if you search for "toon shade blender" you should get enough to get you started. Blender is a free 3D animation package.

Finally, thanks a lot man, I had always been wondering about the cool scenes where the camera started moving in 3d. I just assumed that japanese drew those scenes frame by frame because they're always known for their hardworking attitude. Anyway thanks a lot these cleared up a lot of things.

There's a lot more 3D animation in anime than you'd expect. It's still hard work, but it's a lot quicker which = cheaper.

has there been cases where the anime character is 3d.

I can think of 2 ways:

Film all the objects separately with green screens. Apply a keyer to each one to key out the green areas, place them all on the timeline, and fade each one in as you see fit.
Film them all together, and then manually mask out each object by hand. If the objects are basic shapes it might not be too hard, but if it includes people moving, etc., it could be tough. Then fade the masks out as you see fit.

how about the colorful...y'know colorful "lines or shapes"

I would use a motion graphics application like Apple Motion or Adobe After Effects to make those. You generally put the playhead where you want them to start, draw them, and then set the out point just like with an editor. You could also import drawings from Adobe Illustrator or Photoshop.


text:
Convert MXF files into CBR TS
I am trying to convert couple of rather large MXF files into TS files preserving the video and audio encoding. The output TS has to be CBR Mpeg-2 TS file, which I know is not possible with ffmpeg. Any idea for another preferably Linux command line tool which could handle this task? Windows is also an option, but I want to convert couple of files on a server, so that is why it would be better if it is Linux based.

FFmpeg can produce CBR TS. What command did you try?

@mulvya ffmpeg -i input.mxf -copyts -c copy -muxrate 30M -f mpegts output.ts I only want to add the stuffing. I have also tried to transcode the video with the command: ffmpeg -i input.mxf -vcodec libx264 -b:v 20M -minrate:v 20M -maxrate:v 20M -bufsize:v 14M -acodec mp2 -ac 2 -b:a 192k -f mpegts output.ts. So I want the output to be completely flat. This could be done by setting the muxrate to a much higher value or by achieving completely CBR video bitrate. The ffmpeg version is 3.2.4.

If transcoding using x264, add -x264opts nal-hrd=cbr and also muxrate. Provide a value about 10-12% above video+audio, or more precisely, sum of stream bitrates.

@Mulvya, it works, even though the size of the stuffing is quite big the output file is indeed CBR. I have noticed that after a certain size of the video bitrate the output starts to look not so uniform, but this option should be fine for anything up to 250-300Mbps video bitrate. Do you happen to know the same command but this time for HEVC? Or just how to re-wrap the container from mxf to ts and setting the bitrate of the TS?

For x265 x265-params strict-cbr=1:vbv-bufsize=<x>:vbv=maxrate=<bitrate> + muxrate

@Mulvya, unfortunately the command line you send me is returning an error. I have used the following command line:
ffmpeg -i HD_Plus_Fussball25_FINISH_v06_R128_.mxf -c:v libx265 -x265-params strict-cbr=1:vbv-bufsize=25000:vbv-maxrate=25000 -muxrate 30000 -c:a copy -f mpegts test.ts and this is the error: x265 [error]: Strict-cbr cannot be applied without specifying target bitrate or vbv bufsize

Yes, you need to keep the bitrate  -b:v

@Mulvya, yes, you are right, I have forgotten to add the video bitrate option ffmpeg -i input.mxf -c:v libx265 -x265-params strict-cbr=1:vbv-bufsize=25000:vbv-maxrate=25000:muxrate=30000:bitrate=25000 -c:a copy -f mpegts output.ts The problem here is that the output TS file doesn't have any stuffing bits, which is creating a lot of CRC repetition errors on the VPID and the output is far from CBR, the bitrate is fluctuating between 18 and 30 Mbps. For comparison the command in x264 actually created a CBR TS mux and inside the MUX the stuffing bitrate was fluctuating but very little.

Okay thanks to @Mulvya I have found a solution how I can create CBR MPEG-2 TS with stuffing and constant constant bitrate and inside of it VBR VPID. The command for H.264 is:
$ ffmpeg -i <input> \
-c:v libx264 -x264opts nal-hrd=cbr \
-b:v 30M -minrate:v 30M -maxrate:v 30M -muxrate 35M -bufsize:v 25M \
-c:a aac -ac 2 -b:a 128k \
-f mpegts <output.ts>

This will create 35Mbps CBR TS and inside the TS the bitrate of the VPID will fluctuate a bit around 30Mbps, and also the bitrate of PID 8191 (null PIDs).
The command for doing the same but with HEVC is the following:
ffmpeg -i <input> \
-c:v libx265 -b:v 25M -muxrate 30M \
-x265-params strict-cbr=1:vbv-bufsize=25000:vbv-maxrate=25000 \
-c:a aac -ac 2 -b:a 128k \
-f mpegts <output.ts>

Here the TS will be with 30Mbps bitrate and the VPID will be around 25Mbps, this command will create also stuffing (null PIDs) around 5Mbps. Please also note that the bitrate after -x265-params should be in Kbps.


text:
How to scroll using a trackpad in After Effects?
I'm working on an animation project and I want to zoom in on certain places in the canvas to see better (I don't want to actually zoom in the animation itself" but I can only zoom in and out without scrolling
How can I scroll with my trackpad?

Hold down the alt (option) key on the keyboard, and do a two-finger zoom in the trackpad (make sure you've enabled two-finger zoom in system settings).


text:
How to set ffmpeg encoding framerate?
in short: I set -r 25 , but I see in the converting process that it's fps=18. Why?
I am trying to convert a video to H.264 format using ffmpeg, and I am trying to set the framerate(out framerate) to 25. I am willing to accept more than 25 if possible but not below.
so I use this command:
ffmpeg -i Millionaire.mp4 -y -c:v libx264 -r 25 file.h264

But I see that in the convertion process in the cmd that: fps=18
Now I understand that fps means "frames per second".
And right after I hit the enter key, it starts as fps=25 but then it drops by 1 every few seconds until it reaches 18.
The input file is 1.61 GB
ffmpeg version:
ffmpeg-20170130-cba4f0e-win64-static.zip    47340467    30-Jan-2017 06:02
from the website:  https://ffmpeg.zeranoe.com/builds/win64/static/
System information:
i7-4702MQ CPU 2.20 GHZ
RAM = 8 GB
Windows 10 x64
Anybody knows why it doesn't stay on fps=25? And how can I force it to not drop below 25 fps?
Thank you

That's processing speed i.e. ffmpeg is encoding 18 frames per second, not the output file's framerate. You can set -preset fast to speed it up but again this has nothing to do with output file's framerate.