text:
Add transparent background to ffmpeg with text over it
How to correctly add expression to transparent background like on this question ffmpeg drawtext filter - create transparent background with text
for my case (where there are 3 lines in bottom right corner):
ffmpeg -i videoin.mp4 -vf "[in]drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline1':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-130, drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline2':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-75, drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline3':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-20[out]" -codec:a copy videoout.mp4

Use the box options i.e.
drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline1':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-130:box=1:boxborderw=12:boxcolor=black@0.45

This adds a box with padding of 12 pixels around the text boundary, and the color is black with 45% opacity.
Using drawbox (add it before the drawtexts)
drawbox=y=ih-140:h=110:c=black@0.45:t=max:enable='between(t,2.5,6.5)'

Here's the entire vf expression:
-vf "drawbox=y=ih-140:h=110:c=black@0.45:t=max:enable='between(t,2.5,6.5)',drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline1':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-130, drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline2':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-75, drawtext=enable='between(t,2.5,6.5)':fontsize=50:fontcolor=White:fontfile='ariblk.ttf':text='textline3':x=min(4*(tw\+10)-(abs(4-2*(t-2.5)))*(tw+10)-tw\,10):y=h-th-20" -codec:a copy videoout.mp4

Thx Mulvya, but i was thinking about drawbox so the background can be in full width. With 3 lines that have different number of letters it looks ugly this way. I am using y=h-th-130 up to y=h-th-20 for those 3 lines, so the background should be from around 140 to 10, but in full width, as i might add more text or image over it in right corner later. And from the link in question it looks perfect (not the position but background).

Thx Mulvya !. I am getting error "Unable to parse graph description substring. Might be that i am not separating text and box expressions correctly. Starting like this ffmpeg -i videoin.mp4 -vf drawbox=y=ih-140:h=110:c=black@0.45:t=max:enable='between(t,2.5,6.5)': "[in]drawtext=enable='between(t,2.5,6.5)'....etc...


text:
ffmpeg audio to visualisation
I would like to "convert" audio to video visualisation (oscilloscope or waveform) sort of like some media players have.
I read this thread on how to do so with ffmpeg: How do I turn audio into video (that is, show the waveforms in a video)?
I have never used ffmpeg before and having read the previous thread I am still very confused with how to do it. As far as I know, ffmpeg does not have a GUI, so its a bit hard to understand.
I tried the following code:
ffmpeg -i audio.mp3 -filter_complex "[0:a]avectorscope=s=1080x1080,format=yuv420p[vid]" -map "[vid]" -map 0:a -codec:v libx264 -crf 18 -preset fast -codec:a aac -strict -2 -b:a 192k output.mp4

But the result i get is just a vertical line (the avectorscope does not spread out).

I have made sure that the audio is in stereo and has a high amplitude. I guess there is something I am missing in the code...
Also I would really like to know how I can change the background color from black to something custom.

Have you used a shell or, on Windows, the command line?

Can you provide your input file?

Not really because the content is private. It is a stereo MP3 file at 320kbps in 44.1 Hz

Related: https://superuser.com/questions/843774/create-a-video-file-from-an-audio-file-and-add-visualizations-from-audio

The following command shows a video with a waveform of the corresponding audio:
ffmpeg -i input.mp4 -filter_complex "[0:a]showwaves=s=1280x720,format=yuv420p[vid]" -map "[vid]" -map 0:a -codec:v libx264 -crf 18 -preset fast -codec:a aac -strict -2 -b:a 192k output.mp4

I replaced avectorscope with showwaves: avectorscope is for showing the difference between stereo pairs.
Try showcqt,showfreqs,showspectrum for other visualization effects.

Thanks a lot. Do you know any way to change the background from black to a custom color?

@Arete For what effect, specifically? Some, or at least showfreqs, already have alpha and you just need to overlay it over a color source. Otherwise you could try format filter and colorkey or chromakey filters.

source: Stack Exchange

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

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

sort: votes


text:
convert horizontal side by side to vertically stacked 3D video
I have seen this and this post explaining how to crop and stack videos using ffmpeg.
My question is - is there an easy (preferably one step) way to turn a horizontally stacked video into a vertically stacked one?
And is there a Linux-way to re-encode given 3D video formats into others?
Edit:
with Mulvyas help I wrote a script which does the converting stuff and creates a text file with meta information needed by the Gear VR video player.
Note: you need a recent version of ffmpeg for the vstack filter - version 2.6 which is installed with Fedora 22 is too old. Version 2.8.3 has vstack available.

Just integrate all filtering into one command:
ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

Edit: this command below scales and pads the output to 2000x2000
ffmpeg -i input.mp4 \
-filter_complex "[0:v]crop=in_w/2:in_h:0:0 [top]; \
[0:v]crop=in_w/2:in_h:in_w/2:0[bottom]; \
[top][bottom]vstack,\
scale=iw*min(2000/iw\,2000/ih):ih*min(2000/iw\,2000/ih), \
pad=2000:2000:(ow-iw)/2:(oh-ih)/2[outv]" \
-map "[outv]" -map 0:a -c:a copy output_3dv.mp4

I have a source video named input.mp4 which I first turn into left.mp4 and right.mp4. If I understand your command assumes these files to exist in the first place.

modified for single input

can you scale and pad the output at the same time, too?

sure. what do you want done?

I'd want to pad the output to be squared (same width as height). Currently I'm running -vf "pad=width=in_h:height=in_h:x=in_w/2:y=0:color=black" on the output. And additionally I'd like to have a fixed width (and height) of e.g. 2000 pixel

Did you also want to scale the video?

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


text:
Is it worth exporting at the exact 29.97 FPS from Photoshop or just use 30 FPS?
My live action footage is Frame Rate 29.97 FPS. When exporting frame by frame animation from Photoshop that I intend to composite on top of the live footage. Since I have the ability in Photoshop to specify should I enter 30 FPS or the exact 29.97 FPS?
You can see Jumper and ISO BG.mov is 30 fps

I read this question:
What is the proper workflow for slightly different framerates, i.e. 30, 29.97, 29.976?
But it has conflicting answers and neither one has many upvotes or marked correct. Will there be any difference if I export it with the precise 29.97 and 30 or does it make no difference?

What is your target? There is no "one right rate", only what you need it to be. If the majority of your inputs are 29.97, then sticking with that as the project rate, and for PS export, makes sense.

@JimMack Not sure what you mean by target?

The frame rate of the final output i.e. edited movie

29.97 is the NTSC compromise for 30 fps.  23.976 is the NTSC compromise for 24 fps.  29.976 is a framerate that results from confusing these two numbers into a single bit of nonsense.
The bottom line is that if you have a mix of 29.97fps and 30fps, then every 1000 frames (about every 33 seconds) there's going to be a glitch.  Either you have to double up a frame of the 29.97fps stream to keep up with the 30fps stream, or you have to skip a frame of the 30fps stream so as not to overrun the 29.97fps stream.
If you never have to composite 1000 differently-timed frames in a row, then you can fudge the two as being equal.  But unless you can read the source code of your video editor, you don't really know at what point the program is going to try to "correct" the glitch.  It might be uppity and try to do it half-way through the 1000 sequence to minimize the average divergence, rather than waiting until the divergence is indisputable.  In that case, best to output your generated frames to match the frame rate of the rest of your content.

None of those decimals are exact.  The real values are 30/1.001 and 24/1.001.  (or with integer ratios, 30000/1001).  They're good enough for almost everything, though: 29.97 is extremely close to 29.97002997  (with infinite repeating blocks of ...002997), and 23.976 is also very close to 23.976023976

Where does the 1001 divisor come from?


text:
GoPro Footage with Adobe Premiere is stuttering
Okay.
I searched many internet sites but i can't handle this problem.
My PC:

6 GB RAM
4* 2.4 GHz CPU
1 GB Radeon GPU
SSD for System and Program
HDD for Video footage
Software: Adobe Premiere Pro CS6 with TotalCode Package.

Video footage:

Captured with GoPro
1920*1080
29,97 fps
MP4 Format
data-rate 35140 kBit/s
Clip 28s, 123 MB.

