text:
FFmpeg spliting video without re-encode
Using the recent ffmpeg I am trying to split an arbitrary video to 10 equal parts of 1 seconds every given interval. The Audio is not important to me and should not be in the output.
I used
ffmpeg -y -ss 18.946 -t 1 -i "input.mp4" -c:v  libx264  -an "output-001.mp4"

this is running in a loop for the next 10 slices
And it works fine but the re-encoding of 10 frames just kills my CPU and it take very long time.
When I use:
ffmpeg -y -ss 18.946 -t 1 -i "input.mp4" -c copy -an "output-001.mp4"
ffmpeg -y -ss 37.892 -t 1 -i "input.mp4" -c copy -an "output-002.mp4"
...

Some of the parts are not playable and some have wrong duration.
For example some part may show 2.80 seconds instead of the wanted 1 seconds.
I tried to use -t, -to, -avoid_negative_ts make_zero and all sort of "solutions" I found on the internet. but I simply can't make it work without re-encoding.
I don't care about the output video format as long as the quality is reasonably OK.
Is there anything that can be done, or am I doomed to re-encode each video?

The command and the full output:
ffmpeg -y -ss 18.946 -t 1 -i "input.mp4" -c copy -an "output-001.mp4"

ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --e
nable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libblur
ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enab
le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-li
bvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --en
able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enabl
e-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enabl
e-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enab
le-dxva2 --enable-avisynth
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, flv, from 'D:\input.mp4':
  Metadata:
    starttime       : 0
    totalduration   : 189
    totaldatarate   : 802
    bytelength      : 19039608
    canseekontime   : true
    sourcedata      : BADC20088MM1286981312657773
    purl            :
    pmsg            :
    httphostheader  : v24.nonxt5.c.youtube.com
  Duration: 00:03:09.46, start: 0.000000, bitrate: 803 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 640x480 [SAR 1:1 DAR
4:3], 693 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 120 kb/s
Output #0, mp4, to 'D:\output-001.mp4':
  Metadata:
    starttime       : 0
    totalduration   : 189
    totaldatarate   : 802
    bytelength      : 19039608
    canseekontime   : true
    sourcedata      : BADC20088MM1286981312657773
    purl            :
    pmsg            :
    httphostheader  : v24.nonxt5.c.youtube.com
    encoder         : Lavf58.12.100
    Stream #0:0: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 6
40x480 [SAR 1:1 DAR 4:3], q=2-31, 693 kb/s, 29.97 fps, 29.97 tbr, 16k tbn, 1k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame=   84 fps=0.0 q=-1.0 Lsize=     234kB time=00:00:00.97 bitrate=1963.8kbits
/s speed= 974x
video:232kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
verhead: 0.699095%

FFProbe of the Output:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output-001.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
  Duration: 00:00:02.80, start: 0.000000, bitrate: 682 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x480 [
SAR 1:1 DAR 4:3], 677 kb/s, 29.97 fps, 29.97 tbr, 16k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler

As you can see the Duration: 00:00:02.80 instead of 1 second.
The sample input.mp4 video file Download


text:
Do old CRT TVs and monitors distort their image, or cut it off?
I vaguely understand that an old CRT monitor/TV's screen is a section of a sphere, and since the section lines of a sphere curved, the edges of the screen are curved as well.

My question is, if you take a 4:3 image and one of these CRTs, is that image being stretched and 'fish-eyed' to fit the curved edges of this monitors, or does it appear square, but with its corners cut off?
In other words, is A or B correct? Note that the blue lines are straight. On A the image is square and orthogonal, and on B the image is warped to conform to the borders of the screen.

CRTs were originally round, as can be seen in this 1945 prototype. The cabinet masks off the outer parts of the tube to create the square viewing area. This is called overscan. Later tubes were more rectangular, but still relied on overscan. This was partly because as the tube aged, the scanned area shrank, so the cabinet would hide the blank parts of the screen. The front to back curvature of the tube is not accounted for in the image because every model tube had a different curvature and I don't think it added much distortion.
Curves at the rounded corners of the cabinet were also not accounted for because of the differences in cabinet. But that was part of the motivation for overscanning and for limiting important picture elements to safe areas.

I'm not sure I get it yet 100%. I clarified my question with a demonstration of the two things I'm trying to figure out between. The cabinet masks off an area that isn't entirely square, which is what I'm wondering about. Is the image stretched to fit that not-rectangular viewing area, or are the corners cut off more?

The corners are cut off. There is no distortion applied to the image. It would be impossible to do that since every model was different and even within a model, the distortion would change over time.

source: Stack Exchange

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

sort: votes


text:
How to slow down ProRes file from 25fps to 16fps without re-encoding?
This works to change the speed, but it also changes the codec to MPEG4 Video (H264).
ffmpeg -y -r 16 -i at25fps.mov -filter:v "setpts=25/16*PTS" at16fps.mov
I need the codec to stay untouched: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, progressive).
I found many similar post, but nothing worked:
How to change framerate with ffmpeg without re-encoding?,
Lower framerate without re-encode
This post suggest I first extract the raw stream - how would I do that for a ProRes file?

I just found a way to do this by changing the parameters help by fps tbr tbn tbc; answer is derived from this post.
ffmpeg -y -i at25fps.mov -c:v copy -video_track_timescale 16 at16fps.mov
I am getting these remarks from Apple Sound Media Handler (so I am not sure if this is the best way to do it)

Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file.
Non-monotonous DTS in output stream 0:0; previous: 1, current: 1; changing to 2. This may result in incorrect timestamps in the output file.
...

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


text:
Combine audio from one video file with video from another
I would like to combine high-resolution video in English with a foreign-language audio track from a low-resolution version of the same movie.
What is good software (for Windows 7) to combine audio from one video file with video (same video content) from another?
Ideally, it would also automatically correct for time offset based on the video content (frame similarity).

IF you have Win7, Movie Maker will do it.
If not, almost every video editing software where you can have more than 1 clip will do it.
If you thinking about doing some more stuff, you could use Hitfilm or Davinci Resolve.

Which of these can automatically correct for time offset based on the video content (frame similarity)? Which of them are easy to use?

most will automatically synch video clips based on audio, but not video. You'd have to do that manually - you could just lay the two clips into separate tracks and slip one of them forward or backward until the video synchs up.

You can use Shutter Encoder to do that. It's free, but they did a really good job putting this app together. I've recently started using it in place of other higher profile programs.
It's basically a really nice GUI front end for ffmpeg.
This one will definitely merge video and audio for you, and you can even trim whichever is shorter if you'd like. See if this helps you.

Thank you! Does Shutter Encoder automatically correct for time offset based on the video content (frame similarity)?

I don't know that one, but you can email the dev or go on their Reddit page. They are pretty responsive.


text:
How can you convert a WebM with transparency to MP4 with a background color using ffmpeg?
I'm trying to convert a webm file that has a transparent background to an mp4 file. Mp4 doesn't have transparency so I'm trying to using this color: #D9DADB. How can I make this conversion happen with a single command in ffmpeg?
I've tried the following command and I seem to get a black background instead of a gray one:
ffmpeg -f lavfi -i color=c=0xD9DADB -i 123.webm 123.mp4

The native VP8/9 decoders don't support transparency, so a) you'll have to force a decoder, b) the way to change transparent pixels is to overlay the video onto the color.
ffmpeg -c:v libvpx -i 123.webm -f lavfi -i color=c=0xD9DADB,format=rgb24
       -filter_complex "[1][0]scale2ref[bg][vid];[bg][vid]overlay=format=rgb:shortest=1,setsar=1"
       -pix_fmt yuv420p -c:a copy 123.mp4

this is great - just 2 problems though. 1) the rendering doesn't stop - it can go well past the final frame. 2) the resolution is different than the original. I'm guessing its because of the pix_fmt argument? How can i set specific dimensions for the final image?

corrected, 2) not because of that, also corrected

If your WebM isn't using VP8 but instead VP9, you need to replace -c:v libvpx with -c:v libvpx-vp9.


text:
How to delete a gap in an After Effects timeline
...without having to carefully select everything after the gap, and shift it all up.
All articles/videos I see only talk about  trimming the timeline at the beginning or end, but I can't find anything about cutting out a piece in the middle.
Basically, I want the inverse of Trim Comp to Work Area. I want to remove a piece of the full comp in the middle of the timeline.
Is that possible?

Sounds like a job for a script. *fires up VSCode*

There's a script that does it for you (I just wrote it). You can get it (free, open source, WTFPL license) here on my blog. With the playhead in a gap, run the script and it will pull the layers after the gap along so the gap disappears.
BTW all care, no responsibility. It works on my machine, but I've tested it like, twice. Save before using.

