text:
How to loop outer glow layer style in After Effects?
I have a layer in After Effects to which I have applied an outer glow as a layer style. Ideally I would like the glow to turn off and on, in a loop, starting at a point in time and then stopping. Is this possible—perhaps with a script?

I'd suggest animate the 'Opacity' property of the outer glow:

Click to enlarge

Create a keyframe by clicking on the stopwatch of outer glow 'opacity' and set its value to 0%
Create a second keyframe and set its value to 100%
Alt-Click the stopwatch to create an expression and insert loopOut(type = "pingpong") to get an endless loop of both values

Composition length: 49 Frames,
2 Keyframes: frame 0 > opacity 0%, frame 25 > opacity 100%
Note: In order to create a less generic animation, you can also create 3 or more keyframes by using loopOut(type="cycle") expression instead.

To start the animation at a predefined time as well as stop the animation as you like, you can either duplicate the layer twice and remove the layer styles of both duplicates in order to concatenate all 3 layers by hand or write a simple condition like this:
// get the current frame of the composition
currentFrame = timeToFrames(time, 1 / thisComp.frameDuration, false);

// check if the current frame is in the predetermined range
if (currentFrame >= 20 && currentFrame <= 60) {
  // loop all keyframes
  loopOut(type = "cycle");
}
else{
  // if the current frame is not in predetermined range set glow opacity to 0
  thisLayer.layerStyle.outerGlow.opacity = 0;
}

Composition length: 80 Frames,
Loop animation range: Frame 20 - 60,
3 Keyframes: frame 0 > opacity 0% , frame 10 > opacity 100%, frame 20> opacity 0%
Official expression language reference

timeToFrames(time, 1 / thisComp.frameDuration, false) is the same as time / thisComp.frameDuration is it not? Simpler, and one fewer function call.

Yeah, good idea @stib. Feel free to edit my answer.


text:
Gstreamer 1.0 rtspsrc to rtp (audio and video)
Hi I'm currently trying to use gstreamer-1.0 to consume rtsp source and provide RTP streams for audio and video in the streams (for Janus Gateway). I have a working solution with ffmpeg so basically would need help to translate this to working gstreamer pipeline.
ffmpeg -rtsp_transport tcp -i rtsp://ip:port/h264.sdp \
-an -c:v h264 -profile:v baseline -preset ultrafast -tune zerolatency -vf "fps=20" -bsf:v h264_mp4toannexb  -f rtp rtp://localhost:8004 \
-vn -acodec copy -f rtp rtp://localhost:8005

Currenlty I have only this:
gst-launch-1.0 rtspsrc location=rtsp://ip:port/h264.sdp latency=0 protocols=tcp ! rtph264depay ! rtph264pay name=pay0 pt=96 ! udpsink port=8004 host=localhost

but this is not transcoding, and by itself the stream is not playable (strangely it works if I start the ffmpeg example to see video and then run gst but this is beyond the point here), so I would like to have x264 transcoding (re-encoding?) to baseline profile with minimum processing power required.

Ok I've found the solution that works, it was here all along but needed some changes (link only since it's link to the stackoverflow)

source: Stack Exchange

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

sort: votes


text:
Which gives better prores bmpcc or 600d with atomus nimja 2
Which gives better prores bmpcc or 600d with atomus nimja 2. Which kit to buy.

Does the 600d send an 8-bit stream down the hdmi to the Ninja which the Ninja then 'up-converts' to 10-bit proRes? If so then I'd say the BMPCC.

First, understand that you are probably asking the wrong question. (I'll quickly answer it for you anyway -- the BMPCC's native 10-bit ProRes support is superior.) The real question is probably which camera will produce a better-looking result for you. Whose ProRes implmentation doesn't really matter, and it should not factor into this purchase decision.
Some things to take into consideration:

Lenses. Do you already have either EOS or Micro 4/3 lenses that are any good? If not, are you able to buy decent ones for either of these camera systems? A fantastic lens on either one of these cameras would produce a much better result than a crappy lens on the other.
The BMPCC completely destroys the 600D (and every other camera in its class) in low-light performance,so if you'll be shooting outside at night a lot or something, this alone is a huge difference.
The 600D has the 12-minute clip record limit. If you're attempting to film, say, a concert performance, not convenient.
While the BMPCC can thankfully now format its cards, I still don't think you can delete individual clips off it. If you aren't able to dump footage frequently because of this, maybe an issue.

Those are only a few things to think about. I would say the BMPCC is a superior camera overall and would recommend it over the 600D for most things, but again, some of its quirks may not work well for whatever you're going to be using it for.
Either way, take some time to consider your specific needs, and determine which camera will produce the better overall result for you.

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


text:
Forcing a comp to play back at a certain framerate in aftereffects
I have an after effects comp that is "stop motion", i.e. all animations move at about 8 frames per second.
I want to use this comp as a 3D layer and animate camera moves over it smoothly at 30 fps, while the animation continues to play at 8 fps.
But every time I drop the 8 fps comp into the 30 fps comp it seems to be rendering at 30 fps, losing my stop motion effect completely.
I have a video example here:

Will I have to render out a .mov and reimport to get the desired effect?

Oh my goodness after ages I found it.
Comp settings > Advanced settings > Preserve Framerate When Nested or in render queue


text:
Mux mkv and dts file, change default audio stream and language
I want to mux (combine) two files into one mkv file. The first one is an mkv file that contains a video and an audio stream in German. The second one is an English audio stream in dts format.I want one mkv file that contains both audio channels, the English one being the first and default audio stream.
Here's the ffmpeg command I'm using so far:
ffmpeg -i movie.mkv -i audio.dts -map 0:v:0 -map 1:a:0
-map 0:a:0 -c copy movie_combined.mkv

This produces acceptable results. I get an mkv file that has two audio channels, the first one English, the second one German. However, there's two problems. The second (German) audio stream is still the default stream (VLC media player uses it by default and according to MediaInfo, there's a default flag on the stream). Also, the English stream doesn't show up as English, according to MediaInfo there's no language information for that stream.
How do I flag the English audio stream as the default one? And how do I add the language information for that stream (so that, for example, it shows up as English in the audio track selection of VLC media player)?

For language, add -metadata:s:a:0 language=eng. FFmpeg doesn't set or alter track dispositions in MKV. Use mkvpropedit.

@Mulvya Thanks, the metadata tag works. Can you explain what it does / how that parameter takes it's input? And do you know what command I need to use with mkvpropedit to set the default audio stream flag? Feel free to post that as an answer so I can accept it

For language, add -metadata:s:a:0 language=eng.
FFmpeg doesn't set or alter track dispositions in MKV. Use mkvpropedit.
To set the default flag for the first audio track and remove it from the second one, use this command:
mkvpropedit movie.mkv --edit track:a1 --set flag-default=1 --edit track:a2 --set flag-default=0

As mentioned in the docs, the app "does not set the 'default track flag' of other tracks to '0' if it is set to '1' for a different track automatically." This is salient because FFmpeg sets default flags for all tracks to 1 unless the input has it different.

Based on this answer on stackoverflow, it seems that changing the disposition is now possible with ffmpeg (see also the official documentation).
I think that the command that you would need, so that the final file had English as the default audio stream is:
ffmpeg -i movie.mkv -i audio.dts -map 0:v:0 -map 1:a:0 -map 0:a:0 -c copy -disposition:a:0 default -disposition:a:1 0 movie_combined.mkv

The addition is -disposition:a:0 default -disposition:a:1 0. The numbering of the streams is for the output. -disposition:a:1 0 is needed to remove the disposition from the second stream.
(Instead of -disposition:a:1 0 you could also, in principle, use the non-documented -disposition:a:1 none, which has the same effect.)
To add metadata/language information, see the other answer.

Have you tested this? At the time of my answer, -disposition was added but didn't work with MKVs.

Yes, I have tested this (using ffmpeg on Ubuntu 16.04) with MKVs and it did work. The changed disposition was recognised by both ffmpeg itself (ffmpeg -i previous_output_file.mkv) and a mediaplayer.

for people stumbling over this (like me): the ffmpeg doc now has -disposition and says, that you should use 0to delete the disposition. none is not listed there, maybe unknown values are simply mapped to 0.

Thanks for the information! It's great that -disposition is now documented. none, despite indeed not being mentioned there, still seems to work. It's not just the case that unknown values are mapped to 0 — using any other value results in an error message. I've edited the answer, but kept mention of none in case there are old versions of ffmpeg which accept none but not 0. (It's unlikely, but I don't want to test all old versions or trawl the git history...)

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


text:
I am doing a scene in a movie where someone runs through a forest
I don't know how to keep a moving camera steady. I also want to properly light this, is there a way I can get light into a forest? Or is there a good program to fix lighting. (I heard about color-grading, but i'm not sure what it is.)

There are a number of options for keeping a moving camera steady. There's the new electronically controlled gimbal mounts, they do an amazing job of removing camera movement, and they're relatively inexpensive to buy or hire. I use one of these, and it's great for DSLRs or a Blackmagic Cinema camera.

There are also passive stabiliser mounts, that let the camera swing freely but use weights to slow the rotation down. If you're on a super low budget you might want to consider one of these.

Going the other way are the full-body stabiliser rigs like SteadyCam and GlideCam. These are rigs that the operator wears and provide a very stable platform for even quite large cameras. We have a glideCam rig where I work and from experience it requires a fair bit of practise to use well - not to mention stamina and physical strength.

As for lighting, you can't fix what you can't see. Colour correction and grading will fix problems and create a 'look', but you have to be in the ball park for the results to be any good. This is because physics: if you don't have enough light and you try to bring up the levels in post you're only going to get a bunch of noise. Similarly if your picture is completely blown out you won't be able to retrieve any information where the levels are completely white.
To light a forest requires either big lights and a generator truck, or imagination. Without large light sources you're only going to get pools of light, so you need to use smaller shots and edit it cleverly. You could give the character a practical source of light - torch, lantern burning branch, and then move the light source with them, using the pools of light it creates.
Another good trick for lighting for darkness is to mainly light from behind, giving your subjects rim light, but little light on their faces, except maybe a small eye light and some bounce. For close-ups you bring in a bit more fill, but for the wides you keep everything silhouetted.
You can also shoot day for night. That's where you shoot during the day, but then bring down the exposure and saturation and grade it to give the feeling of night time. Done badly it looks rather cheesy, but it is a common technique, you'll find plenty of tutorials for it.