When i open this Clip within Adobe Premiere, create a sequence from the clip and try the preview the first 2 sec will play smooth and after that the video is jumping and stuttering or after running 2 sec the preview freezes. No effects applied. (CPU Usage ~50%, all cores)
So my Sequence settings are: Rovi TotalCode AVC-Intra 100, 1920*1080 30 fps Non-Drop-Frame-Timecode. No matter if i choose the TotalCode renderer or the Mecury Renderer. Video preview is set to AVC Intra-Class 100 1080 24p (or 30p or 60i - no difference).
Video preview format makes no difference between full, 1/2 or 1/4.
I think because i created the sequence from the clip, there is no red/yellow/gren bar over the clip in the cutting window.
I get better results if i create a 720p sequence (for example: For editing 1280x720 AVCHD type video. Widescreen NTSC video (16:9 progressive). 29.97 fps 48kHz (16 bit) audio.). When i insert a clip and preview it the video stutters and jumps. But now i have the yellow bar. If i render the whole working area the preview plays smooth.
Okay - now i would say: its my fault, my PC has not enough power.
BUT:
if i convert the MP4 via GoPro Studio to avi (Medium resolution) with the same specs (1920*1080*29,97) i got a 520 MB file (so roughly 4x the size of the original video).
When i use this clip instead of the MP4 the preview will play smooth (or nearly smooth) (CPU usage ~50%, all cores).
So Adobe Premiere has a problem with a data-rate of 35140 kBit/s but not with 151182 kBit/s on my PC? Hard to understand that this should be a performance issue...
I also tried to copy the clip to my SSD and start playing it, but nothing happens. Also tried to safe my project files on my SSD, not working.
I also tried to change the optimize rendern setting between Memory and Performance - nothing changed.
I saw this question:
Adobe premiere is lagging in preview window -> Because of the mentioned AVI i don't think it has something to do with the data size.
Editing 1440p @ 47 FPS in Premiere Pro CS6 -> Much higher data-rate and video quality.
Adobe Premiere preview video lagging -> also talks about data rate (think this doesn't apply because of described avi/mp4 behavior)
Does anyone have some more ideas? Of course i could just convert 20 GB from mp4 to avi, but i'd like to safe this additional space on my hdd.

Try zooming out or letting premiere render in and out any affects in the sequence

The reason Premiere runs just fine with a massive file but struggles with a smaller file is the issue of data compression. Many people (logically) believe that the two tradeoffs between high and low compression codecs is information vs. space, and that codecs with more information will take more processing power to process. This is actually not the case. While more compression will cause a loss of visual information, it also makes the data more difficult to process because the CPU (or the GPU in the case of accelerated hardware) has to decompress the codec information before it can be displayed. This means that codecs like h.264 and VP9 are more difficult to process than DNxHR and Prores.
If you can give more information about your CPU and GPU, I can adjust this to be more useful to you. The main issue I see in your specs is a mediocre CPU and GPU. The all-intra bit encoding (all-intra isn't technically a codec, just a means of storing data within h.264) uses single-frame compression. This helps retain more information and improves scrubbing performance within a video editor, but it makes playback more difficult than a normal h.264 encoding. While I'm no expert on the subject, I imagine that any hardware h.264 acceleration your computer has may not be able to process all-intra.
My personal recommendation would be to upgrade your GPU to something like a GTX 950 or a GTX 960, or simply convert your files to a visually lossless format such as DNxHR before you begin editing.


text:
What is Pivot in Color Grading?
Most of the controls I at least have a basic understanding of from Photography and other design applications (Affinity Photo / Photoshop / Lightroom etc). But not Pivot.
In the SpeedGrade Manual the word Pivot doesn't exist at all. Pretty big omission but I'm resourceful and know other applications exist. So even though I don't use it I pulled up DaVinci Resolve's guide which states

Pivot:
Changes the center of tonality about which dark and bright parts of the image are
stretched or narrowed during a contrast adjustment. Darker images may require a lower
Pivot value to avoid crushing the shadows too much when stretching image contrast, while
lighter images may benefit from a higher Pivot value to increase shadow density adequately.

Perfect cause this actually sounds like exactly what I need. Except when I use it there's absolutely no change in my video and I've got no idea why:
Here's the original:

Here's the footage with the pivot greatly pushed up, yet no change:

I don't know if I'm not understanding the Pivot or what. I'm not seeing any difference though.

As you know, the contrast function darkens dark colors further and lightens light colors further. Software without a pivot parameter assume that the point where darkening becomes lightening is exactly in the middle, at 0.5 (for a color range of 0 to 1). Those with a pivot parameter allow to move the pivot point up or down. Shifting the pivot slightly down (e.g. from 0.5 to 0.4) results in dark-medium colors (let's say 0.45) not anymore being darkened, but lightened.
In your image, the effect is not that visible because most of the colors are already very bright, very dark, or just in the middle.
If you want to lift or lower your midtone details, I would suggest that you use a gamma or midtone control instead.


text:
GoPro footage: premiere playback performance versus system media player
I am trying to edit 2.7k 60fps footage (shot with my GoPro Hero 4 Black) using Adobe Premiere Pro CS6. But even when I try to play a clip in the source viewer (i.e. before even putting a clip onto the timeline), I get a very laggy experience that feels like 2 frames per second. If I play the same footage in my OS's native media player (e.g. Windows Media Player or Quicktime) I get smooth playback without any visible frame drops. I have tried converting the H.264 compressed footage to Cineform digital intermediate, but this does little to resolve the problem.
I am aware that editing high resolution video is demanding (see, e.g., Adobe Premiere Pro CC editing/playback performance), but my question is specifically why does playing back raw, unedited footage perform so much worse in Premiere than in a dedicated media player when both are apparently performing the same task?

System specifications are as follows:
System 1: i7 950 at ca. 3GHz, 12GB DDR3, GeForce GTX 760 2GB, 256 OCZ Vertex SSD
System 2: 2013 MacBook Pro Retina, i77 2.7GHz, 8GB 1600MHz DDR3, GeForce 750M, 256GB SSD
I have the same issue on both systems.

Did you allocated enough RAM in Preferences => Memory?

@Shultc On "system 1", for example, I have 7GB allocated for Creative Suite applications. Premiere is the only Creative Suite application I have running.

And how many RAM is used, when you are playing it with media players? Maybe try to maximize that number for test, and look, if that will help.

I have discovered that this problem is specific to GoPro cameras from the Hero3 and range and later.
For Premiere CS6, the problem can be solved by updating to version 6.0.5. The update can be downloaded here. After installing this update I get flawless playback in Premiere and others have reported that this solution worked for them too.


text:
When and why to use Speedgrade?
I read both of these questions which came up in my search for Speedgrade:

Tips to make professional looking hand-held videos using smart phones?
Adobe CC Post-Production Workflow (Story, Prelude etc.)

But I'm not seeing any broader question about Speedgrade. For making promotional / instructional videos that will be uploaded to YouTube is it necessary to use Speedgrade and what exactly does it do? Should I only use it everything is live action? Some of the videos I work on have a mix of live action footage I take with a Canon 70D as well as Flash Animation.

You ask what it does: Speedgrade is a color grading / correcting tool. Davinci Resolve is another, and there are others still. They allow you to adjust the characteristics of a video on a shot-by-shot basis.
It's never necessary to use any color grading tool, but you'd do so when you want to match scenes from different sources or shot under different conditions, or to give your video (or one portion) an overall look. The usual use is for consistency.

So if I have say a shot on an overcast rainy day and another on a fairly bright and sunny day would that be something I could correct or at least make a bit more consistent using Speedgrade? Or if the White Balance was off would Speedgrade be the tool to fix that?

Cloudy vs sunny is a tough one, since color grading can't add shadows or internal contrast. You can correct for 'tone' but there are limits. White balance is much easier (other things equal) and can often be corrected without recourse to a dedicated color grading tool. There are lots of YouTube videos demonstrating and contrasting the use of Speedgrade and Resolve. Have a google.


text:
Premiere distorts picture while paused
Premiere is distorting footage while paused, making color grading ridiculously challenging.
Whether the media is playing in the source monitor or the sequence monitor, the picture is pixelated and tinted red and yellow. While playing, the picture looks normal. Here are two screenshots from the Black Magic Cinema Camera. The same happens with the 5Dmk3 H.264 footage.
Paused

Playing

Troubleshooting
Here's what I've tried and the results so far:

I reinstalled Premiere Pro CC 2015.
I tried from different cameras. The issue persists in every case. I've tried with H.264 from a Canon 5Dmk3 as well as with ProRes 422 HQ from a Black Magic Cinema Camera.
I tried footage from different shoots. Same problem.
I created a brand new project and imported new footage. It still distorted while paused.
I rebooted my Mac in safe mode, created a brand new project, and the picture wasn't distorted. It was, however, cropped down to only show 25% (the lower-left corner of the picture).
I tested in Final Cut Pro X 10.2.1. No problems here.
I tested in Speedgrade CC 2015. Same problem as Premiere.

Normally it renders OK, but when I've tried to render to MPEG the distortion persists in every 2nd frame.
My setup
Here's the hardware and software combination I'm running on. If I hadn't successfully eliminated the distortion in safe mode, I'd think my OS was the issue. It may be, but this issue did not occur in 10.11's safe mode.

Premiere CC 2015
OS X 10.11.5 (the public beta of El Capitan)
MacBook Pro (Retina, 15-inch, Late 2013)
2.6 GHz Intel Core i7
16 GB 1600 MHz DDR3
NVIDIA GeForce GT 750M 2048 MB

My question
What next step(s) should I take to resolve this issue? (Or, what else can I do to understand it more deeply?)

Same exact issue here running the GM of OS 10.11. It seems like it's an issue with El Capitan so hopefully it will be resolved in either the next adobe update or the next El Capitan update.

I was toying with the idea of updating to the GM! Whew. Glad you said something.

@GideonShils Has this problem persisted for you?

Just tried it running OS X 10.11 El Capitan. The problem has persisted.

I've updated Roaring Apps crowd-sourced upgrade tracker to reflect the issues I've been having and what I've learned from Adobe Customer Care. http://roaringapps.com/app/adobe-premiere-pro-cc

According to Adobe, it's a bug. Until Adobe fixes this bug with an update, the workaround is to switch off GPU acceleration in Project Settings.

The non-beta version of OS X 10.11 El Capitan did not fix this issue. I spoke with Adobe Customer Care today, and they said it was a bug their engineering team is working on.

Any chance of adding a link to the adobe page that says this please?

I spoke with them on the phone, so I don't have a link @tomh

This was also affecting my windows setup. CC 2017 on Windows 10

I had the same issue on my 2013 15-inch MBP. I was able to fix it by switching my renderer to CUDA (after reinstalling Premiere it automatically set it to OpenCL for some reason).

Rob, did you have any other issues? I'm also unable to use audio FX.

I had the same issue and downloaded the CUDA Drivers form nVidia site (El Capitan version).
Then I chose CUDA Renderer in project settings.
No more artifacts when pausing clips.

Most issues in adobe premiere that are related to rendering or display can almost always link back to an incompatibility with a GPU. This was previously stated, but having many GPU issues in the past I can personally a test to this. I have everything from Intel only to nvidia k6000.


text:
Frame stacking effect in After Effects
If I have a locked-off camera filming an athlete moving through the frame, how could I stack the frames so that every new frame of movement was layered on top of the next?  Assuming the background remains static throughout, is there a clever way to do it without tonnes of rotoscoping?
For example, here's a (famous) sequence of a horse running:

And here's the kind of effect I'd like to be able to achieve, without keying/rotoscoping etc:

Note that I made this with a simple luma key, because the background is mostly white.

Interesting :) The example is nice to understand your question, but I don't know if this is a good example for what do you want to achieve (foreground and background are easy to seperate in this specific case). If possible, please add a frame of your final footage to think about a solution.

Think about what you're asking. When you did the horse you used a luma key to isolate just the horse. If the horse was running through trees or down a racetrack what would you want to happen to the trees and other stuff in the background? Would they go over the horse from the layer underneath? If so, how are you going to see the layer underneath?
There's no way of overlaying frames without the front layer being partially transparent - either transparent in part of the frame (masks or roto), transparent depending on their pixel values (transfer mode, or key) or with an overall opacity of less than 100%. If it's not transparent then you can't see the background, it's that simple.
If you can, shoot against a green screen and key out your foreground. This will let you layer it up to create a visual echo as you show in your example. That's the best way to do this, even though it's "cheating".
If chroma keying is not possible, and if only part of your frame is moving, you might be able to use a difference matte. Get an empty shot of your background and use that to matte out only the parts of the frame that have changed. This will work best with locked-off shots.
Failing that, have a play with various transfer modes. They're basically pixel level keys that work depending on the value of the foreground and background colour. I worked with a visual artist who produced some lovely dance videos using time-delayed layering kind of technique. She filmed the dancers against black, and rather than pulling a key we just used the lighten transfer mode - which is basically a way of keying parts of your image that are darker than the layers below (we were using hundred of layers in each comp, I did some scripting work to make the whole process a lot easier).
Otherwise, if transfer modes, chroma / luma keys or difference keys don't work, put on a pot of tea, turn up the music and get stuck in to the roto.

I'm not sure I get exactly what you're asking, but if you're looking for a sort of stroboscopic motion effect, you can set up multiple layers, say 4 or 5, containing the same clip but offset in time by one or more frames. Then set the transparency of each (level of dissolve) in ratio to the number of layers (4 layers, each 25%, 5 layers each 20% etc). Experiment with the transparency and offset to get the look you want.
I don't do AE, but there may already be an effect or plugin that does this for you.

Thanks, but I'm not looking for a visual echo effect - I don't want the earlier frames to be less opaque than the later ones, I want every new frame to appear overlaid on top of the previous older frames.  I'll add some examples to the question to make it clearer.

Depending on the makeup of the video, perhaps you can use a technique called "non-additive mix" which is a sort-of key, sort-of dissolve. NAM used to be common in electronic mixers, but I don't recall seeing it in lists of digital effects, at least not under that name. It looks quite a bit like what you posted.


text:
Vegas Pro 13 - Shaking Image - Including Preview
Can I shake a transparent .png image in 3D?

(source: ggpht.com)

Yes. In a nutshell:

place an image on the timeline (set Alpha Channel in media properties if needed)
click 'Track Motion' button in the track header
select '3D Source Alpha' compositing mode
use keyframes to create animation

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


text:
What was technically wrong with this unseekable wmv?
I recently had an unseekable WMV file. ASFTools fixed it using the "Lost Chunks" feature which was suggested in the selected answer.
What does the "Lost Chunks" function do? What did it fix? What are "chunks"? I originally tried the "Make Seekable" function, but that did not work, so what is the difference between the two?
I'm very much interested in the technicalities so don't be afraid to get detailed if the answer requires it.

WMV is really just another name for ASF. That format, like many multimedia formats, contains its data in pieces of various types. Some formats call these packets, some call them segments. ASF, like RIFF before it, calls them chunks. There are several types of chunks, the main one being the data chunk, which holds the encoded streams. There may be several data chunks in the file, mixed in with other chunk types.
The other chunks can contain metadata, DRM info, text data and so on. WMV includes one called (I believe) the index chunk which holds information about where the data chunks are located in the file.
If the index chunk is corrupted or missing the file can usually be played but perhaps not seeked, or may seek randomly into the middle of GOPs. Programs like ASFTools and Steeper attempt to re-index the file by locating the data chunks and building a new index chunk if they can't locate a misplaced one.
Chunks of various types begin with unique identifying headers -- byte sequences called tags -- that can be found by scanning the file. This allows a repair program to potentially reconstruct a minimally playable file from a partially corrupt one by examining the full set of chunks.

What's a GOP? So, the program scanned the bytes of the file for specific byte sequences that tag the start and end of chunks?

Group Of Pictures - a sequence that starts with a complete frame and contains difference frames -- data that describes the difference (deltas) from preceding and following frames. If you 'jump into' the middle of the sequence you don't have enough information to completely decode where you landed. You have to wait for an I frame or key frame to get you right again. And yes, a repair program can find data chunks by scanning for the tags that start a chunk header. That header holds the length of the chunk (there is no end tag). Once you find any valid chunk you can follow the chain of chunks.


text:
Is there a low-cost automated pan/tilt/zoom system?
Our church wants to install a video camera to record services and sermons, nothing fancy - here's what I'm thinking:

Mount a remote-control pan/tilt head on the wall or railing of the balcony
During the service, attach a video camera that has remote-control zoom/start/stop control
Have software that lets the operator hit buttons that say "pan/tilt/zoom so the camera is pointing at the pulpit" or "pan/tilt/zoom so the camera shows the entire altar area".

The challenge, of course, is that we don't have $5000 to spend on one of the fancy commercial systems (nor do we need something that sophisticated).
We have a Canon VIXIA HF-R52 that you can control remotely (zoom/start/stop), and I'm considering the Panasonic CTR-1 Remote Pan Tilt Cradle, what I can't tell is whether the controls for either let you say "go to zoom level 8.3, pan 20 degrees from center and 30 degrees down from horizontal" (which is what I would need, in order to give the operator a button for "pan/tilt/zoom to the altar".
BTW, I don't want the system that follows motion, or requires everyone to carry a special tag that the PT head detects and follows.
Is there a low-cost solution that gives me what I need?
I saw this question: Remote pan/tilt/zoom cameras that aren't expensive which is similar, but didn't go far enough.  As far as I can tell, the low-end pan/tilt heads let you say "pan to the left" but they don't let you say "pan to 30 degrees left" which is what I am looking for.

What you look for is probably a combination of the Bescor / Hague MP360 motorized pan tilt head with the CamRanger controller. CamRanger are selling the combo under their label, you can see some nice video explanations at their web site. If you don't need the extra pizzaz then you can look at just the MP360, or even the lower-end MP101 which is a great product too.
Note that these heads have a tilt limit of 30deg, so, depending on your setting, you may have to throw in a correction plate.


text:
Weird zooming in Premiere Pro preview-window
After a hard time getting my Premiere Pro CC to work correctly,
I stumbled upon a new problem.
In the image below, you can see how the frame is about 200% zoomed in the preview window, and normal in the "source"-window. I've checked the magnification level, but it's ok. Resolution is set to "Full".
The preview was a square and zoomed at first, so I created a new sequence, but now it's widescreen and zoomed.
How do I make the preview normal again?

Fixed it by creating a new project.

Make sure the resolution in the sequence is the same as the resolution of your clip. Otherwise you'll need to scale the video to fit correctly.

It's hard to read the text in the screenshot, but it appears that the scale drop-down in the two windows is different. The one of the left appears to say "1,3", and the one on the right appears to say "Full" (which is what you said). That may not be THE answer, but it's something I noticed.

For my understanding (and experience) it's just for the playback quality. It won't scale my video, but change it's quality.


text:
Adding metadata for films/TV shows on Linux
I am looking for an open-source solution for automatically pulling films/TV shows informations. I've found MetaX (Windows only) and Subler (MacOSX only) from a post here. Apparently metadata sources can be found from: TVDB, TheMovieDB, Amazon, and tagChimp, as well as IMDB, ref here.
I know I can use MP4Box (or libav/ffmpeg) to easily add metadata (including Cover Art), but really what I would like is a script and/or GUI to easily retrieve metadata (plot summary, cast and crew, genre, release data, Cover Art as JPEG...).
Some people suggested using VLC on Linux. But I cannot get anything to work over here (using debian/jessie amd64). Neither the “Download Cover Art”, nor the “Add Cover Art” seems to work.

The first one does nothing, the second one print this on the console:
[00007f3fc4567d38] taglib meta writer error: File /tmp/big_buck_bunny_480p_h264.mov can't be opened for tag writing

Bonus point: if this could be integrated to Handbrake, that would be awesome.

Do you have any sources that can be used to pull these informations in an automated manner? ffmpeg can handle metadata

After some research, I discover this post.
So far the API for http://www.omdbapi.com has proven to be exactly what I wanted. For completeness, I found those command line tools helpful:

https://github.com/xbgmsharp/allocine
https://github.com/bgr/imdb-cli

And on debian:
$ sudo apt-get install python-imdbp


text:
How does one "convey" a news article in a movie?
Here, I'm talking about a "news article" regarding the events of the movie, and not about a generic article such as "Japan Bombs Pearl Harbor" or "U.S. Invades Iraq."

Since this is an "inverview," one way is to have the reporter and source orally read their respective lines.

Since they are discussing the hero and heroine, another way is to have one "read" the article to the other.

In theory, the article could be posted on the screen so the audience can read it, but that seems like the worst alternative. Unless it was combined with either 1) or 2).

Which of these, or other methods are used?

If you don't need the interview to be conveyed verbatim, you can have two characters discussing (or arguing about) points from the article.
The people discussing the article could even be the hero and heroine, without having them read it aloud verbatim. "Did you really say that?" "I think the author took that out of context.  What I meant was ______."

Not a bad answer. But the "source" is the heroine's boss. So I want the audience to know what the boss thinks.

Can the actual live interview be shown on screen, and then we see some other character get the article and react?

Not a bad idea. My idea was to have the reporter and source do voice-overs, while the main character pore over the paper article together.


text:
How would I remove a specific pattern (say, every n-n+59th frame) of frames from a lengthy video file?
I have large video files of screen recordings which I created with Camtasia Recorder. The content I am recording only updates once per minute (1/60 fps), however Camtasia appears to require at least 1 fps for recording (quite silly, really). So that's what I did, and then I tried looking in Camtasia Studio to cut out the extra frames but it seems the only way to reduce the file size without compressing to a lossy format is to manually cut by hand 1 second segments throughout the entire file, but these files are too long to do this by hand (3 files, one of which is 24 hrs and the shortest is 8 hrs).
How would I cut all but 1 frame every 60 seconds from a video file?
Note that while the file is currently in the CamRec format, I can convert it to other formats if need be.
Attempts at using mpdecimate:

I have a 479mb "test.avi" video (you can download it here) which is 35 second uncompressed avi file of me moving some windows around on my desktop.
The first command I ran was:
ffmpeg -i test.avi -vf mpdecimate test-out.mp4

The resulting file (714kb) has 5-6 seconds of black, then the rest of the input video unaltered (but it is compressed).

Then I tried:
ffmpeg -i test.avi -vf mpdecimate -vsync 2 test-out.mp4

Which output a file (716kb) with seemingly the same results.
ffmpeg version N-70358-g047fd98 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu
tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-l
ibrtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --ena
ble-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 19.100 / 54. 19.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 23.106 / 56. 23.106
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, avi, from 'test.avi':
  Duration: 00:00:34.87, start: 0.000000, bitrate: 115403 kb/s
    Stream #0:0: Video: rawvideo, bgr24, 572x280, 115425 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
File 'test-out2.mp4' already exists. Overwrite ? [y/N] y
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0000000003047200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000000003047200] profile High 4:4:4 Predictive, level 2.1, 4:4:4 8-bit
[libx264 @ 0000000003047200] 264 - core 144 r2525 40bb568 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options:
 cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 dead
