text:
After Effects stroke effect doesn't play
In After Effects I am trying to apply the Stroke effects to characters as described in this video:

My Screen:

Although as you can see even just going at the middle of the effect with the two start and end keyframes it seems to not be doing / applying anything, my logo/characters are entirely shown. They should show up "progressively" like in the Youtube tutorial.
Any idea what is happening here?

Also asked at graphicdesign.stackexchange.com: https://graphicdesign.stackexchange.com/questions/56737/after-effects-stroke-effect-doesnt-play/56738#56738
UPDATE
As it turns out I went so insane that I removed AE and re installed the CS Cloud latest version as a trial, and now it works.
I guess my old AE version wasn't playing well with Windows 10 or whatever.

related: http://video.stackexchange.com/questions/14892/how-to-animate-the-outlines-of-text-after-effects/14909#14909

Your Stroke effect is not shown as enabled in the screenshot at Graphic Design. It is, right?

I tried with and without activating it.

I can put a GIF here where I recorded exactly what I do: http://imgur.com/VgkrSJ2

This should be a quick fix:
Unselect the "end" keyframe selection. Only use either, the "start" or the "end", don't use both simultaneously. The "Start" keyframe with 0% opacity should end with another "start" keyframe with 100% opacity.

It looks like you're changing both the Start and End of the Stroke effect. If you want the text to write on completely, you need to use just one or the other. Which one you use will determine the direction the Stroke is animated in.
The effect will have to be activated and set to "Reveal Original Image" in order to see the animation demonstrated in the YouTube video (which, by the way, is a horrible masking example. I recommend watching some tutorials on using the Pen tool in order to create better masks).


text:
How To Start to Educate Yourself in Film Making?
I am interested in making films, movies or documentaries but for several years I believed that I needed to watch a lot of movies and documentaries from all around the world. I am 23 and watched apprx. 480 productions (movies and documentaries) with paying attention to the style of different directors in making movies.
I am from Turkey and as a start I want to educate myself in film making then make a project about the education system in some local universities in our country. I want this project, which will be sort of documentary, to be good quality by cinematography, sound, shooting techniques, edit, music. Not to mention it will be a non-profit work.
Question:
I found a local film making school which requires around $300 for 2 weeks education for directing and film making course. Since I will finance the project and desire to direct it with my poor technical knowledge at present. Since, I want to attend a school like this. Is this a useful start and what is your advice? I hope my question is not going to seem foolish.

Whether or not it is useful is not something we can tell you here. Experience is a good thing, sure, but it'll be up to you whether you find that useful.

There are loads and loads of free filmmaking websites, videos, tutorials etc online, Vimeo have free videos which teach you loads of basic things, Youtube offers tonnes of videos from other filmmakers. websites like NoFilmSchool are a great place to learn loads, in the end it is how you take the info and use it to your advantage, otherwise just make films and learn from them

source: Stack Exchange

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

sort: votes


text:
How do I cut out black space on a video?
I record mobile games and have my phone screen, but around the edge of the video it adds a black border which I don't want. Does anyone know how to remove it?

What are you viewing the videos on? What do you imagine would be there on a standard display instead of black surround?

If you are playing a portrait oriented game, as Jim Mack said, something has to be in the empty space, that's where the black pixels come from. Unless...
You can use After Effects here. Duplicate the video clip, take the video behind the front one, which you won't touch, then scale it up so that the sides meet the sides of the composition, and add a gausian blur, or any blur, really, to the back layer. Here is what I'm talking about:
Duplicate the first layer (press Ctrl+D or go to Layer > Duplicate):

Scale up the second layer (open up the layer properties by clicking on the arrow > left beside the layers name or select the layer and hit S to open up scale property only):

Add a Blur Effect to the second layer (Select the Layer and go to Effects > Blur and Sharpen > Gaussian Blur)

Note: In order to render faster, use a Fast Blur and enable repeat edge pixels to blur the entire image.

You might want to check the "repeat edge pixels" box in the blur filter to get rid of the dark lines around the outside.

When you view a portrait-oriented video on a landscape-oriented display, something has to occupy the otherwise unused raster. In this case it's black.

Run the video through the ffmpeg crop filter, the link I gave has the full description with examples.

ffmpeg has a cropdetect filter to detect the size of the black bands automatically.  By default rounding to keep the video size a multiple of 8x8, I think.

The context of this question is a case where the crop area is already known, so there's no need for crop detection.

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


text:
Video Rendering at 2x Speed
The video rendered at a normal speed before seen here (it just is missing audio in the first half):

Now that I got the audio working in the first half (AE - Composition video file/layer missing audio) it's rendering at 2x speed. Not sure if this is happening after the After Effects render or at the Adobe Media Encoder render (can't tell because I render the After Effect render at best quality and it's too slow to playback on any local video player software, Windows Media Player, VLC, ect.., so I can't determine if this is when it first gets rendered at 2x speed).
I saw this question here on StackExchange (How to force After Effects to interpret footage at a specific framerate?), but I checked the local raw video file's properties for their framerate and it says 29, same as it being rendered in both places. I render from Adobe AfterEffects with "best & lossless" quality settings and then from Adobe Media Encoder with H.264 YouTube 1080p HD, both say rendering at 29 framerate.
Here's what my "composition Settings" looks like:

and render settings:

Thanks for any input. :)

Please check your composition settings: Composition > Settings. Also for preview purposes you could encode your composition with after effects to .mov with h264 or in older versions to  .mp4 directly.

Hey @poor, composition settings have the right framerate. I took screen shots of my composition settings and render settings windows.

It makes sense to render a preview or just a part of it as I suggested, to determine if the issue is caused by after effects or media encoder. Did you tried to encode it with ae?

@poor, I saw no output version for H.264 in any of the After Effects render options. Do I just choose .mp4 directly? Also, are you saying to do a RAM Preview?

I think the last version with h264 support is CS5 - but as i mentioned: you could encode it as Quicktime and h.264 in newer versions for a preview.

Footage Settings? http://video.stackexchange.com/questions/6987/how-to-force-after-effects-to-interpret-footage-at-a-specific-framerate


text:
Windows Movie Maker - why is it a disaster?
Didn't find any relevant question here, except for this one - the answer highlights what I already suspected.
Basically, several people online complain about the errors Windows Movie Maker / Live Movie Maker has. I personally have experienced the following, and I have  a modern computer:

Program freezes and on reloading loses all links/cuts/effects on the videos
Adding a new video to the timeline causes program freeze (and above issues)
Trying to recover the .wlmp file is fruitless, and on my case wasted around 4h of editing on a specific video (15GB of Gopro footage)

I'm a technical person, and I got lost in the several tips&tricks websites...and eventually gave up.
I really don't need any sophisticated editing suite. I only perform cuts and add background music....really the bottom end of the video editing food chain.
Is there a specific hardware platform that they're targeting, are they having trouble supporting big HD files? Why is a basic modern product from one of the top software companies in the world so flawed?
I hope I'm not being unfair.

Might be better to searching for alternative software... There are a lot related questions on this site related to free or open source video editing.

I can vouch for iMovie, which is free, though you'd need to get a Mac to run it. If you're uploading to YouTube, they have a free online editor which can handle cuts and background music, though it's definitely NOT sophisticated.

@BrettFromLA iMovie is the (much better, I know) Mac equivalent. It seems to be the proper basic editor I'm talking about. According to other questions on videoSE, blender seems to be a free powerful editor - I'm looking into it.

Simply put, because you are using it for more than it was intended.  Movie Maker is not designed to be used for making much more than super, super simply videos.  They didn't put a lot of resources in to it as it is an extra added for free to another product.  Asking why it has issues is a bit like asking why you can't use MS Paint for photo manipulation, it simply is not what it is designed to do.
WMM is fine for making simple family videos with somewhat low to moderate quality video being fed in with a couple of simple transitions and a title or two, but beyond that, it pretty much falls apart because that is all it was designed to handle.

My problem with that is that any cheap point&shoot camera or cellphone will output 720p+ video...and that's what I'm considering the modern entry level video quality. Doesn't seem out of place to assume that an entry level "super super simple video" making software should be able to handle 1h or so of footage of that quality. It is a rant, I know.


text:
Determining original resolution of an upscaled digital image?
It is believed that anime is made at resolutions below 1080p.

most anime are [made in 720p].

Very few anime series are produced in native 1080p.

Yet if anime is sold on Blu-Ray, it is (usually) in a 1080p format. One can assume that it is upscaled from its original mastering resolution, or perhaps even a lower resolution than the master. (Ex. mastered at 900p, resized to 720p for distribution to TV networks, then those 720p versions are upscaled to 1080p for the Blu-Ray.)
How can one tell that the video has been upscaled? Is it something only a human can do, or could a computer be made to follow an algorithm and determine whether or not an image has been upscaled?
This problem comes up in video games as well, with groups like Eurogamer's Digital Foundry explaining the original resolution of certain material.
Does the process vary depending on the source?

Film that was scanned into a digital format
Digital-only live-action
Digital-only animation
Video games

What are you trying to accomplish by determining the resolution at which the anime was created? Are you only interested in anime that was created digitally? If it was traditional hand-drawn animation, then what does that mean for your question?

I don't think that what you ask is possible. Just by looking at an image nobody can say if it was upscaled from another souce or if the original export was like this.

Here is an interesting article that goes into detail on how to recognize an upscale, specifically for anime: https://ultimatemegax.wordpress.com/2015/04/24/photography-and-resolution-of-anime/

Please just don't link articles. It's better to quote parts that are relevant to answer the question or provide a summary of the article in your own words and include the link as a reference. Keep in mind that the link may stop working in the future, so your own text should contain all necessary information to answer the question.

The relevant section is the entire article. That would just be stealing the pages content.

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


text:
How to do <=1 Hz timelapse photography with Canon 7D?
I'd like to take 1 Hz and sub-second timelapse videos with my Canon 7D. I've tried both DslrDashboard and Magic Lantern, and couldn't figure out how to set the timelapse any faster than that. Worse, both of them ended up taking photos at such a jittery rate that I could hear it was completely off kilter. The camera would take one photo, then wait for a couple seconds before taking two in less than half a second, and so on, making the result unusable for video making. I was using manual mode, and shutter time, f-stop and ISO were all set to static values.
The camera is otherwise perfectly capable of taking many photos per second, even at RAW quality. Is there some fundamental issue with the timing used when remote controlling (and even when using custom firmware) causing this, or did I miss an important setting to make it all work? If this is simply an issue with both these products, are there other software products (preferably FOSS) which will reliably take 1 Hz or faster time lapse series?
(Repost from photo.SE after suggestion.)