The first part of your question: asking how to keep the camera steady really depends on what kind of camera you have. there are quite a few "steadicam" type rigs for the smaller cameras in use today, they do take practice to use well. Can you contact a local rental house in your town to see if they have one for rent? The second part of your question: depends on the shot, how wide? what time of day, how long?

The scene is supposed to be during night time, but according to @stib, I can lower the exposure and saturation to make it look like night when I shoot during the day.

To keep your moving camera steady, there are multiple options.

Many video cameras include an "optical image stabilizer" to stabilize the footage as you're shooting. It's done digitally.
As Tom said in his answer, you can look into a consumer-level "steadicam" device.
The appearance of shaking is reduced with a wide-angle lens. (Conversely, if you're "zoomed in", the shaking is a lot more obvious.)
In film school 20 years ago, I built a "shaky-cam" mount for my 8mm film camera. It's simple and cheap, and works pretty well. Simply put, you mount the camera on a board. This was used for "running through the forest" shots in the cult classic "Evil Dead". It's item #4 on this page.

I think 'shakycam' rigs were just about compulsory for anyone going through film school around 20 years ago!

That's exactly when I was in film school! :)


text:
How to use a layer as mask for another
In After Effect CC, how can I use a layer, for example with a black shape, to use that shape as a mask for another layer? I know I can draw a transparency map on the layer I want to mask itself, but wheneven I move / resize that layer (it's a simple image, in my case) the mask gets moved / resized as well and I want the mask to stay put.

I think you need to use a track matte - this lets you use one layer to control the transparency of another:
https://helpx.adobe.com/after-effects/using/alpha-channels-masks-mattes.html


text:
Binding something to a moving object
Many montages on youtube use some kind of binding things(text, images) to some moving objects. For example this guy uses binding on game character:

I made something similar in Sony Vegas but that looks like garbage even after all the keyframes I made to move the text synchronously to object. Is there any better way to make something similar and which program will do the best job here? What is the name of this effect and how to find(search for) it?

What you're looking for is Motion Tracking. There are a number of tools which have motion trackers in them - Apple's Motion, Adobe After Effects, and more. There are also 3rd party trackers like Mocha, Core Melt Track X, etc.
The workflow will differ depending on which tool you're using, so I can't really get into details here. But you should be able to find tutorials on YouTube and at the vendors' websites.


text:
How to embed multiple images in a video recording
I have on one side a video (of someone giving a talk) and on the other side a list of slides that were used, and the timing at where the slides were switched. I want to embed the slides in a resulting video. Do you know how to do this?
I've found how to do it with one image, but I don't know if it's possible to do it with multiple ones?
ffmpeg -i input.mp4 -i image.png \
-filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,20)'" \
-pix_fmt yuv420p -c:a copy \
output.mp4

You can chain multiple overlay filters where each instance overlays one slide, but this will very quickly produce an unwieldy command. It's more convenient to do this in two steps. 1) Generate a video of the slides only with the required timings. 2) Use a simple ffmpeg command to overlay that video onto the main video.
For the first step, I've pasted an earlier answer I gave:

You can use a combination of two tools to do this: ffmpeg and
  mp4fpsmod
Step 1 is to generate a constant frame rate file using ffmpeg
ffmpeg -i images%d.bmp -pix_fmt yuv420p ffmpeg-cfr.mp4

Step 2 is to generate a timecode file like the one below, with each line containing the relative timestamp for a frame in
  milliseconds.
# timecode format v2

0
33
88
100
120
160
200
230
330
347

Step 3 is to use mp4fpsmod to generate the VFR file
mp4fpsmod -o vfr.mp4 -t timecodes.txt ffmpeg-cfr.mp4

This file plays as expected with ffplay but may not with some
  players, in which case run
Step 4 Generate a CFR MP4 from the VFR using FFmpeg
ffmpeg -i vfr.mp4 final-cfr.mp4

This is a CFR file but the temporal relations are preserved as per the
  VFR, although there will be some PTS adjustments, if the timecode
  intervals are very irregular. That can be remedied by specifying a
  high framerate -r N

You'll have to rename your slide images so that their names form a continuous regular sequence. And for your case, I'd suggest your Step 1 command should be
ffmpeg -i images%d.png -c:v libx264rgb -pix_fmt rgb24 ffmpeg-cfr.mp4

and Step 4 if needed should be
ffmpeg -i vfr.mp4 -crf 16 -c:v libx264rgb final-cfr.mp4

You can then overlay the latest file onto the lecture video, using a command like the one in your question.

Thanks for your answer. I tried, but during the last step, I'm not sure how I should use the command you're reffering to. Here is what I tried but the slids aren't showing for a few seconds in the resulting video: ffmpeg -i "Video name-WUUc5HYE3yY.mp4" -i final-cfr.mp4 -filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,5)'" -pix_fmt yuv420p -c:a copy output.mp4. What should I do instead?

What's the first value in your timecode text file?


text:
Extract key frame from video with ffmpeg
I have a need to generate a thumbnail for videos for a web application and I am currently doing that with this command:
ffmpeg -ss <seconds> -i <input file> -vframes 1 -y <output file>
Pretty basic, and does the job. But, of course, sometimes the frames aren't very "interesting".
For example, sometimes the video has faded to black as the scene changes, or it could be something which is somewhat boring like credits rolling or similar.
I need some sort of algorithmic way to extract something interesting from the video and essentially filter out the boring bits.
Is there anything in FFmpeg that might be able to make this easier?
If not, then I will need to collect a number of frames and process them outside of FFmpeg; likely using PHP. As a side note, if anyone has any existing code that does this, it would be super helpful!
Many thanks

No ffmpeg code can identify interesting frames. At most, there are filters which detect representative frames and filters which identify frames with a scene change. So, at best, there's a thumbnail filter for this, sort of. It can't detect "interesting" frames but it detects representative frames. So, frames from the middle of fades should be out.
Syntax is
ffmpeg -ss 50 -i in.avi -vf thumbnail=300 -vsync 0 thumbs%d.png

This will pick one representative frame from each batch of 300 consecutive frames.

This seems to be the answer, thank you. I think the usage is syntax is somewhat different, however.
Running the above command results in a single file over 1GB (it must contain a frame every 300 frames), rather than producing a separate image for each frame.
Additionally, as we only require one frame I think we can add -frames:v 1 so that it will take the first suitable frame it finds. This seems ok to me.
This seems to ignore the -ss parameter as far as I can tell, though. Would be ideal to start finding thumbnails after X seconds, but maybe it won't be needed. Thanks again!

Check your ffmpeg version. Both ss before -i works and output is a set of image files (PNG is a still image format, anyway). There's one change needed to avoid a quirk of ffmpeg which will duplicate frames. I've added that to the command.


text:
How to organize captured footage for documentaries before sending to editor?
I have captured 20TB of footage. It's currently organized as follows:

a separate folder for each day filmed, (example: 11/1/16) inside that:
separate folders for each camera (2-4 cameras used)
separate folder for audio tracks

The film will be edited on Premiere. I don't have an editor yet, but I need to get started on sorting and tagging the footage.
What is the most recommended way of structuring the files (folders & naming) so that the tagging done is not wasted when an editor gets the footage to start cutting?

If I was going to send this to an editor Or If I was going to be sent this I would like the following structure (this is all dependent on how they work but it helps)
 - Project name
   - Raw Video Files
     - Day 1
      - Cam A
      - Cam B
      - ...
     - Day 2
      - Cam A
      - Cam B
      - ...
   - Audio Files
     - Dialogue
      - "Audio recorder"
       - Day 1
        - Audio File 1
        - Audio File 2
        - ...
       - Day 2
        - Audio File 1
        - Audio File 2
        - ...

Im sure you can gather where im going with this, simple folder structure can make a whole difference to how easy and quick it can be to edit this my files at the top level look like
Project Name
 > Raw files
 > Audio files
 > project files
 > Exports
 > XML
 > DVD
 > ...

Hope this helps, there are many ways to organize this and many blogs, sites advising which is the best way but it comes down to how you want to work and what works for your filming and editing process within your company

IMO the next most valuable things, after the footage itself, are camera reports and script notes. With good notes you can tag and bin by scene/take, and flag which takes are 'printed' (in film terms) and which are bad or incomplete. Further flagging 'best overall' or 'starred' takes can make it much easier for the editor to focus on the good stuff more quickly.
When I've edited larger productions I'd spend the early days just reviewing the material in script order -- often a rough stringout of starred takes can give you a feeling of what your task will be like and where there may be holes in coverage.

Thank you for your input. I would love to have a script to this story, but because this is a documentary and there are no "takes" or script to follow just yet.


text:
Stream using HLS as source fails
So my problem is this:
I have a main process that is using as source bmdcapture, that process is creating a set of 4 different streams using HLS, so the command is something like this (showing only one to simplify):
ffmpeg -i /data/pipe0 hls_time 10 /data/input0/out.m3u8

That works awesome! No problem at all. Now, if I se that output as input for another stream, it works ok. So, if I do:
ffmpeg -i /data/input0/out.m3u8 hls_time 10 /data/input1/out.m3u8

It works ok, no problem at all. I can play it and it works ok.
However, the problem is if I want to use that first HLS to do RTMP streaming... the video gets corrupted, it jumps, sometimes it does not play at all... etc. Is worth to mention, I'm using Akamai to sent the package, but if I use wowza, the same thing happens.
But, I have the solution. Use 2 seconds segments, like this:
ffmpeg -i /data/input0/out.m3u8 hls_time 2 rtmp://akamai.end.point/file

And just by doing that change, the stream works flawlessly without problems. However, the main process I have (ffmpeg -i /data/pipe0 hls_time 10 /data/input0/out.m3u8) I need it to be 10 seconds, instead of 2, so I cannot change it... one solution could be create something else in the middle, but that adds complexity specially because this system runs 24/7, so that is not an option...
The question is: why I cannot stream using 10s segments as the source?

The reason is because HLS as a source is really just a static file (a bunch of .TS packets).  This requires you feed the new ffmpeg process (in your case RTMP) at x1 speed, or real time.  You can do this with the -re flag before the input.


text:
Changing the input frame rate of a series of images in FFmpeg
I am attempting to animate a series of PNG images at 30 frames per second (and add an audio track) with FFmpeg.
On the command line, I specify the input and output frame rates as 30 fps.

ffmpeg.exe -r 30 -i %d.png -itsoffset 0.770 -i soundtrack.wav -r 30 -vcodec mpeg4 -y "ffmpegtest.mp4"

The output shows that it is reading the input images at the default 25 frames per second.
    ffmpeg version N-82225-gb4e9252 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
      libavutil      55. 35.100 / 55. 35.100
      libavcodec     57. 66.101 / 57. 66.101
      libavformat    57. 57.100 / 57. 57.100
      libavdevice    57.  2.100 / 57.  2.100
      libavfilter     6. 66.100 /  6. 66.100
      libswscale      4.  3.100 /  4.  3.100
      libswresample   2.  4.100 /  2.  4.100
      libpostproc    54.  2.100 / 54.  2.100
    Input #0, image2, from '%d.png':
      Duration: 00:02:24.00, start: 0.000000, bitrate: N/A
        Stream #0:0: Video: png, rgba(pc), 480x320, 25 fps, 25 tbr, 25 tbn, 25 tbc

[I'll interrupt here to say it is that last line that confuses me]
    Guessed Channel Layout for Input Stream #1.0 : stereo
    Input #1, wav, from 'soundtrack.wav':
      Duration: 00:06:51.26, bitrate: 1411 kb/s
        Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Output #0, mp4, to 'ffmpegtest.mp4':
      Metadata:
        encoder         : Lavf57.57.100
        Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 480x320, q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc
        Metadata:
          encoder         : Lavc57.66.101 mpeg4
        Side data:
          cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
        Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s
        Metadata:
          encoder         : Lavc57.66.101 aac
    Stream mapping:
      Stream #0:0 -> #0:0 (png (native) -> mpeg4 (native))
      Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    [image2 @ 0000000000622cc0] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    frame= 3600 fps=242 q=19.1 Lsize=    9908kB time=00:06:52.04 bitrate= 197.0kbits/s speed=27.7x
    video:3263kB audio:6494kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.540179%
    [aac @ 000000000064e600] Qavg: 448.922

I am fairly new to FFmpeg. What am I missing? How do I tell it the input stream is 30 fps?

With image sequences, you have to use the framerate option. So,
ffmpeg -framerate 30 -i %d.png -itsoffset 0.770 -i soundtrack.wav -vcodec mpeg4 -y "ffmpegtest.mp4"

With -r specified before the sequence name, FFmpeg assumes 25 fps and duplicates/drop frames to meet the set rate.

I don't completely understand the last sentence yet, but it solved the problem, thank you.

Let's say you set -r 50. FFmpeg treats the input as having a native rate of 25 and duplicates each frame to make it 50 fps. If you set -r 10, it drops 3 out of every 5 frames.

Right, I expected that to be true if I had the -r on the output only, and not on the input. I expected the first -r on the command line to affect the input, preventing that. (Clearly, I was wrong!) Looking at section 5.5 of the manual, it seems it used to work they way I expected. Perhaps I got my misunderstanding from an old web-site. Thanks for clearing it up.


text:
Continuous smooth camera movement in post
I'm editing a small video which got recorded on a really cheap tripod, therefore the Camera movment is really uncontinuous and not smooth.
Any ideas how to make the movement smooth? such a thing as warp stabilisation but for mevement smoothness?

If you are a Mac user who has Final Cut Pro, it does this right automatically. Activating stabilization in the video inspector will analyze your clip, find the problem and correct the movement. The manual setting is called Inertia Cam.

As Duvrai mentioned, the docs for Final Cut's InertiaCam setting do say it will handle what you're talking about, but I've never tried it myself.
If you are familiar with the 3D aspects of AE as well as simple AE motion tracking, you could try the following technique. It's a little involved so it's usefulness depends on how important the shots are to you.
First turn the footage into a 3D layer and then apply an Animation->Track Motion to that layer. Change the Track Type to Stabilize. (This is how to access the older, simpler AE stabilizer, as opposed to Warp.)
Stabilize the footage using a position track point on a good spot in your panning shot. Pick a spot with lots of screen time during the pan. Apply the stabilization. Afterwards, if you switch to an alternate POV like Custom View 1 and scrub through your footage, you should see your footage slide left/right in 3D space synced with what your real-world camera did.
Next add a 3D camera layer and keyframe it's position to make it 'shadow' what your original camera did, but this time using eased keyframes instead of a tripod. This effectively creates a more ideal motion laid on top of your original real-world movement.
Obviously sometimes the original footage will go out of the 3D camera's view when the original doesn't match the ideal. To remedy, cleverly add a few more camera position keyframe to throttle the AE camera's velocity over time, or simply use scaling keyframes on the footage layer to smoothly 'zoom-in' occasionally.
"redpc post" -

There are ways to stabilize it in Premiere and AE but they will either take the viewing box and scale the video down in it and counteract the movement within the box. Doesn't look good at all. The second option is based off the same premise but it scales the video larger then the viewing box and crops it depending on the movement. Both can't fix things too shaky and take awhile if your PC is not powerful

I'm aware of that stabilisation, however my image is stable. Just the movement is inconsistent, so the AE stabilisation cant really help me as I know.

Most methods can't get exactly what you want but you could try optical flow

I tryed optical flow it but it didnt work at all, thanks for the suggestion tho


text:
Wrapping AVI with RGBA channels in a MOV file?
I'm very new to this honestly
I'm trying take a rendered sequence with an alpha channel that I exported from HitFilm 4, and import it into Davinci Resolve. Resolve doesn't support AVI (I didn't know that AVI was an archaic format) but HitFilm cannot export to any other format with an alpha channel EXCEPT AVI.
I'm not even sure if any of this is realistically possible but I don't want to give up. Mainly, I'm trying to wrap the AVI file into a MOV container, or something of the sort, while keeping the alpha channel intact.
Is there anything I can do?

You can use ffmpeg, a free command-line tool to do this.
The command is
ffmpeg.exe -i in.avi -c:v copy out.mov

This will copy the video stream over without transcoding or dropping the alpha. The caveat here is that if MOV doesn't support the codec of the AVI video stream, then ffmpeg will fail. But, then you can simply run
ffmpeg.exe -i in.avi -c:v qtrle out.mov

This will losslessly transcode the video, keeping the alpha. The size may increase.

Thank you so much man, like seriously I'm so grateful right now!
This did the job perfectly without a hitch.
Sorry it took so long to get back to you, ffmpeg's windows builds were down the day I tried and I just got the change now to work on this


text:
Why use different camera angles?
During interviews, TV shows and movies, there are several camera angles they switch between. Sometimes it is direct, or indirect (like a side view). How do they decide what angles to change to, and why do they do this?

Can you narrow your question a bit? Maybe give an example of what you're talking about exactly. There are several factors at play, and it also vastly differs for the different media you mentioned (interview, TV and movies). As it stands, this question is too broad to give a complete answer.

It's dependent on the producer/editor's own artistic opinion

Different angles are used for many reasons. Wide and/or long shots are used to establish the setting where the video is being shot.  Medium shots are used to show the relationship between people and/or objects.  Close-ups are used to see the expression on people's faces, or details like hand movements or manual operations (using a wrench or a food processor, etc.)
In interview situations, it is a cliche that you need a medium close-up on the subject. And if the interviewer is on-camera, then a similar shot of the interviewer is used so that you can see one or the other more or less full-face without the camera whipping back and forth and giving many viewers motion sickness.
Sometimes we will use the camera shot of the subject while the interviewer is speaking just to see the subject's reaction to the question or statement, etc. Or, conversely, a shot of the interviewer while the subject is speaking. This is called a "reaction shot".  And similar to occasional shots of the audience to give the viewer more of a sense of being there with the live audience.  And to see their reaction. Especially applause, laughter, surprise, etc.


text:
Why is todays TV production suffering from horrible imaging style?
I would like to point out that this is my personal view of things and I am not sure if this was the first place to express my concern with this. I apologize if this was the wrong thing to do.
Colors
It has been a pain to follow the trend in which TV-production (reality shows especially) has been taking. Technology has been getting better, higher resolutions, more colors, more contrast levels to use...yet the production seems to be in love with the cheap fake look of things. oversaturate and burnt colours which make people skin, clothings, everything seem...horrible. If you take such a video material under closer observation and you checked  the values of colors and such...it would be a conclusion to say that those frames are ruined, not usable material.
Using such high saturate colors and burning things actually makes things loose details, so actually an old DVD material would have more actual details
in the image than a 4K sharp reality-TV.
Focus/Depth of field
Also my observation has been that a very deep depth of field effect is being widely used, which is alright. However it also seems that in production they tend to film people closer and closer these days. These two with the fact that the camera is shaking quite a bit, makes things very claustrophobic to watch.
Final words
This trend seems to also be taking over in web-production, Youtube shows etc...I am worried.

Your post seems to be more of a rant than a question, but let me attempt an answer anyway (might be convoluted).
First of, what kind of crap have you been watching? The thing is, there's low and high quality content in every media. The best match for your description are daily soaps and, to some extent, reality TV (note this also differs from country to country). Those aim at overloading your senses to hide the fact that the actual content is very shallow. Kind of like trying to make a bland photograph more interesting by making it black-and-white, adding a vignette and stuff like that. It's the same with depth of field. A shallow DoF can be used to highlight fine detail such as facial expressions, hand gestures et c. That wouldn't really work in a show like The Big Bang Theory, where you are bombarded by a staccato of one-liners and audience laughter.
If you see the same thing on YouTube, it might be a Monkey see, monkey do effect. Most YouTubers have not had a formal education in videography but have learned the technical aspects of it (i.e. using the editing software et c.) by watching/reading online tutorials and neglected to learn anything about aestethics. So they just duplicate what they've seen on TV. This is why there's a lot of crap on YouTube as well.
This may sound overly negative, which isn't actually my intention. It can be argued that though formats like that may seem cheap and badly-done to video editors or video artists, the goal of those TV stations is to make money. And if those formats are what their target audience wants to see, you can't blame them for producing that kind of content. Same goes for YouTube. If they have success with it, who are we to tell them they do it wrong?
On the other hand, I don't think the overall quality of TV shows is going down. This may seem the case if you only watch cheap and quickly produced reality TV or daily soaps, but there's also a lot of high-quality programmes. For instance: House of Cards, Breaking Bad, Better Call Saul, Game of Thrones. Those all have intricate plots as well as high-quality videography and editing.
One example for this (WARNING, Breaking Bad season 4 spoilers ahead):

 The final shot of the last episode zooms in on the Lily of the Valley in Walter's backyard, revealing that it was Walt who poisened Brock, not Gus Fring:

Breaking Bad Season 4 final scene on YouTube

Admittedly this is not the best example. Watch House of Cards, they play with depth of field a lot.
There's a theory laid out in Steven Johnson's Everything Bad is Good for You that concludes that the general complexity and cognitive demands of TV shows is going up, not down (as is often suggested by certain media outlets). The reasons for this are too complicated to reiterate them in this post, but I highly recommend reading the book if you are interested in the development of popular media.
tl;dr: You wouldn't read The Sun if you want high quality journalism. So don't watch cheaply and quickly produced shows that are intended to be easily consumable if you want high-quality videography.
tl;dr the tl;dr: Go watch House of Cards.


text:
FFmpeg: afade plugin, how to specify time 1:55 if colon separates filter parameters? Escape
I want to make a fade out in a video, using the afade audio filter.
Here's my command:
ffmpeg -i VIDEO06.mp4 -c:v copy -af afade=t=out:curve=hsin:st=00:0:30:duration=00:00:10 VIDEO06-faded.mp4

But appearantly that's wrong, because ':' separates the filter arguments.
How can I specify the time in H:M:S format (here's ffmpeg's duration syntax) within the params? Or how can I escape the colon?

Enclose the time argument in single quotes and escape the colons within.
So,
afade=t=out:curve=hsin:st='00\:0\:30':d='00\:00\:10'

For me it needed two backslashes: afade=t=out:curve=hsin:st='00\\:0\\:30':d='00\\:00\\:10', or, if you want to do it without quotes: afade=t=out:curve=hsin:st=00\\\\:0\\\\:30:d=00\\\\:00\\\\:10.


text:
Delaying video overlay in ffmpeg without frame drops
I'm trying to play 2 videos overlaid against a static background, with the 2nd video (and its audio) delayed by a couple seconds.  When I do this, ffmpeg complains about buffer overflow and the 2nd video drops tons of frames.  How do I prevent the frame drops?
ffmpeg -y -loop 1 -i ~/Desktop/FP2.tiff -i ~/Desktop/fp.mov -itsoffset 2 -i ~/Desktop/fp.mov -lavfi \
"[0:v]fps=60[bg]; \
[bg][1:v]overlay=10:(main_h/2)-(overlay_h/2):format=rgb[v1]; \
[v1][2:v]overlay=460:(main_h/2)-(overlay_h/2):shortest=1:format=rgb[final]; \
[2:a]adelay=2000[a2]; \
[1:a][a2]amix=inputs=2[audio]" \
-map "[final]" -map [audio] -c:v ffv1 -level 3 -c:a pcm_s16be ~/Desktop/filtergraph.nut

Try
ffmpeg -framerate 60 -loop 1 -i ~/Desktop/FP2.tiff -i ~/Desktop/fp.mov -i ~/Desktop/fp.mov \
       -lavfi "[0][1:v]overlay=10:(main_h-overlay_h)/2:format=rgb:shortest=1[v1]; \
               [2:v]setpts=(PTS-STARTPTS)+2/TB[2v]; \
               [v1][2v]overlay=460:(main_h-overlay_h)/2:shortest=1:format=rgb[final]; \
               [2:a]adelay=2000|2000[a2];[1:a][a2]amix=inputs=2[audio]" \
 -map "[final]" -map [audio] -c:v ffv1 -level 3 -c:a pcm_s16be ~/Desktop/filtergraph.nut

If this still drops frames, then you should insert a FIFO filter for the 2nd video after the setpts, like this:
[2:v]setpts=(PTS-STARTPTS)+2/TB,fifo[2v]

That one works.  The "fifo" is needed.  I was able to trim the fat on the command as well and get rid of the 2nd reference to the same video input altogether as well.
Thanks for the help!


text:
Stack images with "hstack"-filter from video or image sequence in ffmpeg
Is it possible to input a video and extract images every second while simultaneously stack them horizontally or vertically with the "hstack" filter to create one jpg image?
The only way I can figure out how to do it is by extractning the still-frames with this command:
ffmpeg -i INPUT.mov -vf fps=1 -s 192x108 thumbnails%03d.jpg

And then inputting them one by one and then specifying then number of inputs like this.
ffmpeg -y -i thumbnails001.jpg -i thumbnails002.jpg -i thumbnails003.jpg... filter_complex vstack=inputs=3 output.jpg

It would be nice if it was possible to do in one more dynamic chunk from the original video or at least from one inputted Video-Sequence and not manually inserting the number of INPUTS needed to create the Stack.

You're better off using the tile filter for this:
ffmpeg -i INPUT.mov -vf fps=1,scale=192:108,tile=54x1 output.jpg

The tile argument is the size of a rectangle. So for a 54 second video, 54x1 produces a horizontal stack of 54 frames. Use 1x54 for a vertical stack.

Thanks a lot. Works like a charm.
Is it possible to specify what frame number each second it should choose? Now for a 25fps clip it seems to choose frame 13. I would like it to choose the first frame each second.

Replace fps=1 with select='not(mod(n,25))'

Once again, many thanks!
I needed to add it whithin "" in this filter chain. Now it works.
-vf "select='not(mod(n,25))'",scale=960:540,colormatrix=bt709:bt601,tile=30x1


text:
Changing the effect of a certain object but not anything else
I am recording a scene in which a "gun" is involved, but I do not have the budget for a realistic gun, so I am using a nerf gun. I am wondering how I would make the nerf gun look real

You could create one with parts from a hobby store or craft store, and paint them the correct color of gray.  Model your gun replica off of a specific existing gun that you find photos of online. Figure out ways to shoot the scene so the viewers don't see the gun too much:

keep it in shadow
only have it on screen for 1/2 second at a time
keep it moving, especially if this is an action or chase sequence
show it from a distance
keep it out of focus (while something "more important" is in focus, like a person saying a line of dialog)
train the camera on the face of the person with the gun and the reactions of the potential victim

Also use visual effects (as suggested by bret7600 in his answer) and sound effects. A Foley artist once said he uses a door deadbolt to simulate the sound of a cocking handgun.

You mentioned paint, do you happen to know if there is a paint that washes off plastic?

I don't know if there's paint like that.  Were you thinking of painting the Nerf gun? If so, maybe you could cover it with gray/black tape instead of paint, so you could remove it later. Or you could paint it black/gray, and after the shoot paint over that with orange or whatever color it was before.

Please try an application like Adobe After Effects. With this app, you should be able to make a realistic gun flash, as you can mask different objects and key frame them accordingly. See link for tutorial. http://www.surfacedstudio.com/tutorials/how-to-make-great-gun-fire-muzzle-flash-effects

This does help, but is there also a way to make the blue and orange nerf gun black and gray?

If you map a colour filter with a mask, you should be able to do.


text:
What's different between Premiere's own h.264 and QT h.264 encoders?
I noticed that Premiere(CC2017) can export h.264 through its own encoder and QuickTime. Are there any / what are the differences between these two?

PP Native h.264 encoder

QT h.264 encoder

I thought h.264 was h.264?  As far as I know, no difference

@Manly At least with MP3 there's LAME encoder and Fraunhofer codec, which both produce regular MP3 but Fraunhofer yields better quality.

I'd say LAME is better at VBR encodes and FDK at CBR.

@Mulvya good to know :)

since when lame is worse?

@SargeBorsch Hmm.. I might've cut some corners here and relied on something I heard a long time ago, without checking the facts. According to multiple forum posts, LAME actually seems to be better most of the time. I apologise. In my defense, this was all just to demonstrate that different software produce different quality even if the end format is the same :)

The encoder is always the same, namely Adobe Media Encoder. What you're changing is only the format, which admittedly is a bit confusing since that dropdown mixes up a couple of concepts which don't really belong together. If you select H.264 from the format dropdown, that's the video codec. Using that format selection, you will find a ton of options below, one of which is the multiplexer tab. This is where you can select what container format you want your video and audio stream to be mixed in (usually that's MP4). If you select the QuickTime format, you are always exporting a MOV file. The codec of the QuickTime format is variable, so you get a dropdown for that instead.
So with both options, you will get an H.264 video stream, but mixed in a different container format. You can find more info on individual streams and containers in my answer here.
It's a bit confusing that you are selecting different things (codecs or containers) in the format dropdown, but since there are also completely different options such as exporting as an image sequence or exporting audio only, it's hard to come up with an interface that's neither terribly bloated nor missing important options.
From the Adobe Support Pages:

Some filename extensions—such as MOV, AVI, and MXF —denote container file formats rather than denoting a specific audio, video, or image data format. Container files can contain data encoded using various compression and encoding schemes. Adobe Media Encoder can encode video and audio data for these container files, depending on which codecs (specifically, encoders) are installed. Many codecs must be installed into the operating system and work as a component inside the QuickTime or Video for Windows formats.

Thanks for the answer! I still have a question, just to be sure I understood correctly. I know you can encode mp3 using different software(LAME and Fraunhofer). Fraunhofer according to the internets yields better quality. This is the basis for my curiosity here. So, regardless of chosen container format, would the actual h.264 stream be always bit-by-bit the same(if I managed to match the encoding settings)? Or in other words is the stream always encoded using the exact same encoder/codec/piece of software before writing it to the chosen container?

Also, I found lots of (old) discussions on QT gamma shift, so I really can't let this be until I've got a more in depth explanation. Your answer is great, but could you maybe go into more detail? :)