zone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_in
tra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahe
ad=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'test-out2.mp4':
  Metadata:
    encoder         : Lavf56.23.106
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p, 572x280, q=-1--1, 30 fps, 10000k tbn, 30 tbc
    Metadata:
      encoder         : Lavc56.26.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0000000003017fe0] Warning: data is not aligned! This can lead to a speedloss
frame=  406 fps= 50 q=-1.0 Lsize=     715kB time=00:00:34.06 bitrate= 171.9kbits/s
video:711kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.578083%
[libx264 @ 0000000003047200] frame I:4     Avg QP:20.40  size: 18550
[libx264 @ 0000000003047200] frame P:342   Avg QP:21.60  size:  1878
[libx264 @ 0000000003047200] frame B:60    Avg QP:19.97  size:   176
[libx264 @ 0000000003047200] consecutive B-frames: 75.9% 12.8%  1.5%  9.9%
[libx264 @ 0000000003047200] mb I  I16..4: 40.3% 25.6% 34.1%
[libx264 @ 0000000003047200] mb P  I16..4: 10.2%  4.6%  4.8%  P16..4:  7.6%  2.0%  0.6%  0.0%  0.0%    skip:70.1%
[libx264 @ 0000000003047200] mb B  I16..4:  0.6%  0.1%  0.3%  B16..8:  7.8%  0.4%  0.0%  direct: 0.1%  skip:90.7%  L0:42.8% L1:56.3% BI: 1.0%
[libx264 @ 0000000003047200] 8x8 transform intra:23.3% inter:53.3%
[libx264 @ 0000000003047200] coded y,u,v intra: 17.3% 7.5% 7.2% inter: 1.9% 0.4% 0.4%
[libx264 @ 0000000003047200] i16 v,h,dc,p: 20% 76%  3%  1%
[libx264 @ 0000000003047200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 18% 57%  0%  0%  0%  1%  0%  1%
[libx264 @ 0000000003047200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 45% 16%  1%  2%  2%  2%  2%  3%
[libx264 @ 0000000003047200] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000003047200] ref P L0: 62.9% 10.7% 14.1% 12.3%
[libx264 @ 0000000003047200] ref B L0: 85.2% 14.2%  0.6%
[libx264 @ 0000000003047200] ref B L1: 99.1%  0.9%
[libx264 @ 0000000003047200] kb/s:163.69

Then I tried:
ffmpeg -i test.avi -vf mpdecimate=hi=64*12:lo=64*2:frac=0.1,showinfo -vsync 2 test-out2.mp4

with the same results (in terms of how the video file appeared).
frame=  411 fps=221 q=-1.0 Lsize=     716kB time=00:00:34.06 bitrate= 172.3kbits/s
video:712kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.589478%
[libx264 @ 0000000004e66b40] frame I:4     Avg QP:20.26  size: 18595
[libx264 @ 0000000004e66b40] frame P:343   Avg QP:21.49  size:  1876
[libx264 @ 0000000004e66b40] frame B:64    Avg QP:19.52  size:   170
[libx264 @ 0000000004e66b40] consecutive B-frames: 74.7% 13.1%  1.5% 10.7%
[libx264 @ 0000000004e66b40] mb I  I16..4: 41.6% 24.6% 33.8%
[libx264 @ 0000000004e66b40] mb P  I16..4: 10.2%  4.5%  4.8%  P16..4:  7.6%  2.0%  0.6%  0.0%  0.0%    skip:70.3%
[libx264 @ 0000000004e66b40] mb B  I16..4:  0.6%  0.1%  0.3%  B16..8:  7.5%  0.4%  0.0%  direct: 0.0%  skip:91.0%  L0:43.4% L1:55.6% BI: 0.9%
[libx264 @ 0000000004e66b40] 8x8 transform intra:23.1% inter:53.7%
[libx264 @ 0000000004e66b40] coded y,u,v intra: 17.4% 7.5% 7.2% inter: 1.9% 0.4% 0.4%
[libx264 @ 0000000004e66b40] i16 v,h,dc,p: 21% 75%  3%  1%
[libx264 @ 0000000004e66b40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 17% 58%  0%  0%  0%  1%  0%  1%
[libx264 @ 0000000004e66b40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 45% 16%  1%  2%  2%  2%  2%  3%
[libx264 @ 0000000004e66b40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000004e66b40] ref P L0: 62.9% 10.6% 14.2% 12.3%
[libx264 @ 0000000004e66b40] ref B L0: 86.0% 13.3%  0.6%
[libx264 @ 0000000004e66b40] ref B L1: 99.1%  0.9%
[libx264 @ 0000000004e66b40] kb/s:164.04

FFmpeg has a framestep filter to take every nth frame.
There's also mpdecimate, which outputs a frame whenever the input frame is different enough from the previous frame.  (so if exactly every 60th frame isn't perfect, you could use mpdecimate instead to detect the changes, and make a potentially VFR video.)
I didn't test this command; post a comment if I screwed it up:
ffmpeg -i in.camrec -vf framestep=60 -r 1/60 -codec copy -map 0 -c:v libx264 -preset medium -crf 16 -movflags +faststart -vsync 2 out.mp4
Or use out.mkv if you like matroska better than the mp4 container.
copy (stream copy) won't work while dropping frames, I think even for an intra-only codec.  So your output has to be encoded to some codec.  My example uses lossy h.264, but with the quality cranked so high it should be transparent.  You could use lossless h.264 (-preset ultrafast -qp 0), -c:v utvideo, or whatever else you like.
-vsync 2 turns on VFR output mode, which for some reason isn't the default in mp4.  (but it is in mkv).  You'll want that if you use mpdecimate, but you won't need it for framestep.
A quick google didn't tell me if camrec is already lossy or not.  If it's lossy, then there's no way to get a file as small but with the same quality as just keeping every 60th CamRec frame without decoding them.  (assuming there's an intra-only frame at the point you want one, if the format has any non-intra frames.)
With mjpeg, you can turn a video into a directory of images without decoding, and select whichever ones you want, and mux them up again.  Since camrec frames probably aren't a stand-alone image format, it's unlikely there's something similar, so you just have to use video tools.  Like I said, don't think ffmpeg can do clever things like frame dropping without decompressing, even for intra-only codecs.  Other tools might exist that can do that, for some codecs.
If it's lossless, then it just takes more CPU time to decode / re-encode to a new lossless format.
edit: more about mpdecimate:
As noted in the comments, I added some stats logging to mpdecimate.
git pull https://github.com/pcordes/FFmpeg.git mpdecimate
and then build ffmpeg as usual.
Then run ffmpeg -v debug ....
Or ffplav -v debug -vf mpdecimate  input.avi
Testing mpdecimate threshold settings with ffplay is a lot faster than making an encode.

Oh btw, camrec appears to be a container format.  It can hold a few different codecs.  I haven't checked that ffmpeg can decode them all, but apparently you can record in xvid or h.264 in camrec, unless I misread a random forum comment.

I tried both commands but neither worked. It seems mpdecimate is really what I'm looking for, but every time I try to run the command I get either an unchanged file, or a purely black file that is slightly longer than the input file. I converted my camrec file to a lossless AVI file (since ff seems to have trouble with it) and ran this: ffmpeg -i "capture-1.avi" -vf "mpdecimate" -vsync 2 "capture-1.mp4", also without the -vsync 2 part, to no avail. Am I doing this wrong?

The difference in the frames is substantial and should be triggering the drops, but in case it isn't I tried altering the command parameters with little success. The documentation unfortunately offers no real guidance on how the parameters are entered.

That looks like the right command line. What different options did you try for mpdecimate?  The options set thresholds for 8x8 SAD of blocks on all planes (luma and chroma).  (http://en.wikipedia.org/wiki/Sum_of_absolute_differences).  Is there a blinking cursor somewhere on the screen that's triggering the hi threshold?  Maybe crank it really high, and depend on the lo threshold to detect when large areas of the screen change.

See my edit to my answer.  Last time I used mpdecimate, I added some debug prints to it.  If can and want to compile ffmpeg from source, grab my mpdecimate branch of https://github.com/pcordes/FFmpeg/tree/mpdecimate.  (I just rebased it to current git master, so you should be able to git pull https://github.com/pcordes/FFmpeg.git mpdecimate in an existing git clone of ffmpeg.)

I retried the commands, I noticed the files I thought were "purely black" were actually mostly black, with some of my input video at the end. But it doesn't seem like all the frames were dropped (some were), so I would need to increase the sensitivity. Do you know how I would do that? I don't have the tools to recompile ffmpeg, sorry.

No worries.  Black frames sounds like a really weird symptom.  mpdecimate should make your video appear to freeze for a bit if it does anything at all.  IDK if it even can drop the first frame.  Try  ffplay -vf mpdecimate,showinfo.  You can tell it's dropping frames when showinfo isn't printing lines of output.

If the frames you want to drop are really identical, you can try -vf mpdecimate=hi=64*12:lo=64*2:frac=0.1,showinfo.  as http://www.ffmpeg.org/ffmpeg-all.html#mpdecimate explains, one 8x8 block where the sum of differences exceeds hi will result in an output frame.  Same when more than frac fraction of the 8x8 blocks have more than lo difference.  So if there's a blinking cursor, that will trigger hi every time unless you crank it all the way up and just depend on lo.

Next time you test it, can you copy/paste FULL command line output from ffmpeg into your question?  There might be something else going wrong leading to black frames.  Like I said, you should just see an old frame stay there for ages if mpdecimate is dropping more than it should.  (Maybe your input video has black frames?  Or ffmpeg isn't decoding it perfectly?)

Ok done. In terms of black frames, I remember Camtasia prompting what color background I wanted the video to have, black being the default. I didn't understand it, since I was screen recording (there should never be a "background" showing, but maybe it's just a weird format requirement).

3 things: What do you get without mpdecimate?  Still black frames at the beginning?

Try with ffmpeg -v debug.  I'd forgotten mpdecimate does have debug-logging code to print WHEN it's dropping frames; my patch just added info on whether hi or frac / lo was the reason for allowing a frame through.  (It will spew a crapton of debug output from everything else, too, since there's no per-component logging).  You didn't post output from the mpdecimate,showinfo, just the x264 encoder stats after it got to the end.  I could see that it allowed 411 frames through, instead of 406 from your run with mpdecimate default settings.  (of 35s*30fps = about 1050 frames.)

and the 3rd thing: I tried to download your original from dropbox, but it didn't work.  I get the captcha, but no download starts at all.  Since your ffmpeg output indicates it's really uncompressed, not just lossless, you could make it a LOT smaller but still bit-for-bit identical data with ffmpeg -i raw.avi -c:v libx264rgb -qp 0 -preset ultrafast  lossless.mkv.  Then upload that.  (libx264rgb since I see your input is raw RGB video.)  No need to try mpdecimate with that input, results will be identical.  Filters happen after video decoding.

Oh also, your video is only 572x280.  Do you normally record at such low rez?  Doesn't that make it hard to read text?  Anyway, this might be causing changes in the input to happen on smaller scales than the 8x8 blocks that mpdecimate checks.

I really appreciate all your help with this (seriously), but I think this is simply outside my expertise (psychologist, sadly). I'm burning taxpayer dollars and getting nowhere fast, so I'm just going to re-record using different software capable of 1 frame-per-minute recording. Thanks again for all your help.

no worries.  mpdecimate isn't the most user-friendly filter.


text:
Sync up ffmpeg `rawvideo` recording and Audacity ALSA recording
I am attempting to transfer some Video 8 tapes to my computer with ffmpeg and Audacity.
ffmpeg captures a rawvideo stream from an EasyCap dongle, and Audacity records from the line-in audio jack.
With ffmpeg's frame rate parameter set to 29.97, the output video ends up being shorter than the audio recording.  At 25 frames per second, the video is significantly longer than the audio.  Audacity's settings are simply default.
Shouldn't the parameters match up with NTSC's; 29.97 fps?  Do you think ffmpeg or Audacity are on the wrong time scale, or both?
The rawvideo stream is sourced from the somagic-capture utility, shown in the script below.
Relevant line:
ffmpeg -pixel_format uyvy422 -s:v 720x480 -framerate 29.97 -f rawvideo \
-i $PIPE  -vf scale=w=720:h=540 -vcodec libx264 -preset ultrafast \
-c:a libfdk_aac -b:a 128k $OUTFILE > $FFMPEG_LOG 2>&1 &

I've also tried to record the audio stream with ffmpeg.  This solves the sync problem, but is unreliable.  The script for that attempt and the details are here: https://stackoverflow.com/questions/28359855/forcing-ffmpeg-to-capture-unreliable-alsa-audio-stream
Script for recording video, without audio, in ffmpeg:
#!/bin/sh

PIPE=/tmp/somagic-pipe
OUTFILEDIR=~/easycap/Videos/
LOGDIR=~/.somagic-log/
NOW=`date +"%m_%d_%Y_%H_%M_%S"`

OUTFILE=${OUTFILEDIR}fpv_video_${NOW}.mp4

mkdir $LOGDIR

FFMPEG_LOG=${LOGDIR}ffmpeg.log
SOMAGIC_LOG=${LOGDIR}somagic.log
MPLAYER_LOG=${LOGDIR}mplayer.log

rm $PIPE >/dev/null 2>&1
rm $OUTFILE >/dev/null 2>&1

rm $FFMPEG_LOG
rm $SOMAGIC_LOG
rm $MPLAYER_LOG

mkfifo $PIPE >/dev/null 2>&1

ffmpeg -pixel_format uyvy422 -s:v 720x480 -framerate 29.97 -f rawvideo \
-i $PIPE  -vf scale=w=720:h=540 -vcodec libx264 -preset ultrafast \
-c:a libfdk_aac -b:a 128k $OUTFILE > $FFMPEG_LOG 2>&1 &

somagic-capture --ntsc -c --luminance=2 --lum-aperture=3 2> $SOMAGIC_LOG | \
tee $PIPE | \
mplayer -vf yadif,screenshot -demuxer rawvideo -rawvideo    \
"ntsc:format=uyvy:fps=30000/1001" -aspect 4:3 - 2> $MPLAYER_LOG

rm $PIPE >/dev/null 2>&1

Modified from this script:  https://gist.github.com/Brick85/0b327ac2d3d45e23ed33

As suggested by stib, here's the output of ffprobe.
On the audio file:
peterbecich@Sirius:~/easycap$ ffprobe snapping.m4a
ffprobe version 2.5.3 Copyright (c) 2007-2015 the FFmpeg developers
  built on Jan 11 2015 17:53:45 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libpulse --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'snapping.m4a':
  Metadata:
    major_brand     : M4A
    minor_version   : 512
    compatible_brands: isomiso2
    encoder         : Lavf54.20.4
  Duration: 00:19:06.78, start: 0.000000, bitrate: 189 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 186 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

On the video file:
peterbecich@Sirius:~/easycap$ ffprobe Videos/fpv_video_02_06_2015_16_34_09.mp4
ffprobe version 2.5.3 Copyright (c) 2007-2015 the FFmpeg developers
  built on Jan 11 2015 17:53:45 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libpulse --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
  libavutil      54. 15.100 / 54. 15.100
  libavcodec     56. 13.100 / 56. 13.100
  libavformat    56. 15.102 / 56. 15.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Videos/fpv_video_02_06_2015_16_34_09.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.15.102
  Duration: 00:19:08.08, start: 0.000000, bitrate: 5352 kb/s
    Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661), yuv422p, 720x540, 5351 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler

Try using ffprobe on the two files–does that shed any insight into what's going on?

Thanks. I don't know how to interpret the output, though.

I can't say what's going wrong or if there's a change to the ffmpeg scripts that would help, but from a practical POV I can offer some advice on how to deal with what you have.
If the difference is due to drift, the fix is relatively simple. If it's due to dropped video frames or audio dropouts, it's probably not going to be fixable without a good bit of work.
The 'drift' scenario is this: you know they're out of sync at the end because you can see / hear the difference. Something near the end doesn't match up. So find that thing and identify its exact time relative to the start, in both the picture and sound. Reduce these times to absolute frames -- in this case numbers will be around 34000 or so at 30fps. Find the ratio of these two values and apply it in Audacity as a speed change percentage (with constant pitch, usually). Check that the audio event now occurs at the same time as the matching video event you noted. If you got it wrong, invert the ratio.
If after doing this you find places in the middle that are still out of sync, you're forced to apply this same technique in multiple segments, or to cut / move / blend the audio in sections. I don't envy you this task.

The issue is apparently that ffmpeg cuts out dead space from captured video, and Audacity does not do likewise for audio.  I've now noticed that ffmpeg's frame count stops incrementing over blank video.
I believe this problem also happens when using two separate ffmpeg processes to capture video and ALSA audio.


text:
Black and white moving character in a color video
This question is a consequence of :

How to make a film in black and white and add color to some objects?
How to show a character in black and white mode with colorful background?

This is just for my personal culture. Using gimp + path + transform, I can do it in one 2D image, but I was trying to understand how you guys would make a character in black and white in a colored scene, if the movie is already done.
From the previous answers, I understand that the key word is this case is rotoscoping.
But, I don't understand the principle !
Is it some kind of dynamic path with the time ?
What software would you use to do it ?
Have you got a link to explain that to a guy without video processing culture like me ?
Thanks for reading,

You'd achieve the effect by masking one part of the image and applying a desaturation effect to it. The hard part is masking off one part of the image.
In software such as After Effects and Nuke you can mask off an area of the image with bezier splines, and the shape of the masks can be animated. Tracing and animating these masks is what is called rotoscoping (it was invented by animator Max Fleischer in 1915, where he hand traced frames of film projected onto paper).
After Effects does come with an automatic rotoscoping tool called "Roto Brush" that works a bit like the magic wand in Photoshop, except that it changes shape over time. This can take a lot of the work out of rotoscoping, but it is far from infallible.

The concept is simple, but it's time-consuming to implement and requires a lot of attention to detail.
1) In each frame, using video editing software, you mask off a certain part of the image. In this case, you create a mask that exactly outlines the character you want to make black and white.
2) Then, you tell the video editing software to desaturate (make b&w) everything inside the mask.
Then you do that for the next frame.  And the next.  And so on.
There must be existing software that can help automate much of the process, and I'm sure that another person on the forum can recommend some for you.