Should this question be deleted? The photo.SE question got much more response, and by now it's just a dupe...

The problem isn't the remote timing, it's the rate at which data can be written to the SD or CF card.  The camera can shoot a bunch of images quickly in burst mode because it stores them in an internal buffer for a short while before it writes them to memory.  However, this pace of data acquisition is not sustainable for long periods of time because the buffer will fill up before it can offload to the card.  The best thing you can do is make sure you're using cards with the fastest write speed possible.  Shooting jpeg only might also help, depending on how quickly the camera converts RAW to jpeg.

I have a very fast card already - UDMA 7 - so I very much doubt this is the issue. I've also tried with small, fine JPEG and it doesn't help.


text:
Adobe Premiere Pro CC editing/playback performance
Dropped Frames and Latency Woes
I recently switched from Final Cut Pro X to Premiere Pro, and I've run into a performance issue. To be clear, I've seen several questions about Premiere's rendering performance, but none about its editing performance. Since I started adding clips to the timeline, it has started dropping way more frames than I'm seeing during playback. And its latency for "play" and "pause" when I hit the spacebar has become very noticeable. None of these issues were present when I was sub-clipping.
Storage
All of the footage is located on my 1 TB SSD boot drive, where the application is installed. I realize this would be a problem if I was using an HDD, but with my SSD, I'm not sure it is. Full hardware specifications below.
The Question
What are the best practices for increasing Premiere's performance while editing and playing back in the application?
Hardware

Model Name: MacBook Pro
Model Identifier:   MacBookPro11,3
Memory: 16 GB
Graphics: NVIDIA GeForce GT 750M 2048 MB
Memory: 16 GB 1600 MHz DDR3
Storage: 1 TB SSD (55% full)
Processor Name: Intel Core i7
Processor Speed:    2.6 GHz
Number of Processors:   1
Total Number of Cores:  4
L2 Cache (per Core):    256 KB
L3 Cache:   6 MB

There are a couple factors which can be giving you lagy playback.You don't specify your bit rate or codec. If you are editing a processor intensive codec like h.264 (not a good idea) -the processor could start to be a bottleneck. If you are editing a less compressed format like ProRes your drive or RAM can start to become the bottleneck. Since that is the most likely, I'll address that:
Because you have only one hard drive; Premiere is running off it, the OS is using it, preview files are trying to run off it at the same time. Easiest thing to try first is adding a hard drive or two. Ideally: Drive#1: OS/PPro, Drive#2: Project/Source Footage, Drive#3: Previews/Final Exports. If need be: put your Project and Source footage on an external drive and put your Previews on the local (fastest) drive. Once your previews are created, the project won't need to access the project and source very much. Use an "uncompressed" codec like ProRes or DNxHD for editing -a good SSD should be able to handle several streams at a time.
16Gb may be enough RAM, but it's not a given. It depends on the number of streams, bit-rate, size, length of the timeline, etc..

So, part of this is absolutely accurate: if editing "native" camera media (most especially the H.264 variety), the hardware is working a bit harder to get the precise frame that your playhead is on. Choosing to transcode to an intermediate format such as ProRes or GoPro Cineform will help with some of that.

@WineSoaked Your suggestion of adjusting playback is indeed a valid one to the asked question: "What are the best practices for increasing Premiere's performance while editing and playing back in the application?"

If it wasn't for the fact that I have a three year old Mac that I've been doing three-hour multicam edits on, I wouldn't know as much as I do about how to squeeze as much as I can out of the hardware.

Something that isn't mentioned, but has a direct impact on performance obviously would be what effects (even fixed effects like motion & opacity) are applied on the footage while trying to cut.
Other things to consider (some mentioned before, some not), in no particular order:

Overall effects applied (including color correction).
The number of non-empty video tracks in your sequence.
What codec your footage is using.
Adjust the playback resolution to 1/2 or 1/4, depending on source footage.
Experiment with exporting the sequence you are editing using the Project Manager, and then reopen the new project file and see if the project file itself was causing some of the issue.

None of these are a slam dunk for increasing performance, but I've used these tips to help stretch older hardware to be able to edit with the latest CC updates. Let's face it: a 2.6GHz i7 is not what it once was in terms of the performance ladder.

I should include that new color tools in Premiere Pro CC (i.e. Lumetri Color Control) at least anecdotally have a smaller impact on performance than the more traditional color effects (Three-Way Color Corrector, as an example). So, adopting the latest color effects like Lumetri may not have as big a performance hit, though it does still take compute cycles...


text:
Animating between mask paths in After Effects
This is a continuation of a previous question where I asked how to animate a waving flag drawn in Illustrator. I received a really useful answer from @poor and I've followed it as closely as I could in addition to a useful tutorial by Adobe titled 'Animating Organic Illustrator Paths in After Effects'. I'm not sure if my drawing is too complicated for this process but I am near to getting the result I want, with just one last problem. I'll explain below and any help is greatly appreciated.
I've drawn each 'keyframe' of the flag waving and would like to smoothly transition in between them. This is what each stage of the flag looks like (each one is a different layer):

Each flag ends up being composed of 6 masks when I paste them into the Path value of Mask in After Effects (because they aren't entirely closed). I paste the first flag, keyframe all 6 masks, then with the 6 masks highlighted paste the next flag in, and keyframe it:

When I play this as is, it does a really weird maneuver. I've tried setting the 'First Vertex' with no luck either:

Even the pole, which is consistent throughout, changes shape a little. Is what I'm trying to accomplish possible, or perhaps are the 'organic shapes' a little too complicated for smooth transitions between? Thanks a lot for any input or advice.

Could you please add your illustrator file to the question? That would make it easier to find a solution...

@poor Sure, here is the file for CC and CS6: https://www.dropbox.com/sh/718zdo0stwk2mef/AAB9VOEncuua2_vnd1NiEYTsa?dl=0

Thanks for the ai files - tested it today. I thought, this easily can fixed by setting the first vertex mentioned in the video here: http://tv.adobe.com/watch/no-stupid-questions-with-colin-smith/creating-organic-animations-using-illustrator-paths-in-after-effects/ Right Click > Mask and Shape Path > Set First Vertex, Sometimes it really helps, but not for the whole animation. The shape seems to be too complex for after effects - maybe there is too much movement. I will test it in the next days again.

Thanks for trying. I found this flag (http://aniconslibrary.com/wp-content/uploads/2014/07/Anicons-FlagPole.gif) as part of an animated icons library in After Effects. Maybe I should aim for a flag with no folds. Do you think that would work with the method you mentioned? A lot simpler.

It helps to remember that when you animate masks in AE the points always go in a straight line between where they are at one keyframe to where they are at the next.

Like @stib said above, masks interpolate in a straight line. However, you can also use tools like the Smart Mask Interpolation panel to tell After Effects to re-examine how the masks are interpolated between each other and find a better route, but this creates a TON of keyframes (one per frame actually) so if you plan to make additional changes to the masks later, this isn't the best option.
If it were me, I would just do each line as its own animation, and use a 10-15 frame hand animated loop, so you have control over each individual line itself...once the first crease in the flag moves from one end to the other, you can just loop that part over and over...
More info on Smart Mask Interpolation here:
https://www.provideocoalition.com/managing_moving_masks/


text:
Equipment for documenting an adventure journey
I will be traveling to India in a few weeks and I want to document the journey. Now I'm looking for the right equipment.
There are two constraints: First, the amount of work I want to put into shooting should be just short of dominating the journey. In other words, I want to take my camera everywhere but it should be small enough to not be in the way when I want to enjoy the moment and put it away (I guess everyone has this problem). We will be backpacking and moving around a lot, so I'm not looking for studio equipment or anything too heavy.
EDIT: I would like to make three kinds of shots: 1) some well-thought-out tripod shots of scenery 2) to take my camera into town on some occasions to get relatively stable footage of everyday life and of my travel partner 3) shots on the go, which can be of the Go Pro cam sort. Instead of making the filming itself less elaborate, I just cut down on the times I pick up my camera. Are these 3 kinds of shots going to give me footage for a travel documentary which isn't just interesting to watch because there's me in it?
At this moment I have a Canon 650D with a 28-105mm L and a 50mm 1.4 lens, plus a good fluid tripod. I would like to improve my footage as much as possible within the space constraint outlined above.
The second constraint is that I don't want to spend more than 500€ (absolute limit 800€).
I have already considered buying a Rode Videomic shotgun mic to improve audio. What are your thoughts?
If you have been in the same situation before, you can probably help me best. What's your experience?
Best,
Appletree
PS: Help me improve my question. I don't know what information you need to give me a good answer.
PS2: I have already read "What equipment should I get for starting out making professional quality films?" which helped me somewhat but was too unspecific for my situation.

I hate to burst your bubble, but if you are expecting video to be a similar level of intrusiveness to photography, you are almost certainly mistaken.  Video is a much more work intensive process as it requires constant attention to make sure you are getting smooth usable shots instead of the occasional random thought that "I'd like a photo of this."  It is going to take significantly more work and effort to get usable video footage that is stable and well composed.
That said, the amount of effort required varies greatly on what you are hoping to accomplish.  If a "reality cam" style video shot from a GoPro mounted to your pack or helmet and stabilized in post (will still be jumpy and move a lot) is sufficient, then buy a GoPro, a mount, some extra batteries and go to town.
If you want something that more captures the feel of where you are with documentary like footage to make something that isn't a pure "action shots" montage, you will need considerably more effort to setup tripods, capture proper shots, more planning of the shots, plus the longer time it takes to get the shots.
Audio quality is also something to be mindful of in that situation, as shooting outdoors you are likely to have wind noise and will need to carefully monitor your audio while recording as well and getting decent quality footage might require multiple attempts at the shot.
If you can update your question with a bit more detail as to what you are trying to accomplish, we can probably refine the answer a bit more for your specific situation, but the key thing to know is that it sounds like your expectations of the effort required for a particular type of product may not be grounded in reality at the moment.