@Pichan Regarding the encoders ... to be honest, I am not sure. Premiere exports are pipelined into Adobe Media Encoder, which is an independent piece of software that gets installed together with Premiere. As far as I know, this software encodes H.264 in the same way regardless of the container. But again, I'm not 100% sure on this, sorry. But to be honest, even if it differs slightly nobody will notice the difference (in the same way that nobody can notice the difference between Fraunhofer and LAME). HOWEVER when using the QuickTime format, you have less control over your output quality. tbc

With the QuickTime format, you have a quality slider that goes from 0 - 100 instead of the exact bitrate settings that you get when you select H.264 format. So the latter offers you more flexibility regarding the desired quality/filesize tradeof, so I would prefer that setting.

Regarding the gamma shift, that's more of a player issue than an issue with the video. Standard H.264 has a tone range of 16 - 235 and contains a metadata flag that tells the player to scale those values to a range of 0 - 255. However, some players such as QuickTime in certain configurations don't read that value which leads to the gamma shift. I don't think it's much of a problem anymore, as YouTube, Vimeo et c. read those flags and display the video correctly. Also, Media Encoder has good, working presets for those services.

It seems the H.264 encoder in Adobe products is the one by Mainconcept.

@MoritzLost Thanks again. I know you can't really hear the difference between LAME and Fraunhofer, but you have a choice, why choose the inferior option. Same with h.264 :) I'm actually looking into x264 now, not seeking any real gains, just out of curiosity. Still, I hear it's marginally better and faster than Premiere's own h.264 :) Oh, and a small correction: QT supports choosing your own bitrate. I don't know how the quality slider and bitrate limit actually work together but at least I'm able to limit my exports to roughly 100MB/min.