text:
How can I manage videos with OS X, iPhone and Sony Nex 3N?
I asked this question here but I find it is also relevant here. So let's take fresh: I have many videos in iPhone, many videos in Sony Nex 3N and I have Macbook Air laptop. My goal is to create training videos having video collages.
How can I combine the videos from iPhone and Sony to video collages easily?

You'll need to describe in much more detail what you're trying to do before we can give you a reasonable answer. Aside from saying, get Final Cut Pro or some other editing app and import the footage into your computer, we need to know specifics of what you want to do.

@user1118321 my Final Cut Pro used for merging Sony videos like here. I want to merge iPhone vids and the Sony vids. My goal is to create sport videos like here and collage sport videos to which I need videos from my iPhone and from my Sony. I have applications in iPhone like ClipCatch to do Collage videos. I am able to do awesome videos with iPhone like here but Sony is so much better many times with its inverted screen so will merge videos over iPhone/Sony.

OK, so you want to move the Sony clips from the Sony camera into your iPhone and then use them on the iPhone with ClipCatch? And the problem you're having is easily moving them over to the iPhone? If so, are you comfortable using the command-line on OS X?

@user1118321 I love commandline! Proud Vi veteran :)

This question is both unclear what you are asking and likely an overly broad question asking "how do I do video editing?" which is an entire field of study that can't possibly be summarized in one question and answer.