Thanks a ton Henderson! I appreciate this information as it shows me that I haven't properly thought about what I want yet. I gave it some thought and added some information about the kinds of shots I'm planning to shoot. In short: some nice and stable shots and some with varying degrees of action.

video stabilization filters are really really good these days, but of course can't fix things like the camera losing sight of the subject for a bit.  I used http://public.hronopik.de/vid.stab/ for something recently, via ffmpeg, and got great results.  (I used a really long time-window for averaging, since the camera was supposed to be looking at the same subject the whole time, not panning.)

If you are planning to stabilize footage in post, zoom out more than you would otherwise.  That way, the image you want to keep is in every frame, even while the camera is shaking.  Video stabilization filters typically zoom the image in as far as needed to not include pixels that are out-of-shot some of the time.  Also see http://www.youtube.com/watch?v=BgAdeuxkUyY/ for a nice and short explanation of how video stabilization works, from Tom Scott.


text:
Setting timecode in Premiere Pro by using file creation date of clips
I have filmed a small rock concert with 4 cameras.
One of the cameras was filming short sequences (about 3 mins Clips), then paused for a few minutes and than resumed. Now it is quite a lot of work to synchronize These Clips. I'm using Premiere Pro and synchronizing by Audio is not working for those short Clips.
To solve this Problem I want to try to set the timecode of each Clip to the file creation date, which should be more or less relyable - and then do the fine Tuning Clip by Clip.
I use right click on a Clip, Modify>Timecode. But there I can only set the timecode at the beginning of the Clip (requires some calculation for each Clip).
Do you know an easy method to synchronize These Videos? Can Premere Pro 8.2 automatically set the timecode relative to the file creation date? How can I set the timecode at the END of a Clip?

edit:
I used this CygWin script to get file creation Dates:
stat -c '%W %n' *.MOV | sort -k1n > creation-times.txt

and converted the timestamps in Excel with this formula:
= A1 / 86400 + 25569

Then I used this CygWin script to get Video Durations:
for f in *.MOV
do
  echo -n "$f;"
  /cygdrive/c/Path/MediaInfo_CLI_0.7.72_Windows_x64/MediaInfo.exe "$f" | awk -F: '/Duration/ { print $2; exit}'
done

Afterwards I used standard excel formulas to calculate the start-timecodes of those clips.

https://www.cygwin.com/
http://mediaarea.net/en/MediaInfo/Download/Windows

I'm not sure about how to set the timecode of the clip from the datestamp of the file but Red Giant have a fantastic plugin called Plural Eyes which does a great job of syncing multiple clips most of the time if the audio is even half decent.


text:
Free video editing software
I'm looking for a free video editing application that works on windows that must have the following requirements:

Must be able to take segments (cuts) of videos and add them together.
Remove audio from the clips and add in a single song for the whole video.
Add in text that can show/hide at specific points in time.
Has no horrible watermarks that make the video un-viewable.
Is free since it is only for fan video use (so not corporate whatsoever).

Cheers.
Similar Questions: Simple Video Editing Tool? and What Beginner Video Editing Software Should I Use?

Welcome Adrian :) I'd recommend you to read this article: http://opensource.com/life/15/1/current-state-linux-video-editing

Resolve, Hitfilm Express are legally free editors.

Have a look into the new Blackmagic Davinci Resolve, which includes an NLE and color correction tool. it is free and can output a maximum resolution of 3840x2160.

There is also blackmagic's fusion free version https://www.blackmagicdesign.com/products/fusion. not a simple software, but will cover the needs of op. (wow in this world everything is becoming free... good or bad time will tell...)

First off there would be Lightworks, which is free with some limitations. It's a pure abomination and needs a lot of learning an rethinking if you're used to usual NLE software.
Then, what most people don't think of, there would be Blender. Actually a 3D rendering software, but also a very good, free/open source video editor. Like all software, it has a learning curve, but there are some really nice tutorials. Just search on YouTube for "blender video editing".

Virtualdub is very good software. Maybe it not cover all the requirements. And it's not exactly "visual" managed as the other, but it'd good and very flexible

"Not visual managed" - Can you elaborate?

You do not have so much buttons on the screen, most of the work is done via plugins with very sample interface :)

You can use VSDC Video editor. It is free. You can add clips, delete a portion of a clip, add text wherever you want, move the text from one place to another, PIP (Picture in picture) is possible.
You can save in many formnats. This SW (VSDC) also works as convertor to convert the videos from one format to another.
This accepts images, videos, audios, etc.
You can also add, delete an audio at any portion of the video
C Nagaraj, Pune, India

There is Microsoft Movie Maker that comes free with Windows.  It is part of the Windows Essentials package that is available for the recent versions of Windows.  I have found it is quite simple to use and able to perform the simple set of tasks you list.
There are a few online help guides and YouTube videos about using it.  The nice thing is that as it is quite a simple too it is not so complicated to pick up the basics.  I have used it for down car and motorcycle DVR footage.

This program is no longer available, and the equivalent "Movie Maker: Free Video Editor" does not have a lot of features I need.

Thank you for the update @GameDeveloper.  It is a shame that such a useful tool has gone.  If you are using YouTube then the video editor they include in creator studio is quite good.  https://www.youtube.com/editor Outside of that the free ones I know of are mostly Linux based.

Oh cool! Youtube have it :D pretty cool since I wanted to publish on youtube it anyway. Thanks!

I am pleased my comment provided a helpful answer.  The breadth of tools that YouTube now offers is quite impressive.  I would recommend uploading videos inside the editor unless you want to keep the originals posted too.  Makes splicing things together a bit easier I think.

If you put that as answer in my question I can accept it and delete my answer :) http://video.stackexchange.com/questions/20761/free-tool-to-chain-videos-and-overlap-another-audio-in-a-mixer-like-fashion/20806#20806

Four free & open source video editing software that I would suggest trying out are:

Kdenlive
OpenShot
Shotcut
Olive

I have not tested any of them thoroughly, as I generally just use a combination of Avidemux & FFmpeg for very simple video editing.

power Director is a very good software for Video editing. The current version of the software is not free however occasionally there are offers for free older versions.
I have tried the older version and find that it suffices for most routine editing work and meeting the requirements listed in the question.

MoviePy allows to edit videos with Python, which is more flexible in many situations where you don't remember where to find some control at UI.


text:
Sync separate audio to video+bad-camera-audio, free NLE recommendations
My use-case, in case the details help people understand what I'm looking for:
My brother needs some videos of him singing while playing the piano, to send in as an audition for a dinner theater.  For this job, he's already met the musical director, so this isn't a first impression, but obviously we want him to look and especially sound good.  I'm not picturing putting in any video effects or titles / credits.  (We figure metadata should be meta, like web page title or filename, and stored in the video container metadata, not burned into the video.)  So the target for these videos is to be watched on a computer, probably via youtube, not DVD or broadcast.
We used a digital camera to record video, but the audio quality isn't good enough.  We recorded audio at the same time with an analog mic hooked up to his laptop (with Audacity), but it needs to be manually synced.  More details about the details at the bottom, for anyone that's curious.  The camera and laptop clocks don't quite agree on how long a second is: the camera actually records at about 29.981 fps, when it thinks its recording at 30fps (with its audio staying in sync).
So I have 4 videos, 7 to 22 mins long, and 4 audacity projects with better audio for each video (which I can just export to wav or flac), but not synced.  Desired output: one file per song, with audio from audacity mangled as little as possible
I need to:

align the start of each external audio (wav or flac) with the synced but bad-sounding audio that comes in the same file as each vid
stretch the external-audio or a+v cam clip so they align at the end, too
discard the audio that came with the video file (or mute it and keep it around for reference so I can go back and fix the alignment if I notice a problem, without starting from scratch.)
select the time range of the "good take" of each song.
export these non-overlapping segments of my source videos, one output file per song.  (The longer source vids have multiple songs)
encode each song with ffmpeg / x264 / libfdk-aac and upload to youtube, and/or stick on my website with an HTML5 video tag.  Export from the NLE in a lossless format that I can feed to ffmpeg is fine.

I know what I'm doing with ffmpeg / x264 / libfdk-aac / flac / libmp3lame / mp4 container to make final files to put on youtube and/or on my website; I don't need help with that part.
I did the a/v sync part of the problem for the first video, as a proof-of-concept before recording more:
In audacity, I loaded the audio from the camera .MOV, and found I needed to shift the external-mic track left by 5.34563s to align with the camera track.  I did that, and cut off the part before zero secs.  Then at the end, I found the camera track had to be shifted right 0.43144s to align with the external-mic track at 11m:30s.  So I had to make the video 0.431 sec longer to stay synced with the audio.  I exported the shifted and clipped external-mic track to a .flac from audacity, after using the noise-reduction filter.
Then I fed that to ffmpeg:
ffmpeg -i session2-shifted.flac -an -i P1000669-sess2.MOV   -shortest -c:a libmp3lame -q:a 1 -c:v libx264 -preset fast -crf 18 -filter:v "setpts=690.43144*PTS/690,transpose=2:passthrough=portrait" -r "30 * 690 / 690.43144" -movflags +faststart out.mp4
(I only had ffmpeg's built-in not-very-good AAC encoder in the windows build of ffmpeg I put on my brother's laptop, hence the mp3 audio for a test-run.)
So my output is a 29.981 fps mp4, with A/V sync from start to finish.  (29.981 is close to NTSC 30/1.001 ~= 29.976, but that's just a coincidence.)  I should be able to re-run that with lossless output (or -codec copy), and then chop out the sections I want.  Either with a NLE, or note a start/stop time, and use ffmpeg -ss [start] -to [stop] -i session2-synced.mp4 -x264 -blah -blah song1.mp4
I got my brother to clap at the start AND end of each video while the external sound was recording, so we have sync marks that should be visually obvious in the waveform for the last 3 vids.  (Aligning the first one was a bit tricky, glad I did one by hand before recording the rest).
I'm looking for recommendations for software to get all that done more quickly / easily than the manual process I used.
I use GNU/Linux, my brother uses Windows.  Ideally, there's an NLE that's good for this use-case and is cross-platform, so I can show my brother how to cut segments out of a longer video that he records on his phone or something, with the same software I learn to use.  I'm only interested in open source software.  I'm not interested in investing time into learning my way around something that isn't open source.  (And not going to spend money on it when I can already do what I need with audacity and ffmpeg.)  Don't omit a good suggestion just for lack of cross-platform support, though, please.
There are many options on GNU/Linux and it's even been asked on Ask Ubuntu.
I know what a NLE is supposed to be able to do, but haven't used one before.  (Just ffmpeg / mencoder with start / stop times covered the minimal stuff I've done before.)
I'm aware that usually people stretch and pitch-correct audio to fit video, but I trust the clock in the laptop more than the clock in the camera.  And I want to keep audio mangling to a minimum.  Although I already need some pretty serious denoising / 60Hz removal on the external-mic audio, so it's hardly pristine super-high-quality.  So I'm willing to consider a solution that stretches/pitch-corrects audio instead of making non-standard fps videos.
I already tried pitivi, but the audio waveform display wasn't very visible, so I'd probably still have to do the syncing in audacity.  As installed from the Ubuntu 14.04 package, it can't export with x264, and the only lossless codec is Dirac.  (no ffvhuff...)  Lossless dirac export is unacceptably slow, so that's another big downside.  (I love open source / patent-unencumbered codecs like VP9, but I don't want anyone to have any hassles playing the vids, so I'm going with H.264 video and high-bitrate AAC audio.  Or does youtube accept VP9 uploads?)
I've used avidemux, too, but IIRC it doesn't do well outputting to modern containers.  It def. doesn't like reading codecs with b frames from modern containers, so it's pretty much a dead end.  (h.264 in mkv or mp4, anyone?)  It can do audio from an external file, but doesn't show waveforms for syncing.
This question is similar to others that have been asked before:

How can I record audio & video synced with another audio file?
How to automatically synchronize two recordings of the same event?
Free software to synchronize audio and video recorded at the same time
Non-Linear Video Editor for Free or Cheap That Does These Things
Video desyncs with the audio over time

The first question has one answer that is sort of what I'm looking for: http://auxmic.com/, but that's Windows only, and it doesn't say anything about how it handles clock drift in the input.  I might give it a try, since it's prob. simple enough to work fine with WINE in Linux.  I'd still need to use something else to cut out the good take of each song from the videos.
None of the other answers have any useful suggestions, maybe because the questions weren't specific enough.
For those curious about what I actually used:

camera was a Panasonic Lumix FZ28 on a tripod, maybe 2m from the subject, high enough to get a good view of the piano keys and his face.  It records 1280x720 or 640x480 MJPEG + 16kHz mono PCM in a MOV container, on SD cards.  Video quality is pretty good, given enough light.  At 720p, it can go for just under 12mins before hitting the 2GB max file size for FAT32, and stopping.  (22Mbit/s or so, obviously needs to be xcoded for final use.)  The video scaler in the camera is bad, and introduced some ugly banding from aliasing effects or something in the wall hanging behind my brother when we recorded in 640x480 (11Mb/s MJPEG).  We used 640x480 anyway to let the camera run longer, since each separate shot takes manual labour to A/V sync.  On top of the time to just select a start/end point and export a file.
The mic was just a cheap Labtec computer desk mic we had lying around.  It picked up a lot of 60 Hz interference, even when its cord wasn't near the power cables for the lights and digital piano.  (Even with the laptop on battery power.)  Audacity's noise removal function does a good job of killing the 60Hz and background hiss.  Having the mic sitting right on top of the piano picked up a lot of the sound of physically hitting the piano keys.  If we'd had time before he was heading back to school, I would have used something for a mic stand to put the mic farther from the piano keys, and not in physical contact with the body of the digital piano.
I made a separate project in Audacity for each video file, since the A/V offset would be different for each one.  I could have just made one big audacity project, but I don't think that would have helped with anything, except maybe being able to tweak noise-reduction / highpass (to maybe reduce the noise of piano keys being hit) filter settings and then apply it to everything at once.

BTW, is "clock drift" the right term for the de-sync over time due to sources recorded with clocks of different speeds?  I just made up that terminology, but I figure there's probably an established term.

I asked this question on softwarerecs and the answer was also Kdenlive.

@sebix, Thanks, but as I said, kdenlive doesn't handle tracks so long that one needs stretching to match the other, as well as alignment at one point, to stay synced over the whole length.  That's why I didn't mark my own answer as accepted. :/

That's also the restriction I am struggling with. Maybe I'm sometime so annoyed 'bout that, that I start to improve the situation...