@Mulvya Thanks. Do you know if Quicktime h.264 goes also through Mainconcept?

@Pichan It does? I didn't find that option in my export settings when I checked it. Are you using the latest CC version of Premiere? And where did you find that option?

@MoritzLost It's almost at the bottom of the export settings, between Advanced Settings and VR Video. Here's a screencap: http://i.imgur.com/kYDwpAl.png

For bitrates used on the web, x264 is much better than Premiere's encoder. At higher bitrates, the difference becomes modest.

@Pichan Hm, apparently I'm blind. But still, that's only a bitrate limit setting, not as elaborate as the fine-tuning that is possible with the target/maximum bitrate and CBR/VBR settings available under the H.264 format.

@MoritzLost True. Though I prefer the H.264 format settings, QT seems to work just fine and the people I export for don't usually care that much about encoding quality, as long as it's good enough and filesize is at most 100MB/min. And like you said, if there is a quality difference, no one would notice :)


text:
Scaling videos of variable size to a fixed aspect ratio
I have 45 videos of varying aspect ratios and resolutions.
I need to scale all of them so that they fit neatly inside a 640x360 (16x9) container with the following specs:
16x9, 640x360, 1600kbps, H.264, MP4, progressive, 29.97
For example, some videos might be 512x12, others might be 480x320, but they all have to fit, scaled and centred, inside a new 640x360 output video.
If a video is not wide enough to fill that space, black bars should be added on the left and right.
Is this possible with ffmpeg?
Here's the code I've been toying with so far:

ffmpeg -i "input.mov"  -b:v 1600k -bufsize 1600k -r 29.97 -vf scale=640:360 -vcodec libx264 output.mp4

This seems to do everything I need, except for dynamically scaling to that fixed resolution.
Does anyone know how to achieve the result I'm looking for?
Thanks!

Use
ffmpeg -i "input.mov" -vf
          "scale='if(gt(a*sar,16/9),640,360*iw*sar/ih)':'if(gt(a*sar,16/9),640*ih/iw/sar,360)',
          pad=640:360:(ow-iw)/2:(oh-ih)/2,setsar=1"
       -vcodec libx264 -b:v 1600k -bufsize:v 1600k -r 30000/1001 output.mp4

The scale filters use the conditional if(a,b,c) expression i.e. if a then b else c. I check if the video is wider than 16:9. If yes, I scale the width to 640 and scale height to preserve proportion. If not, I scale height to 360, and keep width proportional. Then the result is padded out to 640x360. The setsar is used to make sure ffmpeg registers the video as square-pixel.

Thank you! I tried this, it did works!! There's one video I encoded in which the aspect ratio of the output was stretched horizontally by about 15% to 20%. (The rest of the parameters, including the padding worked fine.) Maybe there was something strange going on with the source file? Here are the specs for the source video: 720x486, 40656 kb/s, SAR 10:11 DAR 400:297, 29.97 fps, 29.97 tbr, 30k tbn, 30k tbc (defaul

Try modified command.

https://video.stackexchange.com/q/21567/18935


text:
iMovie Not Letting Me Export
I just finished up an iMovie project, and I tried to export it, but every time I click "Share to File", which is what I do every time, but it responds with the Mac "ding" sound, the one that plays when the Mac cannot complete the procedure. It won't let me upload to Youtube directly, or any of the other sharing options. I just get the Mac ding. I have 400 GB of storage left, and the project is only 4 minutes, so it should take up a gigabyte at most. Can someone help?

Ok, just a simple restart of iMovie fixed this. But it is still a weird glitch though.


text:
filming iridescent liquid or effect
I am going to shoot a music video where i want to have a iridescent effect.
I could shoot a liquid with iridescent effect and then use it as background for the scene using green screen.
But... how to do that??
Any ideas on lighting or somebody that have done this before?
Thank you.
Luca

Please clarify:  Do you want to know how to light a green screen and the people in front of it?  Or do you want to know how to create those iridescent effects?

i'd like to know how to create those iridescent effects. i'd like to shoot real liquid!

Those do look really cool. Sorry but I don't know how they're shot! You can probably Google "how to shoot iridescent effect", and you will find some good advice.

The second image looks like paint, which should be easier to shoot than clear or translucent liquids. I don't remember a whole lot about shooting liquids, but I do remember that clear liquids need to be back lit in order to be seen.

yeah! i'll make some experiments :)

you could also try looking at stock libraries, they have a ton of that stuff and you won't get paint all over your camera ;)

watch at this! https://www.youtube.com/watch?v=eEDunSMssrw

What you are asking is not quite clear, but if you want to have the colored liquids in front of your people, just add the video on top of the main video, and just change the opacity of the colored liquids. If you want the iridescent liquids behind your people, shoot the main video in front of a green screen with fairly good lighting, then add the colored liquid in after, utilizing the green screen.
Hope this helps!


text:
Mouse drag and drop / drag to select animation in after effects
I am currently trying to create some kind of drag and drop as well as a drag and select animation in after effects. The latter one is supposed to be looking something like this in the end:

(this animation is from adobe themselves, showing how to make stuff pixel-perfect in illustrator and can be found here: https://helpx.adobe.com/illustrator/how-to/pixel-perfect.html)
My problem is, that (1) I have have no idea how to make an object follow the animation of another object but only for a certain time. I mean, there is parenting, but I obviously just want the object to follow my cursor-object as long as it is in "clicked state" and not during the whole animation. I hope that makes sense ...
Also (2) I have no Idea how to let an anchor point of a rectangle follow another object.
My way of doing such an animation would be animating each object independently, but it always gets messy lining those animations up, especially when I for example change the speed of one of these animations in question, because I then will have to redo all the lining up again. There has to be an easier way!
Please let me know if you either know the answer yourself or a tutorial that can help me with this.
Kind regards,
Arvid

Expressions are you friend. Honestly I don't understand how anyone use AE without using expressions. To make the size of a rectangle shape follow a mouse you could do this.
Parent the mouse and rectangle to a null, with the top left corner of the rectangle aligned with the null. On the size property alt/option-click the stopwatch to open the expressions editor.
Delete what's there, and drag the pickwhip (the blue curly thing) to select the position of the cursor layer.

the size property will now look like:
thisComp.layer("cursor").transform.position

(if your cursor layer is called "cursor"). Now when you move the cursor the rectangle will scale to match the movement. But there's a problem, it scales from the middle, so you can add an offset to its position to make sure it lines up correctly. This time we use a bit of maths as well. On the position property of the rectangle path (not the position property of the layer) alt/option-click the stopwatch and drag the pickwhip to the size property of the rectangle, and then divide that value by 2. It will look like:
content("Rectangle 1").content("Rectangle Path 1").size/2

Now your rectangle should resize as if it's beign dragged by the cursor. You might have to manually drag the layer to line up perfectly. You can use more javascript to make the layer start and stop following the mouse.
Go learn expressions. As a bonus (or perhaps as a negative) you get to learn javascript, a ubiquitous computer language.

yeah, I also love expressions :D
How would you go about making it stop? Cutting up the layer using cmd/ctrl + shift + d? Or is there something to do just that?
Also the whole Null thing would mean the rectangles follow my cursor before the animation takes place? Or when I have multiple rectangles, would I have to use multiple nulls parented?
Also thanks for your help!

You can use expressions to make it start and stop. For example a technique I often use is to have the expression start after the last keyframe. You do that with something like if (time>foo.bar.key(foo.bar.numkeys).time){ <whatever> } the code inside the curly braces will only get executed if the time is later than the last keyframe for the foo.bar property.

You could also use another property to turn the expression on or off, e.g. a slider in an Expression Control effect: if (effect("Slider Control")("Slider") > someValue){ <whatevs> } would execute the code only when the slider value was above someValue.


text:
Finding the place where a video loops
I got a video of a fireplace, the video is 3 hours long.
I can see that it is looping as the logs keep burning forever. My guess is that it is looping in the region of 5-15minutes.
Is there some software available that can find where the video loops?
So far my best idea is using ffmpeg to output all the frames in raw bmp and search for duplicate files.

That's a tough question. Your solution may be the most straightforward. I'd recommend outputting as PNG instead of BMP, since the files will be smaller. You also might be able to output the audio file and look for duplicate 3-second-long stretches of audio. That would take up way less disk space, though I don't know what software to use to make the comparison.

Try
ffmpeg -i video.mp4 -filter_complex
"[0]trim=start_frame=0:end_frame=1[c];[c][0]blend=all_mode=difference,blackframe" -f null -

As long as the very first frame of the video is not something like a static logo screen or similar, this should help you locate the loop joint. If it is, change the start frame value to a higher number. The end_frame should be 1 greater.  Basically, one instance of the video is trimmed to just one frame, then it's composited with the full video frame-by-frame, in difference mode. When the blend filter encounters an identical frame i.e. the point of loop, the result will be a black frame. The blackframe filter should then identify that frame (and all others at each loop turnover), with a readout looking like this:
[Parsed_blackframe_2 @ 0000000003607d20] frame:325 pblack:100 pts:13837 t:13.837000 type:I last_keyframe:325

That t value represents the duration of a single loop.

If anyone else is a dummy like me, and getting errors, try making sure the code isn't split onto multiple lines. ;)


text:
How to fade in/out a video/audio clip with unknown duration?
I'm working on a project where I'm using ffmpeg to batch convert some video files, and adding fade in/out effects at the head and tail of each clip.
I've been using this bit of code to add the fade/out effect on clips with known durations:

ffmpeg -i clip.mp4 -filter:v 'fade=in:0:30,fade=out:9650:30' -c:v libx264 -crf 22 -preset veryfast -c:a copy fadeInOut.mp4

My two questions are:

How can I simultaneously fade the audio in/out?
Can ffmpeg automatically figure out the duration of the clip and be told just fade out the last 30 frames?

Thanks!

#1 To simultaneously fade the audio in/out:
ffmpeg -i clip.mp4 -vf 'fade=in:0:30,fade=out:960:30'
                   -af 'afade=in:st=0:d=1,afade=out:st=32:d=1'
       -c:v libx264 -crf 22 -preset veryfast fadeInOut.mp4

The afade times are in seconds.
#2 Automatically? No. But see workaround below
You can first run ffprobe to get duration.
ffprobe -i clip.mp4 -show_entries stream=codec_type,duration -of compact=p=0:nk=1

You'll get something like this:
video|13.556000
audio|13.816000

You can then use the above to place your fades. These times are in seconds.
Workaround
ffmpeg -i clip.mp4 -sseof -1 -copyts -i clip.mp4 -filter_complex
       "[1]fade=out:0:30[t];[0][t]overlay,fade=in:0:30[v];
        anullsrc,atrim=0:2[at];[0][at]acrossfade=d=1,afade=d=1[a]"
       -map "[v]" -map "[a]" -c:v libx264 -crf 22 -preset veryfast -shortest fadeInOut.mp4

FFmpeg has a sseof option that allows one to seek an input from the end. We can use that to accomplish our goal. So we feed the input twice, with the 2nd time ingesting only the last second. We tell FFmpeg to preserve the timestamps, so that ffmpeg preserves the temporal position of this tail portion.
We apply a fade out to this tail and then overlay the result onto the full input. Since they are the same media file, the foreground completely covers the background, and since copyts was applied, the overlay happens upon the corresponding identical frame in the background input.
For audio, we create a blank dummy audio of duration 2 seconds, and then apply an audio crossfade from the main audio to this dummy audio. Since the 2nd audio is blank, this is, in effect, a fade-out for the main input. The -shortest is added to leave out portions of the dummy audio after the crossfade has occurred.

This gives the error "no such filter!" for the audio filter.

There are 4 audio filters used. Which one? Run your command with -report added and share the report.

It's a terrible hack, but this might work if all you want to do is audio fade in/out but don't know exactly how long the clip is:
ffmpeg -i input.mp4 -filter_complex "afade=d=0.5, areverse, afade=d=0.5, areverse" output.mp4

[edit 2019-07-24:  Note that this solution is not good for streaming solutions since it requires the full track to be processed before the first byte can be streamed]
another option I is to use acrossfade with a silent track:
ffmpeg -i input.mp4 -filter_complex "aevalsrc=0:d=0.6 [a_silence]; [0:a:0] [a_silence] acrossfade=d=0.6" output.mp4

This is actually pretty elegant :-)