Additionally, please be careful when posting very similar questions on multiple sites.  It does appear that the questions are actually slightly different in this case (one appears to be asking how to get the files off the cameras and the other is asking how to combined them?), however asking the same question on multiple sites is greatly discouraged and will normally result in one of the questions being closed outright or migrated and closed as dupe.  We want to make sure we get the best answers possible to a question and if the same exact question is listed twice, one of them will suffer.

Since you're a command-line user, you can use ffmpeg to do the conversion for you. I suspect when you mount your Sony camera, it probably always gets the same volume name. (Probably something like /Volumes/SONY/ or /Volumes/DSC/ or something like that.) You could write a script that basically walks through the directory containing the movies, and converts them to a suitable format, saving them on your hard drive.
Looking at iTunes in Automator.app, I see that it supports an "Import Files Into iTunes" function. You could probably make an Automator action that calls your ffmpeg script, then imports the results into iTunes. From there, you just sync your iPhone. (Not sure if it will auto-sync large videos via iCloud or not, but it might.)
I'm not the best at scripting or Automator, but you can probably get an answer to the specifics on either Ask Different or Super User.


text:
Should you shoot flat when shooting with a DSLR?
I've read a bit about how it can be useful to use a "flat" profile for shooting video on a DSLR which produces only compressed video. For example as described in this article. The reasoning is that most lossy compressors (like H.264) will do more compression in the darks, removing that data and making it impossible to adjust in post. (For example, if you brighten it, you'll get bright gray squares instead of whatever data was there before compression.)
The author of the above seems reasonable. He worked at LucasFilm and has directed many music videos and feature film VFX shots. It doesn't seem like he's suggesting some fad, but is talking from experience.
In the answer to [Post-production workflow: VFX before color correction? workflow: VFX before color correction), this was included in the accepted answer:

As far as low contrast and low saturation, I would disagree rather strongly with shooting for low contrast/low saturation. This is how you get noisy, low quality color. Your camera has a limited number of colors it can describe, if you ignore a large portion of that color space, then you can't describe as many colors and the resolution of your color after boosting the saturation and contrast will be very greatly reduced.

These sound contradictory to me, but maybe I'm misunderstanding. Is the advice to shoot flat good advice for DSLRs with lossy compression or not?

Neither viewpoint is wrong, they rather have different advantages.  It is a question of dynamic range vs compression noise.  My answer on the previous question may have been a little too strongly from my particular camp of thought (I was not aware of the compression related dark color issues at the time as I shoot high bit rate video primarily, which makes it much less of an issue.)
If you are shooting non-raw and using a flat color space, you have fewer values to represent the range of colors in your shot.  You can get more detail on the brightest and darkest spots since they are exposed as mid-range colors, but you lose the depth of color since you have to artificially expand it later in post.  I'm not sure what I was thinking with the noisy bit, probably thinking about the loss of color detail from reducing your color space based on the surrounding explanation, but noise was a poor choice of term for that.  (I have updated accordingly.)
The flip side of that is to get it mostly right in camera.  You have to be careful about your black point and make sure that you actually have sufficient detail in the shadows, but utilizing the full color space allows for far more colors to be described, even if it offers less ability to adjust after the fact.
It is all a question of recovery.  When you deal with RAW, you have detail going all the way down to the darkest and all the way up to the brightest point from which you can work to pull out any details that the camera captured.  When you are dealing with an encoded video though, you are limited to whatever is displayed.  Using flat allows more recovery since you capture beyond the black and white point of the final video (and does reduce sensor noise in the darks since they are actually exposed as mid-tones) but it means much less color detail to work with.
I prefer making full use of my color space and controlling shooting, others prefer to have extra control at the cost of color depth.  Neither is a wrong choice.

Thank you for the clarification! This makes more sense to me now that I see what the trade-offs are.

I'm confused about the "fewer values to represent the range of colors" bit. Is there a noticeable difference between applying in-camera saturation as opposed to post saturation? I didn't think changing in camera contrast and saturation (color profiles) changed the "color space" of the camera. It's still sRGB, Rec 709, NTSC, etc. no matter what your settings. Am I misunderstanding?

@ScottJamesWalter - it is the depth of the color space that changes.  It still captures the same min and max color (actually, technically, it gets a wider min and max arguably), however there are fewer actual values in between.  You have a fixed color depth (number of distinct colors).  If you use a bunch of those as buffer, you lose color depth.  Taken to and extreme, lets say you almost made the image black and white.  You could expand the limited color you had so that they are strong colors again, but it's gonna look something like early color footage without a wide selection of colors.

In the finished product, for a "flat" color file, you are going to make a lot of greys black and possibly some light greys white.  Those are all possible color values you aren't making use of.

There are two schools of thought on this topic but nothing I know has suggested that shooting with a flat profile is a bad thing. Here is what I understand:
1) When shooting with Canon DSLRs, it's generally advised that you shoot with a flat profile (Technicolor cinestyle, Prolost, etc.) and over expose (but don't clip!!) and you get a picture with much more detail, specifically in the shadows. Here is a video showing this: https://vimeo.com/73909925
It's rather long, but the entire series is good. In there he specifically shows the effects of shooting standard and exposing correctly v.s. shooting flat and over exposing. Lots of detail in the shadow is preserved when performing the latter.
2) A lot of more professional film makers (Shane Hurlbut, and Stillmotion) suggest that you should use a color profile that best matches your final color result. Less work is needed in post, and  you have a better feel for your film. I think I see this school of thought from professionals more often because the gear they own has high dynamic range and retains so much information anyways, so detail isn't something to worry about.
Personally, I'm not a professional and I record with a Canon 550D but I use the Standard Profile when exposing my shot (aka, over exposing) and switch to technicolor cinestyle when I hit record to give me more color grading flexibility in post.

+1 on the observation about dynamic range.  I suppose that really is kind of key that if you have good dynamic range in to shadow, then it is worth preserving color depth, but if you don't, you are really just adjusting the format to use the best part of the dynamic range available and discarding part deemed unusable.


text:
Are there any recent 64-bit VFW screen capture codecs out there?
I'm currently editing some video screen capture recordings I did under Linux using recordMyDesktop (basically OGG Theora video files).
Since there's currently no way to import Theora video into After Effects CC, I first need to transcode the video files into an intermediate format. I first tried with the Huffyuv and Lagarith losless codecs, but the file sizes came up too big.
I also tried transcoding to MP4 using ffmpeg with mixed results. It seems that After effects only likes a particular kind of MP4 encoded videos which I have yet to find. In my case, the footage would show intermittent "video offline" frames, which is undesirable.
The My ideal codec would be something that:

Uses screen capture specific compression.
Can be enumerated as a 64bit VFW codec inside Virtualdub 64.
Runs in 64 bit mode (since I need to decode and edit inside After Effects).
It's free (I'd pay for one, but first I'd like to exhaust my options).

Finally, I tried looking for VFW compatible screen capture codecs and here's what I found:

TSCC codec - TechSmith: Not free. Free version does not allow me to encode video using Virtualdub. I think this one can run with 64-bit applications.
inno Screen Capture Codec(iSCC): Not free. Don't know if runs in 64-bit mode.
MSU Screen Capture Lossless Codec: Free. Compresses files fairly nice. I think it kind of messes with the framerate of the video. Unfortunately, I didn't find a 64-bit build of the codec, so the 32-bit codec encoded files get rejected by After Effects :(.

I also read about using ffmpeg to encode to Quicktime mov with an animation codec here https://video.stackexchange.com/a/8315/6059. So I'll give that a try.
So has anyone else done something like this?
Thanks!

You don't need a 64bit codec to use it in 64bit Software like VirtualDub or After Effects, a 32bit codec will work just fine.
For intermediate codecs I generally use either a QuickTime with PhotoJPEG compression or Animation like you suggested yourself. The latter is lossless and produces fairly big files, the former is lossy just like JPEG but offers visually lossless compression with a reasonable size and works very well in every software that supports QuickTime video.
Another alternative would be a JPEG2000 image sequence which can be be either lossless or lossy, though its a bit less fun to work with as you end up with thousands of files in a folder, though there are commercial JPEG2000 codecs out there that are 64bit native and integrate into Windows.
Another good (open source) alternative is Ut Video. It also features a native 64bit version of the codec and integrates into Windows aswell. It's completely lossless but produces files with reasonable size.