I tried kdenlive, so I'll post my findings about it as an answer.  It didn't quite do the job, so I'm not going to mark this as the accepted solution.
kdenlive easily imports my clips in mjpeg+pcm, and flac.  And looks like it can export through ffmpeg, which is what I want.
It has a feature to "set audio reference", and for other tracks, "align audio to reference".  That's perfect, programmatically aligning audio is much nicer than manually dragging stuff to align waveforms by eye.  However, it doesn't seem to handle the clock drift at all.  In my 23min shot, it had perfect sync at about 4 mins.  It was a touch out of sync at the start, and maybe 0.5s out of sync at the 19 minute mark.  (I don't have a good sync point later than that, since that shot hit the 2GB file size limit, xD)
KDENlive's timeline display is in h:mm:ss.frames, not decimal fractions of a second, which confused me at first.  I was thinking that it had stretched one track, but no, it didn't.
It's easy to tell there's a problem by leaving both audio tracks unmuted, even though that will reveal problems too small to be noticed visually.  (In my longer tracks, like this one, the drift eventually gets big enough to be a problem for visual AV sync.)
I checked manually in audacity:  With the start of both tracks aligned, they're about 0.68s apart at the same 19min sync mark.  So I could do my aligning in kdenlive manually, but its automatic tool for doing it unfortunately doesn't support clock-drift correction by stretching.
kdenlive does display the audio waveforms nicely, esp. if you go configure->timeline->track height: increase to 80 or 100pix.  Nice UI for zooming way in on the timeline.
If I end up doing the AV sync in audacity before exporting, I might well use kdenlive for the rest of the process.  I'll have to see how easy it is to make multiple videos from segments of a single timeline.

Try Blender's Video Editing.
If Video and audio where recorded at the same time it will be easy to sync them, just be sure your video frame rate is correctly set in Blender and that you check synced in the video editor (at the bottom beside the time line and play, stop, etc... buttons.
Don't be scared by Blender's complexity, you are not going to use any of the others features, you are just going to use video editing and that is pretty straight forward.

Thanks, I'll give it a try if you say it does what I'm looking for.  I did blender some 3D text like 15 years ago, I remember thinking the UI was neat. :)

Ok, I loaded my vid an external audio in blender, but I didn't see anything yet about automatically aligning them based on audio similarity.  Or stretching one track to align with the other given two sync points.  This answer doesn't answer any of the specifics of my question, especially not the part about dealing with un-synced clocks.  (i.e. the part that makes it non-trivial to sync, even though stuff was recorded at the same time...)  Maybe blender can do stuff, I'll keep poking.  But this answer didn't point me anywhere useful.

You don't need to stretch anything if you set the right framerate for the video you are going to load. There is no magic, you obviously have to know aproximatle the moment where the audio matches the image, from there you can fine tune the exact frame with the exact audio time. Once you have a single frame synced the whole video is synced (assuming you have set the right video framerate and pushed the sync-av button)

Reread my question.  My two recording devices don't agree on how long a second is (because one is a Lumix camera, not even DSLR).  That's the whole point of the question.  If I have to use something else to work out the A/V sync offset and stretch, I might as well just plug that into an ffmpeg commandline.  (blender could stretch the video by setting a custom FPS, though.)

Also, blender's export-to-h.264 with x264 is very inflexible, so I'd have to export to lossless and transcode.  The only option is ABR, not CRF, and there doesn't even seem to be an x264 CPU-usage preset choice (from ultrafast to medium to veryslow).

The following response is the methodology of how to sync an external audio recording to your video. This method assumes that both your audio and video recordings are being recorded at the same time rate.
Prior to recording each scene, you need to make a loud clap sound that both the audio input of your video camera, and the external audio recorder can pick up at the same time. Typically, a clapper or hand claps are used for this purpose. A clapper is a framed chalkboard or whiteboard with scene information that is recorded by the video camera, and has an arm that is raised and clapped down to make the needed sound. The clap, when recorded, creates a spike in the audio of both the video camera's audio and the external sound recorder audio. These spikes are illustrated in the sounds waveform view with larger spikes if the sound is loud enough. When you align these two waveform spikes in your time line, the video and external sound are aligned and synced perfectly.
If you record your audio and video in one setting without breaks and without stopping the camera and the audio recorder, there is no need for you to have multiple claps during the recording, a single one will do. However, you will need to insure that when you edit out unwanted portions, you delete both the video and external audio portions at the same time otherwise, your external audio and video will cease to be synced.
Once you have aligned your audio and video; rather than delete the video audio, mute the video's audio track. If the video editing software you are using does not allow you to mute the audio track on your video, then you do have a software problem and you may want to look for a different program. I have been looking at OpenShot.org. It appears to be a full featured open source cross platform video editor which I am currently downloading and have yet to try out.
This should help you refine and simplify your video production.
ST.

When you align these two waveform spikes in your time line, the video and external sound are aligned and synced perfectly. Right, that's the manual process I described.  The question was about what software gives you a UI that can do what you describe.  (And (preferably in my case) can scale the video frame rate instead of stretching the audio with pitch-correction.)  IIRC, I ended up using ffmpeg with an offset and custom frame-rate.  This was a one-off for me, helping my brother make an audition video, so I didn't keep looking for other software.

You can try the following programs.
Serif MoviePlus starter Edition - http://www.freeserifsoftware.com/
Screen shots for OpenShot at OpenShot.org  also appear to have this feature. I am currently downloading it to review.
Scott

I'm looking for recommendations for software to get all that done more
quickly / easily than the manual process I used.

If you're willing to experiment with beta software from a noob programmer (and solder some boards too) there's my DIY open source low cost (43 USD) timecode generator and its companion application that corrects  drift between devices in post: TicTacSync
Eh, you could even participate to the project... that'd be great! For starter, I lack the IT skills to wrap up an installer script  (for windows, linux and mac).


text:
FFMPEG Sync Audio & Video From Pi Camera & USB Microphone
Posted this in the Raspberry Pi community, but it got closed for being off topic. Reposting in the hopes that it is now in the right place.
I am trying to stream low-quality audio & video from my Raspberry Pi to another device. I have a Raspberry Pi camera & a USB microphone. Both devices work separately but i cannot seem to get the audio & video to sync up.
I am running Raspbian. I began by compiling ffmpeg as described at http://blog.giuseppeurso.net/raspberry-pi-streaming-webcam/.
Here is my ffmpeg info:
ffmpeg version 1.0.10 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 27 2014 00:14:25 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: --enable-filter=movie --enable-filter=aresample --enable-avfilter

Before i get streaming working, i want to just dump the audio & video to an MKV file. I wrote this script to dump audio & video to out.mkv until terminated.
#!/bin/bash

vpipe=/tmp/videopipe
apipe=/tmp/audiopipe
vw=320
vh=240
fps=15

trap "rm -r $vpipe" EXIT
trap "rm -r $apipe" EXIT

if [[ ! -p $vpipe ]]; then
    mkfifo $vpipe
fi

if [[ ! -p $apipe ]]; then
    mkfifo $apipe
fi

raspivid -t 0 -w $vw -h $vh -fps $fps -o - > $vpipe &
arecord -D plughw:1,0 -r 16000 > $apipe &

ffmpeg \
    -y \
    -fflags nobuffer \
    -r $fps \
    -i $vpipe \
    -fflags nobuffer \
    -analyzeduration 0 \
    -i $apipe \
    -map 0:0 \
    -map 1:0 \
    -filter:a aresample=async=1 \
    -c:a copy \
    -c:v copy \
    out.mkv

The audio & video are grossly out of sync. I have tried changing the framerates on both raspivid & ffmpeg with no success. Not sure what piece of the puzzle i am missing.

Have you tried starting ffmpeg in the background before arecord / raspivid?  So the pipe buffers don't fill up before ffmpeg starts reading from them.  Prob. doesn't account for "gross" sync error.  Maybe get ffmpeg to read directly from alsa and the camera, if it's a V4L2 /dev/video device?  IDK, just a couple ideas since I saw this question while looking for something else...


text:
Are introductions in other languages suitable for internet videos?
I would like to start a YouTube Channel, playing games and reviewing them, possibly also some web development tutorials. One of my favourite shows is Citizen Khan, and, as he is a muslim character, he greets people by saying "As-salamu alaykum", an arabic greeting often used by Muslims. While not islamic myself, I wish to introduce my videos by saying "As-salamu alaykum".
Within the Asian community, doing so would not be even though about, let alone considered innaproriate, however the internet is a multicultural platform, and I do not wish to offend anybody.
Would introducing myself in this way cause offense? Would it be considered inappropriate?
(Sorry if this doesn't fit with this rooms guidelines, it's my first question here)

Firstly, I don't know if this is on-topic or not; I'll leave it for others to decide.
Simply, there are no rules. The question I would ask, is "would you do this in person?". That should give you your answer.
It intrigues me, however, that you wish to use a phrase from a culture and religion you are not a part of - so you really need to be extremely careful that you understand the implications of the phrase, as well as if it is used within society by non-Muslims. Cultural appropriation can be a serious insult to a culture; or it can be seen as appreciative and continuing their history.


text:
avconv: How to blur scenes?

I want to blur some scenes with avconv
The ffmpeg command -find it here- is:

ffmpeg -i input.avi -vf "boxblur=enable='between(t,22,113)'" -codec:a copy output.avi

doesn't work with avconv

avconv -i "video_in" -vf "boxblur=10:1" "video_out"

blur the whole video, what can I add to it to blur selected scenes.
Thanks

last progress: avconv -i "video_in" -vf "select='gte(t,10)*lte(t,20)', boxblur=10:1" "video_out" but I lose lte 10 and gte 20 black screen avconv -i "video_in" -vf "select='lte(t,10)'" "select='gte(t,10)*lte(t,20)', boxblur=10:1" "select='gte(t,20)'" "video_out" doesn't work...

last progress:avconv -i 01.mpg -filter_complex "[0:v]select='lte(t,10)' , copy[out1] ; [0:v]select='gte(t,10)*lte(t,20)' , boxblur=10:1[out2] ;[0:v] select='gte(t,20)' , copy[out3]".... all what I want is in [OUT1] [OUT2] [OUT3] someone can help me to put it in one -"OUT.mpg"- file


text:
Free software for annotations (circles, arrows, etc.) in screen capture videos
I have recorded some technical tutorial videos through screen capture. At certain points in these videos, I want to highlight buttons, text, etc. by circling them or putting arrows. An example effect can be seen here:

I know there are paid software out there -- Adobe Premiere Pro, Camtasia Studio, and the like. Is there any freeware that can help me achieve the same?
Related question: Video tutorials: how to add labels, comments, arrows etc

Very, very closely related: http://video.stackexchange.com/questions/2274/good-open-source-video-editors

There's CamStudio (GNU General Public License): http://camstudio.org/
It has screen and video annotations tools.


text:
Millisecond stopwatch for visual stereo video synchronization measurement
I am trying to get 2 video streams into sync at low cost. I would like to visually measure how good can I synchronize my cameras by pointing them to a millisecond capable stopwatch.
Does anyone know what is the refresh rate of an "old style" monochromatic LCD stopwatch (example)? I don't have one so I haven't tried to capture these yet. Wikipedia says an LCD could have a refresh rate as high as 200Hz. If LCD is slow, LED probably would be faster depending on circuity used.
So far I used online stopwatch, but these are limited by (usually) a 60Hz refresh rate of a computer LCD monitor. 60Hz lowers the resolution to about 16ms (1s/60Hz).

This question appears to be off-topic because it is about electronics unrelated to video.  The only question I see you actually asking is "what is the refresh rate of a stopwatch?"  This has nothing to do with video even if the application of it does.  You may want to try the Electrical Engineering StackExchange with a focus on the question of "which display type is better for use in a device for high speed sync".

Also, if you really want highest possible accuracy, video is not the way to do it, sync your audio tracks.  Video samples around 24 to 60 times a second, audio samples around 41,000 to 96,000 times per second.  Simply play a sound with a quick start and stop so that you can cleanly align on the edges of the sound.  This should work well unless the cameras you are using have bad sync internally.

I agree with you actually. Thanks for a topic recommendation for EE SE.

You can only sync video to an accuracy of a frame, or somewhere in the area of 15-40 mSec depending on frame rate. So as long as whatever you're shooting can update and refresh at least that quickly, it's not important to do much better. Even shooting a mechanical metronome will probably get you as close as anything else. The refresh rate of the display shouldn't be a factor, if you're examining both clips on the same screen.

Please note I have two cameras in stereo setup and with OpenCV I am showing a new frame for measurement only once in 2s so I can read the captured time easily. Say the exposition time is 1/1000s (1ms). In case of 60Hz monitor I may only be sure that my frame drift is less than 16ms if both frames show same time. I want to push this 16ms even to a smaller number - but this can only be done by getting more Hz on display that is captured by cameras, possibly 1000 Hz for ms accuracy.

A faster display won't change anything. All that matters is the frame rate of the camera. Your captured motion is quantized at that rate, and observing the quanta more quickly or more often doesn't make those quanta any different.

Agreed - assuming you're shooting at 60 fps, you'll only be grabbing a frame roughly every 17 milliseconds. Your display can update all it wants, but as long you're updating at least every 17 milliseconds (60 Hz), you'll be fine. There will be no difference between a 60 Hz and 1000 Hz display shot at 60 fps. As long as the refresh rate of your monitor (in Hz) is greater than or equal to your frame rate (in fps), you should be fine.

I still think you both are wrong. You are still talking about a single camera. What I care about is the sync offset of TWO cameras. Example: Time is 0. I push a trigger at time=1.000s. First camera takes its first frame at time=1.000s. Second camera takes its first frame at time=1.005s. The 0.005 or 5ms is the offset I care about. Though on a display that has 60Hz both cameras show 1.000 value in their frame because the dislpay has not updated yet and will update at time=1.016s. That is my point.

@Kozuch - note that for that type of a sync, having a timer probably isn't ideal because it would be hard to tell exactly which segments were active during the frame exposure.  If you really want to do it visually, you need something that will light up in sequence so that you can tell which segments were active during each frame, thus giving you a clearer picture of your offset.  (Though I'd still prefer sound if the camera's have good internal A/V sync.)

@Kozuch - One camera or two, the frames occur at 16ms intervals (assuming 60fps). It makes no difference if the cameras are taking at different times: if you observe, side-by side, still frames from the two cameras, you will always see the images as captured at their respective times. Any time difference you see on the display can't be affected in any way by the display's speed or refresh rate. In any case, AJ has given you a good suggestion to use audio rather than video to determine the offset.

Agreed, audio is a much better way to test the synchronization of cameras.

As Jim Mack said, you can only sync video to an accuracy of a frame, which can be pretty tricky. If your two video streams are half a frame off, for instance, there's really no way for you to correct this difference any further (this is the worst case scenario).
My suggestion would be to use some physical object or motion instead of a stopwatch. A "slate" or "clapboard" is a very common way of synchronizing audio and video and can easily be used to sync two cameras.
For this case, some other physical movement might be easier to use - maybe put both cameras on the ground, shooting a ball dropping in front of a ruler or something along those lines.


text:
How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream?
Note: I posted same question to stackoverflow a short time before, when I have not found this comunity yet. I repost this since the question is more suitable to this community.
1. What I tried
I have some .MTS (AVCHD format) files recoreded with my AVCHD camera. Its specification is as shown below:
$ ffprobe 140612_Canon-00000.MTS
ffprobe version 2.2.1 Copyright (c) 2007-2014 the FFmpeg developers
(snip)
Input #0, mpegts, from '140612_Canon-00000.MTS':
  Duration: 00:48:58.40, start: 0.800300, bitrate: 5563 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448),
      yuv420p, 1440x1080 [SAR 4:3 DAR 16:9],
      29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz,
      stereo, fltp, 256 kb/s