this works great. could you explain how it works. trying to make sense of the documentation..

@oberhamsi: Option 1: The first filter adds a fade at the beginning of the track. It then reverse the audio and adds another fade in at the beginning (which is actually the end). Finally the track is reversed again. Option 2 creates a silent track of 0.6 seconds and crossfades it for the same amount of time with the original track. All the filters and their usage are documented here: https://ffmpeg.org/ffmpeg-filters.html (although I have to agree that it's a bit cryptic)

What would be the script to merge Video + Audio (Audio is longer) and have fade in and our for the audio (Let's say Fade In finishes after 2 seconds, Fade out starts at 48 and ends at 51)?

The answer to question 2 is a resounding YES! I was looking for the same functionality and I ended up writing a bash script that asks for fade duration in seconds and calculates the initial frame for the fade-out:
#!/bin/bash

f="$*" # all args
p="${f##*/}" # file
fn="${p%.*}" # name only
e="${p##*.}" # extension

echo
echo $f
echo $p
echo $fn
echo $e
echo

read -e -p "Number of seconds of fade-out: " -i 1 sec # prompt for fade duration in seconds

r=$(ffprobe -show_streams "$f" 2> /dev/null | grep r_frame_rate | head -1 | cut -d \= -f 2) # frame rate
let "frames = $r * $sec" # duration of fade as number of frames
echo $r
echo $sec
echo $frames
lf=$(ffprobe -show_streams "$f" 2> /dev/null | grep nb_frames | head -1 | cut -d \= -f 2) # total number of frames
let "lf = $lf - $frames" # initial frame to start fade at

ffmpeg -loglevel quiet -i "$f" -vf fade=out:$lf:$frames -r $r -vcodec libx264 -preset slow -crf 12 -bf 2 -flags +cgop -pix_fmt yuv420p -acodec copy "$fn $sec sec fade-out.$e"
open "$fn $sec sec fade-out.$e"

Fades require re-encoding so using a low crf value for libx264 gives a high quality re-encode. The comments should explain everything else.

The answer to question 2 is a resounding YES! --> it's still No. The Q is Can ffmpeg automatically figure out the duration... but you've written a script that runs multiple ff* commands to do it. Useful for *nix systems, though.

I see, so you insist that YOUR answer is STILL correct? If you follow my script, you will see that it does indeed automatically figure out the duration using ffprobe, which is installed with ffmpeg. Who said anything about any restriction on the number of commands or *nix? It seems that the OP is using a version of UNIX. No .exe in the ffmpeg command. I myself am using OS X which is built on UNIX but is not UNIX.

If you follow my script, you will see that it does indeed automatically figure out* --> your script does, ffmpeg does not.

But ffprobe is an integral part of the ffmpeg distribution. You're picking at nits to save face IMO.

I'd have to agree that something being done by a bash script is not something being automatically done by ffmpeg.  But if this works, this is a way to work around that problem.  Hence the term "workaround".  I can't say if it works because I, like most people out there, don't have bash or a unix system.  +1 for the effort anyhow.


text:
Extract specific video frames
I am looking for a Windows based open source method to extract specific frames from video files (*.avi). Ideally the method will be suited to R.
I need to do this as I have annotated (many) video files using Solomon Coder. This is an open source program which, quickly and easily, allows for user specified frame by frame annotation.
I have then summarized the data using R. In my summary I have a behaviour event and the start and end frame numbers. I also have the start and end time in seconds, epoch time and as a POSIXct object.
I'd like to extract the specific frames in some instances.
I am aware of the following options:

ffmpeg in Matlab. However, I do not have access to Matlab nor I am that competent using it.
Using the command prompt and VLC. However, many images seem to get skipped and one ends up with lots of corrupt files. (e.g: https://www.raymond.cc/blog/extract-video-frames-to-images-using-vlc-media-player/)
Potentially calling Octave through R and using similar approach of ffmpeg. Again, this is a bit beyond my ability for the moment.

If anyone has some quick guidance that would be greatly appreciated.

How about ffmpeg from the command line? I can supply a command if you're interested.

Hi Mulvya, that would be great. Thank you! I have been going through the ffmpeg documentation. It is quite new to me so if you could guide me through the code that would be greatly appreciated!

To extract frame # x through y, use
ffmpeg -i in.mp4 -vf select='between(n\,x\,y)' -vsync 0 frames%d.png

Hi Mulvya, this is working great so far. Thank you again. I was wondering though, can you modify this code so that the frame numbers are printed in the name of the output file? As oppose to the current naming convention which always begins with "frame1" even if specifying, for example, to start on the 200th frame.

You can do it manually: ffmpeg -i in.mp4 -vf select='between(n,x,y)' -vsync 0 -start_number x frames%d.png

@Gyan Its giving an error, I had to escape the commas in between(n,x,y) with backslash

@burglarhobbit yes, depending on your shell, it's needed.

@Gyan I came to know of this from an another similar answer of yours. Please do edit it for other users convenience. I have the latest ffmpeg version.

You can also use:
ffmpeg -ss XXX -i input.mp4 -vframes 1 output.png

where XXX is the time in seconds. If you know which exactly frame you want to extract you can calculate the XXX by multiplying the number of the wanted frame * frame duration which is 1/fps.
Please also note that since H.264 is using I, P and B frames it would be best if you first decode your video to some intra-frame codec or raw. You can easily do that by:
ffmpeg -i input.mp4 -vsync 0 output.y4m

And then you can extract the desired frame. But y4m is a format with no compression which means that the output file will be huge. You can also use ffv1 to do that since it is lossless codec, but make sure you use -g 1 option, since you need only I-frames at the output.


text:
Using a K-mount lens for Emount camera
I am insterested in buying a new Macro lens for my sony a7s II. The only thing is that the lens I want Rokinon 100mm macro for the emount is around $500 and the one for the K-mount is around $350.
What will happen if I buy an adapter to the K mount lens and use it that way. Will the picture quality be affected. If so, by how much. What would I be losing or risking by doing that? I am using the lens mainly for closeups in videos.

If you have your heart set on that particular lens, go for it! That's exactly what adapters are built for, after all. I have a Pentax 50mm F1.7 that I use with a K-Mount to EF-Mount adapter on my EOS 80D, and I love it.
However, there are a couple of considerations.
Image quality
The image quality should be largely unaffected. However, the adapter you use is an additional piece of metal/plastic between camera and lens that the manufacturer did not plan for. This might ever so slightly reduce the cameras speed, but in practice, I don't think you will even notice that. Another consideration is that even the smalles of adapters functions like an extension ring. This means it might slightly shift the focus range towards the camera. This might reduce the minimal focusing distance. In turn you might lose the ability to focus on infinity.
There are a couple of might's in there, as it all depends on the specific lens and mainly on the quality of the adapter. The first cheap adapter I found claims to allow lens focus to infinity, so it doesn't seem to be much of a problem in pracitcality. I wouldn't worry about those things too much.
Technical limitations
Depending on your filming habits, this might be a larger problem for you. Most (if not all, not quite sure) adapters you will find are purely mechanical, meaning there is no electronic communication between the camera and the lens. This has a few effects:

No autofocus (mostly). You might have to focus manually. My K-Mount to EF-Mount adapter has an autofocus confirm chip. With this, my camera will confirm whether my selected focus point is in focus when I press the AF-button. So I can manually focus and then check if it's focused properly by pressing the AF button. I only use that lens for photography though, manual focus only will probably be more of an issue if you're using the lens for filming.
Manual only. If the camera can't communicate with the lens, it can't control the aperture as well (nor know what aperture you set the lens to). So you have to manually set the aperture. This might also throw off your camera's auto exposure, so you will mostly be limited to using your camera fully manual.
Missing or wrong EXIF data. No communication means all the lens-dependent parameters such as lens model, focal length and aperture won't be recorded into your EXIF data / metadata. Some adapters have an EXIF-chip that present the camera with static info. My own adapter tells the camera that a 50mm lens with f/1.4 is mounted, independent of what lens I use it with or what aperture I set it to. This means, for example, that I won't be able to find out what aperture a particular shot was taken with afterwords. Depending on your editing needs and habits, this might either not be a problem at all or utterly disrupt your workflow.


text:
What are display and pixel width reported by mkvinfo?
For one movie, mkvinfo says:
|   + Pixel width: 704
|   + Pixel height: 480
|   + Display width: 853
|   + Display height: 480

What are these values exactly? Why the difference?

The pixel values refer to the actual number of samples stored per frame. The display values refer to the dimensions that the player should render the video at. The ratio of 853/704 = 1.212 is the pixel or sample aspect ratio. This is an example of  non-square pixels, a legacy of analogue video signals and usually seen in digitized forms of NTSC/PAL format signals.


text:
Whats the name of this Effect?
I've been seeing a lot of Motion Graphics work including this special destruction like effect. It looks like this:

Watch Video here
Does anyone know, what this effect is called? Or what program is used to create it? Propably something like C4D or Maya? Any Suggestions?

I don't think there is a name to the effect. If I were to describe it, it would just be "the effect of a shell of an object cracking up and falling / peeling away in fractured pieces".
I am sure you already know the compositing side of things, where you do the colour grading, atmospheric effects and such in After Effects.
For the 3D software I work primarily with Maya and 3D Studio Max. I am very certain any 3D software that can simulate dynamic objects (rigid bodies / soft bodies / cloth) will be able to achieve an effect like this. These include Blender, Maya, Max, C4D, Houdini, Softimage XSI and a host of many others.
In motion graphics C4D is definitely a good choice for procedural effects like breaking, cracking, fracturing. In some software (like Maya and 3D Studio Max), creating the fractured pieces procedurally could be a challenge. The artist might need to use a fracturing plug.
After the objects are properly fractured, the dynamics portion of any the software listed aboev would definitely be able to achieve the physically believable simulation of the pieces falling away.
Thereafter you would need shading/lighting/rendering skills to render out the full image, or portions of it in passes, in order to achieve the final image.

thank you for that detailed answer. So I would guess that this is a softbody fractured object right? Because the pieces falling away look very soft to me.

@MartenZander yes, for lack of a better description. usually fractures are used to describe hard / rigid bodies. For soft deforming objects like soft leather we say it cracks &  peels away. nCloth system in Maya is extremely versatile. NCloth objects have attributes like hardness / rigidity / deform resistant  that can be animated over time to allow great flexibility in our simulations. I believe most softbody / cloth simulation software will have controls for how soft / deformable the objects are. So yes softbody / cloth simulation would be a good direction to approach this.


text:
Tool for cutting video
I have an MP4 format video.
I was wondering if there is a good tool to take a video, and create n number of new videos, by just setting a bunch of cut points.
Obviously most video editors will be capable of cutting a video and exporting. But I am wondering if there are any tools who are exceptional fast at this.
For example, and ideal situation would be like..
take a 2 min video and say..
set split @ 30 seconds
set split @ 60 seconds
set split @ 90 seconds
and then just hit export function that spits out 4 new videos orig_name_[number].mp4.
In an even MORE ideal world this could be done with a command line program and a batch file :)
Thanks for any feedback you can provide!

You can use ffmpeg, a command-line tool to do this.
If you want equal-sized splits, use
ffmpeg -i input -segment_time 30 -f segment -force_key_frames expr:gte(t,n_forced*30) -reset_timestamps 1 a%02d.mp4

If you need to split at irregular intervals, use
ffmpeg -i input -crf 18 -segment_times 30,60,90 -f segment -force_key_frames 30,60,90 -reset_timestamps 1 files%01d.mp4

I am curious what the files%01d syntax is doing. When I try to add this to a batch file called video_cut.bat I get error "Invalid segment filename template 'filesvideo_cut1d.mp4"

You have to escape special characters in a bat, so it will be filesvideo_cut%%1d.mp4 inside the BAT. Since you are generating sequentially named files, the %nd specifies the numeral field width. For files test-0000 to test-3342, you would use test-%04d

One more question. What does the -crf 18 refer to. What would the command be just to resave the whole video?

CRF is a rate control method which controls the quality of the output. Lower values are better but larger. 18-28 is a good range. To resave the entire source is ffmpeg -i input -crf 18 output.mp4


text:
Cant change stroke Brush Size via Composition, only via top bar. AECS6
I am trying to do this tutorial:

When I try to change the Brush Size of the Stroke via the left panel (the guy in the video does it at 2:04 - 2:09) it does not cover the text (PIC 1), it only covers the text when I use the "Stroke Width" in the Upper Bar (PIC 2).
Am I missing something?
https://i.sstatic.net/qa8kg.jpg (PIC 1 and 2)
I am using Adobe After Effects CS6

That happens because in the video path is added to the Text layer, but you have it on separate shape layer.
Try to move you path to the text layer.

How do I do that?
When I try to copy and paste it on the text layer, all it does is create another path layer.

First add stroke effect to the Text layer. Then copy-paste "path" value.

Ok, just got it.
Thanks for the help!


text:
put a logo on sportsfloor adobe software
I try to put a logo in a video but I want it to be on the floor where people walk over it.
With blending it is still on the person so how can I best act in this way. Does anybody knows a good tutorial or can easily explain what I have to do?
The sporter in the video will run over the logo. from several angles.
Hope someone can help.

Can you provide some further details ie: are you using greenscreen, what software you have access to, is this a live event, pre-filmed, etc as your question is very broad and not really a direct question

sorry i shot video on a tournament and we want our logo on the sportsfloor so we have a slow motion video. and a .png file with a black and white logo.
I have an Adobe CC available and now we try to put the png into the video. With After Effects i can angle the png to the right way but now when a player cross it the png will be on the player instead of the player blocking the logo.
Hope this explains more what i want.

If video was made without any preliminary preparation, you most probably shall use rotoscoping. You can see tutorial for After Effects here.
However, if floor is monocolored and it will not blend with any leg parts, you can try to separate its part for the logo, and use keying on it. But most probably it will be messy.

pretty much what my answer would have been lots and lots of rotoscoping


text:
software for frame images to video with changing framerate?
I've got some frames that were captured over 24h at 2 frames a min.
I want to convert them to video BUT with different playback speeds depending on when they were shot.
I want to be able to use different framerates for different periods of the video.
Each hour has 120 frames so playback of each hour different FPS would take:

|------------------|
| frames |  play   |
|--------|---------|
|   1    | 120 Sec |
|   2    | 60 Sec  |
|   3    | 40 Sec  |
|   4    | 30 Sec  |
|   5    | 24 Sec  |
|   6    | 20 Sec  |
|   8    | 15 Sec  |
|   10   | 12 Sec  |
|   12   | 10 Sec  |
|   15   | 8 Sec   |
|   16   | 8 Sec   |
|   20   | 6 Sec   |
|   24   | 5 Sec   |
|------------------|

Something like this:

Each hour/120 frames at different speeds, this setup would play a day back in just under 9min.
any ideas where I can find software that would let me do this? preferably adjusting the speed via a graph/equalizer setup?

This but on a PC! https://itunes.apple.com/gb/app/slow-fast-slow-control-speed/id727309825?mt=8

You can try slowmovodeo, a standalone app or Twixtor for After Effects

If you know any scripting you could create duplicates to pad the frames out so that there were an even number of frames per minute (with appropriate renaming).

This is a really late response but I just stumbled onto the question.
The software you're looking for is Adobe After Effects.
Inside After Effects, you'll end up using the effect called "Time Remapping".

Open After Effects
Import all your frames as an image sequence
Create a composition(whatever resolution/framerate you'd like)
Drag your image sequence into the comp(or timeline)
In the effects panel, find the time remapping effect and drag it onto your image sequence
Go to the effects tab and it should show you the time remapping effect.  Add a keyframe using the stopwatch
Add as many keyframes as you need and adjust them to the speed you want depending on where you're at in the video
When you're ready to move to the "graph view" select the "graph editor" button

If you're having trouble just google "Time Remapping in after effects" and "Graph Editor view in After Effects" and you should find what you're looking for.

Welcome to the site matty :) I'm sorry, but link only answers are discouraged as if the link goes down then so does the answer. Please include at least some of the steps that the link includes here on the answer. Thanks. Anyway, enjoy video.se!

Hi @poor . I have updated my answer. Sorry for the link, didn't know that would be a problem.

Hi Matty, thanks for the more detailed answer. this is definitely what I was looking for!


text:
Losslessly converting Microsoft DV to Quicktime DV
I have a bunch of AVI files containing captured DV footage (Microsoft DV, as that is what is captured through Adobe Premiere on Windows).
These now need to be converted to Quicktime DV to work with some other software package.
When I Export as Quicktime and select DV25 as codec (in Adobe Media Encoder) the filesize remains almost the same (not surprising because it is the same bitrate as the source), but what exactly happens during the export?
Is the raw DV footage simply extracted from the AVI container and put into a MOV container (meaning only copying of data with no loss in quality)?
Or is the video transcoded from Microsoft DV to Quicktime DV (meaning there will be a slight loss in quality)?
If the latter, how can I losslessy extract the DV footage from an AVI container and put into a MOV container?

I doubt Adobe Media Encoder is rewrapping the video stream.
To copy the data losslessly from a Type 1 to Type 2 DV-AVI or to MOV, use ffmpeg, a free command-line tool, like so
ffmpeg -i input.avi -c copy -map 0 -video_track_timescale 25 output.mov

You can tell if it's re-wrapping by how long it takes. If it's re-wrapping it should be lightning fast, taking very little time at all. If it chugs through them it's probably transcoding.

Unfortunately that command gave the error FATAL error, file duration too long for timebase, this file will not be playable with quicktime. Choose a different timebase or a different container format. It did create a file with an identical filesize to the original, though, but no applications were able to open it.

Please paste the console readout of the ffmpeg command.

Here's everything that was output when I used the command you provided: http://pastebin.com/CKM7034A

Command edited.

That extra option did at least remove the error message, and the resulting file was closer in filesize to the original than the file exporter via Adobe Media Encoder. Because it uses the -c copy option, which only copies the video track without any transcoding, I conclude that this has done exactly what I asked for. Thanks :)