Thank you. I pretty much ended up settling with ffmpeg encoding into video frames using the qtrle codec and placing them under .mov files. In my case generated about 120Mb per minute, which I think is quite suitable since After Effects does understand that video codec.

Bare in mind that RLE codecs are very inefficent. If you want lossless go with UT video, the compression ratio and decoding performance is a ton better.


text:
How can I examine Quicktime file internals?
How can I examine a QuickTime file: is there a standard utility?  Or passable third party utilities?
I'd like to be able to try to debug these problems myself before resorting to "randomly install all the codecs you can find."
I use Adobe Premiere (I'm on 5) and using OSX 10.8.5 .
Example:
I'm having a problem similar to the (unanswered) one in Can't import some .mov files into Adobe Premiere, it says “Codec missing or unavailable”:

Adobe Premiere 5 says "codec missing or unavailable" when trying to
  import a .mov file… but the .mov file plays fine in Quicktime.

UPDATE: the root cause of this is the file was generated by Final Cut Pro, which wrote it with a Apple Intermediate Codec (AIC) - specifically "hdv2"

The go-to tool of my choice is MediaInfo. It's multi plattform, open-source and can analyze a big deal of formats out there, including QuickTime. So far I barley found an unsupported format. You'll get a lot of very usefull information for debugging format issues from this tool.


text:
How to detect and extract words from audio/video stream online in a webpage itself?
I have a video (or audio, I think it is not important) stream/file which does not contain subtitles. But it has clean english speech. Is it possible to detect and extract words from it. I don't need 100% accuracy.
Are there some services or applications for this case? Maybe some services gives API for this? Any ideas are welcome.

If you work on a regular basis with the "owner" of the voice I can recommend Nuance's Dragon it offers very accurate speech to text with very few errors but it needs some "calibration" to a specific voice.
So if you can get your actor/narrator to read the calibration text you will have an easy time making transcripts and subtitles (though subs will require manual timing afterwards).
Nuance also offers a developer SDK/API if you need that.
However it will not help you in the case of interviews with random people on the street.
An alternative that doesn't need calibration and is also free to use is the Google Voice to Text service. There is a nice un-offical "API" for that on Github.
It will give you usable results in most cases and its fairly easy to use if you know a bit about programming and can use a command line.
Though be aware that I do not know the legal status of that, I'm not sure if that service is allowed to be used for commercial use. You might want to read into the Google Terms of Service for that, they unified that about a year ago so it should apply for the Voice to Text service as well. Also a downside, it only accepts 15 seconds snippets but if you want to automate this anyway you can just split your audio file up with FFmpeg and upload them at the same time.
There is also another commercial alternative called iSpeech which works on a pay per use model.
Also there is a built-in speech recognition in Adobe Premiere which should be the easiest way to make subitles as it integrates into the complete video workflow and allows almost automatic adjustment of the timing. A nice how-to can be found here.

Really thank you for your answer! It's very helpful. I've quickly checked services what you are talking about and I believe I could use some of them. I accepted and voted up for your answer. But if you remember anything else let me know please.

I will expand the answer if I happen to find anything new. It's a very common issue that I'm sure many people will encounter when producing videos, especially for an international web audience.

YouTube has several captioning options. At one time they had free computer generated captions which you could then download the results in a text file.
YouTube currently provides this list of caption software and services.

If you upload content without captions they still get generated automatically. You can download them from the edit>advanced page on YT. It's a free way to get semi-accurate transcripts of rushes.

We use an online service to do our subtitling. It's not free, but it's pretty cheap, considering the amount of work it saves - it's certainly cheaper than paying post production staff to do it. There are lots of companies offering this service, with variations from completely machine-driven to completely human transcribed. Usually you want some sort of human intervention because the machines still don't do things 100%.
A quick web search will turn up a long list of them.


text:
How to get a crisp, exact color match for lossless screen-cast?
Background
Recording a screen-cast (no audio) in Xubuntu Linux. The following image shows a side-by-side comparison of the video (left) versus the desktop (right):

The screen-cast is recorded using:
ffmpeg -r 30 -f x11grab -s $WIN_GEO -i :0.0+$WIN_XY -vcodec huffyuv -preset ultrafast -qp 0 output.mkv

Here, $WIN_GEO stores the browser dimensions (1030x794) and $WIN_XY has the browser location (1020x221).
$ cat /etc/issue
Ubuntu Trusty Tahr (development branch) \n \l

Problem
The colours in the video differ from the colours shown on the desktop, resulting in a slightly blurry playback. I have read that this could be due to conversion between RGB and YUV colours.
Question
How do you record a desktop video (screen-cast) that when played back (e.g., using mplayer, VLC, or ffplay) results in an exact match to the original desktop colours and crispness?
Related
Relevant pages:

http://www.unixuser.org/~euske/vnc2swf/
http://technically.us/pictures/test.html
http://ubuntuforums.org/showthread.php?t=1392026
https://askubuntu.com/questions/347574/how-to-do-screencasting-desktop-recording-with-high-quality-audio-and-video
http://step4wd.com/2012/08/03/recording-screencast-in-ubuntu-linux/
https://unix.stackexchange.com/questions/73622/how-to-get-near-perfect-screen-recording-quality
https://unix.stackexchange.com/questions/65970/washed-out-colours-with-screencast-software-but-not-screenshot-on-ubuntu-all-ve
https://trac.ffmpeg.org/wiki/How%20to%20grab%20the%20desktop%20%28screen%29%20with%20FFmpeg
http://rayslinux.blogspot.ca/2012/04/capturing-linux-desktop-via-command.html

What is the final context that is going to require such exacting playback?  If you plan on using the video on the Internet, it will need to be transcoded and compressed at some point which is going to result in far greater alteration and loss of clarity.  You are most likely correct about the color space shift, but I can't find any details about how to make sure ffmpeg is using huffyuv in RGB mode (which it does support).

huffyuv in rgb should be lossless by default, is FFV1 lossless here?  If not, then the input is somehow bad...

Capturing the video frames in XWD format then converting to PNG yields results that are almost pixel perfect when encoded with ffmpeg.
Install xvidcap:
mkdir -p $HOME/dev
cd $HOME/dev
svn checkout svn://svn.code.sf.net/p/xvidcap/code/trunk xvidcap-code
cd xvidcap*
./autogen.sh
LIBS="-ldl -lX11 -lXext" ./configure --prefix=/usr/local
make && sudo make install

Capture stills at 25 frames per second:
mkdir -p $HOME/video
cd $HOME/video
xvidcap --fps 25 --quality 100 --cap_geometry 1024x768+768+288 --file out%05d.xwd

This creates a series of X Windows capture files inside $HOME/video. Convert the files to PNG format using ImageMagick then combine into a video:
for i in out*.xwd; do convert -define png:color-type=2 $i $(basename $i .xwd).png; done
ffmpeg -i out%05d.png -c:v huffyuv -preset veryslow -qp 0 -qscale:v 0 output.avi

An example script:
echo "Click window to capture..."

INFO=$(xwininfo -frame)
WIN_GEO=$(echo $INFO | grep -oEe 'geometry [0-9]+x[0-9]+' | grep -oEe '[0-9]+x[0-9]+')
WIN_XY=$(echo $INFO | grep -oEe 'Corners:\s+\+[0-9]+\+[0-9]+' | grep -oEe '[0-9]+\+[0-9]+' | sed -e 's/\+/,/' )

OUTPUT_DIR=$HOME/video

echo Capturing to $OUTPUT_DIR...
rm -rf $OUTPUT_DIR
mkdir -p $OUTPUT_DIR
cd $OUTPUT_DIR

WIN_XY=$(echo $WIN_XY | tr , +)

xvidcap --fps 25 --quality 100 --cap_geometry $WIN_GEO+$WIN_XY --file out%05d.xwd

# Convert captured images to PNG format
echo "Converting XWD to PNG..."
for i in out*.xwd; do convert -define png:color-type=2 $i $(basename $i .xwd).png; done

ffmpeg -i out%05d.png -c:v huffyuv -preset veryslow -qp 0 -qscale:v 0 output.avi

This creates a high-quality video that looks sharp with VLC, can be edited in OpenShot, and uploaded to various video hosts. Playback with MPlayer yields slightly fuzzy and off-coloured results.


text:
Is low-framerate video recording possible on the D7100 without miniature effect?
The D7100, D5200 and D5100 have a "miniature effect".  Videos recorded in this mode play back at high speed:

"Miniature effect movies play back at high speed, compressing 30 to 45
  minutes of footage shot at 1920 × 1080/30p into a movie that plays
  back in about 3 minutes."

The effect also blurs the edges of the picture to create the illusion of a shallow depth of field.
Question: Is it possible to record a low framerate movie, in the same way as the miniature effect does, but without the blurring or any other processing?
Most websites about shooting time lapse sequences warn about limited shutter life.  I was hoping that the low framerate movie recording that the camera does in miniature effect mode could be an alternative that does not stress the mechanical shutter.

No.
The miniature effect is the only creative mode that also allows movie creation. It suffers from performance "issues" giving it's unique time lapse like feel.

Based on your description of the miniature effect, this isn't a question of recording at a low framerate, it is a question of playing it back at a specific speed. The Nikon D7100 can record 1080p at 30fps without an issue. That will take care of the recording without blurring or other effects.
The rest of the solution would involve pushing through those 30fps in about 3 minutes via post production techniques.
Further, I think it is important hear to understand the difference between a mechanical shutter as used in capturing still images on a DSLR, and the electronic shutter which is used for the capture of video or images taken while in live view. See this existing question for more information: How does shutter work when shooting videos?

In minutre effect mode the camera pulls an electronic shutter frame, pushes it to the fx processor to apply the miniature effect, and then pushed that in the mpeg pipeline, due to the processing overhead of the seconds step is records at about 10fps. When the movie is played back, it plays at 24/25/30 as per the file headers. But the miniature effect is destructive, and the user want a non-destructive slow record option.


text:
How do I change frame size, preserving width (using ffmpeg)?
I'm new to this StackExchange site, and to using the FFmpeg encoder. I have a video that is 720x480 (3:2) that I would like to change to 720x406 (16:9) to match the other videos I have for a site. I have tried various command combinations, including:
ffmpeg -i myfile.mv4 -s 720x406 outfile.mp4
ffmpeg -i myfile.m4v -c copy -aspect 16:9 outfile.mp4

What I end up with is a video that scaled down to the specified height, but didn't preserve the width.  It ends up at 608x406 or thereabouts. I've been playing with various GUI versions of FFmpeg today, and they seem to do the same thing.
What would be the proper options/parameters to pass in (assuming I'll have more control via the command line) to achieve the desired frame size?

using the scale filter will do it, but there is a bit more to it.
ffmpeg -i input.mov -vf scale=720x406 output.mov

will create a movie with the required pixel dimensions, but if you look at the output you'll find that it adds information into the metadata so that it will play back at the same aspect ratio as the original, by using non-square pixels. So if you want to stretch the movie anamorphically to a new aspect ratio you need to manually set the pixel aspect ratio, called the SAR for "Sample Aspect Ratio", thus for square pixels use:
ffmpeg -i input.mov -vf scale=720x406,setsar=1:1 output.mp4

Alternatively you can set the display aspect ratio to whatever you want, thus:
ffmpeg -i input.mov -vf scale=720x406,setdar=16:9 output.mp4

What I'm doing with the -vf command and the x=y,z=a expressions that follow is creating a chain of filters. Filters can be quite complex, but in the most simple usage they take the form effect=parameter,nexteffect=anotherparameter, and they get processed in the order you write them.
You may want to put additional commands for the codec and so on, eg -c:v libx264 to use the x264 mp4 encoder, and something like -crf 20 to set the constant rate factor to 20 (usually a pretty good compromise between size and quality). So, a reasonably complete command would look like:
ffmpeg -i input.mov -vf scale=720x406,setdar=16:9 -preset slow -profile:v main -crf 20 output.mov

Main profile is good for device compatibility, the slow preset for the libx264 encoder is a pretty good balance of speed and quality, so this is a good general web-encoding workhorse. You can make it faster by using fast or veryfast or slower with veryslow and placebo will make it ever so slightly better than veryslow at the expense of a lot more processing time (hence the name).
BTW Don't use -c copy, that means just copy the video and audio streams without doing anything to them at all, so nothing you do in terms of scale, codec, bitrate etc will have any effect.

If you're using recent versions of ffmpeg you don't need to stipulate x264 as the codec any more, but it still might be worth looking at what settings you might want.

I think metadata only has a DAR field. So using setsar is just indirectly setting the DAR?

I have to use "-c copy", but in other side I want to resize screen. How can I achieve this?

@Mr.Hyde you should ask this as a new question instead of asking in a comment


text:
Can I get smoother playback by converting a video to a non-interpolation codec?
Although I've read the about page, I'm not sure whether this question fits here. If it doesn't, please refer me to a better StackExchange website.
I'm using a 5 year old laptop. Sometimes, when I play 720p videos, the video will hang for a few milliseconds and then continue playing.
This doesn't really bother me, but it'd be nice if I could have smooth video playback.
I've recently learnt about codecs, and I'm wondering whether I can reduce the workload at play time by converting the MP4 video stream to a MPEG video stream beforehand, or any other codec that doesn't use intrapolation. It would be cool if this would result in smoother playback.

Many different factors can contribute to stutter in video playback.  It could be a CPU issue (check your CPU when playing the video) in which case, a simpler codec or a player that can leverage the graphics card for decoding would help.  It could also be data rate related though.  In this case, using a simpler format would actually compound the problem as less compressed formats (easier to decode) require proportionally more disk space to store the same quality.
If you are constrained by memory or disk I/O then you would actually make it stutter more by moving to a simpler format (and there would also be quality loss unless you made the file size much much higher due to loss of compression efficiency as well as a second generation encoding penalty.)


text:
What is a description along the bottom of a video generally called?
Sorry about the terrible title question. I'll edit it if I get an answer to be more useful to others, or you're welcome to do so.
I'm trying to find tutorials and even inspiration for stuff like the DKS bar in this picture:

I looked up "trade show videos" "after effects titles" "after effects text" and haven't really found much that's helping. Is there a name used in the video world for that part of a video which might help me find more examples?
Here's the video set to this moment so you can see it all animated:

It is often called a lower third because it is a bar often appearing in the lower third of the image.  Also sometimes a name plate or title plate.

Thanks looking up "designing lower third after effects" found a bunch of results

Things like this are called TG or Title Graphics


text:
Techniques and technologies for synchronizing multiple audio and video streams
I'm hoping to produce an amateur movie.
I may be renting some equipment: (professional camera, microphone and digital recorder) but I hope to primarily use my own equipment: camera phones, professional microphones, analogue audio mixer, audio digitizer and a laptop. I hope to produce the video on an open-source video editor (Linux or Windows).
In case it needs to be said, I'm on a near-zero budget! The biggest concern I have is how I will synchronize a phone camera with an external microphone fed into the laptop.
Are there any techniques to help with this? I had a go before and it's surprisingly hard getting the audio perfectly sync'd with the video. Are there any tricks?
Also, what industry-standard technologies are used for synchronizing professional microphone setups with video, and between multiple cameras? I assume there are at least a couple of old analogue and newer modern digital methods?
Thanks!
Edit: I looked at this link but it didn't go into detail or explain different options.

The professional way
Professionally done, all cameras and audio recorders will have a running (SMPTE) time code, which can be configured in 'free run' mode - meaning the time counter runs regardless whether we record or not (ie, STOP mode).
At the beginning of the shooting day, all recordists (cameras, audio) will sync their clocks. This is done either to SMPTE 01:00:00:00, or to the time of the day.
Then all video clips and audio files (broadcast wave files - BWF, which is just a WAV file with time code imprinted) will be 'timestamped' - the time at which the clip was recorded is part of the file header.
In addition, these recorders allow you to choose the folder and file prefix of the recorded clips. A simple case is when all crew (camera and audio) set this prefix based on the shooting day ('Day01' for example).
Then when the audio and video clips are imported to the video editing software, there's alway an option to 'spot' the clips to their original time code. This way, the alignment of video and audio happens nearly automatically.
The non-professional way
Before the days of digital equipment, the syncing between pictures to audio was done manually with the help of a clapper (clapperboard):

Upon the director's instruction 'Cameras', both the camera men and audio recordists will aim at the clapper; then the clapper is clapped.
Later on, each clip is brought consecutively into the timeline (clips are numbered - there's a way to know which came before the other). The sync is done manually, by finding the video frame at which the clapper jaws were hitting each other; on the waveform display, you can see a transient from the sound the clapper makes. So it's all about moving the audio transient to the clapping frame.
For your purpose - you can just clap your hand in front of the camera (although visual and auditory labelling can be of great aid later on, but this too can be improvised).
Note that in the professional industry, this practice takes place until today, even if all equipment can stamp timecode.

A clapper is the easy approach for your budget since it will provide a synced audio/video event that can be heard on the audio and seen on the video.  The main problem you might run in to however is that many cellphone video cameras are not fixed frame rate.
If they do not capture with a reliable and accurate timecode then syncing up after the fact will be next to impossible.  You will want to make sure that the recording rate of your cameras is precise.  This can be tested quite easily by using a clapper.  Simply start your cameras and audio gear, use the clapper, wait about 10 minutes, use the clapper again.  Bring all the files in to your editor, line them up on the initial clap.  Check the final clap and see if there is drift, if there is, then whatever equipment is drifting is not going to be suitable for your purposes.
Variable frame rate can also be a problem, though this can usually simply be examined by looking at the file format information.


text:
poor quality export of still images from premiere
This is the actual source image to a video track in Premiere (a PNG):

With no resizing whatsoever, and .flv output, this is a resultant frame from the exported video:

How could I improve the output quality, especially the text?
What settings should I use

I've tried to max out pretty much everything in the FLV export settings.
And now I moved to MP4 output with H.264 encoding, but still get poor quality stills.
Here are the MP4 Export settings, what should I change?

Solution
Inspired from the answers, turns out that have to set the source to Progressive when creating a New Sequence (instead of Fields: Upper)

this is why I did not get better results whatever my configuration once I had created a sequence with Fields set to Upper
and this is why the following settings for my next project, yielded good stills

although also using higher resolution, so not sure high that plays into the test results
H.264 / MP4 Export settings otherwise the same

Is the input source a set of PNGs? Any video footage involved? If not, try setting your sequence to 'Progressive'. As per the settings screencap, it's Upper field first right now.

@Mulvya it is Progressive already and greyed out (Field Order in screenshot); the source is a set of PNGs in one track (intermittent slides) and video below. I've also set video transitions to the PNGs (Cube in, Curtain out), but no other effects.

@Mulvya and in the actual Sequence Settings the Fields is greyed out too, and set at "Upper Field First"
& tried to export without any effects just now, still poor quality stills.

Would give a +100 if I could.  I've been battling a similar problem for months, and this explained what I was doing wrong.

That looks more like a 'field' from the video, rather than a frame -- jagged diagonals are the tell.
If your video is interlaced, you may only get half the vertical resolution in a still, unless you specifically set it to output a full frame. Check the export settings.

sorry for the delay and thanks for the answer - im afraid i dont know how to translate your advice into specific settings though, so i have edited the question to show you what settings i use (that produce poor stills still)

found the settings needed now, please see final edit. thanks!

I had the same issue with image quality for a 4K video I was trying to produce. I found that for my situation the image was always very blurry upon an export, so I had to change the Format and Preset. A very nice 4K format that enabled my images to turn out crispy is the H.264 which is quite widely used, and already has a built in default YouTube 2160p 4K preset which works well. Once you select this you can compare how the output will look against the source formatting by switching between Source and Output. Eventually, you can tune the default preset and make your own in order to get a nice 4K video out of the application.