Pay attention to the part of framerate/timebase: 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Now I’d like to convert this file to .mp4 file, without re-encoding H264 video stream, on the other hand, with transcoding its audio stream to AAC.
So I tried the following command:
ffmpeg -i 140612_Canon-00000.MTS -t 60 -y -vcodec copy -acodec libfaac -ab 128k 140612_Canon-00001.MTS.mp4

2. Result
and output file’s specification is as shown below:
$ ffprobe 140612_Canon-00000.MTS.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '140612_Canon-00000.MTS.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf55.33.100

  Duration: 00:01:00.04, start: 0.021333, bitrate: 4590 kb/s

    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
        1440x1080 [SAR 4:3 DAR 16:9], 4448 kb/s,
        59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler

    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D),
        48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

Look at the part of framerate/timebase: 59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc.
Although ffmpeg just copied the video stream, framerate and timebase has been changed to twice value.
So, when I open and playback the output file with QuickTime Player or VLC Player,
the audio has no problem, however, the video stream is not played correctly.
The video is played back with having its frame forward and backward quiveringly repeatedly.
3. Question

How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream correctly?
How can I keep the original framerate/timebase values (fps/tbr/tbn/tbc) when I convert the container with ffmpeg and its -vcodec copy switch.
How can I set framerate/timebase values (fps/tbr/tbn/tbc) by ffmpeg’s command line options without re-encoding a video stream.

Any ideas?

4. Adding -r 29.97 option
Professor Sparkles gave me an advice to add -r 29.97. I tried that:
ffmpeg -i 140612_Canon-00001.MTS -t 60 -r 29.97 -y -vcodec copy -acodec libfaac -ab 128k 140612_Canon-00001.MTS.mp4

However, the output file has still wrong framerate/timebase:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1440x1080 [SAR 4:3 DAR 16:9], 4448 kb/s,
59.94 fps, 59.94 tbr, 11988 tbn, 59.94 tbc (default)

5. Remux using MP4Box
I tried demux and remux using MP4Box, according to Professor Sparkles’s advice.
brew install mp4box

ffmpeg -i 140612_Canon-00000.MTS -t 60 -y \
  -vcodec copy -an 140612_Canon-00000.MTS.h264

ffmpeg -i 140612_Canon-00000.MTS -t 60 -y \
  -vn -acodec libfaac -ab 128k 140612_Canon-00000.MTS.aac

mp4box -add 140612_Canon-00000.MTS.h264:fps=29.97 \
  -add 140612_Canon-00000.MTS.aac \
  -new 140612_Canon-00000.MTS.mp4

and output was:
$ ffprobe 140612_Canon-00000.MTS.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '140612_Canon-00000.MTS.mp4':
(snip)
  Duration: 00:02:00.22, start: 0.000000, bitrate: 2293 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661),
          yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 2228 kb/s,
          29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2014-07-14 00:38:23
      handler_name    : 140612_Canon-00000.MTS.h264:fps=29.97
       - Imported with GPAC 0.5.0-rev4065

    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz,
          stereo, fltp, 125 kb/s (default)

It looks a bit step forward.
Look at the part of framerate/timebase: 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc.
Those are match to the original stream, except for tbn (timebase value from container).
However, when I play back the output file with Quicktime Player or VLC, the video is play back at the half speed.
Although the original file has 90k tbn (90000 ticks per second) and the new output file from MP4Box has 30k tbn which is just one-third value of original one, the output file is play back at the half speed.
I don't know the reason why.  But I think the rest issue is how I can adjust the tbn value.

5-b. MediaInfo's report on the output file
I also tried MediaInfo tool on the output file generated by 5. Remux using MP4Box. The output is here: https://gist.github.com/kaorukobo/c5ab9eaa413dff6cd26a

6. Trying avconv
Volodya reported avconv worked well. Also I prepared a short sample movie file (Canon-00006.MTS) recorded with the same camera. Okay, let's try:
brew install avconv
avconv -i Canon-00006.MTS -c:a copy -c:v copy -y Canon-00006.MTS.mp4
ffprobe Canon-00006.MTS.mp4

The output file's ffprobe information is here: https://gist.github.com/kaorukobo/5b53244ade2632ff1211
and its framerate/timebase information is as the following: 59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc
The output file was played back well with VLC Player as Volodya reported. However, opening it with Quicktime Player X, the video was play back at the normal speed but with having its frame backward quiveringly repeatedly.

7. Why "Free AVCHD to MOV" app work?
As I mentioned in my previous comment, Free AVCHD to MOV app's "rewrap to MOV" feature worked well, even though it makes not MP4 but MOV.
The software calls its own ffmpeg (or avconv) program internally, and I saw what options are passed to it. It's as shown below:
/Applications/Free AVCHD to Mov.app/Contents/Resources/bin/com.geranium-soft.convert \
  -i /path/to/140710_Canon-00003.MTS \
  -map 0:0 -map 0:1 -c:a libfaac -vol 256 -b:a 128k -c:v copy \
  -sn -movflags faststart -threads 0 -pix_fmt yuv420p -y \
  /path/to/140710_Canon-00003.mov

I tried passing same options (Extractly same. I set the output container type to MOV and removed even -t 60 switch.) to ffmpeg program and converting. But the result was same as reported so far.
Anyway that great app resolved my issue on "How can I convert .MTS file (AVCHD) to .mp4 without re-encoding H264 video stream?", except at "to .mp4" and "by ffmpeg". But I'm still interested in why that app do well but ffmpeg don't.

What do you mean by "correctly"? Maybe remove that from the title. I would like to help but I have never used ffmpeg. I just use the adobe tools media encoder.

@eLouai All right, I fixed the title.

Seeing that in the text of your question you have started discussing other utilities, i will assume that you are not interested in sticking with ffmpeg, but rather in getting the job done.
In my experience with libav and MTS i have had no problems with the framerate, the files get remuxed perfectly.
I have just attempted the following with one of my files:
avconv -i 00174.MTS -c:a copy -c:v copy 00174.mp4

The resulting MP4 file played correctly with VLC.
My file is progressive MTS, i don't have any interlaced laying around, but if need be i can do more checking with that.
Report about the file test
The topic starter was able to provide a file, that was remuxed from MTS to MP4 and did not play on that person's machine with QuickTime Player (version unknown). It did, however, play with that individual's VLC player.
I do not have a Mac OS computer, but i have tried it with Ubuntu.
I have played it on Ubuntu on VLC (2.0.8) and GNOME Videos (used to be called Totem) (3.8.2); both play perfectly.
I then asked a friend of mine, who is on a Mac to play it. He is on Mavericks (10.9.4), and it played fine with QuickTime Player 10.3 (727.4).
At this time it appears to be a problem with the particular player or a problem with configuration settings on the computer. And it is probably best to attempt to update to the newest version of QTP, possibly with first removing the current version and completely wiping the old configuration.
Another possibility
When i have had an old machine i have had some high bitrate files play incorrectly in some players, and it was container specific. For example, VLC would refuse to play MTS file, it would show a frame, and then show the next one only in a second and a half. GNOME Videos played it fine. But when remuxing it to MKV, both players played it reasonably well. This maybe a question of something similar. A player maybe reading a particular container (MP4 in this case) in a way that requires just enough CPU time, that it begins to choke itself. The jerkiness effect can be then attributed to whatever subprocess takes up CPU finishing, and player dumping all of the frames that were lagging behind very rapidly, after that the bad subprocess again kicks in, and the cycle keeps on going.
In this possibility, the best option is still to try to upgrade the software. With the current multicore processors it would be difficult to test the need to upgrade the hardware without actually getting it, but maybe it is possible to look at the CPU load during the QuickTime Player useage and compare it to VLC. If you see 100% for any one core with QTP, that maybe indicative of this.

It's rather unlikely that avconv will do a different job for him. avconv is a fork of ffmpeg and ffmpeg is merging a lot of commits from the avconv project into ffmpeg, major bugs fixes like that would likely be present in ffmpeg.

@ProfessorSparkles I think that the fact that it worked here is sufficient ground to believe otherwise. I will wait to see what kaorukobo says.

@Volodya Thanks for your information. I added the report with trying avconv to my question.

@kaorukobo What exactly do you mean by "with having its frame backward quiveringly repeatedly"? Does the output shake or does it in some way jump forward and back?

@Volodya I think your expression is right. Seeing is believing. I've upload the resulting Canon-00006.MTS.mp4 to http://www.filedropper.com/canon-00006mts  If you don't mind, please try playing that file with QuickTime Player (if you have Mac...) not VLC.

@kaorukobo Hello. I have updated my answer, but it doesn't look promicing. I hope that some of the thoughts i have provided will help you to resolve the problem. You may try shooting with the same camera settings except for resolution. But unfortunately most cameras these days come with several presets, and it's not possible to just change the resolution like this.

Sorry, Volodya. I wanted try something about your comment, however I could not take the time after all. @Volodya

As per this ffmpeg bug
Interlaced H.264 packets are split causing MP4 STTS

when remuxing a mpeg-ts containing interlaced H.264 into mp4, both
  fields of each video frame are split into seperate packets. Software
  such as Mediainfo uses the STTS to determine the frame rate. It will
  show as 50fps instead of 25fps

The frame rate mismatch reported here seems to be a result of ffmpeg muxing interlaced MP4 streams according to the specification, as per which, each field is separated into one packet. And thus

"software which uses the sample count in the MP4 file to determine the
  frame rate is simply wrong." Comment 7

This will not be patched as merging field pairs into one access unit violates the MPEG-4 specification, and hence so do any encoders which do the same.
Note that the muxed output, such as the one below, plays fine for me in Potplayer and VLC.
    ffmpeg version N-76741-g8eadabf Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)

Input #0, mpegts, from '00007.MTS':
  Duration: 00:00:07.01, start: 1.033367, bitrate: 15935 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
[mp4 @ 054cf020] Codec for stream 0 does not use global headers but container format requires global headers
Output #0, mp4, to '00007.MTS.mp4':
  Metadata:
    encoder         : Lavf57.16.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, 5.1(side), fltp, 128 kb/s
    Metadata:
      encoder         : Lavc57.15.100 aac
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[mp4 @ 054cf020] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 054cf020] pts has no value
    Last message repeated 209 times