Even though the command says -c copy I don't think it copies it losslessly as I first thought. Putting the original video and the copied video in After Effects and setting the topmost layer to "difference" blending mode, the resulting composite isn't all black, but has grey areas all over. This could only happen if there are any actual differences between the videos, which suggests that the video hasn't been copied correctly.

Nope, there's no transcoding involved with copy. This is probably a color range flag issue. Check the scopes in Color Finesse or the like for max and min values in the two clips. Also check for frame sync between the two clips and the pixel aspect ratio.

I've no idea how to do any of that. I found another solution to get the software to open AVI files containing DV footage, though. By opening the AVI file in Quicktime Pro and saving the file as a Reference Movie, the other software reads the reference file just fine, which means it really reads the video from the AVI file.


text:
Putting a Lower bitrate of my video stream in my current mp4 container
Sorry if my question is too noobish, this is my first question.
What I have is:
An mp4 movie with a video stream and an audio stream.
What I want in the output:
Is an mp4 file containing: the same video stream + the same audio stream + the same video stream with a lower bit-rate
Can anyone please tell me the appropriate ffmpeg command?

What are you hoping to accomplish with this?  Generally you would make two separate files for this kind of thing since either the client would still have to download both or the server can simply switch between which file it is streaming.

Answering the question as asked,
ffmpeg -i input.mp4 -map 0:v -map 0:a -map 0:v \
-c:v:0 copy -c:v:1 libx264 -b:v:1 <lower-bitrate> -c:a copy -movflags +faststart out.mp4