The soluction for this question is Ripple Edit scripts (https://aescripts.com/ripple-edit/) with The functionality "Closes the gap betweenlayers sequentially".

Select all layers in timeline
Right click on any layers selected and click on "keyframe assistant" then select "sequence layers"
After open "sequence layers window", just click "OK"
Done!


text:
Adobe Premiere CS6 has laggy preview with high disk access but low memory use
I have a video project including 40 clips, in average 2/3 minutes, at high quality (400MB /min).
If I import a single clip in the project, the video preview is fine, however, having many of them lined after each others eventually causes the video preview to lag. If I pause and give it a few seconds, the preview after resume is fine for a while then starts lagging again.
CPU usage is bellow 20%, RAM is 1.5GB used out of 6.5GB, however disk usage is high. I assume the software can't keep up loading the video fast enough due to the heavy weight.
Is there a way to fix this issue ?

I haven't found any way to smooth up the "on the fly" preview, however, from Joshjurg's suggestion, I found the procedure to "pre-render" the preview instead. This is quite time consuming since this is basically a video rendering, however once it is done, the cache will stay up and you'll only need to pre-render the frames that have been modified.
The procedure is as follow :

Open your shortcut panel and find the lines "Define workspace entry point" and "Define Workspace exit point" (may not be exactly those words depending on your version). If necessary you can add new key binds for easy access.
Based on the previous step, mark the entry and exit on your sequence, which will be the beginning and ending of the generated cache.
From the "Sequence" menu, click "render workspace" (or press enter).

Note that if you pre-render a portion of the sequence, but start to preview before the first frame of the cached video, the software may not actually use the cache, and use on the fly rendering instead.

I am working in Adobe Premiere CC 2018, but if memory serves you should be able to still do this in your CS6 version.
Set an out point 'O' at the end of the clips you want to preview.
Go up to 'Sequence' in the upper left - and select 'Render In to Out'
Once they're rendered on your timeline they should play with no lag.

As far as I can tell there is no "Render In to Out" function in my version of CS6, but in the 'sequence' menu I can "render the workspace" which will bake the preview.
After this, the preview is indeed fluid. For me it took 1.5x the sequence's duration to pre-render.
However I found into the shortcuts panel "define workspace entry point" and "define workspace exit point", which then allowed me to only render a specific part of the sequence.

Also it's probably worth mentioning that if I only pre-render a part of the sequence, and start the preview before the beginning of the pre-rendered part, the software somehow seems to ignore the cache and keeps rendering the preview on the fly (and therefore, keeps lagging). I'll wait a little to see if someone gives a magical trick to speed up the live rendering, otherwise I'll mark your answer as accepted, since it did the job.

Consider answering your own question - particularly since your solution differs significantly from the solution I offered.
I think you get a special badge for that also!


text:
Identify paid Features in Davinci-16_ Free
I would like to switch to latest Davinci-16_ Free(Version 16.2.7.010)  but on trying some essential ResovleFx effects like film grain,analog grain etc , Davinci shows a switch to paid version message prompt and when rejected it simply shows the Davinci logo overlay than the actual effect.
However unlike other softwares,Davinci doesn't provide any indication in the software itself (other than having to go through their forum to understand the differences here).
It doesn't give much confidence if one were to make a switch from a paid software to simply find that essential parts of the freeware are locked.
How does one identify which effects and other features are paid and can these paid effects be recreated in Fusion?

here are some videos / articles that might help you find out which effects are free https://www.youtube.com/watch?v=cI-T3Pl9dPs
https://motionarray.com/learn/davinci-resolve/davinci-resolve-price-free-vs-studio/

This an older document (v15), but I believe that most of the Free v/s Paid feature list is still valid: https://documents.blackmagicdesign.com/SupportNotes/DaVinci_Resolve_15_Feature_Comparison.pdf


text:
Audio not detected with Transparent Video Formats (Quicktime - PNG/QtAnimation- AAC/PCM)
On importing a transparent .mov file (Quicktime - PNG/QtAnimation- AAC/PCM) , the audio is not detected by the Videoeditors (Powerdirector17 < Davinci Resolve doesn't support the above format> ).
Eventhough Powerdirector supports these formats, the audio doesn't play (https://help.cyberlink.com/stat/help/powerdirector/18/enu/05_01_01_support_file_formats.htm).
Which Transparency supported Video formats + Audio formats combinations are commonly supported in Videoeditors ?

Don't know PowerDirector, but I would try exporting as ProRes 4444 with alpha (sometimes called 'Millions of colors+'.
This works with Adobe Premiere, Final Cut, Resolve and other editors fine.


text:
Why is 4K downsampled so much better than 1080p at low bitrates?
I noticed when I export my footage at low bitrates (eg. 10 Mbps, 1080p), my 1080p footage looks way blurrier than my downscaled 4K footage.
This is despite the fact that the original footage looks similar in terms of sharpness when viewed at 1080p. Anyone knows what is the problem? This issue disappears at higher bitrates.
Another weird thing is that 10 Mbps 4K downsampled is actually sharper than 50 Mbps native 1080p? I can't get my head around this. I always thought the benefits of downsampling is only visible at high bitrates. Something about the low bitrate seems to affect the 1080p footage but not the 4K footage.
Have a look at the images below - no sharpening applied - tried to get roughly the same framing. Ignore my color grading, I know it's not that great.
Also, I'm using the latest version of Adobe Media Encoder. The 1080p footage in question is 120p if that matters, and the original 1080p footage has quite a low bitrate. However, as seen in the image below, despite the low bitrate, the original still looks relatively sharp.
Original

50 Mbps Export

10 Mbps Export

10 Mbps Export (4K downscaled)

First let me explain chroma subsampling, as this is the reason why 4k -> 1080p always looks better than native 1080p
Consumer & pro-sumer camera gear, anything not super high end, cuts some corners to save on processing and storage.  You'll find this information when you look in your specs and see the 4:2:2 like number.  So what's happening is for every 4 pixels, in a square, 2 of them are being used for color (so the top 2 pixels are the same color, and the bottom two pixels are the same color) and all 4 pixels have their own brightness level so that you get the appearance of 4 different colors in this 2x2 block of pixels.  This reduces the amount of data by 1/3rd and what's even more popular even in higher end equipment is 4:2:0 which cuts the data in half.  The reason it saves so much is because a color requires 3 pieces of information plus 1 piece for brightness, so 4 per pixel, but if you throw away color information but keep half or all the brightness, you can approximate the colors.  This is generally imperceivable to the naked eye but it's still a detail shortcut and it's problematic for green screening where you now have multiple mixes of green and non green mixing together and is part of the reason why you see a green halo around people in amateur green screening.
This concept is applied at any level you are recording, so if you record at 1080p your camera is probably doing 422 or 420 and if you kick it up to 4k it's still doing 422/420 but when you down sample 4k to 1080p e, you turn a 2x2 block of pixels into 1 pixel, so now you have all the color and light detail so you are essentially at 444 quality, which is maximum detail.
You can read more about it on Wikipedia: https://en.wikipedia.org/wiki/Chroma_subsampling

I understand chroma subsampling, but it doesn't seem to be an issue with the original 1080p footage, unless you're saying that chroma subsampling is more of a problem at low bitrates?

What is happening is that the native 1080p footage is subsampled, so the chroma is at 960x540 resolution, but the 4k footage that is scaled down has full resolution chroma. There's an additional factor at play, by using 4 source pixels to create one output pixel, it's a bit like shooting in 10 bit, so there is more information to start with.

@stib well it's not outright 1/4th the res because the lighting levels are still full 1080p, the color is 1/4th but then the brightness changes the shade of that color as close as the pixel really was, it's a pretty neat optimization and the damage on quality is minimal... tbh it doesn't really explain the guy's problem

That is not how camera sensors work. They use a Bayer pattern, it has nothing to do with chroma subsampling

Very good question!
There are some factors, but the most important one would be multisampling. If you know your way around gaming, you probably heard of anti-aliasing. To get rid of jagged edges, you take samples of many pixels around one pixel to determine its accurate color and brightness. Aliasing is not really the same thing for video, but the main mechanic works similar. Where a 1080p recording only has one sample for each pixel in a 1080p sequence, 4k footage on the other hand will have much more information for each pixel when downsampled to 1080p.

Surely that can't explain such a huge difference in sharpness, especially since they are at the same bit rate? 4K footage should have 4 times the resolution, but when downsampled, the difference shouldn't still be 4 times? And the thing is, the original 1080p footage looks fine to me, and the downsampling benefit of 4K only appears in lower bitrates. I can't comprehend what happened.

I think my main confusion is why the benefit of downsampling 4K is only apparent at low bitrates? I'm concerned that I might be rendering my videos incorrectly.

The same amount of information is stored for a pixel no matter what resolution it is: 480p, 720p, 1080p, 4k, etc.  Of course bitrates and chroma subsampling makes this much more complicated to understand.  I have explained how chroma subsampling is playing a role in this quality difference in my answer.


text:
Make Youtube live streaming available to another country after end streaming
I have an youtube channel that makes a lot of live streams.
But i have different countries watching at the same hour in its own time zone.
I have a live streaming on Brazil starting 6PM and finishing 9/9:30 PM (GMT -2). But i can't finish my live stream because people on USA start to watch the live stream at 6PM (GMT -5) from the start of live stream. I need to stream black until they finish to watch at their 9/9:30PM (GMT -5).
If i finish the stream, they can't watch. There is somo way to do not have this problem? Thanks!

YouTube can record the live stream so that it can be played back any time afterwards.
You need to select archiving of the live stream, and then publish that archive.
I'm pretty certain the default is to archive the live stream, so you should check it in your settings, in case you have disabled it for some reason.


text:
Debian & Blackmagic Davinci Resolve
Anyone got Davinci Resolve to run on Debian?
Version 15.x installs great without error on debian but it crashes upon startup.
I would like to hear from anyone who runs it with Debian, what video cards you are using etc.
for the record, here is the terminal output of the crash.
/opt/resolve/bin/resolve
ActCCMessage Already in Table: Code= c005, Mode= 13, Level=  1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= c006, Mode= 13, Level=  1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= c007, Mode= 13, Level=  1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= 2282, Mode=  0, Level=  0, CmdKey= 8, Option= 0
PnlMsgActionStringAdapter Already in Table: Code= 615e, Mode=  0, Level=  0, CmdKey= -1, Option= 0
log4cxx: No appender could be found for logger (UI).
log4cxx: Please initialize the log4cxx system properly.
15.2.4 (#006) Linux/Clang
Main thread starts: 99B99AC0
resolve: AppConfig.cpp:171: void AppConfig::LoadAllSiteInfo(): Assertion `m_SiteEnabledIdx > 0' failed.

==========[CRASH DUMP]==========
Please send this to support:

# TIME Wed Mar  6 10:36:48 2019 - Uptime 00:00:00 (hh:mm:ss)
# PROGRAM_NAME DaVinci Resolve v15.2.4.006 (Linux/Clang)

/opt/resolve/bin/resolve() [0x467c199]
/opt/resolve/bin/resolve() [0x18b0893]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7f72800a90e0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf) [0x7f727e11afff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f727e11c42a]
/lib/x86_64-linux-gnu/libc.so.6(+0x2be67) [0x7f727e113e67]
/lib/x86_64-linux-gnu/libc.so.6(+0x2bf12) [0x7f727e113f12]
/opt/resolve/bin/resolve() [0x189ddf0]
/opt/resolve/bin/resolve() [0x189c5c6]
/opt/resolve/bin/resolve() [0x189be98]
/opt/resolve/bin/resolve() [0x1d58051]
/opt/resolve/bin/resolve() [0x1d57dc4]
/opt/resolve/bin/resolve() [0x18af69e]
/opt/resolve/bin/resolve() [0x1897944]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f727e1082e1]
/opt/resolve/bin/resolve() [0x189679d]
Signal Number = 6

================================
resolve: AppConfig.cpp:171: void AppConfig::LoadAllSiteInfo(): Assertion `m_SiteEnabledIdx > 0' failed.

==========[CRASH DUMP]==========
Please send this to support:

# TIME Wed Mar  6 10:36:48 2019 - Uptime 00:00:00 (hh:mm:ss)
# PROGRAM_NAME DaVinci Resolve v15.2.4.006 (Linux/Clang)

/opt/resolve/bin/resolve() [0x467c199]
/opt/resolve/bin/resolve() [0x18b0893]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7f72800a90e0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf) [0x7f727e11afff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f727e11c42a]
/lib/x86_64-linux-gnu/libc.so.6(+0x2be67) [0x7f727e113e67]
/lib/x86_64-linux-gnu/libc.so.6(+0x2bf12) [0x7f727e113f12]
/opt/resolve/bin/resolve() [0x189ddf0]
/opt/resolve/bin/resolve() [0x189c5c6]
/opt/resolve/bin/resolve() [0x189be98]
/opt/resolve/bin/resolve() [0x18d0e0d]
/opt/resolve/bin/resolve() [0x18b0ade]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0) [0x7f72800a90e0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf) [0x7f727e11afff]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f727e11c42a]
/lib/x86_64-linux-gnu/libc.so.6(+0x2be67) [0x7f727e113e67]
/lib/x86_64-linux-gnu/libc.so.6(+0x2bf12) [0x7f727e113f12]
/opt/resolve/bin/resolve() [0x189ddf0]
/opt/resolve/bin/resolve() [0x189c5c6]
/opt/resolve/bin/resolve() [0x189be98]
/opt/resolve/bin/resolve() [0x1d58051]
/opt/resolve/bin/resolve() [0x1d57dc4]
/opt/resolve/bin/resolve() [0x18af69e]
/opt/resolve/bin/resolve() [0x1897944]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f727e1082e1]
/opt/resolve/bin/resolve() [0x189679d]
Signal Number = 6