frame=  420 fps=0.0 q=-1.0 Lsize=   12478kB time=00:00:07.01 bitrate=14564.2kbits/s
video:12458kB audio:6kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.111239%
[aac @ 052fd480] Qavg: 64863.176

You might want to try to enforce the original frame rate by using -r 29.97. FFmpeg is probably trying to adjust the framerate for some reason.
Your syntax is otherwise correct and shouldn't produce that error.
Regarding your third question. Simply not possible.
You can omit frames when using codecs that encode frames individually but thats not the case with h264 but even with such a codec you still modify the video stream in some way.
The same goes for increasing frame rate, you have to either add calculated frames or duplicate some frames.
Edit: Regarding the additional info from the comment below. If you need to change the data written in the format header without writing a completely new file you probably want to do that in a hex editor. FFmpeg only has option to alter metadata which doesn't include the stream data.
How and where to make your changes in the file depends on the container format.
Another option would be to demux the container and remux the video and audio stream into a new container with your options specified. How much you can specifiy again depends on the container format. The tool MP4Box might be of help with that in this case, you can specify a framerate when muxing raw video streams into a new mp4 using the following syntax:
MP4Box -add input.h264:fps=29.97 -new output.mp4

Thanks. Regarding -t 60 switch, it is an option to specify not a framerate but processing duration ( $ ffmpeg -h|grep -- -t -> -t duration  record or transcode "duration" seconds of audio/video)

Oh right that was a different encoder, sorry for that error.

See my edit to the answer.

Thanks again. I edited my question to add the result by trying your advice. Unfortunately, the problem was still there..

Regarding your response to my third question, it's all right for the case I'd like to change the video stream's  framerate, not just "value". However, in my case, "set framerate/timebase values" means just rewriting values put on container/codec-stream's header. Why? There are some cases to deal with: the case that some encoder (e.g. Apple Compressor's h264 transcoder) injects wrong timebase value (tbc) to the video stream, and the case such as this question that ffmpeg injects wrong framerate/timebase values, which are different to those of original video files.

Thanks again. I previously tried using Hex editor, and soon gave up that method.. MP4Box sounds good. Installing and trying mp4box, it made a bit step forward. After more trial, I'll report the result.

I added 5. Remux using MP4Box at the end of my question.

Could you try the tool Mediainfo instead of ffprobe and see what is says about the framerate?
http://mediaarea.net/en/MediaInfo

A nice tool. I tried MediaInfo and added its report to my question. However, I could not find more useful information than ffmpeg.

I tried another solution than ffmpeg. Free AVCHD to MOV's "rewrap to MOV" feature worked well, even though it makes not MP4 but MOV. The software calls its own ffmpeg program internally, and I saw what options are passed to it. When I have some time, I would report about it.

Very weird issue you have there. One thing you could try besides looking what commands this tool used internally is to omit the time constrain (´-t 60´). I'm somewhat believing that cutting h264 like that could cause problems without transcoding. FFmpeg could have just cut in the middle of some P or B frames that dont decode without an I frame which may have caused the video to corrupt depending on how a player would handle such a case.

Sorry for the delay. I agree your viewpoint and doubted that possibility. Although I didn't write about that in my question, the same issue appeared without the time cnostrain -t 60... But properly, I should inspect such issue by using a short source file recorded with the same camera.

I added 7. Why "Free AVCHD to MOV" app work? to my question.

I know this is an old question, but it just popped up again in the feed so it's new to me. (-:
One thing I don't see mentioned is field order. This is an interlaced file, so that's a consideration. The OP mentions the frames "quivering back and forth" which is always a flag for incorrect field order. If the video is otherwise OK except for the 'quivering', try adding whatever ffmpeg needs to force "top field first", then the opposite if that's still wrong. I'm not familiar enough with ffmpeg details to give the exact flags for that.

I want to try running some ffmepg commands on your answer. However  my ffmpeg version 2.2.1 doesn't seem to have options that handle the field order . I tried ffmpeg -h|egrep 'field|first' but it shows nothing. Previous version (0.8.6) of ffmpeg had -top option which may handle it.

@kaorukobo The internet offers this: -vf "fieldorder=bff" or =tff where the t and b refer to top and bottom respectively. The top=1 / 0 option is apparently used to change the order in which fields are read, not written. Again, I use ffmpeg / avconv only casually, so no guarantees.


text:
Low cost frame synchronized (genlocked) 3D stereo camera
I am trying to capture stereo video with 2 Microsoft LifeCam Studio USB webcams.  Thus far, the best approach I've managed to come up with is my own tool written using OpenCV to capture video streams from the cameras in Ubuntu 14.04. I am using very simple VideoCapture code (source here) and am trying to at least view two videos that are synchronized against each other.
I used Android stopwatch apps (UltraChron Stopwatch Lite and Stopwatch Timer) on my Samsung Galaxy S3 mini to realize that my viewed images are out of sync (show different time on stopwatch).
The frames are synced maybe in 50% of the time. The frame time differences I get are from 0 to about 300ms with an average about 120ms. It seems that the amount of timeout used has very little effect on sync (same for 1000ms or 2000ms). I run in FullHD but lowering resolution to 640x480 had no effect.
I am trying to record stereo video with a low cost setup.  An ideal result would be a 100% synchronized stereo video stream that has about 10 FPS.  Are there any alternative approaches that would result in better synchronization?
EDIT: In my search for low-cost hardware I fount that it is probably possible to do some commodity hardware hacking (link here) and inject a single clock signal into multiple camera modules simultaneously to get the desired sync. The guy who did that seems to have developed his GENLOCKed camera board (called NerdCam1) and even a synced stereo camera board that he now sells for about €200.
However, I have almost zero ability of hardware hacking. Also I am not sure if such clock injection is possible for resolutions above NTSC/PAL standard (as it seems to be an "analog" solution?). Also, I would prefer a variable baseline option where both cameras would not be soldered on a single board.
Also found this related post: Cheap solution for shooting with multiple (>2) cameras in sync
   (genlock or LANC?)

I tried to minimize the waitKey timeout (using 1ms for the loop to work) and check every 100th loop iteration to save the still pair. I still get sometimes about as many as 12ms delay from the first camera to the second... I guess I need a better stopwatch since these are often not readable in the frames while redrawing numbers (or my shutter times are too long).

There was a bit of discussion about this question between the mods and we agreed to keep it closed though essentially the question isn´t really off-topic but your focus is very heavily on computer vision. Asking about how to do snyc'ed stereo video is totally on-topic here, you just have to make the question a bit more general.
If you edit the question to reflect that I gladly re-open it.
Otherwise if you definitely need a programmatic approach with webcams the question might be better suited for SO.

I reworded the question to omit the CV topic. I would be happy for this to re-open. Please feel free to edit the question to get a desired video-topic.

I removed some of the code heavy parts, added a bottom line to the question, opened the question up for different camera solutions than webcams and re-opened.
The fact that you were focusing on webcams, coding in OpenCV and live viewing of your cameras made it quite unusable for anything else video production related but computer vision (which is not on-topic here but on SO)
Does that still reflect your question?

Thanks for an edit. Yes I only need to record synced stereo video, that is the main goal.

I changed the "X FPS" requirement to a more concrete "10 FPS".

You probably will not achieve a 100% perfect result with your setup. That you got them synced to a 1FPS accuracy is pretty amazing actually.
Professional stereo setups use frame locking in hardware to ensure the cameras record in perfect sync.
This is not possible with ordinary webcams. If you fix the recorded video in post you can get to less than 1/RecordingFPS'th of a second accuracy which can be enough depending on your framerate. The higher your framerate the smaller the offset will be.
If the webcams offer some sort of low level api you might be able to improve the results even further but I doubt thats available, thats usually something you only get in (rather expensive) industrial cameras.
Edit: Regarding your edit, Genlocking is the way to go with pretty much any video application if you need 100% sync (or as close as possible to that, you will always have some nano/microsecond delay between frames).
Being it syncing videos displayed on a display wall (all these individual displays need to show the correct portion of the frame at the same time). Or recording with multiple cameras the same frame at the same time.
Resolution isn't a factor here.
Though price definitely is. Do you have a budget for this project or is this for hobby purposes? There are definitely (non-cinema) cameras that would support this though they are not exactly cheap as a webcam.
The cheapest solution I can think of is using the GoPro Stereo Rig. http://gopro.com/camera-accessories/dual-hero-system
This would put you at a budget of 1000$ in total (minus a few cents). Not exactly cheap but definitely affordable.
And the GoPro is also a very flexible solution. You can shoot from 3840x2160@15FPS to 848x480@240FPS. It also supports raw HDMI output which can be helpful if color precision is desirable or live monitoring of your shoot.
A downside is that the GoPro has a fish-eye lens. You can reduce the distortion by setting the camera viewing mode to narrow and using this nifty software hack but you wont get fully rid of it unless you replace the lens.
Edit 2: If you go the "build your own electronics route" you should have a look at the ArduCam project. It's essentially a shield for the popular Arduino boards. It allows you to connect several cmos modules like the OV5642 which is a 5MP sensor that is also used in the Raspberry Pi camera module.
According to this thread on the RaspberryPi forum these modules support genlocking.
While its not possible with the pins broken out on the PiCam module (though there are some ideas about how to do genlocking with it on the last page) you can order these modules cheap (25$) from ebay and use them with the ArduCam board. Even if you don't connect the modules to the same oscillator to do genlocking you should get some pretty good results as you work pretty close metal here also the Arduino plattform is very easy to use.
With such a setup you could potentially make a 1080p stereo 3D rig for around 125$.
50$ for the cmosm modules, ~16$ for 2 Arduino Uno clones and 60$ for 2 ArduCam shields.

I made an edit to my question adding some hardware hacking possibilities in case you are interested in replying.

@Kozuch: edited my answer

Thanks for elaboration :). I have some budget (say $ thousands) but I am trying to develop cheap solutions for possible community project. The GoPro Stereo is very interesting because of a very commodity hardware. I guess the housing is not necessary - you only need to connect 2 HERO3+ BE with a (proprietary?) sync cable? Though something cheaper would still be nice. I probably need to get into HW hacking/development because the NerdCam1 is what I actually need (though it has not open PCB schematics probably)... But NerdCam1 seems to have very lousy resolution, I need a sharp 1 Mpix at least.

