Final Cut output to FFmpeg workflow If I use Apple Compressor, I could just 'Send to Compressor', without first exporting a ProRes master.

However, I would like to use FFmpeg/x264 for better quality (at low bitrate).

Do I have to export the master first? It is 150 GB/hour and exceeds my remaining disk space. Or is there a 'streaming workflow'?

You could try and add your own share destination setting into FCPX.
Click on the Share button in FCPX, then in the opened share window click on 'Add Destination'. In the right half of the window, you see all the possible options. Click on 'Compressor Settings' and another window will open. You might find and can finetune one of these settings.


What could be causing these strange MP4 video playback corruptions on some machines? (Note: the video is a screencast hence the desktop icons, that's not actually the desktop of the machine having the error.)

We are using JWPlayer, and we rarely have this issue, but on it is frequently reported by customers and becoming a repeat issue. We've had them update their Flash player to the latest version. What causes this? My guess is codecs or video driver issues but I am not sure how to fix.

Put keyframe distance in the encoding options to KEY EVERY FRAME.

When you export in the export options you have keyframe distance, which is used to calculate "intermediate key points/key frames", and the default is 25/30 frames. The player calculates pixels and frames inbetween keyframes. Sometimes it gets lost in calculation because of lost bits or bytes. Having less distance between keyframes reduces the chance of this, and results in more accurate frame rendering.


How to stop horizontal scrolling lines caused by fluorescent light (USA and NTSC)? I'm trying to record something for a school project and my lighting is underneath fluorescent lighting. My camera is set to 30 fps but records at 29.97 fps (seen on pc). I've tried to copy the clip, move it up and forward by one frame and set the opacity to 50 but it doesn't work. How can I stop the horizontal bars without changing lighting?

These lines exist because the refresh-rate of the light is different and undividable by your framerate. One solution is to set the framerate to the Hertz of your light (which must be known for this case) or to use a light with a refresh-rate that is dividable by your framerate. If none of this is possible, you can still try to deflicker footage using deflicker gizmos for nuke, which work the best from my experience. This should always be your last option though, since the result will not look stunning.


How to set a specific ffmpeg Decklink device output format using format number? I am working on an IP-SDI decoder using ffmpeg and a Blackmagic Decklink Mini Monitor card.

If I list ffmpeg supported output modes with this command:

ffmpeg -i test_1.mp4 -f decklink -list_formats 1 'DeckLink Mini Monitor'

I get these:

[decklink @ 0x39b8c60] Supported formats for 'DeckLink Mini Monitor':
[decklink @ 0x39b8c60]  1       720x486 at 30000/1001 fps (interlaced, lower field first)
[decklink @ 0x39b8c60]  2       720x486 at 24000/1001 fps
[decklink @ 0x39b8c60]  3       720x576 at 25000/1000 fps (interlaced, upper field first)
[decklink @ 0x39b8c60]  4       720x486 at 60000/1001 fps
[decklink @ 0x39b8c60]  5       720x576 at 50000/1000 fps
[decklink @ 0x39b8c60]  6       1920x1080 at 24000/1001 fps
[decklink @ 0x39b8c60]  7       1920x1080 at 24000/1000 fps
[decklink @ 0x39b8c60]  8       1920x1080 at 25000/1000 fps
[decklink @ 0x39b8c60]  9       1920x1080 at 30000/1001 fps
[decklink @ 0x39b8c60]  10      1920x1080 at 30000/1000 fps
[decklink @ 0x39b8c60]  11      1920x1080 at 25000/1000 fps (interlaced, upper field first)
[decklink @ 0x39b8c60]  12      1920x1080 at 30000/1001 fps (interlaced, upper field first)
[decklink @ 0x39b8c60]  13      1920x1080 at 30000/1000 fps (interlaced, upper field first)
[decklink @ 0x39b8c60]  14      1280x720 at 50000/1000 fps
[decklink @ 0x39b8c60]  15      1280x720 at 60000/1001 fps
[decklink @ 0x39b8c60]  16      1280x720 at 60000/1000 fps

Ok. I can set my desired output format using -s for output size and -r for frame rate:

/home/ffmpeg/bin/ffmpeg \
-i udp://224.168.240.69:2069?buffer_size=262144?fifo_size=4525000&overrun_nonfatal=1 \
-threads 0 -vf setpts=PTS-STARTPTS \
-pix_fmt uyvy422 \
-c:a pcm_s16le -ac 2 -ar 48000 \
-s 1920x1080 -r 30000/1000 \
-f decklink DeckLink Mini Monitor

Is there a way to set my desired output format using ffmpeg's Supported number from the list [1..16]?

I don't see any option in the source to set output format parameters via the serial number.


Control key frame value with slider control I have an object in After Effects comp and I need its scale to change from keyframe A to keyframe B and I need keyframe A to have value of 95% and keyframe B value of whatever is set via slider control. Now I know how to set overall scale by slider, but I seem to have problem finding a way to link just that one keyframe to my slider control.

I am fairly new to expressions and I tried to re-purpose following one I found for the same thing but with opacity, but it doesn't work. I think it's because it supplies just one value and scale needs two values, but I honestly have very little idea whats going on in the expression and how to adapt it.

if (numKeys > 1){
  t1 = key(1).time;
  t2 = key(2).time;
  v1 = 0;
  v2 = comp("INPUT").layer("CONTROL").effect("Zoom intensity")("Slider");
  linear(time,t1,t2,v1,v2);
}else
  value

You were close.

if (numKeys > 1){
  t1 = key(1).time;
  t2 = key(2).time;
  v1 = [95, 95]; //or if it's 3d [95, 95, 95]
  slider = comp("INPUT").layer("CONTROL").effect("Zoom intensity")("Slider");
  v2 = [slider, slider]; // or [slider,slider,slider] if 3D
  linear((time, t1, t2, v1, v2);
} else {
  value
}

You were right that the scale property requires 2 (or 3) dimensions. So you need to use arrays, which look like [value1, value2], or [value1, value2, value3,… valueN] for as many members you want the array to have.

On line 4 I assume you want it to be 95% not 0. I also changed it to an array.
on line 5 I assign the slider value to a temporary variable and then put that in an array. You could do it in one line by repeating the comp("INPUT" … (Slider) phrase inside an array, but it would be really long and awkward. Alternatively you could use a point control if you wanted to be able to set the dimensions separately.
on line 8 the else without curly braces works, but it makes me nervous.


Can you read video files off a HyperDeck Studio Pro 2? Is there a way to connect a Hyperdeck Studio Pro 2 directly to a computer, and edit the video files directly? It has a Thunderbolt connection, but it says that it's for "capture of video and audio" which sounds like you would be capturing to a file on the computer, rather than reading the previously captured file on the SSD.

https://www.blackmagicdesign.com/products/hyperdeckstudio/techspecs/W-HYD-03

Currently our process involves removing the two SSD's from Hyperdeck, and putting them into an SSD Dock.

That introduces several adverse variables into the workflow:

The video capture person may forget to remove them and dock them at the computer. This matters because the editing person works remotely, and logs into the editing computer.
The dock connections are fiddly, and I can see over time that the SSD's SATA connectors will be stressed and become a point of failure.
It seems unnecessary.  It would be better to just read the files directly off the deck so that the drives can stay where they are.

As the HyperDeck manual mentions :

Accessing Your Clips
To access your clips, simply connect the SSD to
your computer using an SSD dock. You can either drag the files from
the SSD directly to a local hard drive, or you can work directly from
the SSD.

There's no mention of reading the clips via the Thunderbolt interface.


increasing sequence resolution in premier pro I am editing footage with a resolution of 1228x690 in Premiere Pro 2020. When I tried to upload it to youtube, it automatically got bumped down to 480p, significantly lowering the quality. I tried to increase the video preview width x height settings but it is capped at 690p. Is there a way to force the video to a "higher resolution" so it won't get lowered to 480p? Am I just trying to change the wrong settings? Thank you for helping.

First variant. You can change "Frame size" in "Sequence Settings" (Sequence -> Sequence Settings) to more higher. You need to change them with saving proportions of your video frame.
To save 720p quality on youtube you should set amount of vertical pixels to 720 or more. With 1080p it should be 1080p or more.

Second variant. You can change resolution of your video file on the render stage.
Move to Basic video settings, then uncheck checkbox for changing resolution. And then you can change it to needed. With height to 720p or more.
Also you can save proportions of frame.


For time-lapse videos, what software should one use? I have the following starting position:

I have a GoPro Hero 2 and have done some timelapse series. I took them and stitched them together with the software that go pro provides. This all worked well.

The Problem:

As soon as i want to watch these videos somewhere else, I can't. The software uses some codec apparently belonging to GoPro and obviously most common players won't play anything.
I already tried to convert the video to a wider accepted format(codec) but I wouldn't get anything I could watch. It either only used the first view pictures and then went black or
the video was entirely black.

The Question:

Now my question is should I use an other program or is there any easy way to convert my current work into a format(codec) that is wider spread. What software would you suggest to use in such a case. This is only a hobby project so I'm not prepared to spend unreasonable amounts on fully fledged software suites.

So I finally got time and dug around. I unearthed multiple options to do a timelapse video, but the one I found best is actually the following:

The answer is so simple, I just didn't know a time-lapse video could be created with VirtualDub.

Here is how you do it and you can install and use your very own and wanted codec: manual

You can then work on the time-lapse movie with a video editor of your choice.


Does bitrate also mean the internet speed I need to have? I am streaming raw video at -r 30 and the bitrate is as follows

frame=  228 fps=6.3 q=-1.0 Lsize=  410406kB time=00:00:31.03 bitrate=108341.2kbits/s

Does that mean that I need 100Mb/s internet to support sending raw frame, that bitrate is also the internet speed I need to have? And since my internet cannot support the fps drops to 6.3 instead of 30?

Yes. But you should have a little overhead as well, so you probably need about 150Mbps for this. Something like huffyuv could give about a 50% reduction, or a lossy codec would give 95% or more reduction.


Tips for shooting professional POV footage I'm working on a video for a client and they are wanting to tell a story in video shot entirely in POV.

My initial thoughts were GoPro but i think it doesn't give the same quality as a DSLR. I'm thinking about using a helmet mount what are your thoughts on this?

Is there anything i need to consider when filming POV footage for example

Which lens should i use for POV? (i have a canon mark 5d III)
Is there a particular camera set up or filming techniques should i use to get the most of the POV footage?
How should i instruct my actors who will be wearing the camera?

Or is it just as simple as mounting a camera to your head?

I wouldn't mount a camera to your head - that might result in a) really nausea-inducingly wobbly footage that's much higher than the average eye-height and b) a sore neck. Instead, I'd go for a shoulder rig (something like this: http://amzn.eu/ixifFeM - DISCLAIMER: I haven't got one of these or used this model so this is not an endorsement, just an example). I've shot a POV film before and this was absolutely the best way we found to do it and gave great results (make sure your operator is of average height, though, otherwise you'll be looking up/down at the scene, unless, of course, that's the look you're going for - don't mean to be mean, just something to consider).

You'll get the camera to eye-height and will have much more stability and the ability to capture some excellent shots without having to stretch up with a gimbal or whatever.

The best thing about this is that you can use whatever body/lens combo you'd like (within reason :P).

Remember, though, that humans do have selective focus so you'll need a focus puller and some way for them to operate.


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

Firstly, I don't know if this is on-topic or not; I'll leave it for others to decide.

Simply, there are no rules. The question I would ask, is "would you do this in person?". That should give you your answer.

It intrigues me, however, that you wish to use a phrase from a culture and religion you are not a part of - so you really need to be extremely careful that you understand the implications of the phrase, as well as if it is used within society by non-Muslims. Cultural appropriation can be a serious insult to a culture; or it can be seen as appreciative and continuing their history.


ffmpeg: white padding is light grey but not white I want to generate 16:9 thumbnails from videos with white padding but the resulting picture has grey padding instead of white. This is the command line (input here is a jpg but the effect is the same when using a video):

ffmpeg.exe -i "https://gooseberry.blender.org/wp-content/uploads/2014/01/franck.jpg" -filter_complex scale=iw*min(852/iw\,480/ih):ih*min(852/iw\,480/ih),pad=852:480:(852-iw*min(852/iw\,480/ih))/2:(480-ih*min(852/iw\,480/ih))/2:white,fps=fps=50/5.000000 output.jpg

the resulting image (text and white box added with paint):

even though the padding color is white it's light grey in reality. Is there a way to get it 'whiter'? It's especially ugly if you plan to print it on paper.

The end of the filter chain should output full RGB, like this:

Windows batch:

ffmpeg.exe -i "https://gooseberry.blender.org/wp-content/uploads/2014/01/franck.jpg" ^
  -filter_complex ^
   scale=iw*min(852/iw\,480/ih):ih*min(852/iw\,480/ih),^
pad=852:480:(852-iw*min(852/iw\,480/ih))/2:(480-ih*min(852/iw\,480/ih))/2:white,^
format=rgb24 franck-padded.jpg

Linux bash:

ffmpeg -i "https://gooseberry.blender.org/wp-content/uploads/2014/01/franck.jpg" \
  -filter_complex \
   "scale=iw*min(852/iw\,480/ih):ih*min(852/iw\,480/ih),\
pad=852:480:(852-iw*min(852/iw\,480/ih))/2:(480-ih*min(852/iw\,480/ih))/2:white,\
format=rgb24" franck-padded.jpg

The important part is format=rgb24 which keeps or converts the final filter output to the RGB pixel format, which allows full range values from 0-255. Without that final filter, ffmpeg will convert the filter output to the YUV pixel format where the range of legal values is 16 to 235 for luma (brightness) - 16 maps to black and 235 to white - and 16 to 240 for the chroma components (color). (The default YUV colorspace range is a legacy of analog television signals and carried over into the digital realm by the MPEG committee and hence still widely adhered to by most digital video formats)


Get effect to overcome image size [After Effects] Quick question, how can I get a transition effect on an image (CC light wipe) to fill the composition?

Is there an easy way to do this?

Thanks

Using Adobe CC 2014

If you are applying the light wipe to an image which is smaller than your full comp size, then the light wipe effect will only fill the size of the image, not the full screen.

To overcome this, you could add a full screen solid behind your image, and pre comp the image and the solid.  Then add the light-wipe to the comp, not the individual images.

Alternatively, you could try putting an adjustment layer between your two images, and applying the light wipe to that.


Recompressing many huge MOV files My camcorder produces huge MOV files, and I use it for about 1 hour every day, which gives me more than 7 GB of data per day (around 128 MB per minute of recording). Here is the codec information given by ffmpeg -i for a sample 12 minute clip:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Video.MOV':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2013-02-05 20:12:47
    original_format : NVT-IM
    original_format-eng: NVT-IM
    comment         : CarDV-TURNKEY
    comment-eng     : CarDV-TURNKEY
  Duration: 00:12:37.00, start: 0.000000, bitrate: 15935 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 14745 kb/s, 30 fps, 30 tbr, 30k tbn, 60k tbc (default)
    Metadata:
      creation_time   : 2016-02-05 20:12:47
      handler_name    : DataHandler
      encoder         : h264
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 32000 Hz, 1 channels, s16, 512 kb/s (default)
    Metadata:
      creation_time   : 2015-02-05 20:12:47
      handler_name    : DataHandler

These are files I would like to keep, and in a decent quality. I will not have storage enough to keep them all in the long term, and my country is one of the most expensive places (if not the most) to purchase or import hardware components, so buying new hard drives is really out of the question.

I have tried recompressing this 12 minute clip using different settings on Handbrake (including of course, the Normal and High profiles), but the resulting file is generally the same size, if not bigger (around 1.5 GB).

I have searched on YouTube for HD videos, and have downloaded a few videos just to check their size, and I got 1080p 12 minute clips for around 200-300 MB in size. They may have reduced some quality, but in my eyes, 1080p videos on YouTube generally look pretty sharp. If possible, I would like similar results!

While searching here on Video Production, I have found this answer which says that "cameras have to compress on-the-fly, so they use constrained baseline mode (...) if you'd like to recover some space, you can use ffmpeg". I have tried running that particular command, but still I am getting huge files.

I am on Linux, but could maybe run Windows in a virtual machine too.

My earlier answer still holds in general. Additional advice I can provide is to try higher CRF values and use the veryslow preset.

ffmpeg -i input.mov -c:v libx264 -crf 23 -preset veryslow -c:a copy -c:d copy -map 0 compressed.mov

You can also mimic a constrained quality mode by setting

ffmpeg -i input.mov -c:v libx264 -crf 21 -preset veryslow -maxrate 5M -bufsize 10M -c:a copy -c:d copy -map 0 compressed.mov


How to load 3D LUTs on Dslr? There are few film emulation LUTs (LookUp Tables) that I would like to use on my DSLR in real-time (live) because shooting live with LUT applied gives very accurate results and cuts down time on post editing process.

I would like to know if there are any ways to use LUTs live on DSLR just like you can with some smartphone apps.

As far as I'm aware there are no dslrs with lut loading capabilities. Further, many professional grade cameras don't even have that ability.

I suggest getting a small HD monitor and loading it there and connecting that to your Dslr.


FFmpeg. CUDA decode. Past duration too large. Variable FPS Please see my input udp stream information:

  ffprobe udp://IP:PORT

Input #0, mpegts, from 'udp://IP:PORT':
  Duration: N/A, start: 42243.737022, bitrate: N/A
  Program 17
  . . .
    Stream #0:0[0x781]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 24.67 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x782](Tam): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 64 kb/s
    Stream #0:2[0x783](Kan): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 64 kb/s

And run this command again:

  ffprobe udp://IP:PORT

Input #0, mpegts, from 'IP:PORT':
  Duration: N/A, start: 42589.601022, bitrate: N/A
  . . .
  Program 17
    Stream #0:0[0x781]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 24.58 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x782](Tam): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 64 kb/s
    Stream #0:2[0x783](Kan): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono, s16p, 64 kb/s

Please pay attention to FPS value. In the first execution it 24.67 and in the second it 24.58

I want to transcode this stream with the following command:

  ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -deint 2 -i
  "udp://IP:PORT" -map 0:#0x0781 -map
  0:#0x0782 -vcodec h264_nvenc -acodec libfdk_aac -f flv rtmp://IP/test/name

Please see the log:

Past duration 0.981102 too large
frame=83 fps=0.0 q=18.0 size=502kB time=00:00:04.05 bitrate=1015.4kbits/s dup=0 drop=80 speed=7.42x
frame=96 fps=90 q=18.0 size=643kB time=00:00:04.69 bitrate=1122.1kbits/s dup=0 drop=93 speed=4.38x
frame=111 fps=70 q=18.0 size=802kB time=00:00:05.14 bitrate=1278.1kbits/s dup=0 drop=108 speed=3.26x
frame=121 fps=57 q=19.0 size=921kB time=00:00:05.61 bitrate=1344.7kbits/s dup=0 drop=118 speed=2.64x
frame=137 fps=49 q=19.0 size=1096kB time=00:00:06.25 bitrate=1436.4kbits/s dup=0 drop=134 speed=2.26x

I also can add the framerate parameter "-r". As follow:

  ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -deint 2 -r 25 -i
  "udp://IP:PORT" -map 0:#0x0781 -map
  0:#0x0782 -vcodec h264_nvenc -r 25 -acodec libfdk_aac -f flv rtmp://IP/test/name

In this case this warning is not shows. But the transcoding FFmpeg process failed after 10-15 seconds, without any errors in the log.
Everything works fine if I do it via software decoding:

  ffmpeg -y -i
  "udp://IP:PORT" -map 0:#0x0781 -map
  0:#0x0782 -vcodec h264_nvenc -acodec libfdk_aac -f flv rtmp://IP/test/name

Also everything works fine if I transcoding it to the local file and specify framerate:

  ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -deint 2 -r 25 -i
  "udp://IP:PORT" -map 0:#0x0781 -map
  0:#0x0782 -vcodec h264_nvenc -r 25 -acodec libfdk_aac -f flv result.flv

This issue affects only for some input streams.
How can I transcode this UDP stream to FLV stream with CUDA decoding?

The key -drop_second_field 1 fixed this issue.  And result command looks as follow:

  ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -deint 2 -drop_second_field 1
  -i "udp://IP:PORT"  -vcodec h264_nvenc -acodec libfdk_aac -f flv rtmp://IP/test/name

What I think about this problem: at the moment in cuda decoding we can use only 2 deinterlace variants:

-deint 1 it's bob deinterlacing,
-deint 2 it's adaptive deinterlacing.

Both of these variants are increase bitrate, because after deinterlacing each field(half of frame) displaying as frame (framerate is doubled) Bitrate is grow and if fps is variable we got timestamps issue. And when we enable drop second field then everything looks fine with bitrate and timestamps.


How to create a 1h long WMV file from a repeated 1 minute WMV many times over? What's the fastest way to do this? Is there a way I can just copy the file 60 times over without having to re-encode?

It's a WMV file created with Expression Encoder.

The ffmpeg concat demuxer can do this if the WMV video codec variant can be encoded by ffmpeg. Windows Media Video 7 & 8 qualify, Windows Media Video 9 doesn't.


After Effects - Trying to Export Video with RGB Alpha (I get a black background in the export) In After Effects I'm trying to Export Video with RGB Alpha (I get a black background in the export) please see notes below:

Here's my setup (on canvas transparency is toggled on)

Looks like it should work to me. You could try using ProRes 4444 instead, with millions of colours+ and Alpha turned on.


How to specify different flags for inputs with FFMPEG? You can specify multiple inputs to FFMPEG and mix them into a single output. I understand the basics of this, for example:

ffmpeg -i vid1.mp4 -i vid2.mp4 [commands] output.mp4

What I can't figure out is how I can specify different commands for each input. For example, I have the following I'm trying to do:

 ffmpeg -i vid1.m2t -i vid2.mp4 -map 0:a -filter_complex "[0:v:0][1:v:0]vstack=inputs=2" -crf 24 -c:a aac -b:a 128k -ac 1 -movflags +faststart output.mp4

vid1.m2t is a 1440 anamorphic hdv mpeg stream, and vid2.mp4 is a regular 1920 h.264. Using -filter_complex "[0:v:0][1:v:0]vstack=inputs=2" I'm trying to stack vid1 on top of vid2, but I get the error that says it can't proceed because the two videos are not the same width. Well, yes, except in display the m2t is actually 1920 wide, not 1440.

When I'm converting just the hdv by itself, I use -filter_complex "scale=1920:1080,setsar=1" to ensure square pixels. I know that works well, but how can I incorporate that into this vstack command? If I put it in with the other I get errors. I've tried a variety of different ways, including before the input (thinking that would make ffmpeg apply it only to the input before sending it to the other commands for output), but they all make errors.

Additionally, I wonder if the -crf 24 command can be specified for each input. When converting individually the m2t needs to be at 24 or less, or it looks bad, while the mp4 can be as high as 30. I might be misunderstanding what vstack does, but I would think that if I can tell ffmpeg to give different attention to quality for each input would lessen file size.

I have the same issue with hstack. FFMPEG will render the output, but the m2t file comes out 1440 wide, therefore skewed. So the total video width is 3360 wide, instead of 3840.

Maybe more specific to this exact problem, how can I use vstack or hstack when the inputs have different dimensions?

Suppose a video stream is 1440x1080 with sample/pixel aspect ratio of 1.333, leading to a display of 1920x1080. Realize that the actual resolution of the stream, and what's stored in the file, is 1440x1080. The aspect ratio flag tells the consuming app (player/editor..) that the intended display proportion is different than the raw ratio of the width to height and that it should use the aspect ratio to rescale the video to produce an accurate display. FFmpeg will not automatically make a video square-pixel since the user may not want that.

The stack filters require that all streams have the same size at the interface that they are joined at - for hstack, that's height, and for vstack, that's width. Only the raw size matters, the aspect ratio is just an informational flag.

So, you'll have to rescale the first input before stacking.

Use

ffmpeg -i vid1.m2t -i vid2.mp4 -filter_complex "[0:v:0]scale=iw*sar:ih,setsar=1[vid1];[vid1][1:v:0]vstack=inputs=2" -map 0:a -crf 24 -ac 1 -c:a aac -b:a 128k -movflags +faststart output.mp4

As far as the encoder is concerned, it is just presented with one stream of 1920x2160 - the historical provenance and composition is lost. Now, if you want to apply different levels of compression to parts of the frame, that's called Region Of Interest encoding. Some initial patches were applied last month to allow this for x264 and x265, but it is not operational yet. I'll update this answer when it becomes so, but for now, you can only assign a single CRF value for the whole frame.


Should I shoot at 1080p if I intend to use 720p on the web? I'm filming video that will only be viewed on the web at 720p, I'm considering shooting in 1080p in case in future I need to up the quality. I'm going to use 720p at present to keep streaming costs down but in future 1080p could be used when costs fall. Will I loose anything shooting at 1080p with the final output being 720p?

I'm new to video production hence the question.

There is no one right answer to this very general question, but here are the considerations.  Some cameras (such as the Canon EOS DSLRs) have very naive line-skipping algorithms to decimate their normally very high resolution down to FullHD or HD video.  Such algorithms create lots of aliasing noise, which is further aggravated by further image scaling.  Other cameras are more intelligent about how they match the sensor's native resolution to the desired recording resolution.  RED cameras, for example, crop down the sensor so that whether you are recording at 6K or 5K or 4K or 3K or 2K HD resolution (1920x1080) you are using precisely the RAW pixels, not some interpolation or decimation thereof.

Another consideration relates to the actual recording bandwidth of your system.  If you are recording at a fixed rate (such as 28Mbps AVCHD), then a 1080p video will, necessarily, have to employ greater compression than the 720p video, because the 1080p has 2x the spatial resolution of a 720p video (and both have the same bit rate).  If your fixed recording rate is 200Mbps (such as is offered by the Panasonic GH4), that might be so generous that you really are getting very high quality for both 720p and 1080p.  So it depends on whether your camera's imaging system is well within, at the limit of, or past the point of a good compression tradeoffs.

Finally, 1080p streaming might strip out way more quality from your 1080p master than exists in even your 720p master.  In which case a high-quality 720p master might be all you need.

The places where video quality really gets down to the pixel level are typically within the post-production process, pulling keys, doing color correction, sharpening, etc.  Once you have a high-quality master, streaming compression will probably obliterate all differences in your 1080p vs. 720p masters.  Unless you have a notorious camera known for particularly poor quality in the first place.


What tools do you use for command line editing? [edited to be more like a question.]

I have been producing video using a combination of ffmpeg, mencoder and graphicsmagick for several years. Mostly it is because of not only the sorry state of affairs of GUI editing tools on linux, but also since I prefer to use the command line and scripts more than clumsy crashy interfaces.

[/edit]

I investigated the MELT CLI after stumbling across a couple of youtube videos showing how it works.

As opposed to ffmpeg, it is FRAME-PERFECT, allows for simple concatenation of files or even clips within multiple files, transitions are incredibly easy and the usage of video and sound filters is intuitive (once you have wrapped your head around the syntax). In fact, you can even script effects with html5!

Here is an example that would provide both an audio and video transition between clip1 and clip2 and create an mp4.

$ melt clip1.dv clip2.dv -mix 25 -mixer luma -mixer mix:-1 \
  -consumer avformat:clip1and2_mixed.mp4

From their webpage regarding their system / plugins:

FFmpeg for audio/video decoding and encoding
swfdec Flash decoder
WebVfx for HTML5-based graphics/animation generation
GTK+ and Qt for image loading and text rendering
LADSPA audio plugins
SoX audio effects
libsamplerate audio resampler
JACK audio routing
frei0r video plugins
SDL for desktop audio/video output

Note:
I am not knocking ffmpeg and I am not affiliated with MLT or MELT.

http://www.mltframework.org/bin/view/MLT/Projects

http://www.mltframework.org/bin/view/MLT/MltMelt

Video editing is a very visual workflow, you need to see your result at all times, instantly, to be effective in your daily job.
Working with a CLI is rather counter intuitive and makes it hard to make creative decisions.

Frameworks like these are great to make programs on top of them and to automate video processing but are tedious to use in standard video production and animation workflows.
It's a matter of what you want to do, not whether its a powerful tool or not.


A specific MP4 file is not playable with avfoundation in iOS I have an mp4 video file that I want to play it in iOS using avfoundation. Unfortunately, the file is not being played and save into the default gallery (photos) even it has h264 video codec and aac audio codec. And it is only playable when I reencode it using ffmpeg. I want to know why the file only becomes playable after reencoding the video?
Not Playable(originalFile.mp4) vs Playable File(outputFile.mp4) Information Comparison

File is playable with avfoundation when these commands are being applied:

ffmpeg -y -hide_banner -i originalFile.mp4 -f mp4 -vcodec h264 -vf scale=out_color_matrix=bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -b:v 5703k -acodec aac -b:a 249k outputFile.mp4

ffmpeg -y -hide_banner -i originalFile.mp4 -f mp4 -vcodec h264 -acodec aac outputFile.mp4

File is not playable with avfoundation when this command is being applied:

ffmpeg -y -hide_banner -i originalFile.mp4 -f mp4 -vcodec copy -acodec aac outputFile.mp4

originalFile.mp4 file link: https://drive.google.com/file/d/1-yZFL0EsLztMIfwU79Al6dv8gdwJyGAD/view?usp=sharing
ffprobe streams of both files are here
https://www.diffchecker.com/VgZL66QB

The original video is an old, interlaced format.  At least, according to the line that says, "smpte170m/bt470bg/bt709."  The SMPTE standard is available for purchase here, but you can tell from the summary that it's interlaced.
The second ffmpeg command is copying the format without re-encoding, or handling the interlacing, which isn’t supported on iOS.  The first set of commands work because the video is being re-encoded. Whether or not the video is automatically being de-interlaced, I can’t say without seeing, but I doubt it.  See my answer to this question to judge for yourself.


How to remove little camera movements I want to remove little camera movements from a video. Is this possible?
I tried virtualdub with deshaker plugin, but it only works for shaking.

Shooting position: bridge
Weather: strong wind

Example shot on youtube.

Adobe premiere and After effects have a stabilizer plugin with a "no motion" setting that does what you want. These are commercial applications.

The free Da vinci resolve lite also has a "stabilize option" (but I have never tried it personally)


Convert HDMI video to Coaxial Antenna? I need to take an HDMI (unencrypted source) from a Sony video camera and send it via coaxial cables which are hooked directly to TVs wired throughout the building. I'd like to be able to tune into i.e. Channel 3 to tune into the video signal.

I've searched and the only solution I can find is an SDI to HDMI converter, but I'd rather not use that and would prefer to hook coax directly to the TV as below:

Camera (HDMI) --> [CONVERTER BOX??] ==coaxial==> TV
                                     |=========> TV
                                     `=========> TV  (etc)

Assuming you want digital channel 3, you can use an HDMI to QAM modulator, like this one or this one. You will need appropriate multiplexers, amplifiers, and splitters to combine your feed with your CATV provider and then distribute to the TVs.

If you need analog channel 3, then it is more complicated. You will probably first need to convert to SDI, then convert to analog video and audio, and finally feed an analog modulator.


Can an expression parse a text file or the expression of another property in After Effects? I am going to have tons of layers use the same expression, but I need to be able to edit the expression later without having to edit it for every layer. I also can't simply have each layer's property point to the original, because the expression needs to be evaluated for each layer relative to itself.

Is there a way I can have each layer expression simply point to and parse a text file? I could edit the text file so all layers expressions update.
Or, if somehow I could put the expression on a null object and have each layer parse that expression for itself.
Thanks for any help!

My workaround solution is to make a null object with a slider control for every single value that I may edit later, updating all layers, but this doesn't allow me to change the non-numerical information in the expression, such as adding parenthesis or other functions.

Yes, since expressions are basically JavaScript, you can load and evaluate external source files. Unfortunately the location needs to be hard-coded, since (AFAIK) expressions do not have access to the path of your AE project, so it's rather brittle. For instance:

try {
    myPath = "~/Desktop/source.js";
    $.evalFile(myPath);
} catch(err) {
    "MISSING";
}

Further explanation of how similar code works can be seen on the ProVideoCoalition site.

One further caveat is that the script is loaded and evaluated again for every frame that gets rendered. You might want to test how loading the script affects your render times.


Raising volume of one mic in an audio track to meet others' mics volumes I have a long video where I and other people talk. Whereas the voices of others sound good, my mic captured mine with a very low volume. The problem is that the video is long and voices alternate, so I cannot go looking for every piece of audio where I talk and raising the volume one by one.

Is there a way to automatically raise my voice while keeping others' voices in a good level as they currently are?
I think I have to use some "compression" and "normalization" but I don't really know how they work, so if you provide specific steps it will be highly appreciated. I already played with normalization without much success. I attempted to increase the volume of the whole piece, so my voice reaches a good volume, and then "normalise" the volume to see if that will lower the voices of others to their initial state, but it didn't work (I probably did something wrong).

For it to sound good, you would certainly have to raise and lower the volume by hand using keyframes. If you want a quick and dirty solution, you can use a limiter or compressor. A limiter sets a ceiling of volume that cannot be surpassed. This way, you can turn up the volume significantly, which would make your voice touch this ceiling while others would be crashing through that ceiling. The limiter than lowers the volume of the parts that would crash through the ceiling, effectively putting loud and quiet parts closer together in volume.
However, you will also hear an extreme limiter / compression like this. Quiet sounds when nobody talks will be awkwardly loud, breaths sound like from an asmr video and you will most likely have a problem with background noise, which will be more audible aswell.
To avoid this problem in the first place, I would recommend you use microphones for each person that's speaking, so you can adjust the volume easily in post-production.


How to concatenate multiple videos with fades (from- and to-black) in-between? I recently had the following problem:

I wanted, using ffmpeg, to concatenate several videos (with audio), adding black clips (with null audio) between them , and lastly fade the videos from those black clips (fade-in) and to those black clips (fade-out).

Schematically, with 2 videos for instance:

black (1s) --> part_1 (60s) --> black (3s) --> part_2 (120s) --> black (1s)
            ^                ^              ^                 ^
       (2s-fade-in)     (2s-fade-out)  (2s-fade-in)      (2s-fade-out)

I was looking for a one-liner solution (to avoid re-encoding original videos more than once), but only found documentation or help for each part of the problem.

Having figured it out, I wanted to document my solution for those after me who will stumble on a similar problem :)

So here is what I came up with.
A not fully one-liner solution
1) Generate black clips
ffmpeg -f lavfi -i "color=black:s=1920x1080:r=30" \
 -f lavfi -i "anullsrc=r=48000:cl=stereo" \
 -c:v libx264 -c:a aac -t 3 empty_3s.mp4

Use lavfi filters to generate your empty clip. Of course, change the parameters according to your videos and what you want to achieve. Especially:

in first (video) source filter:

s (size) should match that of the videos you want to concatenate.
r (frame rate) should also match your videos (especially if your want a constant frame rate output)

in second (audio) source filter:

r (sample rate) should match that of the audio tracks from the videos you want to concatenate.
cl (channel layout) should also match the audio from your videos

Output parameters (codecs for instance) should match those of your videos. Use -t to set the length (in seconds) of the empty clip.
2) Concatenate and fade your videos using a complex filtergraph
ffmpeg -i empty_1s.mp4 -i part_1.mp4 -i empty_3s.mp4 -i part_2.mp4 -i empty_1s.mp4 \
 -filter_complex \
  "[1:v] fade=t=in:st=0:d=2, fade=t=out:st=58:d=2 [1v]; \
   [1:a] afade=t=in:st=0:d=2, afade=t=out:st=58:d=2 [1a]; \
   [3:v] fade=t=in:st=0:d=2, fade=t=out:st=118:d=2 [3v]; \
   [3:a] afade=t=in:st=0:d=1, afade=t=out:st=118:d=2 [3a]; \
   [0:v] [0:a] [1v] [1a] [2:v] [2:a] [3v] [3a] [4:v] [4:a] concat=n=5:v=1:a=1 [v] [a]" \
 -map "[v]" -map "[a]" -c:v libx264 -c:a aac output.mp4

Explanation:

we first specify the inputs (-i) that we will concatenate
we then set a complex filter (-filter_complex), that we use to:

first, fade in and out our videos. To that end we use the fade (for video) and afade (for audio) filters. We specify the start (st) and duration (d) for each fade. We output the results with outpad names ([1v], [1a]...).
then, concatenate the black clips and the previously faded videos, using the concat filter. We specify the number of input segments n (i.e. the number of video+audio sets, in our case 5) we want to concat, and the number of video (v=1) and audio (a=1) streams for the output.

we map the final output to the output streams from the concat filter
specify the encoding parameters to whatever you want :)

Important notes:

your videos (inputs) must have the same characteristics (pixel and sample format for video, sample rate and channel layout for audio). See concat documentation for more info.
in the fade filter, we specify start time and duration in seconds, but you can use frames or samples as well with s and n (video) or ss and ns (audio) options. See afade and fade filters documentation.
you must know the duration of your videos for the fade filter, especially for fade-outs. See this question for hints on how two fade-out clips without having to manually specify start time.

True one-liner
If you really want a one-liner (and not having to encode empty black clips), you can use:
ffmpeg \
 -f lavfi -t 1 -i "color=black:s=1920x1080:r=30" -f lavfi -t 1 -i "anullsrc=r=48000:cl=2" \
 -i part_1.mp4 \
 -f lavfi -t 3 -i "color=black:s=1920x1080:r=30" -f lavfi -t 3 -i "anullsrc=r=48000:cl=2" \
 -i part_2.mp4 \
 -f lavfi -t 1 -i "color=black:s=1920x1080:r=30" -f lavfi -t 1 -i "anullsrc=r=48000:cl=2" \
 -filter_complex \
  "[0:v] null [0v]; [1:a] anull [0a]; [3:v] null [2v]; [4:a] anull [2a]; \
   [6:v] null [4v]; [7:a] anull [4a]; \
   [2:v] fade=t=in:st=0:d=2, fade=t=out:st=58:d=2 [1v]; \
   [2:a] afade=t=in:st=0:d=2, afade=t=out:st=58:d=2 [1a]; \
   [5:v] fade=t=in:st=0:d=1, fade=t=out:st=118:d=2 [3v]; \
   [5:a] afade=t=in:st=0:d=1, afade=t=out:st=118:d=2 [3a]; \
   [0v] [0a] [1v] [1a] [2v] [2a] [3v] [3a] [4v] [4a] concat=n=5:v=1:a=1 [v] [a]" \
 -map "[v]" -map "[a]" -c:v libx264 -c:a aac output.mp4

In that case we must beware of the input indices, as black video clips and null audio clips are separated inputs (I didn't figure out how to put them as two streams in a single input, if you have an idea feel free to share it).
Here I applied null and anull filters to those inputs to give them outpad tags, in order to use consistent identifiers in the concat filter. But this is purely optional.
Hope this helps, feel free to improve my solution with your insights :)


How does ffprobe identifies I frame and IDR, when it sets key_frame=1 How does ffprobe identifies I frame as an IDR and sets key_frame=1.
Is it for the scene change?

My requirement is to filter out IDR frames: the steps I am following are

ffprobe output_file -show_frames -select_streams v:0
Filter above command results with key_frame=1 values(as per ffprobe IDR)
The total count i got is 259. Using ffprobe I am getting wrong sets of key_frame=1 values.
When i analyzed the same file with textronic analyzer I got correct values idr = 118

Textronix analyzer gives me below details for a a file verification.

TotalPictures:Count[ 5864]
I Pictures: Count[  259]
P Pictures: Count[ 1059]
B Pictures: Count[ 4546]

RAP Pictures:Count[259]
IDR Pictures:Count[118]
BLA Pictures:Count[0]
CRA Pictures:Count[141]

Frames:     Count[ 5864]    Percentage[100.00]
Fields:     Count[    0]    Percentage[0.00]

GOP (in Pictures, between I): Count[258] AverageSize[22] MinSize[1] MaxSize[50]
CVS (in Pictures, between IDR):Count[117] AverageSize[50]MinSize[50]MaxSize[50]

Now how to identify correct IDR count using ffprobe?

FFmpeg is setting iskey to 1 for CRA frames as well(tried with -skip_frame nokey). I need to collect only IDR frames

It sounds like you're analyzing a HEVC bitstream. HEVC has multiple types of Random Access Pictures, only one of which clears the buffer. But ffmpeg flags all of them as keyframes.

You have to use the HEVC decoder to parse this info out. The skip_frame option, as implemented in the HEVC decoder, only decodes IDR frames.

Use

ffmpeg -skip_frame nokey -i in.mp4 -vf showinfo -vsync 0 -f null -

The number of frames output is the IDR count.

For the sample file, you can use the filter_units bitstream filter to keep only IDR frames

ffmpeg -copyts -i HEVC-1080i25-STB_02_576i25.ts -an -c copy -bsf:v filter_units="19-20" -f mpegts - | ffmpeg -copyts -i - -vf showinfo -f null NUL

This will show the data of 118 frames, same as the analyzer.


Color Grading in Adobe premiere elements I recently started to film with my drone(phantom 4). I read somewhere that it was recommended to use some "flat" preset, like D-Log or D-cinelike, which I did.

Now I've very flat video, and I've some hard time to find how I can easily restore the color back on adobe premiere elements(which I'm using over adobe premiere pro because of the dynamic titles).

Can someone explain how to restore the colors easily?

I found severals things(tridirectional color corrector), but I can't find how to bring nice colors back.

I was able to do such things with Adobe lightroom for pictures, by adjusting the histogram to have it filling the whole spectrum, adjusting low/light, saturation and that's it, but here I cannot find how to do it?

Thank you very much

The easiest way would be to use 3 way color corrector.

Do a first pass color correction to get it to a standard look.

Then do a 2nd pass within the same filter (lower down on the filter) to grade.

Or get Resolve (paid version), or Color Finesse, which is also very good.


Nvenc produces corrupted video Someone knows how to solve this?

Hardware:

DRIVER: 396.24
CPU: Ryzen 1700
GPU: Nvidia MSI 1050 TI

Settings

Ok, this is a known bug in ssrr: https://github.com/MaartenBaert/ssr/issues/658

SOLUTION: You can use OBS, which is compatible with NVENC.


AE - Imported mp4 seems to be missing audio I'm new to After Effects, but my experience with video editing so far has been that audio and video are treated separately. When I add an mp4 to my composition, I get the video element, but I can't figure out where the audio is at. When I hit play on the preview toobar, the audio does not play. I checked to make sure "mute audio" wasn't enabled.

I'm sure it's something simple, I just need to be pointed in the right direction.

If you just play the comp it won't play audio. You need to do a RAM preview. Hit 0 (zero) on the numeric keypad or Ctrl+0 if you're on a laptop.

. (period) on the numeric keypad (or for laptop ctrl+.) plays just the audio from wherever the playhead is.

If your footage does have audio, you will see the waveform in the preview thumbnail in the project window, and the item description will tell you the audio format, as below (in this case 44.1kHz, 16 bit unsigned pcm, stereo audio)

If the clip has audio and you bring it into a compositon you should see a little speaker icon on the layer with the audio, next to the eye icon, on the left.


Resolution loss by chromatic subsampling: is there a workaround? I was trying to make some recordings of a game (with OBS), but it wasn't really good even with "lossless" options. Some part of the interface was just pixelated... After a while I realized that the chromatic subsampling should cause the problem, as the pixelated interface is red. (In OBS the default color format is NV12, using RGB instead - without subsampling - it was all good.)
Is there a workaround to keep the resolution of the interface intact, but still do some kind of chromatic subsampling? (Maybe with some other color encoding than YUV?)
It's Ok if I need to make the recordings without subsampling, and than convert/transcode the videos. I would do it anyway, as OBS can't record with hevc_qsv. Also I don't have an intent to publish these videos on the internet. (Probably I'd like to store the videos using H265 or AV1, to obtain the best compression.)

No. Almost all video on the planet is limited YUV420 (all Blu-rays, even HEVC ones with Dolby Vision, all Youtube, only some satellite FEEDs not for consumers use 4:2:2). Sorry. Of course, there is RGB and even mathematically lossless mode in all common encoders, H.264/AV1/VP9/HEVC... For lossless AV1 see https://trac.ffmpeg.org/ticket/7600
But, alas. It is not used at all.
Only Dolby Vision in profile 5 that is not HDR10 compatible (it uses IPTPQc2 color instead of YCbCr and FULL RANGE) can be good enough for you. It still uses 4:x:x chroma but because of new encoding it is much better looking!


What are the names of different ways to fit video when the aspect ratios do not match? If I want to communicate to someone editing a video, how can I tell in an unambiguous way how I want the video to be resized.

1) If I want the image to be cropped so that there are no black strips filling the area that has no image.

2) If I want the the video to be scaled down so that the image is not cropped, adding the two black strips filling the gaps where there is no image.

Letter box if you have bars on the top and bottom.
Pillar box if you have them on the sides.
Stretch (or possibly anamorphic, depending on what the intended playback aspect ratio is)   if you are full screening it by stretching it out to fill the space.
Cropped if you are making it full screen by cutting off the edges.


Where are the Source Scaling Options in Adobe Media Encoder CS6? In Adobe Media encoder CC, the Settings in the drop-down menu have a Match Source option that will preserve the pixel size of the file.

In this Adobe Help article, the authors of the page state that Adobe Media Encoder CS6 can let the user chose "Match Source" in an "Output" panel.

I have seen this panel in the Export window of Premiere Pro before, but my version of Adobe Media Encoder doesn't seem to have this panel:

When I add projects to Adobe Media Encoder, they show up in the Queue panel, and the settings are in the top right Preset Browser panel. None of them has a "Match Source" option.

If I am directly adding video files to the Encoder, which isn't in one of the preset pixel sizes, how do I encode it properly in Adobe Media Encoder CS6?

If you're just looking for the h.264 match source settings preset, you'll find it in the Preset Browser under System Presets > Broadcast > H.264

If you have another preset that you want to use, or if you're wanting to customise one, then if you look at the presets in the queue item you'll see that you can click on the name of the preset to edit the settings—note the blue line when you hover.

Once you do that the familiar export settings window will appear, with the great big Match Source button.


disabling streams in quicktime movies with ffmpeg In Quicktime pro you can turn off streams in movies, without deleting the stream. Is it possible to do this with a command line application like ffmpeg?

I have a bunch of video files that were recorded with both the crappy on-camera mic and a separate audio recorder. I've synched the sound and added it to the video, and now each clip has two audio streams. I want to keep the original audio, for reference and archival purposes but disable it. It's obviously done in metadata, but can it be done by ffmpeg?

QTCoffee let's you edit track information in QuickTime files, but it's OS X only and donationware:

$ modmovie -list clip.mov
Track list for clip.mov:
    * Video Track
    * Timecode Track
    * Sound Track
$ modmovie -disable "Sound Track" -save-in-place clip.mov

If you are on OS X, and if you have QuickTime Pro (included in the pro apps), I would rather use that and AppleScript.

For other platforms: libquicktime can also edit track properties through it's API, so you will need to write a command line wrapper first ...


solution for archiving digital video What solution do you use for archiving digital video content?
Are magnetic tapes adequate, or better setup another 8HDD raid5 server?
I read some news that SONY will bring to market an 1.5TB tape drive by the end of the year

Your best bet is to save them on two disks, that is two back up copies. A RAID sounds nice, but have you ever had to replace a RAID system with a faulty controller? It can be a nightmare. Forget RAID as a back up unless you are talking about an instant snapshot retrieval system that is online 24/7. If you are talking about a long term back up as in a real archive then get two USB disks with enough capacity and make two copies, one on each disk.

Tapes will require hardware that may not be around when you want to retrieve the data.

As a systems administrator for many years please allow me to demonstrate this issue.

In the 1980s we used 1/2 inch tape transports to back up our servers, this was replaced by 8mm tapes by 1995, 8mm tapes were replaced by DLT transports, DLT was then replaced by super DLT, which then was replaced by LTO. This never ends. If you wanted to read those old 1/2 inch tapes you would have to go to a museum, and this will eventually be true for every tape transport system that was ever developed.

Yes disk interfaces change, but getting a conversion interface say EIDE to USB, or ATA 100 to USB, or SATA to USB is easy. Other serial interface conversions will be easy too vs. trying to locate a 'vintage' tape system that still works.

I only shoot on digital memory, so backing up my data is simple and painless. I make two back ups on two different disks. The disks are then removed from service and stored where they will not get toasted, or frozen. I only use these disks when I need to update the backup. Eventually when they are full I store the disk in what I call a dormant back up.

Because I only power up the disks when I either need the data or I need to do a back up increases their reliability. Most disks have a 5 year warranty, if these are on 24/7 or turn them on every time I use my computer I would be needlessly heating them up, and after 50,000 hours they may not work. Using the back up disks only when you need them will extend their life way beyond 5 years.

Currently I have two 2 TB disks as my active back up. I have two 1TB disks in the dormant state too.

Like a volcano, information has 3 states: Active, Dormant, and Extinct.
Active data should be accessibly 24/7, dormant should be available, and extinct goes to the shredder.


Display image file name in AE viewport When there's a file missing in the imported image sequence, there is a filename displayed in the corner. Is there a way in After Effects to have the file name displayed all the time even on non-missing frames? Thank you.

This suggestion might help you
https://video.stackexchange.com/a/26424/4426

It was relating to audio files, but the principle is the same.
You would make a text layer, then apply this expression to the Source Text field in the text layer:
thisComp.layer(2).name

Anything on layer 2 in the comp would then have its file name displayed in the text layer.


Why does variable bitrate still have a bitrate specified? My understanding is that the vorbis algorithm uses a variable rate of encoding.

So, when encoding videos with audio in vorbis format, why does Handbrake ask me for a bitrate? What does Handbrake do when I choose a bitrate of 160, say, in the audio section?

For CBR encodings, the bitrate is always kept at the bitrate specified regardless of if it is needed.  For VBR encoding, the bitrate is an average target, however the media stream will use more or less data rate when it needs to but will try to average to the target.

This is why you see 1 pass and 2 pass VBR.  2 pass VBR first makes a pass to estimate where more or less data will be needed and then makes a second pass to make best use of the available data rate.  1 pass does a lot more guessing.

For an example of how this works, lets say we had a video that had 10 seconds of rapid action followed by 10 seconds of a still image.

With CBR, the same data rate would be used the entire time, the 10 seconds of still image would be crazy high quality since nothing is changing, but the action would then fall apart because it is changing too much.

With 1 pass VBR, the algorithm would adjust to use more data for the high level of action, but it might limit itself since the entire video might be like that.  Then, when it got to the still shot, it would use almost nothing, but wouldn't hit the average rate because it didn't need the storage space.

With 2 pass VBR, the first pass would discover that there is no movement at the end, so then during the second pass, a lot of data rate would be used to handle the motion really well and then very little would be used for the still image, the average data rate would be hit and the high movement portion of the video would have the highest quality of any of the encodings while the still portion wouldn't really suffer.


Is WonderShare's video editor a viable alternative to Camtasia Studio? I wanted to experiment with creating YouTube video's, but Windows Movie Maker or Apple iMovie just don't cut it. Camtasia Studio looks like something that much more suits my needs, but is a little too pricy at this stage.

I found Wondershare's video editor, which has a more acceptable price, but was unsure whether it is good enough quality at a comparable level to Camtasia Studio (Windows).

I need:

An easy-to-use, time-saving interface
Switching, embedding and manipulating content like videos, images, texts.
Transitional effects.
Captions.
High quality screen capture.

If you are looking for software for windows then:

.Lightworks (free but you need an account)

.Jahashaka

.If you do not want to use either of those, use Windows Live, Blender, slowmoVideo, and GoPro Studio together in your workflow.
  Typically what I do is import the file using GoPro studio(which can be used on most video formats) and color correct the video, then either using GoPro studio or slowmoVideo I add slow motion effects if needed, and Blender can be use to add CG (something I've never done) or maybe camera movement. The final edit of clips, i.e syncing it to music, etc. is done in Windows Live Movie Maker.

If you are uploading to YouTube I highly recomend you check out GoPro studio.


What is the orbiting technique involved for this scene [youtube]? As in title, what is the technique involved for this scene:

Scene starting from 0.43 to 0.48 secs, orbiting camera view with subjects at standstill.

My best guess is they had many cameras all taking a still shot all at once. Post processing stitch the still frames together. But the scene lasted for 5 seconds. In a 30 FPS video, we will need 150 still shots or 150 cameras!! How did they hide the cameras so well in the dark background? Not practical at all?

Hope someone can shed some light? Thank you all.

I think you partially answered your own question - the dark background actually makes it easier to hide cameras. In saying that, these days a lot of the heavy work is done by interpolation software (as @romkyns mentioned), so I wouldn't think 150 cameras would be required here.


Calculate coaxial cable type/grade to transfer digital video signals to a known distance/length To transfer digital video signals to a known distance/length, like "L", I need to calculate which type/grade of coaxial cable I need to implement.

I was wondering what is the industry/best practice for doing such calculations. Thanks.

Major cable suppliers such as Belden and GEPCO publish guides that correlate at least two factors:

Signal bandwidth or SMPTE standard (standard def, HD, 3G, etc)
Cable length

There are three other factors that make a difference: the quality of the connectors, the quality of the physical installation of the connectors on the cables, and the quality of the signal drivers (distribution amplifiers).

One industry best practice is to use the conservative numbers published in the guide,  using only the best-quality connectors matched with the cable type in question.  The cheapest and/or lightest and/or smallest diameter cable is then selected from the available options.

Another best practice is to use the "up to" numbers published in the guide and then measure whether or not the level of signal loss is acceptable for the given connectors, drivers, and receivers of your actual devices, using the cheapest, lightest, and/or smallest diameter cable that appears feasible.  This can be done before actual installation of the cable, but not before acquiring all the relevant video sources and sinks, and not before actually cutting a maximal length of cable(s) to test it.

Cable manufacturers publish their specifications. Steve Lampen explains about Belden does their calculations and what happens as you approach the high end of the cables maximum length. Best to use those specs for your calculations, not some random number that you find on wikipedia for a "generic" cable.


AAC with no global headers is currently not supported As per ffmpeg bitstream filter documentation, if we use  -bsf:a aac_adtstoasc  then the AAC stream from a raw ADTS AAC or an MPEG-TS container to MP4A-LATM.

https://ffmpeg.org/ffmpeg-bitstream-filters.html#aac_005fadtstoasc

But when i try below command the file is not getting converted or adding the bitstream filter

./ffmpeg -i ~/Downloads/test_audio.aac -c:a copy  -bsf:a aac_adtstoasc aac_try_with_bsf.aac

I have checked the output format with help fo mediainfo binary.

Could someone help me to figure out the issue ?

I assume you're the same poster as at ffmpeg-user who posted this.

.aac stores a raw bitstream and the demuxer has no facility to extract the stream parameters as extradata. So, you can try streaming like this,

./ffmpeg -re -i ~/Downloads/test_audio.aac -acodec copy -vn -rtpflags latm -f rtsp rtsp://shafi:shafi at 192.168.1.135:1935/live/myStream


Detecting VBI or true video height? Is there a way to detect if a file has or has not Vbi data this way!
I.e if a Pal videofile with the reported 720x576 has Vbi data the actual height is an additional 32 lines = 608.

SD pal file VBI = 720x608

I am not interested in the info in those 32 lines - I just want to know if they are present or not ( to be able to make an decicion)

So far from what I can see ffmpeg and Medialinfo reports my VBI samples as 720X576 - but I know they are 608.

Maybe I am using the wrong tools or the wrong flags / cli arguments?

Many tnx!

Containers like LXF/GXF/MXF allow EIA-708 (VBI) streams but as far as I know they do not encode the video data -- the blanking interval -- that originally contained those streams. That would run counter to the idea that codecs embody, that of squeezing out redundant information. I could be wrong, but I've never seen or heard of a codec that encodes invisible lines.

You could scan the file for the packet headers that identify caption / VBI streams, and if you find them you could impute a frame size that would have contained them, but you could do that anyway: any encoded video, if it were output as a TV signal, would have associated blanking, whether it contained captions or not.


Choosing the right program for video editing I've used Premiere and After Effects in the past, but I'm still somewhat unclear as to the different roles and responsibilities of each program in the process. When I need to mix audio, I do everything in SONAR or Garage Band, etc. When I need to do video, I have to figure out whether to use After Effects or Premiere.

It seems that After Effects is more for developing animations, but what's its point then? Can't its functionality be implemented within something like Premiere to make it all accessible from the same place?

Here's my goal. I have a ton of high-resolution images and HD video that I recently shot while on vacation. I'd just like to do simple things like start from black, fade in a SVG image, then fade in a video clip underneath it, all set to music. I'd then like to linearly change from pictures to video, etc. How should I go about doing this? Premiere or After Effects, or both?

Your goal is best accomplished with Premiere Pro!

They are actually completely different, though I didn't see the difference until I learned them both well.

Adobe Premiere Pro:

Clip video and audio together...
(Mix audio, mix video)...
Color Correct
Add nice transitions...
Add many different effects, with animations and keyframes...
easy.

Adobe After Effects:

Add explosions
Add other special effects
Add 3D objects
Add any 2D effect you can imagine
Color Correct to balance your effects (though the last color correction should be done when compositing in Premiere Pro)

Any professional DAW: (Only do this if you are intending to make a blockbuster.)

Make the raw video in a video editing program, and bring it over here to add the audio.
Do all the audio here.

Vegas Pro:

Mix audio (it was originally made as a DAW.)
Do a little bit of Adobe Premiere Pro stuff...
Do a little bit of Adobe After Effects stuff...
Do a little bit of DAW stuff.
easy.

That's it. Do the special effects in After Effects, and all the clipping and color correction in Premiere Pro. If you're new to video, then Vegas Pro is easier to do much of what you can do with Adobe. But when you've learned a bit, Vegas will be a obstacle in your way of creating what your imagination says. And as you already know After Effects and Premiere Pro, then you're good to go!


Converting Container Problems Why does it seem to be so difficult to simply change a video's container?

For example, when I download ".avi" & ".mkv" video's from the internet & want to watch them on my Apple devices (iPhone, iPad, Apple TV), I need them to be ".mp4" instead.

I don't want to spend the time to go through the whole "conversion/transcoding" process with apps like Handbrake when it seems you can simply change their containers out with apps like Mkv2Mp4 or the old Video Container Switcher apps in a fraction of the time.

Problem is, when I use those container changing utilities, various problems arise, like...

having mp4's with audio out of sync, or
having mp4's with no audio at all, or
having mp4's with very jittery video.

I love the speed of these container changing apps but why don't the video's play exactly the same since they're not actually converting the codecs & such?

First reason:
Videos / audios in AVI or MKV containers may be encoded by various codecs, and not all them are supported by MP4 containters.

Second reason:
Containers are more than simple boxes for videos, audios, subtitles, etc. with some not so important metadata as author or date/time. They have a lot of unevitable valuable information, e. g. the synchronization between audio and video is possible only due to it.

So there is not a reliable algorithm to convert any AVI -> MP4 or any MKV -> MP4 (and, generally speaking, from one type of container to a different one) without changing the streams (audios, videos, etc.) contained in them - the result may be similar to the one you described.


FFmpeg Single Input, Seek to Multiple Outputs I'm trying to get multiple snapshots of a single input file using Input Seeking.
I want to seek to different keyframes and save each to different output images.

I can use this using multiple calls:

ffmpeg -ss 280 -i sample.mp4 -aspect 1.7777777777778 -vframes 1 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p out1.jpg
ffmpeg -ss 300 -i sample.mp4 -aspect 1.7777777777778 -vframes 1 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p out2.jpg
ffmpeg -ss 302 -i sample.mp4 -aspect 1.7777777777778 -vframes 1 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p out3.jpg

Unfortunately I have to call ffmpeg programmatically using exec. Is there a way to batch process the tasks above? It has to use input seeking. Thanks.

There are two basic ways to do this:

1) feed file as multiple inputs and extract one image from each input

ffmpeg -ss 280 -i sample.mp4 -ss 300 -i sample.mp4 -ss 302 -i sample.mp4
-map 0 -aspect 1.7777777777778 -vframes 1 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p out1.jpg
-map 1 -aspect 1.7777777777778 -vframes 1 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p out2.jpg
-map 2 -aspect 1.7777777777778 -vframes 1 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p out3.jpg

This method can get unwieldy with many targets or if the input is read from over a network.

2) feed it as one input but only decode keyframes and output as one stream.

ffmpeg -skip_frame nokey -i sample.mp4 -vf "select='lt(abs(t-280),0.2)+lt(abs(t-300),0.2)+lt(abs(t-302),0.2)'" -aspect 1.7777777777778 -qmax 9 -qmin 8 -bt 10000000 -y -pix_fmt yuv420p -vsync 0 out%d.jpg

This allows a leeway of 0.2 seconds in identified keyframe timings.


What options are there for cloud based FFMPEG processing? Just like Imgix and Cloudinary are image editing as a service platforms, are there any online platforms that provide ffmpeg as a service so we can run ffmpeg commands on their server?

At the moment I'm running my FFMPEG commands on AWS Lambda but we are hitting a dead-end because of it's limitation of 1.5GB RAM and 300 seconds duration.

Some of our video processing take upto 1.5GB RAM and it shuts down the server.

Actually you can use Cloudinary for video processing as well.

Cloudinary's API allows you to build manipulation URLs and embed a HTML5 video player with all the video sources and settings.

Original videos are stored in the cloud and you can then dynamically create multiple resized, cropped and manipulated videos on-the-fly and deliver them via dynamic URLs or use code to either add video tags or build the URLs.

For example if  you want to resize a video to a width of 150 pixels and a height of 100 pixels, the dynamic URL will look like this:

 http://res.cloudinary.com/demo/video/upload/w_150,h_100/dog.mp4

You can also rotate the video by any arbitrary angle in degrees with the angle parameter (a in URLs). For example rotating a video by 90 degrees:

 http://res.cloudinary.com/demo/video/upload/a_90/dog.mp4

If you want to add text overlays, use the text: property of the overlay parameter ( l_text: in URLs), followed by the font name and size (separated with an underscore), a colon, and then the text string to display.
For example, to overlay the text string "Sample Video" in the Arial font with a size of 40 pixels:

l_text:arial_40:Sample Video.


How was this slow motion effect created? what programs can do this? In the video they seem to be creating new frames inbetween the medium's original frames and then slowing/speeding it up with speed control.

It looks like the equivalent of going every frame and defining a new frame that's a gamma cross between the surrounding 2 frames.

Simply increasing the fps or changing the speed alone can't facilitate this effect. What programs can do the effect as shown, and what's it called specifically? Or do they manually have to take 1 frame, toss it in a vector image editor of some kind and create all those inbetween frames?

There are methods to generate frames in between frames, mostly giving you mixed results.

For one, the plugin "twixtor" (~330$) actually does a somewhat decent job at assuming missing frames, so much so, that a 30fps video can be played back at half the speed, making it look like 60fps slow-mo.

On the other hand side, you can sample the frames directly in premiere for example. I wouldn't recommend it however, as the results don't usually live up to the expectations.


FFMpeg set language as Unknown or unspecified in a QuickTime MOV I have to transcode with FFMpeg some video with multiple audio where various audio track are not language related, just music and so on.

I would like to assing as language something like Unspecified, Unknown, Not Applicable, Multilanguage, or so on.

Everything that is not a specific named language (English, French, Spanish, ...) works fine for me .

ffmpeg -i in.mov -map 0:a -metadata:s:a:0 language="und" -metadata:s:a:0 title="Just Music" out.mov

For what I researched FFMPeg uses the ISO 639-2 codes:

https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes

In my example I tried to use the und that stands for Undetermined..

In the wikipedia list there are also other possible interesting options:

The standard includes some codes for special situations:

    mis, for "uncoded languages";
    mul, for "multiple languages";
    qaa-qtz, a range reserved for local use.
    und, for "undetermined";
    zxx, for "no linguistic content, not applicable";

Non of them seems to work, everytime I try to set that values with ffmpeg it just assume "English".

Following the Apple Documentation for Moov Format we have:

https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap4/qtff4.html#//apple_ref/doc/uid/TP40000939-CH206-34353

A very small list compared to the Wikipedia one but there's at least a Unspecified 32767

I tried with -metadata:s:a:0 language="und" or -metadata:s:a:0 language="32767" but is not working the same :(

So I tried to read the source code of ffmpeg, at ffmpeg/libavformat/isom.c line 382:

/* map numeric codes from mdhd atom to ISO 639 */
/* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
/* http://developer.apple.com/documentation/mac/Text/Text-368.html */
/* deprecated by putting the code as 3*5 bits ASCII */
static const char mov_mdhd_language_map[][4] = {
    /* 0-9 */
    "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
    "heb", "jpn", "ara", "fin", "gre", "ice", "mlt", "tur", "hr "/*scr*/, "chi"/*ace?*/,
    "urd", "hin", "tha", "kor", "lit", "pol", "hun", "est", "lav",    "",
    "fo ",    "", "rus", "chi",    "", "iri", "alb", "ron", "ces", "slk",
    "slv", "yid", "sr ", "mac", "bul", "ukr", "bel", "uzb", "kaz", "aze",
    /*?*/
    "aze", "arm", "geo", "mol", "kir", "tgk", "tuk", "mon",    "", "pus",
    "kur", "kas", "snd", "tib", "nep", "san", "mar", "ben", "asm", "guj",
    "pa ", "ori", "mal", "kan", "tam", "tel",    "", "bur", "khm", "lao",
    /*                   roman? arabic? */
    "vie", "ind", "tgl", "may", "may", "amh", "tir", "orm", "som", "swa",
    /*==rundi?*/
       "", "run",    "", "mlg", "epo",    "",    "",    "",    "",    "",
    /* 100 */
       "",    "",    "",    "",    "",    "",    "",    "",    "",    "",
       "",    "",    "",    "",    "",    "",    "",    "",    "",    "",
       "",    "",    "",    "",    "",    "",    "",    "", "wel", "baq",
    "cat", "lat", "que", "grn", "aym", "tat", "uig", "dzo", "jav"
};

int ff_mov_iso639_to_lang(const char lang[4], int mp4)
{
    int i, code = 0;

    /* old way, only for QT? */
    for (i = 0; lang[0] && !mp4 && i < FF_ARRAY_ELEMS(mov_mdhd_language_map); i++) {
        if (!strcmp(lang, mov_mdhd_language_map[i]))
            return i;
    }
    /* XXX:can we do that in mov too? */
    if (!mp4)
        return -1;
    /* handle undefined as such */
    if (lang[0] == '\0')
        lang = "und";
    /* 5 bits ASCII */
    for (i = 0; i < 3; i++) {
        uint8_t c = lang[i];
        c -= 0x60;
        if (c > 0x1f)
            return -1;
        code <<= 5;
        code |= c;
    }
    return code;
}

They talk of "und" inside the code, but if you use -metadata:s:a:0 language="und" it just return English.. :\

What is the correct way to specify it? It could be a ffmpeg bug? I'm using the last zeranoe nightly build N-92405-ge24a754916

-map 0:v \
-map 0:1 -metadata:s:a:0 language=zxx \
-map 0:2 -metadata:s:a:1 language=eng \
-map 0:3 -metadata:s:a:2 language=fra \
-map 0:4 -metadata:s:a:3 language=kin


How to resolve ffmpeg error cannot load default config file? I have got this error message when using ffmpeg

[Parsed_drawtext_0 @ 03bdc300] Could not load font "/Library/Fonts/DroidSansMono.ttf": cannot open resource
Fontconfig error: Cannot load default config file
[Parsed_drawtext_0 @ 03bdc300] impossible to init fontconfig
[AVFilterGraph @ 03d9b840] Error initializing filter 'drawtext' with args 'fontsize=15:fontfile=/Lib
rary/Fonts/DroidSansMono.ttf:timecode=00\:00\:00\:00:rate=25:text=TCR\::fontsize=72:fontcolor=white:
boxcolor=0x000000AA:box=1:x=860-text_w/2:y=960'
Error opening filters!

Does anyone know how can I resolve this issue?

I'm using ffmpeg on Windows 7. I've downloaded ffmpeg from ffmpeg.zeranoe.com/builds

This is what I entered and what came up:

c:\ffmpeg\bin>ffmpeg -i in.mts -vf "drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf: timec
ode='09\:57\:00\:00': r=25: \x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1"
-an -y out.avi
ffmpeg version N-70634-g3bedc99 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzli
b --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libblu
ray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-
libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr -
-enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enab
le-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 12.100 /  5. 12.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mpegts, from 'in.mts':
  Duration: 00:00:23.42, start: 1.040000, bitrate: 9937 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3 DAR 16:
9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
[Parsed_drawtext_0 @ 02ac2f20] Could not load font "/usr/share/fonts/truetype/DroidSans.ttf": cannot
 open resource
Fontconfig error: Cannot load default config file
[Parsed_drawtext_0 @ 02ac2f20] impossible to init fontconfig
[AVFilterGraph @ 03cdb840] Error initializing filter 'drawtext' with args 'fontfile=/usr/share/fonts
/truetype/DroidSans.ttf: timecode=09\:57\:00\:00: r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box
=1: boxcolor=0x00000000@1'
Error opening filters!

c:\ffmpeg\bin>

Got it. The error is cuased by the font location in the command is of a Linux computer. The font location need to be different for windows.

The error caused by this line in the command: drawtext=fontfile=/usr/share/fonts/truetype/DroidSans.ttf

The above line does not work in Windows.

For windows change to: drawtext=fontfile=/Windows/Fonts/arial.ttf


recomendations for conversion I have a video in a very not compatible format and want to convert it to something like mpeg. I already have ffmpeg tool installed. Do you have any recommendations on what arguments to give ffmpeg for good quality video, that can be played on a TV?
heres probing output:

    ffprobe 00020.MTS
ffprobe version 4.2.1-2+b1 Copyright (c) 2007-2019 the FFmpeg developers
  built with gcc 9 (Debian 9.2.1-21)
  configuration: --prefix=/usr --extra-version=2+b1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mpegts, from '00020.MTS':
  Duration: 00:02:55.78, start: 1.040000, bitrate: 22477 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080

Try this and see for yourself if the performance and quality are sufficient for your undertaking:

ffmpeg -i "00020.MTS" -map 0 -c:v libx264 "00020.mp4"


How do I make long videos using After Effects? My laptop is Lenovo y700 with 4 gb of Nvidia GTX 960m (not the best but it does the job) and 8 GB RAM. Anyways, I am working on a podcast that ranges from 20-30 mins in length. When we upload it to youtube, we need to add visual effects as well (else, obviously it will become dull). The effects are simple and it is mostly an audio spectrum that responds to the voice and perhaps a neon light flickering.
Anyways, as expected 30 mins is a lot for After Effects to render and it takes around 2 hours to render that. I also tried directly loading the after effects save file into premiere but in the end it took around the same amount of time to render. Is there an alternative to bypass such a long render time for such a minor effect?

There is no way to "bypass" long render times. After-Effects needs to calculate where every pixel has to be and then pack all this information into a container such as .mov or .mp4. However, you can speed up render time by enabling hardware-acceleration in the settings of After-Effects. You can also increase the amount of RAM allocated to After-Effects. Lastly, make sure you render the file in a reasonable resolution (1920x1080 is good enough for most cases) with a reasonable framerate (for a podcast you can probably get away with 24 frames per second, depending on how responsive the audio-spectrum is probably even 20.)
That said, on your hardware, 2 hours of rendering for an effect like that over 30 minutes is not unreasonable and perfectly normal. Try out the optimization I suggested above and see if you can speed up the process a bit.


How do I connect my Alesis iO2 Interface with video camera Nikon D3200? I want to run my condenser microphone through my Alesis iO2 interface directly into my D3200 Nikon video camera, which has a 3.5mm jack input.  Can I simply run a 1/4" output from the Alesis with an adapter into the Nikon's audio input?  Since the Aleis is powered by a USB into my computer, I am curious whether such a configuration will work?  I am very new to the recording world, so any insights or suggestions would be much appreciated.

Im unfamiliar with the iO2, but it sounds as though you're basically wanting to use it as a preamp; you almost certainly can set up it so the inputs are mirrored back to the outputs so you can use it this way, but you will may  need some sort of audio application 'in the middle' to do so.  You'll also need need the computer running for it to work.

Thing is, though, this doesnt really sound like a particularly great way of going about recording your audio, and its certainly not advantageous to have to cart around, and hook up, a computer, just so you can basically misuse a USB soundcard as a preamp.  You'd be better off with a separate preamp.

Plus, if you were utterly determined to use the computer for some reason, you'd probably be better off using it to record your audio, rather than the camera; you'd be opting out on two extra stages of conversion between analog and digital for a start.
I think you're going about this the wrong way, though, and a separate battery-powered preamp would  be a simpler, easier approach.


Converting videos taken by D5100 for a Youtube upload What is the best way to compress a video shot by my Nikon D5100 so it can be easily uploaded to Youtube?
I have a video of around 600MB, I tried converting using Xilisoft video converter but without any success.

Amazingly, the best place to start with a question like this is Youtube. Believe it or not they have help file that explain the process with quite a bit of detail:
https://support.google.com/youtube/bin/answer.py?hl=en&answer=1722171&topic=2888648&ctx=topic

On Youtube itself many others have offered up video tutorials on how to do it:
Youtube.com search

I would take the recommendations that YouTube has on the help pages, and simply apply those settings to your favorite video software, it could be something like Adobe Premiere Elements which is a very common video editor, but many others exist.


Thousands of frames per second? Are there any (consumer) cameras, capable of shooting ~1000 frames per second?

Googling for high speed cameras I found that GoPro is able to take 120 frames per second and some of Photron or Rapatronic cameras, capable to shot millions of frames per second and costing millions of dollars.

Are the intermediate cameras?

The Casio EX-F1 can shoot upto 1200fps, but the resolution reduces as the frame rate gets higher.  They go on eBay for about £600.

http://www.casio.com/products/archive/Digital_Cameras/High-Speed/EX-F1/

Or the Casio Exilim FH20, for about £300 on Amazon, was used to make this:

More info on how it was made here:

http://straylight.co.uk/?p=120


Technical name for this? (PIP picture in picture with transparent background via green screen, chroma key) Two questions regarding this screencap:

http://imgur.com/RYIBdo1

What's the technical name for this? (where you impose a PIP that contains transparency, via a green screen, so there's no rectangular border)

(reason why I want to know the technical name: so that I can search for that feature while evaluating alternative video editing programs.)

What FLOSS (free libre open source software) programs for Windows PC platform are out there that will let me do this? Portable programs will get first attention from me.

The technical name for this is a "bug". Usually the context is that it's an advertisement for another show on the same network, or it's a network logo rather than part of the content.
I'm not very familiar with Windows software, but Shot Cut is free and includes compositing functions.


Equipment needed to record sound when filming an interview with two people I am currently filming interviews for a project and to date, a friend has kindly lent me the following sound equipment.  Unfortunately, I am going to have to give this equipment back very soon and need to replace it.  I don't however, have the budget to replace exactly like for like so wanted to know what was really essential and what cheaper options I could buy to achieve more or less the same effect.

The equipment that is currently on loan to me is:

Pair of HD201 Sennheiser headphones
Alesis PalmTrack 24bit WAVE/MP3 Recorder
2 x Levalier mics - ECM-77B Electret Condensor Microphones (SONY)
1 Mixer - SignVideo ENG-44 (4 channel audio mixer)
1 Cable to connect mixer to either MP3 recorder or to camera - jack to stereo XLR

I would really appreciate if anyone can help me.

Thanks!

You could simplify your costs and needs with this approach to your kit:

Get a similar unit to the Alesis PalmTrack to record your audio, preferably on 2 channels, or as a pair of Left and Right inputs from suitable microphones.
Monitor your Left & Right balance with suitable headphones to ensure the usual clean, distortion free audio.
Later, you could remix your balance levels in Audio Editing software between the 2 Mic inputs.
This would effectively eliminate the cost for the separate Audio Mixer, & the "live" audio mix.

Another solution could eliminate the need for 2 separate mics:

For any interview between 2 people, a pair of mics is almost always necessary.
However, if the camera shot and setup allows, you could park your Audio recorder on the end of a "fish pole" or "boom" attachment, and hold this over your subjects, out of shot, to record the conversation. A bit of practise and skill is required for this to be successful.
You do have to avoid the noise of handling the boom, as you 'pan' or 'swing' the recorder mics in the direction of either speaker.

Another alternative would be to park the recorder above the 2 persons, just out of shot and record audio from there. Correct positioning and minimum body movement of the subjects for the duration of the recording would be critical, however. Best done by seating both at a table, or similar.

A look online at some setup examples, like the searches below might help to visualise a rig:

https://www.google.co.uk/search?q=Film+interview+audio+setups&tbm=isch

https://www.google.co.uk/search?q=Film+interview+setups&tbm=isch


Trying to stabilize a video with FFMPEG so that it looks like it was taken with a tripod I have tried to stabilize this video this video using ffmpeg. I have tried deshake and vidstabdetect/bidstabtransform.  I would like the outcome to look like it was taken from a tripod
I have tried it with these settings:
ffmpeg -t 5 -i GOPR7182.MP4 -vf vidstabdetect=stepsize=32:shakiness=10:accuracy=10:result=transform_vectors.trf -f null -

And settings like this:
ffmpeg -i input -vf vidstabtransform=tripod=1:interpol=bicubic:input=input.trf,unsharp=5:5:0.8:3:3:0.4 -c:v libx264 -tune film -preset veryslow -crf 12 -x264opts no-fast-pskip -c:a copy input-stab.mkv

And lots of variation on shakiness/accuracy/stepsize.  The results are all similar where the motion is reduced but it still shakes.  Does anybody know of settings that would help me get the tripod like results or is this to much to ask given the motion in the video?
Thanks,
Josh

try google photos. surprisingly so good. not to mention free


Choppy reversed video in premier pro Using Premier Pro CC and through the speed/duration menu i have reversed the clip and it plays back choppy but also exports as choppy. Dont know WTF im supposed to do with that. Was trying to change field option and change and time interpolation in different combinations but its not working, video is still choppy.
Im using GPU acceleration.
Hardware: GTX 1060, 8GB RAM.

Is you timeline setting the same as your video file, in terms of framerate and size? And you should also change the timeline interpolation to optical flow.


How to calculate the length of the video file that was encoded so far? I am using ffmpeg to convert a video file to H.264 format. If I call ffprobe while ffmpeg is still running the duration of the video is not known. Only when ffmpeg finishes the ffprobe will display the duration.

Similar, if I run mplayer to play the video while it is still being encoded the duration is either unknown or displays incorrectly.

Is there a way to know duration of the resulted video (h264 in .mkv container) while it is still being encoded by ffmpeg?

Edit: I will make the question a little bit more clear.

I am interested in knowing how long is the video which was encoded so far. Let's say the input file is 1 minute 45 seconds long. The resulting file should preserve the length. But I would like to know how much did ffmpeg encode so far. If we can determine the length of the video after conversion is done, shouldn't there be a way to determine the length of the video that was already processed and ready to be played?

Short answer is No.

Longer answer is, it depends.

If you're encoding a file, then generally the output is the duration of the input, unless there's speed change or trim filters or -ss, -to, -t options applied. For a live input, FFmpeg will stop the encode when it encounters EOF on the input, so unless you know that, you won't know the output duration. For multiple inputs of differing duration, it will depend on what the command is e.g. is there a -shortest in there, is there an amix, which defaults to the longest of the inputs, or amerge which terminates upon the shortest input.

By default, the ffmpeg console readout will display the progress of the encoding in realtime i.e. the duration encoded, so far.


Live Streaming Video Camera? Are there any video cameras (recording over 30 minutes of footage length) that have live streaming services (RTMP) built-in to the camera? I know there are a ton of cameras with YouTube (etc.) uploading capabilities with built-in Wi-Fi, but I'm asking specifically for live streaming.

The JVC  GY-HM200 has live streaming capabilities - http://pro.jvc.com/prof/attributes/features.jsp?model_id=MDL102319.

I've never used that particular model (so have no personal experience of the live streaming functions) but I do use the 170 and it's a solid little camcorder with a great range of options (including shooting in 4K and at high speed - though not at the same time), it's fairly robust and delivers great quality for the price.


What software do I need to edit commercials out of recorded sports games? I have been using HD PVR to capture some of my football games to PC and now I want to edit out the commercials.  So I'm wondering what is the software that will do all these needs:

Allow me to edit out commercials anywhere in the video.
After editing, it keeps the 5.1 Surround Sound.
Burn the video to a Blu-Ray player or save it to disk.
Ability to add menus too my Blu-Rays.
If there are logos on the screen(say ESPN logo), be able tell the software to find all instances and remove it.

The HD PVR allows me to record in .TS, .M2TS or MP4.  Which format is best to allow me to do video editing?

Allow me to edit out commercials anywhere in the video.

Any modern editor can do this (Adobe Premier, Sony Vegas, Final Cut etc) including light-weight (ex. Pinnacle Studio) and free editors.

  After editing, it keeps the 5.1 Surround Sound.

Provided your original clip contains 5.1 channels and your editing environment is set up with (and can support, see more professional packages) 5.1 support, and you export in a format that support 5.1, this is granted.

  Burn the video to a Blu-Ray player or save it to disk.

As long as you export in a format supported by the BD-disk creator software, or a format that can be trans-coded, no problem.

  Ability to add menus too my Blu-Rays.

This most BD-disk creator software can do (see for example Adobe Encore).

  If there are logos on the screen(say ESPN logo), be able tell the software to find all instances and remove it.

This is a very specific task and as you say, you need to tell the software to find these. You can do this by combining a tracker to the logo and a script that can follow. When logo is "lost" for the tracker, init a method in the script that do what you want. This as said, will be very specific and it will require you to program your script very specific.

IMO it will be quicker to go through these manually. especially if you know the material you're working with or at least what to expect of it.


4x resample videoframes using ffmpeg I need to speed up video by a factor of 4x, but do not want to drop the frames and instead average them. I.e. each 4 frames are averaged, and produce 1 output frame. Target frame-rate stays the same, so video is now 4 times faster.

Is there a way to do so in ffmpeg?

ffmpeg with this filterchain does it:

ffmpeg -i input -vf "tblend=average,framestep=2,tblend=average,framestep=2,setpts=0.25*PTS" -r srcfps -{encoding parameters} output

srcfps should be replaced with your input's framerate.


Fill shape layer with an image (after effects) How can I fill a shape, with an image in After effects?

For example, something like this:
http://upload.wikimedia.org/wikipedia/commons/b/bc/Europe_flags.png

I found an answer somewhere that I need to create two layers, and texture layer to parent the shape layer, and use alpha matte. I cannot find alpha matte in my AE CC. but that does not seem to work

Any link to tutorial will be accepted.

If what you want to have as an end result is a flag texture inside a non-standard shape, can I suggest instead that you import the flag texture, and use a matte to change its shape? If you've already created a shape that you want to use, you could convert it into your matte by adding a key frame to the matte's path control, adding a keyframe to the shape, copying that key frame, and then pasting the key frame over the matte's path keyframe.
This is probably easier than using unnecessary alpha channels etc.