================================
Aborted

I tried it on Ubuntu and had the same problem, didn't test it any further

Dual 1080 titan black.

If you're running on Nvidia graphics card, you need non-free nvidia drivers (not noveau drivers), e.g.:
sudo apt install nvidia-driver-450

Reboot system and check dkms
$ sudo dkms status
nvidia, 450.80.02, 5.4.0-51-generic, x86_64: installed


text:
ffmpeg convert mp4 to mov with dnxhd codec
I'd like to convert an mp4 file to DNxHD for use with DaVinci Resolve.
Here is my attempt of doing the conversion using ffmpeg:
C:\FFMPEG\bin\ffmpeg.exe  -i "H:\Downloads\test.mp4" -vcodec dnxhd   "H:\Downloads\test.mov"

It fails and outputs:
  starting ffe job on 2017-02-08 @ 14:56:24.487
  command-line: C:\FFMPEG\bin\ffmpeg.exe  -i "H:\Downloads\test.mp4" -vcodec dnxhd   "H:\Downloads\test.mov"

  ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.4.0 (GCC)
    configuration: --enable-gpl --enable-version3 --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
    libavutil      55. 34.100 / 55. 34.100
    libavcodec     57. 64.101 / 57. 64.101
    libavformat    57. 56.100 / 57. 56.100
    libavdevice    57.  1.100 / 57.  1.100
    libavfilter     6. 65.100 /  6. 65.100
    libswscale      4.  2.100 /  4.  2.100
    libswresample   2.  3.100 /  2.  3.100
    libpostproc    54.  1.100 / 54.  1.100
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'H:\Downloads\test.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      title           : 1296227453771893
      encoder         : Lavf56.40.101
    Duration: 00:00:35.50, start: -0.020000, bitrate: 2227 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x1280, 2196 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbc (default)
      Metadata:
        handler_name    : VideoHandler
      Stream #0:1(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 47 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
  File 'H:\Downloads\test.mov' already exists. Overwrite ? [y/N]
  [dnxhd @ 0000000002be23a0] video parameters incompatible with DNxHD. Valid DNxHD profiles:
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p10; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p10; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p10; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p10; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 115Mbps; pixel format: yuv422p; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 240Mbps; pixel format: yuv422p; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 290Mbps; pixel format: yuv422p; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 175Mbps; pixel format: yuv422p; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 185Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 220Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 365Mbps; pixel format: yuv422p; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080i; bitrate: 185Mbps; pixel format: yuv422p10; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080i; bitrate: 220Mbps; pixel format: yuv422p10; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080i; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080i; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080i; bitrate: 185Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080i; bitrate: 220Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080i; bitrate: 120Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080i; bitrate: 145Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p10; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p10; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 180Mbps; pixel format: yuv422p10; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 220Mbps; pixel format: yuv422p10; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 90Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 110Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 180Mbps; pixel format: yuv422p; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 220Mbps; pixel format: yuv422p; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 60Mbps; pixel format: yuv422p; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 60Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 75Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 120Mbps; pixel format: yuv422p; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1280x720p; bitrate: 145Mbps; pixel format: yuv422p; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 36Mbps; pixel format: yuv422p; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 36Mbps; pixel format: yuv422p; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 45Mbps; pixel format: yuv422p; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 75Mbps; pixel format: yuv422p; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 90Mbps; pixel format: yuv422p; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 350Mbps; pixel format: yuv422p10; framerate: 24000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 390Mbps; pixel format: yuv422p10; framerate: 25/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 440Mbps; pixel format: yuv422p10; framerate: 30000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 730Mbps; pixel format: yuv422p10; framerate: 50/1
  [dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 880Mbps; pixel format: yuv422p10; framerate: 60000/1001
  [dnxhd @ 0000000002be23a0] Frame size: 960x720p; bitrate: 42Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 960x720p; bitrate: 60Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 960x720p; bitrate: 75Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 960x720p; bitrate: 115Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080p; bitrate: 63Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080p; bitrate: 84Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080p; bitrate: 100Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080p; bitrate: 110Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080i; bitrate: 80Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080i; bitrate: 90Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080i; bitrate: 100Mbps; pixel format: yuv422p; framerate: 0/0
  [dnxhd @ 0000000002be23a0] Frame size: 1440x1080i; bitrate: 110Mbps; pixel format: yuv422p; framerate: 0/0
  Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> dnxhd (native))
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))
  Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

  Completed in 2.15886844137404 seconds (2.16 seconds)
  --------------------------------------------------------------------------------

Like the error says: video parameters incompatible with DNxHD. Your input is 1280x1280@24fps, but only the listed resolutions are acceptable. You'll have to scale down and add (black) padding to make it work. If that's ok, I'll post a command.

Your output has to match one of the requested profiles.
For the 5th profile listed,
[dnxhd @ 0000000002be23a0] Frame size: 1920x1080p; bitrate: 115Mbps; pixel format: yuv422p; framerate: 24000/1001

you would use
ffmpeg -i test.mov -vf format=yuv422p,scale=-1:1080,pad=1920:1080:(ow-iw)/2:0 -r 24000/1001 -c:v dnxhd -b:v 115M out.mov

If you receive a syntax error near unexpected token ( error, enclose the whole format value in double quotes, like this: ffmpeg -i test.mov -vf format="yuv422p,scale=-1:1080,pad=1920:1080:(ow-iw)/2:0" -r 24000/1001 -c:v dnxhd -b:v 115M out.mov

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


text:
Can't move imported images
I'm using Adobe Premiere CS3 and I can't determine how to move an imported image around. To move text I double-click on the text item on the items panel. I've tried hiding the text layer that keeps moving (the website URL that is displayed for the full length of the video) though a white box gets moved instead. Double-clicking on the image in the items panel doesn't do anything. This has nothing to do with animation or movement, I just need to change the image's position (it's dead-center by default).
How do I move an image to a different position in the Timeline panel?

Apparently I had to move the image to "Video 5" (if there are four video layers) to be able to move the image around. Obnoxious though effective enough. If someone knows how to still move images around while avoiding having to add tons of video layers I'd appreciate it though.

You can do it in the effect controls panel by scrubbing the mouse on the position x and y values.

@stib "Scrubbing"?

Click and drag on the numbers to increase or decrease them. You can single click if you want to type the number. Clicking in the number field and using up and down arrows works too (use shift to increase x10)

@stib That is the video-in and video-out time in the Project panel, it was nothing to do with the layer z-index in the Timeline panel.

No, you can move any clip on any layer by changing its x and y position using the effect controls tab. Go to Window>effect controls to show it


text:
Question about ffmpeg's overlay variable t
I've got an ffmpeg command that overlays a line on a video and moves it from left to right while the video plays:
ffmpeg -i clip.mp4 -i line-with-transparent-white.png -filter_complex "[0:v][1:v]overlay=x=t/15*1280" output.mp4