If you want to go the self made electronics route (actually not as hard as one might think) I added some usefull info.

Thanks for a great edit. Am I right that the Arduino solution will save video or stills in perfect sync when fed with same external clock signal and ext. triggered via GPIO? Where will I feed the clock signal into on CMOS module? What HW do I need for it or can I get it from Arduino boards themselves? The application will be mobile stereo road/terrain scanner from a passenger car moving up to say 100 km/h so other issue could be rolling shutter but I understand I wont get global shutter cheaply. I hope on short enough exposure time to minimize this or simply reducing vehicle speed. I will ...

Continued: also need to fuse GPS/IMU sensor data within some sync into the image/video stream to make corrections of visual odometry - there comes my initial idea of doing all these in C++. Later DGPS/RTK level GPS should be used. Ordinary GPS will only have 10 Hz anyway but that should be enough in the beginning. Could I save the GPS data somewhere in some sync along with the image stream with Arduino? Arduino GPS tutorial doesnt look very difficult. This GPS thing is likely off-topic here - do you have any suggestions for better place to ask? I struggle with being off-topic on whole SE.

If you have a fast moving vehicle I would really recommend a GoPro at high-frame rates.
Regarding " will save video or stills in perfect sync when fed with same external clock signal and ext. triggered via GPIO" yes afaik, regarding the GPS/IMU thing, not an issue with Arduino, actually pretty easy.
The shields wills save the video to the SD card, where you can also save your sensor data).
Though regarding all these electronic questions I recommend go to http://electronics.stackexchange.com/. Its exactly for these kind of questions.

You might want to post a link to the EE thread if you ask about how to do the genlocking on these boards.

Thank you for your great help so far. Just a side question: the GoPro stereo sync only works with Black Edition units right? This is pushing the cost higher because I need neither very high FPS nor high resolution. I am fine with 10 FPS and 1-2 Mpix. Also GPS/IMU fusion with GoPro would be a challenge? I will test the severity of rolling shutter really hoping it wont be that bad. Finally, I am continuing the journey on EE with following HW post: http://electronics.stackexchange.com/questions/124596/genlock-2-ov5642-camera-modules-on-arducam

Yet another question about GoPro DUAL System camera compatibility: http://video.stackexchange.com/questions/12346/gopro-hero-dual-3d-stereo-system-only-compatible-with-black-edition-units

According to this answer http://electronics.stackexchange.com/a/124628/29812 and this blog http://vanceance.blogspot.co.at/2014/02/arducam.html it seems that ArduCam might only be able to take stills 10s apart (0.1 FPS) and also has no video capture feature.

I guess I got fooled by all these timelapes videos and the live video function of some of the shield variants.
Then I guess your other option would be to do the exact same thing with the PiCam and 2 Raspberry Pis like suggested in the last page of the thread, it should theoretically work by giving both pi cam modules the same clock source. They haven't tried it but its worth a shot I guess, that solution would total to 130$ or 120$ if you choose the Infrared Camera module (which might be more suited for computer vision depending your environment)

http://www.raspberrypi.org/product/camera-module/

http://ex-en.alliedelec.com/search/results.aspx?term=raspberry+pi
http://www.raspberrypi.org/forums/viewtopic.php?f=43&t=48238&sid=0c5ae07959126a05850dfe1bdf1bede1&start=26

There is a follow-up question about frame synchronizing Raspberry Pi stereo camera: http://raspberrypi.stackexchange.com/questions/22696/stereo-camera-frame-synchronization-genlock-video-or-still-image

You might want to cross post the question to EE aswell. The RPi SE is great but more about the more basic things you can do with the Pi and more software focused, not sure you will get a good answer there.

Ok, good idea. Here we go: http://electronics.stackexchange.com/questions/124812/raspberry-pi-stereo-camera-frame-synchronization-genlock-video-or-still-image

New task: I need to do my computer vision processing live and not in post-processing. I need the video signal on a strong x86 machine. I see two options for this: 1: HDMI capture. Feed HDMI out of either RPi, CHDK/SDM (StereoData Maker 1.86 can do video sync!) or GoPro to HDMI capture PCI-E card (Blackmagic Design has some, though getting stereo input is questionable). Data hopefully could be accessed in C+. 2: Custom stereo USB device (two cameras on single USB cable) - tough HW design and assembly, custom PCB for 2 CMOS modules + USB driver needed (=expensive). Could you comment the ideas?


text:
Is it possible in FFMPEG to change scale over time?
Ok, so using the overlay filter, one can change the x/y location of a video over time by using the "t" variable. For example, overlay=x='if(gte(t,2), -w+(t-2)*20, NAN)':y=0 can be used to start sliding an overlayed element from the top left to top right, after 2 seconds has passed.
What I want to do is to use a similar principle for scaling elements. I would like to be able to change the scale of a video over time by using an expression (like, scale=w=iw*t, or something along that line).
Is this possible?
when I run that expression through -filter_complex, I get

Error when evaluating the expression 'iw*t'.
Maybe the expression for out_w:'iw*t' or for out_h:'-1' is self-referencing.

I'm feeling like there's a fair chance I'm going to need to patch FFMpeg if I want to get this functionality, but I thought I would ask first, to see if anyone would be in the know about this kind of thing!
Does anyone know how such a task might be accomplished?
Thanks for the help!

Sounds more like a syntax error right now but I haven't used that feature before so unfortunately I can't really help here.

As far as I can tell, my syntax remains clean and functional until I introduce the "t" variable. Beyond that, it just seems to get mad at me and throw errors, no matter what I try :P

So everything works until you add *t ?

*t, +t, anything having to do with "t". In any other time-adaptable features in libavfilter, you make it dynamic like that by adding a "t" to the expression. With this, introducing the "t" just causes errors, all the time. So, I'm wondering if there's a back door I'm missing, or if the feature just doesn't exist :P

t is not a defined thing when it comes to overlay filter.

It is defined in regards to x and y coordinates of the overlay. You can use it effectively in those expressions (see the docs). I'm having trouble making it work on the scale values, though.

You could just write a filter. http://wiki.multimedia.cx/index.php?title=FFmpeg_filter_howto

Last time I was looking at ffmpeg expressions, I had a hard time finding which variables were available for expressions in which filter.  Some of them support t, some don't.  Re-evaluating the expression and reconfiguring the filter for each frame is expensive for some filters, so I assume that's why they don't.

@theophilus777, did you find the answer on your question?

@alexspeller the scale filter does not support timeline editing, so not directly possible. I'll check if there's a workaround.

@Mulvya How about extracting frames, scaling them as required and putting them back?

Technically possible with H.264/5 output. Don't know how players/editors will handle it.

To be honest this can be definitely accomplished by writing an external application (in python say), where the scale ratios can be multiplied by a varying factor.. I'll see what I can do.. Any suggestions are welcome.

@Mulvya No, players can't handle it. They need a constant frame size. Variable frames should be padded  to complete the frame.

Not true. Try this: encode a video at some size but save to .TS. Encode another video with different size but same encoding settings and save as .TS. Use FFmpeg's concat demuxer or protocol to create merged MP4. Play in VLC or Potplayer. Works here. In Potplayer, if you use the kbd shortcut to resize player window size to video size, it will resize to new video parameters if you press key when the playback has switched to the 2nd video. Basically, if your encoder/muxer inserts multiple SPS/PPS in-band (i.e. in mdat) then some players do support context reinit.

@alexspeller What's the purpose for the dynamic scaling?

From what I understand 't' is evaluated once. Have you read this: https://ffmpeg.org/ffmpeg-filters.html#zoompan ?
Ffmpeg Docs:
9.170.1 Examples

Zoom-in up to 1.5 and pan at same time to some spot near center of picture:

zoompan=z='min(zoom+0.0015,1.5)':d=700:x='if(gte(zoom,1.5),x,x+1/a)':y='if(gte(zoom,1.5),y,y+1)':s=640x360

Zoom-in up to 1.5 and pan always at center of picture:

zoompan=z='min(zoom+0.0015,1.5)':d=700:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'

Same as above but without pausing:

zoompan=z='min(max(zoom,pzoom)+0.0015,1.5)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)'


text:
Sound sync problem
I have a bizarre sound synchronization problem which I am really puzzled with.
I recently recorded an interview with the video camera capturing the sound of the interviewed and an external sound sound capture for the interviewer.
When editing it with Adobe Premiere CS6 I started by synchronizing the start of the interview since both recordings started a few seconds apart. So far so good.
Then, one of the recordings was lagging and at the end of the recording (lasting around 25 minutes) where I found a delay of more than one second on one of the sound tracks. So I found a sync point and used the rate stretch tool to adjust one of the tracks to match the other and since beginning and ending were synchronized (I checked) all was fine... Or at least so I thought.
When I started editing further I realised that towards the middle of the recordings there was further de-synchronization. It is like the lagging and speed-up of sound is non linear; like an accordion...
Has anyone experienced this before? What causes it? How can it be corrected other than cutting everything in smaller chunks and adjusting them one by one?
Thanks in advance for any help.
PS: I have also posted this same question on Sound Design beta since I laster realised it relates more to sound than to video.

The most common cause of this kind of asymmetric drift is dropped frames.  With older equipment, there were sometimes inconsistencies in the internal clocks that would result in issues that time didn't flow at a consistent rate between samples, but most decent modern hardware, while it may have slightly different rates, is inherently stable at that rate.
Dropped frames, however, upset this balance.  With a dropped frame, data is missing or delayed for an instance of time and that gap has to be absorbed.  Frequently, that is absorbed by simply pretending the frame didn't occur.  When this happens however, sync is lost with any other source that did not also drop a frame at that same time.
It can be quite a pain to deal with since you don't necessarily know where exactly the frames were dropped and need to resync on either side of a dropped frame.  This is why it is best to ensure your recording equipment has fast enough cards and processing to avoid dropped frames in the first place.  They are a major nuisance and even one dropped frame is often enough to cause a shot to be re-captured or re-shot if detected at a time when it is possible.