The lower-bitrate version of the video is the third stream. Players typically will play the original video which is the first stream in the output.

Not sure off the top of my head how to do it on the fly (with multiple different video codec settings for different video streams going into the same output container).
However, with 2 input files, this should work to mux all streams from multiple input file into a single output file.  (parallel streams / multiple "programs", NOT concatenated.)
ffmpeg -i in1.mp4 -i in2.mp4 -map 0 -map 1 -codec copy -movflags +faststart out.mp4

Use -map 1:v instead of -map 1 to induct only the video stream from the 2nd file.


text:
Premiere pro transition presets
Where can I find some presets or plugins for premiere pro to do some fancier video transitions?

Here's a list of free third-party plugins for Premiere Pro, including additional transitions.
Here's the official Adobe Add-on Website, where you will find both free and paid-for plugins, also including some transition preset packs.
Here's a great tool which will help you find even more transition presets on your own!


text:
What does the value in parentheses for ffmpeg ssim log denote?
https://ffmpeg.org/ffmpeg-all.html#ssim
I ran a command like this:
.\..\ffmpeg -i [Input] -i [Output] -lavfi  ssim="stats_file=ssim.log" -f null -

and saw this in the ssim log outputs:
n:70 Y:0.947271 U:0.985112 V:0.985611 All:0.959968 (13.975937)

I understand the values for everything except for the value in the parentheses, after All (13.975937). Is this the db representation of the YUV,All values, or is it something different? How is it calculated? Thank you.


text:
removing an x265 audio track without conversion?
I have an x265 video file with dual audio tracks in different languages. Obviously one is useless to me and I want to remove it without waiting through a lengthy conversion that will lead to quality loss.
I have been using mkv2mp4 to do this with x264 in the past, but it spits out an error when I try any x265 coded video. Is there a codec I can install? Any other suggestions?

Use ffmpeg*, a free command-line tool:
ffmpeg -i input.mkv -c copy -map 0:v -map 0:a:0 singleaudio.mkv

where 0:a:0 is the index of the audio stream you wish to keep. In ffmpeg, numbering starts from zero, so 0:a:0 refers to the first audio stream in the source file. Running ffprobe input.mkv beforehand will show the contents of the input.
*download the latest snapshot/nightly build.


text:
ffmpeg split screen two video sources
I am not able to figure out how to get ffmpeg
to make a video
that combines (muxes) half-height-cropped  from two video sources.
The latest generation of ffmpeg (3.x) has a "vstack" filter.
My screen resolution is set to 1280 by 720 pixels.
I have a webcam that is set to provide video at that same resolution.
I want the top half of the webcam's input/feed/stream to be layered on top of the
bottom half of the screen-capture-recorder (recording my desktop).
Both source video streams, plus the end output result will have a width of 1280 pixels.  The combination of the half-height 2 video stream inputs will end up filling up 720 lines of vertical resolution.
This should be simple.
I'll paste a few of the commands that I've tried and that have failed to work.
ffmpeg.exe -f dshow -i video="screen-capture-recorder" -f dshow -i video="Microsoft LifeCam HD-6000" -vf "crop=1280:360:1280:360" -filter_complex vstack -vcodec libx264 -pix_fmt yuv420p -preset ultrafast 6000screen_take1.mkv
and
I even tried adding :
"[0:v][1:v]vstack[v]" -map "[v]"
to that , above (previous) command.
See my Google Doc for complete output (what was in my cmd.exe window) :
https://docs.google.com/document/d/1SqtjEY_gM3rdeKPyRzUq_jJhPQUPCK5L4E5HPttwS3s/edit?usp=sharing

If you're using filter_complex, then all filtering has to happen within that complex. So,
ffmpeg.exe -f dshow -i video="screen-capture-recorder" \
           -f dshow -i video="Microsoft LifeCam HD-6000" \
-filter_complex "[0:v]crop=1280:360:0:0[v0];[1:v]crop=1280:360:0:0[v1];[v0][v1]vstack[v]" \
-map [v] -vcodec libx264 -pix_fmt yuv420p -preset ultrafast 6000screen_take1.mkv

This stacks the top half of the webcam video below the top half of the desktop capture.

Having taken a look at the console output, you should actually try this:
ffmpeg.exe -f dshow -rtbufsize 9000000 -i video="screen-capture-recorder" \
           -f dshow -i video="Microsoft LifeCam HD-6000" \
-filter_complex "[0:v]crop=1280:360:0:0[v0];[1:v]scale=1280:-1,crop=1280:360:0:0[v1]; \
                 [v0][v1]vstack[v]" \
-map [v] -vcodec libx264 -pix_fmt yuv420p -preset ultrafast 6000screen_take1.mkv

You are my hero. Thank you so much. I made a video. http://youtu.be/iaoKalspcI0  I forgot that I neglected audio, so that post has no sound. Let me work on that next step now ...

I got a pretty good video using :  ffmpeg.exe -f dshow -i video="screen-capture-recorder" -f dshow -i video="Microsoft LifeCam HD-6000":audio="virtual-audio-capturer" -filter_complex amix=inputs=1 -filter_complex "[0:v]crop=1280:360:0:0[v0];[1:v]scale=1280:-1,crop=1280:360:0:0[v1]; [v0][v1]vstack[v]" -map [v] -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -acodec pcm_s16le

I made another video and posted it to YouTube.

I used the following command :
  ffmpeg.exe -f dshow -i video="screen-capture-recorder" -f dshow -i video="Microsoft LifeCam HD-6000":audio="virtual-audio-capturer" -filter_complex amix=inputs=1 -filter_complex "[0:v]crop=1280:360:0:0[v0];[1:v]scale=1280:-1,crop=1280:360:0:0[v1]; [v0][v1]vstack[v]" -map [v] -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -acodec pcm_s16le (output video file('s name))

Notice how what is depicted on the top half (virtual on-screen piano keyboard) (both of them) lags behind. Yeah there is latency between the video signal of the top half and the rest of the content.
I suppose there is a more complex solution to this.
I tried tying (chaining) the :"audio=" to  both of the video input source/streams
that is , I tried both logical possibilities (variations) :
video="Microsoft LifeCam HD-6000":
and
video="screen-capture-recorder":
Same issue. In fact, the latency doesn't exchange between the different video streams.

Try putting -use_wallclock_as_timestamps 1 before each -i

"This video is no longer available because the YouTube account associated with this video has been terminated."


text:
How can I increase the frame size of the titles in Adobe Premiere?
In Adobe Premiere Pro CC 2015, I did hours of work on a video that is 640x360 pixels.  I added a bunch of "titles" of that same resolution.
Then I later realized that I wanted to export my project at 1920x1080 even though the source video was 640x360.  (At least then my titles would be more legible on high resolution monitors.)
I easily changed the resolution of the video portions of my project, but how can I change the frame size of the titles?
I don't want to just "scale" them up to 1920x1080; I want them to actually BE that size and to be clear.

As far as I know, unfortunately you can't take an old title which was based on whatever frame size, and switch its size to something else. The only way I know for your situation with the small titles is:

Double click on a title that you want to change (either on the timeline or in the project).
In the title editor window, click on the top left button of 'New title based on current title'.

A pop up shows - type in the size you want for the NEW title AND don't forget to check (or change) the name of that new title, just that later on you know which title is which. Click OK.
You have just created a new title, you can find it in your project. It has the old text with all its preferences, inside a new size frame; the visual result is the same as you would have got with scaling, but w/o the quality loss.
That should do the trick for you, but you'll still have to do it one by one on all the titles, and then to put each one in the appropriate place on the timeline.

I hope that helps. Good luck!

The most recent versions of Premiere have a totally new titling and graphics setup. I have found that changing frame size, say from SD to HD, which I have done recently, the titles don't scale at all and are unusable.
I have to remake them for the new frame size. But it is pretty easy to repurpose the graphics for a new frame size. It would be a pain if there were alot of titles. In my workflow I try to do the titles last, when I already know how I am going to output.


text:
How to film a strobe light

The above picture sums up my problem. I'm struggling to work out what settings to put my camera on to work with my strobe light. I vaguely understand the problem; that the camera takes pictures row by row, so the lighting has changed by the time it gets to the bottom half. But I can't work out how to fix it. I would have thought that a very fast shutter speed would help, but apparently not.
The camera is a Fujifilm X-E1 and the strobe light is a cheap model with a rotary dial to change the speed. It doesn't have DMX control.

What you're seeing is an inherent problem with sensors that use "rolling shutter". There are tradeoffs in sensor technology among speed, sensitivity, and size, and using a sequential line readout with continuous exposure is a popular choice that's a good compromise for many situations. Unfortunately yours isn't one of those.
What you need is what's known as "total" or "global" shuttering, where the entire frame is exposed at once and read out as a single image. Instead you have a sensor that essentially exposes each line of the array at different times.
So I'm afraid the answer is: use a camera / sensor that employs a different technology. I hope for your sake someone has a solution that allows you to use your existing setup, but I don't expect to see one.