(the numbers 15 and 1280 are duration and width of the clip; they are set in a shell script from ffprobe's output).
That works, but only when clip.mp4 is a "normal" video; not when it has been produced by ffmpeg with the following command:
ffmpeg -i music.mp3 -filter_complex "[0:a]showwavespic=split_channels=0:colors=white|lightgrey,format=pix_fmts=yuv420p" -map 0:a audio.mp4

The latter file plays fine: it shows the wave, and the music plays, but when I use it as input for the first command, the line graphic doesn't move. It's as if the variable "t" stays at 0 throughout.
I have the vague suspicion that it's related to the fact that the image doesn't change, and hence that there's no progress in the overlay (the mp4 file is barely larger than the mp3 file).
Does anyone know how to proceed: do I need to change the format of "audio.mp4", is there another trick or tool I can use, or should I file a bug perhaps?
Thanks in advance.
BTW, the first command requires the addition of -max_muxing_queue_size 9999 when using audio.mp4 as input.
Output from ffmpeg:
ffmpeg version N-48132-ga84af760b8-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-gray --enable-libfribidi --enable-libass --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.100 / 58. 47.100
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, mp3, from 'BayesXMas.mp3':
  Metadata:
    TSS             : Logic Pro X 10.3.3
    iTunNORM        :  000001A6 000001B0 00000FCE 0000170A 00000B53 000064B6 0000543B 00006520 00000772 00000E63
    iTunSMPB        :  00000000 00000210 000008F0 00000000001F0000 00000000 00185D01 00000000 00000000 00000000 00000000 00000000 00000000
  Duration: 00:00:46.16, start: 0.000000, bitrate: 278 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 277 kb/s
Stream mapping:
  Stream #0:0 (mp3float) -> showwavespic (graph 0)
  tpad (graph 0) -> Stream #0:0 (libx264)
  Stream #0:0 -> #0:1 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0xceef480] using SAR=1/1
[libx264 @ 0xceef480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0xceef480] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0xceef480] 264 - core 157 r2935 545de2f - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=7 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'audio5.mp4':
  Metadata:
    TSS             : Logic Pro X 10.3.3
    iTunNORM        :  000001A6 000001B0 00000FCE 0000170A 00000B53 000064B6 0000543B 00006520 00000772 00000E63
    iTunSMPB        :  00000000 00000210 000008F0 00000000001F0000 00000000 00185D01 00000000 00000000 00000000 00000000 00000000 00000000
    encoder         : Lavf58.26.101
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 600x240 [SAR 1:1 DAR 5:2], q=-1--1, 73.50 fps, 18816 tbn, 73.50 tbc
    Metadata:
      encoder         : Lavc58.47.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.47.100 aac
More than 1000 frames duplicated      0kB time=00:00:24.93 bitrate=   0.0kbits/s speed=49.9x

showwavespic generates only one frame, so there's no substrate on which for overlay to take effect after that first frame. Use the tpad filter and -shortest option to clone frames till audio length.
Use
ffmpeg -i music.mp3 -filter_complex "[0:a]showwavespic=split_channels=0:colors=white|lightgrey,format=pix_fmts=yuv420p,fps=10,tpad=stop=-1:stop_mode=clone" -map 0:a -shortest audio.mp4

Thanks, but it doesn't work... or rather: doesn't work correctly. FFmpeg doesn't stop generating frames, not even when changing the stop value. It does work when I use the output of the second command from my question as input, and run a new ffmpeg command to tpad that to the desired length. Thanks for setting me on the right track.

Share full log. Works here.

The full log is a bit large when setting loglevel to debug. My summary would be: it starts with the normal output, then there are about 25000 lines of this kind:
[mp4 @ 0xbf678c0] Delay between the first packet and last packet in the muxing queue is 10007800 > 10000000: forcing output
cur_dts is invalid (...)
after which follows this:
*** 1085029 dup!
More than 1000 frames duplicated
[libx264 @ 0xbf68c80] frame=   0 QP=15.98 NAL=3 Slice:I Poc:0   I:570  P:0    SKIP:0    size=6490 bytes
The latter line runs to frame 28123 before I killed it.

Don't need debug level. Share full log.

See question for log.

Ok, ffmpeg isn't getting stuck. The showwavespic filter outputs a single image, and long story short, assigns it a weird large framerate. So, ffmpeg is cloning frames to match a constant stream at that rate. This causes a lag in ffmpeg updating its console, so it appears 'stuck'. If you wait for some time, ffmpeg will update. But added a workaround.

Indeed. I let it run, and after 20min user time it produced a 66MB file with a duration of 04:06:02.33, instead of 00:00:46.16 (which curiously enough looks a lot shifting the digits to the wrong position). I'll look for the workaround. Thanks!


text:
Best way to handle stream with ffmpeg and GPU
So in my project, I need to capture a video stream, decode the video, run the individual frames through an object detection algorithm and then play the output as a video.
This whole operation is running on a Linux server with a couple of Tesla V100's, 40 core CPU (can't recall exact model right now) and a ridiculous amount of RAM. It should play the video which is 720x576i at 25fps (progressive), so de-interlacing also needs to be happening on the fly.
Needless to say, the object detection is by far the slowest operation happening here, but I'm currently looking on how best to approach the transcoding.
Now, since I have access to such a powerful GPU I thought it would be smart to utilize it, but I also read in a few places that transcoding on GPU sucks.
In any case, I have cuda 9.0 installed so I built ffmpeg with the following options enabled:
--enable-libavcodec  --enable-libx264 --enable-gpl --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp

(I'm 95% sure these are all, but if it really matters ill check once I have access to the server, which should be in a couple of days)
What is the best way to proceed from here? I'm not very familiar with ffmpeg and even less so when it comes to all the gpu related options.
I tried de-interlacing with -vf: yadif_cuda, but it failed, saying that this filter is not available. I thought it would be available if i enabled cuda in the build options.
I have no clue which options to use when decoding (e.g., -hwaccel ???, -c:v libx264 or h264_cuvid, etc..) and also I'm not sure how should I display the frames once the detection algorithm spits them out. Do I just 'play' them? Do I re-encode, and if so, how?
Any help is much appreciated, and if any more information is needed ill happily provide what I can.
I've made a diagram to clarify how the entire thing should play out:

Python is used for the algorithm, with probably skvideo for capture and playback. I could also just use ffmpeg directly (with a bash command, executed from the python script) though if necessary.
Everything that is between Capture and Play should happen live, i.e. while the video is transmitted to the end user.


text:
Action camera connected via two usb extenders and RJ45 doesnt work?
I started using my Action camera as Webcam via USB - works good. I wanted longer cable so googled a bit how to extend USB cable and found solution two USB extenders via RJ45 cable.
Computer <--> usb 2.0 to RJ45 <--> RJ45 UTP cable <--> RJ45 to micro USB <--> action camera
The problem is, camera is not turning on - basically I bought extenders which are converting RJ45 to USB (and micro usb on the other side).
Question is how to make it happen ? Invert signal or something is possible ? Camera is dead and extenders are not showing any traffic on led lights.
More details
USB 2.0 port on motherboard has not been modified. Both USB to RJ45 are working - tested when plugging in etrhent cable to usb. To give you more information, here are the models I am using - so from motherboard USB is going Edimax EU-4208 which is connected to RJ45 cable, that cable (1m) is going to ICY BOX IB-AC510 and from this, its going via microusb to action camera Eken H9. I am very afraid that this will not work as they are only converters or is there any hope ?
Thanks.

Welcome! Hope you get it working. We could use some more info. What have you tried? Have you used that camera with a USB 2.0 port successfully before? Is the camera battery/wall-powered, or does it use USB power? If USB, do the adapters pass the full 500 mA? Have you used the USB-Ethernet converter pairs successfully with other devices? RJ-45 is a connector; (read the insulation) what category is the cable? What length? Are the USB-Eth converters active devices, or just "converters"… abusing ethernet's 8 wires as USB leads? What makes and models are each of the involved components?

Hi @JoelReid, thanks for asking more info - here are they - USB 2.0 port on motherboard has not been modified. Both USB to RJ45 are working - tested when plugging in etrhent cable to usb. To give you more information, here are the models I am using - so from motherboard USB is going Edimax EU-4208 which is connected to RJ45 cable, that cable (1m) is going to ICY BOX IB-AC510 and from this, its going via microusb to action camera Eken H9. I am very afraid that this will not work as they are only converters or is there any hope ? Thanks Joel.

Given your answers, that's important info! Just a note on StackExchange norms; consider revising your question to include additional info. Everything important goes in the questions and answers. Thanks!

Unfortunately, given the models you mentioned in comments, the purpose of both of your ethernet adapters is to connect usb host devices, like computers, to ethernet network devices, like switches and routers.
There do exist purpose-built USB extenders (see: example NewEgg search), some of which have RJ-45 ports to operate over cat5 or cat6 cables just for availability and cost savings—but sadly, that's not what you have. They're also usually considerably more expensive. And they do not work with ethernet data networks, instead only as a matched pair. I'm afraid you'll need to work up another solution.

yeah I though that, thanks a lot


text:
(Efficiently) Extract multiple clips from a long video, possibly with ffmpeg
I've got a long video (2 hours at high resolution). We might as well assume it's in mp4 format, because it's in an AVCHD, and I'll have to extract and convert it to mp4 anyhow.
I'd like to extract from it about 40 clips, of varying lengths. I know the "start" and "stop" time for each. It might look like this:
0:00:15 to 0:01:30 -> clip1.mp4
0:01:55 to 0:03:10 -> clip2.mp4
0:03:45 to 0:05:12 -> clip2.mp4
 ... (many more lines)
1:55:45 to 1:57:11 -> clip41.mp4

I can certainly write a script to extract each of these individually (via something like what's described here), but that requires "reading through" the source forty times, which can be slow. Is there a way to get ffmpeg to do this in some sort of sequential fashion in a single pass? Or do I just resign myself to an overnight background process?

The referenced command does an efficient job, and won't read through MP4s but use an index to jump to the inpoint.

In my experience, using -ss, even with the newest versions of ffmpeg, does not give perfect frame accuracy. It gives frame accuracy 99% of the time, but that's not good enough in a production environment. The only thing that I've found to be perfectly accurate is ```
-vf select=between(n,123,456)

Can you share the command+file which doesn't give perfect accuracy?

Anything along the lines of "ffmpeg -ss  -i input.mp4 ....".  If you use "-vcodec copy", as in the link you suggested, you'll get cuts on keyframes, which can be a number of frames away from the frame you actually want to cut on.  Even if you re-encode, though, you'll often get off-by-one errors, presumably from floating point division mismatches.  Let's say you want to start at frame 23 of a 23.976fps movie.  Since -ss doesn't allow frame numbers, you'll have to specify something like "-ss 0.9592926259592927".  Sometimes that'll start you at frame 22 instead of frame 23.

I made a change today morning that may improve seeking in MP4/MOVs. Try the latest builds.

@Gyan: Does it help with the problem that "-ss 0.9592926259592926" might start me at frame 22 while "-ss 0.9592926259592928" might start me at frame 23?  I.e., is there a way to seek to a specific frame rather than to a specific time, and not have to worry about floating point division mismatches?  Thanks.

23.976 is not the exact framerate, it's 24000/1001 2)The issue isn't with FP division (although in rare cases it may be) 3)Your video may not have frames exactly at the calculated timestamps either because of variable frame-rate or audio codec delay. 4)Timestamps are points, not regions - ffmpeg input ss will identify the packet at or before the argument, so once you calculate the exact timestamp, add a couple milliseconds to accommodate possible anomalies. There are still some cases, to do with multiple B-frames, where ffmpeg won't return the exact frame, but in other cases, it should.

Input ss iaccuracy s independent of whether streamcopying. However, further processing may be different whether output format supports negative timestamps and whether the consumer app can handle negative timestamps correctly.

Thanks for the correction on 23.976 vs. 24000/1001 - I hadn't realized the difference until you pointed it out, and perhaps that made a difference.  I did try a bunch of fudging - adding or subtracting a few milliseconds to the start time and the duration - but I was never able to achieve 100% frame accuracy with anything other than "select", and after a couple of weeks of trying everything I could I got very suspicious of any ffmpeg clip extraction methods which used seconds instead of frame numbers. :-)

About the negative timestamps - unfortunately, I have to support a number of different processes after cutting the movie, some of which depend on software that seems to use old and flaky movie libraries.  That may have also contributed to my failures with -ss.

According to @Gyan, the referenced command does an efficient job, and won't read through MP4s but use an index to jump to the inpoint. So there's no real need to optimize.


text:
Camcorder vs. GoPro mounted on bike
I am using a GoPro mounted to a bike to capture crews rowing in a boat next to a (gravel) bike path. I am mostly happy with what the GoPro offers except that I need a less wide-angled view. For better quality and having access to zoom lenses, I am considering using a camcorder instead. However, I am worried that mechanical vibrations are going to break the camcorder which I would expect containing moving parts whereas a GoPro has none. Any recommendations from people taking videos by mounting them to vehicles (rather than holding them)?
Example: https://vimeo.com/338228818

The primal problem will be the stabilization. GoPro's Cameras offer a decent image-stabilization and are wide-angled. This allows shakes and bumps to have less of an impact. If you now go for a camcorder with, say, a lens of 50mm, you will experience an extreme increase in shakiness.
In other words: When you worry about your camera to break due to shakes and bumps, the footage will most likely not be great.
There are some options you have, which one to choose is on you.
First, you could try to buy a GoPro that can record in 4k (maybe you already own one). That way, you can hit two birds with one stone. On the one hand side, you will be able to zoom in digitally in post without losing any image quality, assuming you want to render in full HD (1920x1080). This fixes the issue of the wide-angle lens. On the other hand side, there will be plenty of material around the visible area, so a warp-stabilizer in After-Effects should easily help stabilize the footage, giving you a much more smooth result than opting to put a camcorder on your bike.
The other options would be to use a camcorder indeed, or even a tv-production or cinema-camera if you like, but staying off that bike. Either, you can rent or buy a Steady-Cam or Gimble (the ones from Ronin are very good) and run along. The Gimble or Steady-Cam will stabilize your Camera and will give you probably the best results (assuming you know how to properly use a Gimble / Steady-Cam).
This is also the priciest option though, I fear.
The other is to use the camcorder or higher-tier camera again, but stay still entirely. You can try to find a Spot on the path where the water flows around you a small bit, like in any curve of the river. Position yourself on the extended piece of land and just pan with the Subject, instead of moving at all. This would be the easiest and probably cheapest option, though it only really works well for short, preferably fast pace sequences, so you don't catch that the camera is stationary. Many people use this method to capture people running in forests: The actors simply run in a circle around the camera and the operator pans with them, which results in footage looking like they follow the subject horizontally.
I hope my answer was helpful, good luck with your project!

Thanks for the detailed comments. I am post-processing my videos for stabilisation already using ffmpeg and have experimented with DIY replacing the lens in the GoPro. Not moving along is not an option as these videos are used for coaching and feedback - so it is not an artistic endeavour.

Indeed, when you go for a tighter lens, you will increase the shakiness. Post-Processing stabilization should not be a necessity, it should retouch small bumps. When you up your gopro to, say, 50mm, you will end up with a shake that even stabilization won't make pretty.

I found the discussion at Stabilizing GoPro videos helpful, too.


text:
ffmpeg: using vidstab{detect,transform} on parts of a video
I'm using ffmpeg's vidstabdetect and vidstabtransform filter to stabilise videos. Currently I first cut out the scenes from the single input that I want to stabilise into individual files, which I then stabilise, transform, and join together. To avoid creating these intermediate files, is it possible to:

specify multiple time ranges to stabilise;
create the necessary *.trf file(s) in a first pass;
stabilise (transform) the time ranges from the input in a second pass and create a single output file containing just the stabilised scenes

without creating intermediate files beyond the *.trf file(s)? I am asking because I am not sure that the *.trf files can deal with non-continuous scenes.
What would be the right flag to specify the time ranges to stabilise and join?
Current workflow to extract and stabilise a scene from foo.mp4:
$ ffmpeg -v error -y -ss 00:00:00 -to 00:01:00 -i foo.mp4 -c copy foo-000000-000100.mp4

$ ffmpeg -y -v error -i foo-000000-000100.mp4 -vf vidstabdetect=stepsize=6:shakiness=6:accuracy=9:result=foo-000000-000100.trf -f null -

$ ffmpeg -v error -y -i foo-000000-000100.mp4 -vf vidstabtransform=input=foo-000000-000100.trf:zoom=1:maxangle=(1*PI/180):smoothing=30,rotate=(0.0*PI/180):ow=1920:oh=1080,scale=1440:-2,unsharp=5:5:0.8:3:3:0.4,drawtext=fontfile=din.ttf:fontcolor=0x55b575:fontsize=18:x=w-tw-10:y=h-th-10:timecode='00\:00\:00\:00':rate=60,drawtext=fontfile=din.ttf:fontcolor=0x55b575:fontsize=18:x=10:y=h-th-10:text='foo' -vcodec libx264 -preset slow -tune film -an -r 60 -crf 26 foo-000000-000100.stab.mp4

You could avoid the intermediate files created in step 1 and used in step 2 but not in step 3.

My goal would be to take, say 3, scenes from a file, create in the first pass one '*.trf', and use that in the second pass to stabilise the scenes and extract them (joined up) into a final output file.

It is possible to use the select filter to select scenes for stabilisation and inclusion into the final result - see the example below. It seems that select is slow for skipping over unwanted material. This does not create any intermediate files except the *.trf file. In my example I am not using audio, which would have to be selected likewise.
#! /bin/bash

f="20191128_215245A.mp4"
x="select='between(t,5,10)+between(t,15,20)',setpts=N/FRAME_RATE/TB"
s="vidstabdetect=stepsize=6:shakiness=6:accuracy=9:result=foo.trf"
y="vidstabtransform=input=foo.trf:zoom=1:maxangle=(1*PI/180):smoothing=30"
z="scale=1440:-2,unsharp=5:5:0.8:3:3:0.4"
a="-an -tune film -r 60 -crf 26 -vcodec libx264 -preset slow"

ffmpeg -y -i $f -vf "$x,$s" -f null -
ffmpeg -y -i $f -vf "$x,$y,$z" $a foo.mp4


text:
FFmpeg Filter Loop freezing when using delay or fade on overlay
I'm working on a project where I've to do a batch. What i would want its make an animation all long of movie: this animation is mostly in two parts :
-1st part   Animated apparition of a picture  (0-5s)
-2nd part   Loop picture animation  (5s-end)
Separately these filters works but i cant make it working together, specifically for the loop filter starting after 5s
with fade :
ffmpeg -loop 1 -framerate 15 -i "cover.jpg" -i "input.mp3" -i "part1.avi" -i "part2.avi" -filter_complex "[3:v]loop=-1:500:0,setpts=N/FRAME_RATE/TB [B];[B]fade=in:st=0:d=5:alpha=1 [part2];[0:v][2:v] overlay=enable='lte(t,5)': [part1];[part1][part2]overlay=x=0:y=0 [outx]" -map "[outx]" -map 1:a -c:v libx264 -preset ultrafast -tune stillimage -crf 25 -c:a aac -b:a 64k -ar 48000 -shortest -pix_fmt yuv420p "output.mp4

with delay :
ffmpeg -loop 1 -framerate 15 -i "cover.jpg" -i "input.mp3" -i "part1.avi" -i "part2.avi" -filter_complex "[3:v]loop=-1:500:0,setpts=N/FRAME_RATE/TB [B];[B]setpts=PTS-STARTPTS+5/TB [part2];[0:v][2:v] overlay=enable='lte(t,5)': [part1];[part1][part2]overlay=x=0:y=0 [outx]" -map "[outx]" -map 1:a -c:v libx264 "output.mp4

Both overlay output are freezing at 25s so not looping as i would want.
Thanks for your help and sorry for my english
PS: I'm on windows ffmpeg version N-93214-g7e4d3dbe18 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212

Thanks for your answer, I'm using latest one on windows : ffmpeg version N-93214-g7e4d3dbe18 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20190212


text:
PfTrack: Exchange Projects to different machine?
Is it possible to take a project created in pftrack and transfer it to a different machine that also runs pftrack?
So far, the documentation I found via google was quite poor, I also couldn't find out whether pftrack is upward-/downward compatible.


text:
Premiere: Endless "Media Pending"
I was send a premiere project with all the raw-footage. It also included premiere preview-files.
When I open up the sequence, the program shows "media pending" forever. "Easy enough, I probably know why" - I thought. However, I tried pretty much everything, including:

Clearing the entire cache
Clearing the preview-files that came with the project
Enabling and disabling the footage
closing the program window and opening it again
restarting, even reinstalling premiere
opening the project on a different machine

And at this point I really don't know what to do anymore. Has anyone of you ever had that problem, and how does one fix it? Thanks in advance, have a beautiful day.
Edit: A Temporary fix was to find a machine on which the sequence loaded properly. Upon saving the project on that machine and re-opening that on the original machine, everything seems to work fine. Technically, the issue is solved, but there has to be some reason or reasonable fix for this, no? I would still love some tips on this issue.


text:
Does Youtube accept 10bit uploads? If so, what codec should I use?
I am launching a series of videos to Youtube.  These videos have a black background and lots of colored gradient changes.  4k, 60fps.
Unfortunately this picture style is causing terrible banding issues in H264.
Accordingly I want to upload my videos to Youtube in 10bit - is this possible?
If so, which codec would you recommend?

Why not give it a test? YouTube is a bit of a black box, the best answer might be found by experimentation

I can tell you definitively that YouTube does accept 10-bit, as 10-bit is a prerequisite for HDR (different can of worms, but do-able).  Whether or not it'll fix your banding problem is a different matter.  Like Stib said, try a test upload.  Keep it short so you can iterate quickly.  Also, check the results on a few different screens, because the banding could be happening there.  If you can do H.265 fast enough, that's a good candidate.  It's pretty slow on macs at the moment.  NVIDIA GPUs can supposedly handle it pretty well, though.

It's not the 8 bits causing the heavy banding, but the color sub sampling of 4:2:0. That is part of the 'compression algorithm'. That means that only 25% of original color information is being retained. The 8 bit depth is in most cases enough, otherwise we would see banding everywhere.
There are two options for fixing the issue.

Only use the free x264 encoder (SHUTTER ENCODER*, handbrake, capcut) – It is very slow (No hardware support) but gets 10 - 8  bits absolutely right and smooth (via blue noise overlay automatically). (i really recommend shutter...it is a very professional tool, also enoding prores on windows for example...for free – export as ProRes or DNx and then compress with it. takes longer and another step but is immensely helpful).
You'll need to use a 4:2:2 format (like broadcast has been using for ages) – either as h264 or h265 BUT since all streaming services convert/compress again, is it up to them to make use of it.

Usually, what professionals do, is adding BLUE NOISE to the videos, which reduces banding. Also FILM GRAIN helps. Some free encoders (x264) like HANDBRAKE or shutter encoder, even offer a checkbox for 'reduce banding' which does exactly that: adding special blue noise in areas of heavy gradation. The best way is still 1.

Youtube converts files in two main containers, flv and MPEG-4 AVC (or h.264). For everything below 720p, youtube usually switches to flv, for everything above it uses h.264.
Your file will get compressed by youtube's own bitrate indeed, but upping the bitrate in the encoder will still give you vast improvements in image-quality.
You need to keep in mind that the file will get compressed about three times in your case. When the camera records the image, it compresses it according to the filetype and codec it is set to. Then, after editing, the file will get rendered and compressed furthermore. And at last, youtube will also convert and compress your file.
So, to minimize loss of quality, it's worth considering upping your bitrate of the encoder you use (Adobe Media Encoder, Premiere, After Effects, etc.), since this is the only thing you could change as of now. A bitrate of 25-30 should be what you want. If file-size is not to be considered, I would even recommend pumping it up to about 50. Also, make sure to tick the "use maximum render-quality" when you're using adobe's encoders.
The only limit youtube has for uploading is 124gb file-size if I remember correctly. It's a value videos should never reach tho.

This doesn't actually answer the question, maybe you could improve it by addressing the issue of bit depth, and codec compatibility

Atm a 10 bit h.265 in NUT container is the best of what I've tried. Depending on how popular ur channel is, rather whether you'll get vp9 encoding or not, u should scale to 2k or 4k. But ur doing 4k anyways so its irrelevant u should get good treatment on youtube. So give it a test at:

10 bit h.265 NUT (.nut) @ 4k .wav audio

use a perceptually lossless setting, so fairly high bitrate but not insane. an h.265 crf of 19 is my recommendation, no more no less.
alternatively as a lossey option to save on filesize u can do h.265 10 bit .ts with opus. You'll get a nicer kick with .wav, assuming the audio is any good to begin with. Even just transcoding to wav and using that is gonna show some difference when uploaded to youtube.
If you go mkv as your container, expect problems @ 10 bit. Similar with other containers...they don't work over 8 bit or have very poor results on youtube.
If file size is irrelevant you could just do an image format stored in an mkv. 16 bit png or higher in an mkv..it's insane but its pretty. They've uploaded fine in the past, haven't done it recently though so do a small test first. If I had to choose between the three for just image quality I'd go .ts, for some reason that container looks really nice on youtube. Containers influence the final picture quality on youtube...cause reasons.
Further Information for ffmpeg rendering (quickstart guide):
****Generally in my case things are pumped out as an image strip from whatever video editor I use; use a high bit depth. Then in the folder the pictures are stored in, where the starting picture is called 21.png and the subsequent images are sequentially increasing by 1..22.png...23.png etc; Further naming convention data can be found on the wiki. Sometimes commands start at 0 sometimes at 1, so I suggest you specify the start_number so you don't have to care****
ffmpeg -framerate 24000/1001 -start_number 21 -i %d.png -vf "scale=3840:-1" -c:v libx265 -crf 19 -pix_fmt yuv422p10le 4k_output.nut

After ffmpeg is called up each argument is started with a "-" known as a flag, with the exception of the output.* Where -framerate is expressed as an integer (24, 30, 60 etc); -start_number just sets the start point as noted above; -i signals the input you are gonna do stuff to. In this case it's an image strip so %d is the generic callup for image strips, the .png is the format of the image (most formats supported, .exr may have problems); -vf "scale" is included incase you need to upscale/downscale (you don't tho), in ur case take it out, if you are dealing with jpg you either use -2 or specify the height numerically i.e. "3840:2160". Alternatively  you can specify the algorithm used for the scale with -vf scale=3840x2160:flags=lanczos -v 40; where you change lanczos with whatever you want...'neighbour'...'experimental' by default its bicubic which is fine; specified is libx265 which is just h.265, libx264 is h.264 etc; crf 19 is the quality, for h.265 you would use a value +2 higher than the value u use for h.264 (i.e. 17 crf in h.264 = 19 crf in h.265), the value shown is generally labelled as 'perceptually lossless'; pix_fmt specified the bit depth...in this case we want yuv422p10le for 10 bit, yuv480p for 8 bit, yuv422p12le for 12 bit (requires custom build), rgb48be for 16 bit png etc; the output is custom named, in this case I chose "4k_output". Note: the file extension of output/input are labelled accordingly, .nut = NUT. You can stick a '-preset veryfast' or '-preset slow' after you specify h.265, depending on the file size desired otherwise it'll do the normal speed/size.
I generally recommend a separate command for combining ur audio with video to prevent problems.
ffmpeg -i 4k_output.nut -i audio.wav -c copy final_upload.nut

Where '-c copy' is a command that signals to copy the audio and video streams over so that no re-encoding takes place. You should check the streams information which will be displayed right after you initiate the command and right before it goes frame by frame encoding, this will tell you what is happening to each stream. Look for (copy) to be displayed to confirm where no re-encoding takes place.
For opus you can convert your audio using:
ffmpeg -i audio.wav -c:a libopus -b:a 510000 opus.ogg

Where -b specifies the bit rate, with opus u need to write it out,but otherwise u could write 510k I believe for aac and others. Although I would use 384k for aac. And someone reading this would suggest 128k...but whatever. So this would be 3 separate commands, but if you are confident in your computer (and luck) you could do it all in a single command. I'll leave that to you to figure out, just mix and match in an order where reading it left to right makes sense. And for transport stream just use .ts instead of .nut. It's the same command as with .nut, just .ts can't store lossless audio.
You can preview your video using ffplay (included in same folder as ffmpeg.exe), .nut doesn't play well in many video players.
ffplay final_upload.nut -fs

The format is the same between ffplay and ffmpeg, but the -i is optional, and the inputs are specified at the end of the argument...i always do -fs at the end where its used tho. -fs just signals full screen; it'll fix any zoomed display problems, alternatively you can specify the window size with the scale filter.
i.e.) ffplay -vf "scale=1280:-1,unsharp=lx=10:ly=10:la=2.0" final_upload.nut
filters and effects can be tested in ffplay before rendering, similarly you can play ur entire image sequence in ffplay if ur computer can handle it just re-arrange the commands given and realize you don't have to specify codecs. I really like unsharp so I included it here, it functions as a sharpener when you use positive values.
Worth noting to anyone using command prompt: control+c (3 times in a row is hardstop) will stop any command including ffplay. The 'Pause' key will pause any render operation; control+z will resume any paused operation.
If you wanted to store the images in an mkv video you could use the ffmpeg command originally specified but include a '-c:v copy' and change the output file extension to .mkv. If successful (check the streams as mentioned above) this will ignore all ur video codec settings and simply copy it into the container. ffmpeg reads left to right, so generally you can just specify your copy command anywhere after the input, certain things are better specified before the input but you can research that yourself. If dealing with video you can use '-r' instead of '-framerate', be careful where you place your framerate though. Note 1's and l's look the same but they can make or break ur command. If you have multiple streams in ur video (subfiles, information, fonts, multiple audio/video) specify '-map 0' after the input and this will bring all the streams over to the output. If things are specified, presets will be applied based on stuff like output container chosen. So if I could do ffmpeg -i input.avi output.mkv; and this will automatically carry over the single best quality audio and video stream, re-encoding them to vorbis and h.264. The copy commands in general are (the newer notation):
-c:v copy
-c:a copy
-c:s copy
-c copy
Where v is video streams, a is audio stream, s is subtitle stream. c copy is a short form for saying copy ALL streams. If you specify -map 0 and need to re-encode video you would do -c:a copy and -c:s copy in ur command. Otherwise using -c copy you'd overwrite any video codec settings applied in most cases.
As well be careful not to include spaces where there shouldn't be any. If doing spaces in your notation enclose the argument with a " ", same with input  and output names. i.e. -i "my video".mkv. I included quotes with the filter command up top just cause I generally put spaces after each filter (separated by a ,) and elsewhere just to see better etc. And make sure when your command is running through the frames its not displaying a "frames dropped" display...that would be bad, make sure fps is in the right place. it should display the speed while it's working and that's it.
If you need more help see the official documentation. If you can't read it, it's kinda hard, use https://amiaopensource.github.io/ffmprovisr/ first then reference the command information on the docs/wiki. The wiki pages, where offered, are easier to understand.

Thank you for sharing.
Do you do the transcoding in ffmpeg?  If so, could you share your recipe for H265 (NUT and ts)?

I updated the answer. Upload some samples and compare the results. Tossing '-movflags +faststart' in ur command is recommended by youtube but I saw no difference in upload or performance and it only increases render times. I could be wrong though, I didn't test that part much. '-vframes 500' after your input will limit the output to the first 500 frames assuming your input is an image strip.

Thank you.  I've been trying to get h265 to work, however the output seems to have dropped frames and is very laggy.  I uploaded it to Vimeo, and same result.   The original footage is 10bit DNXHR HQX and it transcodes to h264 without problem.

I'm not familiar with DNXHR HQX you might need an additional library to convert properly or maybe it's just your command. When you say dropped frames is this after uploading to youtube or before? Confirm if there is any problems in ffplay. If its saying dropped frames while its rendering via ffmpeg, next to the speed, then its dropping frames. This is likely due to your command, write it out and let me see or take a screenshot of it in action so I can see the error messages if any. If in doubt convert a bit of your video to an image strip and confirm that this works and then backtrack.

If its during the ffmpeg operation that frames are being dropped you can try adding "-f rawvideo" after the input. This tells FFmpeg to pass the video stream as raw video data without remuxing. This step is what ensures the survival of embedded metadata versus a standard rewrap. i.e. ffmpeg -i input -f rawvideo -c copy output should not have any dropped frames. h.264 10 bit is possible too in ffmpeg. All the info for that is in the answer alrdy, just libx264 and ~17 crf imo.


text:
How do I clone layers in Adobe After Effects
Thanks in advance for your input.
First, I have a composition that has one square in it that has opacity and scale keyframe automations.  This composition is named Square and is 25px by 25px.
Square composition is then added to another composition and is duplicated 3 times to equal 4 squares.
1 2
3 4

These 4 squares are placed in a larger square and are offset by a few frames.  This composition is named Square_4 and is 50px by 50px
I now create a new composition named Square_reveal that is 1000px by 1000px.  I want to add my Square_4 composition to Square_reveal and duplicate it so that each Square_4 layer fills the entire composition of Square_reveal.  This will be 20 Square_4 layers across (50px x 20 = 1000px across).  I then want to duplicate this row 20 times and place each row under the one above it.  This will fill the entire composition.
I have successfully done this by duplicating Square_4 20 times in one Square_reveal composition but then I have to duplicate Square_reveal 20 times and change the y position of each layer.  I feel like there could be an expression that would do this duplicating for me (400 duplicates).  If you have any idea how to do this using an expression or any other way other than manually duplicating I would appreciate your help!
Edit: My goal is to place 400 animated squares into one square  composition.  You can reference this part of the Voxyde video tutorial to see want I to accomplish.

Can you add why you're doing this? What's your goal?  Is it a multiscreen full of videos?

@tomh Please see the edit I have added added at the bottom of this question for what I am trying to replicate.  Thanks for your input.


text:
How to make that effect in After Effects?
How to make blurry, washed out effect like in this video the more far object location is the more blurry that object is.  And then object is moving bluriness also moving. How to do that?  Timestamp 32:48- 33:20

I think what you mean is called "depth of field" and is the way cameras work, no effect.

Can you explain how to do that effect?

You need a DSLR or DSLM with a lens with a wide open aperture (f2.8 or below) open the aperture up as wide as you can.

What programm do i need to do that?

The effect is created in-camera, as a result of the physics of the lens and optical system, not in software.


text:
How to record the movement of an image with the mouse?
So, I'm not really into video editing, but I wanted to know, is there a way for example, when you hold and drag an image on an image editor, but record that movement that you do, but I can't record an image software since there's a lot of stuffs going on, I just wanted to get a video from the image with that. Hope made sense, I want to do this to do some animation things
Edit: Something like this, but recorded to a video editor, in real time:
https://drive.google.com/open?id=1OfOGT0EGxNq-23CAmEkmGqGFAq4qSEKL

Welcome! Unfortunately, it really isn't clear what you are asking. Can you post a sketch or other example of what you are trying?

I edited a link to kinda what I wanted to do

This is a brilliant demonstration of yours I must say :D
This is possible in after effects using the "sketch movement". Just set the image as the target and record the movement.

Hmmm I just tried after effects haha, where do I find that? Also searching in google didn't help much

https://www.youtube.com/watch?v=jGYYNIGG49Y


text:
Can upconverting 1080p videos on 4k TVs, lower their quality?
I read somewhere its better watching 1080p content on native 1080p (Full HD) TVs, because they keep ORIGINAL video resolution without down\upconverting .
If that's true, so buying 4k TVs without any much 4k sources around (While many FHD and HD contents available) , mean wasting both money and quality, isn't that?
On CNET's article:

we've found that 1080p Blu-ray upconverted to the 4K screens looks
  great, although not appreciably better than 1080p on a 1080p TV.

Upsample by an integer ratio can be completely blameless, just repeating pixels and lines gets it done, no new information, and you get only the original resolution displayed, but no losses either.
This zero order hold based approach tends however not to be popular, and the amount of processing to do anything else rises rapidly especially if you either want to apply filtering over more then a very localised area or play dynamic games to try to give the impression of more resolution (Popular with consumer gear which compounds the messing about by not having sufficient processing to do it well).
Just doing a 2D sinc interpolation is pretty close to blameless (potentially 90% bandwidth or so if you can afford to throw sufficient processing at it), and takes the edges off the pixel doubling.
However for most reasonably sized tellies at reasonable viewing distances, HD is in fact just fine, 4k is nice on a computer monitor where you are sat 18 inches away from a 30 inch screen, but that is not the usual use case for telly.
You may find a search on the term "Circles of confusion" to be informative.
Now HDR (On a set that has the brightness and contrast ratio to pull it off, not technically easy) is a real win even on a SD screen.

Matched resolutions will typically yield best percieved visual results.
If youve ever watched an “actual” 525/480 SD signal on an HD set you know exactly what I mean.
Did TV really used to look that bad?  No. A 50” Standard Def Tube TV will produce a FAR better image of Standard Def material than a Sony Bravia 50” 1080 Set with the same feed.

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


text:
FFmpeg concat plus video inside video with different times
I have 4 files with same encoding to concatenate

"video1.mp4": duration 3 seconds. Show time from 00:00 to 00.03
"video2.mp4": duration 1 second. Show time from 00:01 to 00.02
"video3.mp4": duration 2 seconds. Show time from 00:01 to 00.03
"video4.mp4": duration 2 seconds. Show time from 00:03 to 00.05

What commands to get the following output?
00:00

00:01 to 00:02

00:03

00:03 to 00:05

Basic syntax is
ffmpeg -i video1 -i video2 -i video3 -i video4
       -filter_complex "[1]scale=0.40*iw:-1,setpts=PTS-STARTPTS+1/TB[v2];
                        [2]scale=0.40*iw:-1,setpts=PTS-STARTPTS+1/TB[v3];
                        [0][v2]overlay=x=W-w-20:y=H-h-20:eof_action=pass[m2];
                        [m2][v3]overlay=x=W-2*w-40:y=H-h-20:eof_action=pass[m3];
                        [m3][3]concat=n=2:v=1:a=0"   out.mp4

I assume all videos have same resolution and framerate. I've scaled videos 2 and 3 to 40% before overlay and offset their start time to 1 second.


text:
FFmpeg video over video circular at specific time
I cannot figure out how to add video over video circular at specific time
The following command
ffmpeg -y -i blank.mp4 -i yellow.mp4 -filter_complex "[1:v]scale=0.15*iw:-1,pad=iw+20:ih+20:10:10:color=red,setpts=PTS-STARTPTS+2/TB[v1];[0:0][v1]overlay=W-w-20:H-h-20:eof_action=pass:enable='between(t\,2,4)'[vo1]; [0:a]adelay=0|0[a0]; [1:a]adelay=2000|2000[a1];[a0][a1]amix=inputs=2[outa]" -map "[vo1]" -map "[outa]" -c:a aac -c:v libx264 -preset slow output.mp4

Return

That's great, but I need it circular like this

I'm trying with
ffmpeg -y -i blank.mp4 -i yellow.mp4 -filter_complex "[1:v]geq='st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),pow(min(W/2,H/2),2)),255,0)':128:128,scale=0.15*iw:-1,pad=iw+20:ih+20:10:10:color=red,setpts=PTS-STARTPTS+2/TB[v1];[0:0][v1]overlay=W-w-20:H-h-20:eof_action=pass:enable='between(t\,2,4)'[vo1]; [0:a]adelay=0|0[a0]; [1:a]adelay=2000|2000[a1];[a0][a1]amix=inputs=2[outa]" -map "[vo1]" -map "[outa]" -c:a aac -c:v libx264 -preset slow output.mp4

The result is not what I expect.
To fast generate blank.mp4 and yellow.mp4 use
ffmpeg -y -f lavfi -i "color=black:s=1280x720:r=25" -f lavfi -i "anullsrc=r=44100:cl=stereo" -c:a aac -c:v libx264 -preset slow -t 5 blank.mp4
ffmpeg -y -f lavfi -i "color=yellow:s=1280x720:r=25" -f lavfi -i "anullsrc=r=44100:cl=stereo" -c:a aac -c:v libx264 -preset slow -t 2 yellow.mp4

Here's the filtergraph for the video portion,
[1:v]format=yuva444p,geq=lum='p(X,Y)':a='st(1,pow(min(W/2,H/2),2))+st(3,pow(X-(W/2),2)+pow(Y-(H/2),2));if(lte(ld(3),ld(1)),255,0)',split[vid][border];[border]drawbox=c=red:t=fill,geq=lum='p(X,Y)':a='st(1,min(W/2,H/2))+st(3,abs(pow(pow(X-(W/2),2)+pow(Y-(H/2),2),0.5)));if(between(ld(3),ld(1),ld(1)-10),255,0)'[border];[vid][border]overlay,scale=0.15*iw:-1,setpts=PTS-STARTPTS+2/TB[v1];[0:0][v1]overlay=W-w-20:H-h-20:eof_action=pass:enable='between(t\,2,4)'[vo1];

The result is almost perfect, unfortunately there are yellow noise lines in the box and there is no red border over the circle https://i.imgur.com/Mem2wKf.jpg

The geq filter recently became multithreaded. This appears to be a bug related to that. Add -filter_complex_threads 1 for expected result. File a bug report at trac.ffmpeg.org.


text:
FFMPEG - build transport stream with multiple programs
I want to build a transport stream with multiple programs. To simplify the original post, I'm using three files that are the same video, but with different watermarks to track them. (Went this way b/c Gyans request for full log makes this shorter)
ffmpeg -i KeanuRambo.ts -i KeanuLincoln.ts -i KeanuBush.ts \
-map 0:0 -map 0:1 -map 1:0 -map 1:1 -map 2:0 -map 2:1 \
-program program_num=1:title=Ram:s0:s1 -program program_num=2:title=Linc:s2:s3 \
-program program_num=3:title=Bush:s4:s5 \
-report -f mpegts out5.ts

The output file is zero bytes. Here is what the -report produced:
fmpeg started on 2018-05-07 at 22:33:23
Report written to "ffmpeg-20180507-223323.log"
Command line:
ffmpeg -i KeanuRambo.ts -i KeanuLincoln.ts -i KeanuBush.ts -map 0:0 -map 0:1 -map 1:0 -map 1:1 -map 2:0 -map 2:1 -program "program_num=1:title=Ram:s0:s1" -program "program_num=2:title=Linc:s2:s3" -program "program_num=3:title=Bush:s4:s5" -report -f mpegts out5.ts
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Splitting the commandline.
Reading option '-i' ... matched as input url with argument 'KeanuRambo.ts'.
Reading option '-i' ... matched as input url with argument 'KeanuLincoln.ts'.
Reading option '-i' ... matched as input url with argument 'KeanuBush.ts'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:1'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2:0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '2:1'.
Reading option '-program' ... matched as option 'program' (add program with specified streams) with argument 'program_num=1:title=Ram:s0:s1'.
Reading option '-program' ... matched as option 'program' (add program with specified streams) with argument 'program_num=2:title=Linc:s2:s3'.
Reading option '-program' ... matched as option 'program' (add program with specified streams) with argument 'program_num=3:title=Bush:s4:s5'.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'mpegts'.
Reading option 'out5.ts' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url KeanuRambo.ts.
Successfully parsed a group of options.
Opening an input file: KeanuRambo.ts.
[NULL @ 0x7fc093801000] Opening 'KeanuRambo.ts' for reading
[file @ 0x7fc091d00de0] Setting default whitelist 'file,crypto'
[mpegts @ 0x7fc093801000] Format mpegts probed with size=2048 and score=50
[mpegts @ 0x7fc093801000] stream=0 stream_type=2 pid=100 prog_reg_desc=
[mpegts @ 0x7fc093801000] stream=1 stream_type=3 pid=101 prog_reg_desc=
[mpegts @ 0x7fc093801000] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:2
[mpegts @ 0x7fc093801000] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
[mpegts @ 0x7fc093801000] After avformat_find_stream_info() pos: 0 bytes read:2576528 seeks:2 frames:346
Input #0, mpegts, from 'KeanuRambo.ts':
  Duration: 00:03:26.31, start: 1.422422, bitrate: 2569 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100], 152, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #0:1[0x101](und), 194, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, s16p, 384 kb/s
Successfully opened the file.
Parsing a group of options: input url KeanuLincoln.ts.
Successfully parsed a group of options.
Opening an input file: KeanuLincoln.ts.
[NULL @ 0x7fc09280be00] Opening 'KeanuLincoln.ts' for reading
[file @ 0x7fc091f00000] Setting default whitelist 'file,crypto'
[mpegts @ 0x7fc09280be00] Format mpegts probed with size=2048 and score=50
[mpegts @ 0x7fc09280be00] stream=0 stream_type=2 pid=100 prog_reg_desc=
[mpegts @ 0x7fc09280be00] stream=1 stream_type=3 pid=101 prog_reg_desc=
[mpegts @ 0x7fc09280be00] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:2
[mpegts @ 0x7fc09280be00] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
[mpegts @ 0x7fc09280be00] After avformat_find_stream_info() pos: 0 bytes read:2543760 seeks:2 frames:346
Input #1, mpegts, from 'KeanuLincoln.ts':
  Duration: 00:03:26.31, start: 1.422422, bitrate: 2560 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #1:0[0x100], 152, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #1:1[0x101](und), 194, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, s16p, 384 kb/s
Successfully opened the file.
Parsing a group of options: input url KeanuBush.ts.
Successfully parsed a group of options.
Opening an input file: KeanuBush.ts.
[NULL @ 0x7fc092833a00] Opening 'KeanuBush.ts' for reading
[file @ 0x7fc091f00b00] Setting default whitelist 'file,crypto'
[mpegts @ 0x7fc092833a00] Format mpegts probed with size=2048 and score=50
[mpegts @ 0x7fc092833a00] stream=0 stream_type=2 pid=100 prog_reg_desc=
[mpegts @ 0x7fc092833a00] stream=1 stream_type=3 pid=101 prog_reg_desc=
[mpegts @ 0x7fc092833a00] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:2
[mpegts @ 0x7fc092833a00] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
[mpegts @ 0x7fc092833a00] After avformat_find_stream_info() pos: 0 bytes read:1626256 seeks:2 frames:346
Input #2, mpegts, from 'KeanuBush.ts':
  Duration: 00:03:26.31, start: 1.422422, bitrate: 1549 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #2:0[0x100], 152, 1/90000: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #2:1[0x101](und), 194, 1/90000: Audio: mp2 ([3][0][0][0] / 0x0003), 44100 Hz, stereo, s16p, 384 kb/s
Successfully opened the file.
Parsing a group of options: output url out5.ts.
Applying option map (set input stream mapping) with argument 0:0.
Applying option map (set input stream mapping) with argument 0:1.
Applying option map (set input stream mapping) with argument 1:0.
Applying option map (set input stream mapping) with argument 1:1.
Applying option map (set input stream mapping) with argument 2:0.
Applying option map (set input stream mapping) with argument 2:1.
Applying option program (add program with specified streams) with argument program_num=1:title=Ram:s0:s1.
Applying option program (add program with specified streams) with argument program_num=2:title=Linc:s2:s3.
Applying option program (add program with specified streams) with argument program_num=3:title=Bush:s4:s5.
Applying option f (force format) with argument mpegts.
Successfully parsed a group of options.
Opening an output file: out5.ts.
[file @ 0x7fc091c0f8a0] Setting default whitelist 'file,crypto'
[AVIOContext @ 0x7fc091c0fd40] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x7fc091d00f20] Statistics: 2576528 bytes read, 2 seeks
[AVIOContext @ 0x7fc091f00f20] Statistics: 2543760 bytes read, 2 seeks
[AVIOContext @ 0x7fc091f03d60] Statistics: 1626256 bytes read, 2 seeks

Share full log.

Content updated (log was 1.7MB) to just use same video and now the log is much cleaner.

This should work.
ffmpeg -i KeanuRambo.ts -i KeanuLincoln.ts -i KeanuBush.ts \
-map 0:0 -map 0:1 -map 1:0 -map 1:1 -map 2:0 -map 2:1 \
-program program_num=1:title=Ram:st=0:st=1 -program program_num=2:title=Linc:st=2:st=3 \
-program program_num=3:title=Bush:st=4:st=5 \
-f mpegts out5.ts


text:
How to add Photos in background to a Video using FFMPEG
I saw one app and I'm willing to add photos similar to how that app does.
Following is the screenshot of the video that I got from that app:
I'm not sure what is the black part in there on the right-hand side.
Below is the end result after a photo has been added:
Now the photo that I've added seems like it's behind the video, so any help how to do that and an answer to what the black part the right side of the video is, then it will be great and highly appreciated.

I'm going to call the video/image on top, overlay, and the bottom one, the photo.
ffmpeg -i photo -i overlay
       -filter_complex "[1]split=2[color][alpha];
                        [color]crop=iw/2:ih:0:0[color];[alpha]crop=iw/2:ih:iw/2:0[alpha];
                        [color][alpha]alphamerge[ovrly];
                        [0][ovrly]overlay=0:0" output.jpg

I assume that if the resolution of the video is WxH then the resolution of the photo is W/2 X H. If it's not, add a crop filter to the photo and then use that result in the overlay.
If the resulting video has uneven dimensions, add a scale filter after the overlay to rectify that: [0][ovrly]overlay=0:0,scale=2*trunc(iw/2):2*trunc(ih/2)

If you have a sequence of images of the same resolution, then you can use the concat demuxer.
First, create a text file,
file 'image1'
duration 2.0
file 'image2'
duration 4.0
file 'image3'
duration 2.0

Then,
ffmpeg -f concat -i text -i overlay
       -filter_complex "[0]fps=25[bg];
                        [1]split=2[color][alpha];
                        [color]crop=iw/2:ih:0:0[color];[alpha]crop=iw/2:ih:iw/2:0[alpha];
                        [color][alpha]alphamerge[ovrly];
                        [bg][ovrly]overlay=0:0,scale=2*trunc(iw/2):2*trunc(ih/2)" output.jpg

Comments are not for extended discussion; this conversation has been moved to chat.