text:
Tools for exploring .mov containers
As a novice what tools do experts suggest I use to get a technical understanding of .mov container files?
I'd like to know whats inside the container and how I can get the data out safely without reducing the quality. Ideally splitting it into the various media formats detected

If you just want to look inside a video file, check its individual streams and all metadata, you can use MediaInfo, which will show you everything there is to know about your file and the streams it contains.
If you want to extract, remux or reencode the video file's streams, you can use FFmpeg. If you are not comfortable using a command-line tool, there are several GUI-based programs out there (most of which are built around FFmpeg), such as XMedia Recode.

Thanks for responding, I had come across ffmpeg but wasn't sure how i needed to do first. Is it possible for a .mov to include multiple camera views of the same sequence and would mediainfo show me that?

It is possible, but I haven't come across such an arrangement. Each camera angle will be present as a distinct 'stream' or 'track'.

Mediainfo does show me the 4 video streams (ID 1,3,5,7) 4 audio streams  (ID 2,4,6,8) and a timecode stream inside 1 .mov file. Is it possible to split or export (forgive me I don't know the correct term to use) so I end up with right audio with the right stream in its own file. What do I do with the timecode stream?

You can also try out Atomic Dumpster. It will let you view the structure of a QuickTime file, viewing the data of the various tracks and the media.

Using ffmpeg, which numbers streams starting from 0, run
ffmpeg -i input.mov -c copy -map 0:v:0 -map 0:a:0 -map 0:d video-0.mov

to extract the first audio and video + timecode into a new MOV.
Repeat for other streams by incrementing the index numbers after a and v. Retain the -map 0:d. It will copy the timecode over into each split file you make.

Does it matter that my audio and video stream IDs don't match? Also can I export the timecode by itself and is there a value in having it as a standalone entity as in could i use it to create a database table with 1 row per timecode?

As in 0:v:0 paired with 0:a:2? No. They are independent and simply identify the stream to be mapped. The timecode really isn't a track. It's just a binary representation of the starting TC in seconds. The video editor/player then generates the number series as per the frame rate. Running ffprobe file.mov will show that starting value.

How do I know which audio track should be matched with each video if the id codes can't be used? Is it a case of trail and error or exporting all the video streams then all the audio streams and manually matching ?

I guess so. I would assume the person or s/w which created the file arranged the streams logically, so try first with matching IDs i.e. 0:v:2 and 0:a:2.


text:
Adobe Premiere Pro and Media Encoder crash on encoding
Well, I can't export anything, Premiere Pro or Media Encoder keep crashing.
Crashes are quite unexpected, after several minutes or several hours, without any explanations: "Adobe [--] stopped working".
Here is what I tried so far :

Gather all the medias in the same folder/sub-folders (nothing is on an other drive)
Reinitialize settings
Match sequence settings with imported videos settings
Pre-render effects (and use the pre-rendered files for export)
Copy-paste the whole sequence in a new one
Delete all cached medias
Render without encoding (raw)

Still crashing, always...
EDIT: rendering all the sequence also crashes. I'm currently trying to render in->out and expand progressively the area to render...

Even with very short comps, say, 1-2 seconds?

Short export works fine. Tried 37 seconds

Have you tried setting the Mercury Rendering engine to software-only?  Probably won't help.

When reporting problems and seeking help, it's always useful to post basics of your working environment: hardware platform (including special hardware such as GPUs), OS platform, version number(s) of applications in question.

I have an Intel Core 2 Duo @ 3 Ghz, with 8 GB of RAM (6 reserved to Premier), and an AMD Radeon HD 6900.

Software rendering seems to be more stable so far. It was crashing after a few seconds with Mercury...

I'm having same problems with premiere 2016, i have noticed that some of my clips in my sequence turns to have some red lines in the middle" 2 or 3 in 3hr time line
i rendered all my sequence and send it to media encoder but after some time it will crush without any explanation. i have reset and send without changing anything from dvd settings' i thought it will work but nothing.
any help will be appreciated.

source: Stack Exchange

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

sort: votes


text:
Repairing videos producing reading errors
I have several videos which produce reading errors in ffmpeg, thus hindering me to play them in VLC (for example). Is there a way to either skip those problematic parts, or to fix them?
The exact error is:
[matroska,webm @ 0x3a13a20] Read error at pos. 11794050343 (0x2befaed27)
[NULL @ 0x3a18380] Unable to find a suitable output format for '2'
2: Invalid argument

generated by the command ffmpeg -v error -i "sample.mkv" -map 0:1 -f null - 2
The video itself has the following encoding (by mediainfo):
Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2h 1mn
Bit rate                                 : 10.8 Mbps
Width                                    : 1 920 pixels
Height                                   : 1 040 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.227
Stream size                              : 8.95 GiB (81%)
Writing library                          : x264 core 59 r819M 0414d78
Encoding settings                        : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=6 / me-prepass=0 / brdo=1 / mixed_ref=1 / me_range=12 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=4 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=10849 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=1.00 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=24000 / vbv_bufsize=9000 / ip_ratio=1.10 / pb_ratio=1.10 / aq=2:1.00
Language                                 : English
Default                                  : Yes
Forced                                   : No

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Codec ID                                 : A_AC3
Duration                                 : 2h 1mn
Bit rate mode                            : Constant
Bit rate                                 : 640 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 555 MiB (5%)
Title                                    : eng
Language                                 : English
Default                                  : No
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Mode                                     : 16
Format settings, Endianness              : Big
Codec ID                                 : A_DTS
Duration                                 : 2h 1mn
Bit rate mode                            : Constant
Bit rate                                 : 1 510 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 1.28 GiB (12%)
Title                                    : ger
Language                                 : German
Default                                  : Yes
Forced                                   : No

Moving to another location does not fix the error.

How can we reproduce the issue?

By using one of my defect files (as far as I know at the moment). Is there another way to produce that error?

You didn't actually show the exact error, so I'm not sure what the error is. Can you provide a short sample input file?

I added the error, should I just cut the sample with the error out of the full file? If yes, which program can be used for that?

You need to show the complete console output, not just an excerpt. I don't know what video format is contained in your file, so cutting it with dd may result in a (even more) broken file, or it may work.

@LordNeckbeard: That is the whole console output I get, nothing more.

Why is the 2 there at the end? If it's for stderr, you aren't redirecting it anywhere.

I would determine if this is a corrupt file or a corrupt disk. A "read error" sounds like a bad disk to me. If that is the case you probably have bigger problems than reading that video file. I would suggest doing a complete backup of the disk. You can use dd_rescue (or ddrescue) for that purpose which doesn't stop on bad sectors but makes a copy of everything readable on the disk. Once you have got that done, you can take care of the video file on the backup disk.
http://www.garloff.de/kurt/linux/ddrescue/
https://www.gnu.org/software/ddrescue/
If the disk is on the verge of failing, the worst you can do is continuing  to use it  since it may stop working completely anytime soon.

I checked the disk using badblocks, and it showed no errors, thus I assume that the disk is still ok. How can I fix the corrupt file then?

did you check SMART results as well? See this thread: https://lime-technology.com/forum/index.php?PHPSESSID=4759db970e485a7c450a3dfd7e41ed9d&topic=23792.0

If you are positive there is no read errors on the disk, I'd try to make a copy of the file and see how that copy behaves in VLC.

Unfortunately the external hard disk does not support SMART, at least according to gnome-disks

The copy does not behave differently, it still freezes at the same point

But unless I missed something, that means your disk has read errors. If you don't care about making a backup of the entire disk, try to use dd_rescue or ddrescue on that file only.

Is there a way to test the disk (non-destructively) if there are read-errors except with badblocks which did not report any errors?

I guess you cannot read out the SMART stats because the disk is in an external enclosure? If so, you could take out the disk from the enclosure and connect it internally to your computer. Unless the drive is older than 10years or so, I would assume it has smart internally but you cannot access it?

The disk itself reports that it is unable to use SMART, but that could also be related to the USB connection. I will try that at a second computer.

I've recently had some success with this problem.   In my case I was receiving the error converting from MKV to MP4.  The cause of the issue was that the process that created the MKV file failed silently when I ran out of disk space so the source feed to ffmpeg was already corrupt; the error was indicating there was no data to convert beyond that point in the source.
Fortunately I was able to recreate the MKV from it's source (after freeing up disk space of course).
Further, as mentioned in Mulvya's comment on your question, the "2" here seems to be what the command is complaining about.

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


text:
Please explain video bit rate further
I don't understand this video on "What is bit rate"

. I want it explained more. First I need you to define bit rate. And how compressing comes along it? What's that 'two frames containing one color, the colors are treated as one color'? Is IT the compressing? And, what if a video has only 1 Mbps bit rate? And, how does increasing resolution while keeping bit rate constant, make the image quality worse? And how does increasing frame rate while keeping bit rate constant, make image quality worse?
Please explain those....

While Michael has actually done a great job answering all 7 of your questions, in future please only ask one question in a post!

Per the OP's request, I will attempt to explicitly answer his single-sentence questions.
First I need you to define bit rate.
Bit rate is the number of bits per second used to encode a video stream (which itself has an implicit data rate based on the number of pixels (width x height), the pixel depth (dynamic range, color gamut), and frame rate).  Here is an example: 1080p24 HD video feeding a 8-bit color (RGB) display theoretically has a data rate of 1920x1080 x 24 bits x 24 frames per second = 149.299200 megabytes per second, or 1.194393600 gigabits per second.  Not all HD video is created equal: the full data rate (1.194 Gbps) means every pixel gets every bit fully represented.  But it is quite common to encounter 4:2:2 video (which cuts the data rate by a third) and 4:2:0 video (further reducing data rates).  You can read about these here: https://en.wikipedia.org/wiki/Chroma_subsampling
And how compressing comes along it?
This sentence is not grammatically meaningful.  I'm guessing the question is "how is the compression rate related to the bit rate?" in which case the answer is the compression rate is the ratio of the data rate to the bit rate.  If the data rate is 1.2Gbps and the bit rate is 28Mbps, the compression ratio is 43 (rounding up).
What's that 'two frames containing one color, the colors are treated as one color'?
This single sentence contains two completely separate ideas.  "Two frames containing one color" likely means that for a region of the image (which may be only a pixel, or which may be a group of pixels), the color of the region is the same from frame to frame.  In this case, one need not explicitly encode all of the region for both frames, but one can describe the region for one frame and then reference it in the other frame.
The completely different idea is that multiple colors that we perceive to be very close, either visually or spatially, can be merged into a single color covering a larger region.  A blue sky might have millions of very slightly different pixels, but visually they may be represented by perhaps a few dozen different colors of blue.  If this is done poorly, we perceive banding of colors, loss of detail, or other artifacts.
Is IT the compressing?
It is one of the means of preparing the image to be more effectively compressed, but not the only one.  Said another way...Compressing video by decimating chroma information is one way to reduce video data, but that's often the start, not the end of the compression story.  Consumer cameras tend to record video at a rate of about 28 megabits per second.  Some, like the GH4, can do up to 200 megabits per second.  Those are the bitrates of the compressed video codec.
And, how does increasing resolution while keeping bit rate constant, make the image quality worse?
The bitrate defines how many bits per second you can use to create the illusion of displaying the full data rate of the video format you are trying to represent.  The more resolution you have, the more bits you will need to use to represent details that can be discerned in that high-resolution image.  The more you try to preserve color fidelity across the whole 24-bit color gamut, the more bits you will need for that, too.  It is obviously impossible to perfectly cover every pixel in a 1.2Gbps data stream with a 28Mbps bit rate.  In fact, you cannot cover even 3% of it perfectly!  But the human eye is easily fooled: if 30 consecutive frames are identical, a clever encoder can spray out a vague outline in the first frame and then successively refine each subsequent frame with more spatial and chroma resolution until, after the 30th frame, what is on the screen is indeed a perfect representation of the unchanging image.
In the real world, video doesn't stay completely still for seconds on end, but neither does it meaningfully change at every pixel location at every frame.  (If it did, images would look a lot more like static than anything we could make sense of.)  One can measure how much meaningful change exists between frames on average, and how much one can tolerate approximations that allow the same pixel to be treated as the same value between the two frames without destroying the integrity of the perceived image.  That can then be calculated as a bit rate.
The bottom line (and answer to the above question) is that increasing resolution while keeping the bit rate constant magnifies compression artifacts without increasing actual image quality.  The result is a perceived loss of image quality.
And, what if a video has only 1 Mbps bit rate?
Alternatively, you can define a bit rate, such as 1Mbps, and you can go about trying to encode the change from one image to another by identifying what parts of the image are most important, visually, and then using your bit rate budget to allocate pixel data to those areas first while leaving the rest of the image unchanged.  There will come a point when things fall apart: there's just not enough bit rate to faithfully represent or follow the changes of the original data.  But obviously if you need to preserve a lot of spatial resolution, you need lots of bits to keep that info correct.  If you don't have the bits, you fill in the holes with guesses, and too many wrong guesses makes the resolution suffer.
And how does increasing frame rate while keeping bit rate constant, make image quality worse?
Increasing the frame rate while keeping the bit rate constant means that more individual images must be constructed from a constant amount of information.  If you have a 1Mbps bit rate and you try to show 12 frames per second, you have a budget of 83kb to form each frame.  If you keep the bit rate constant and increase the frame rate to 120 frames per second, you have a budget of 8kb to form each frame.  They human eye can do a certain amount of temporal integration, so there are cases where it is possible to trade off spatial resolution (fewer bits per frame) for temporal resolution (more frames per second), but there are limits.  Once the limit is exceeded, perceived image quality suffers.

Thanks for your answer but, I've put what I don't understand as single sentence questions. So, if you could explain me the subject according to the those single sentence questions, it would be great...


text:
What are these rectangular patterns in the frame?

This frame from a video about a camera, has, as you can see, a pattern made up from rectangular boxes.
Is it just the pixelation? Or something else?
*you can see the video by that frame here

This kind of artefact is usually known as "Blocking", and in this case, it's probably cased by YouTube's compression. This paper has more details: http://wavelab.at/papers/Unterweger13a.pdf See also http://forum.videohelp.com/threads/303003-How-to-reduce-blocky-artifacts-in-low-res-low-bitrate-video.

Those are compression artifacts, where the original video has been compressed and has lost data. Block-based coding for quantisation leads to artifacts like this, as the information depth in the image is too high to be successfully compressed at the level required by the lossy algorithm used. From that Wikipedia page:

Lossy data compression involves discarding some of the media's data so that it becomes simplified enough to be stored within the desired disk space or be transmitted (or streamed) within the bandwidth limitations (known as a data rate or bit rate for media that is streamed). If the compressor could not reproduce enough data in the compressed version to reproduce the original, the result is a diminishing of quality, or introduction of artifacts. Alternatively, the compression algorithm may not be intelligent enough to discriminate between distortions of little subjective importance and those objectionable to the viewer.

@DarkDust worded this well:

The part that actually leads to these visible blocks is the fact that for some compression algorithms, each frame is divided into smaller parts, so-called macroblocks, which are further divided into transform blocks. When the compression in two adjacent macro blocks is too far away from the original in different ways, they don't "fit" together at their border any more. It is this "not fitting together" that we see in the block artifacts


text:
Does and/or how chroma keyed image show on the studio cameras?

AFAIK, the Chroma key happens in the vision mixer or something?; after the camera picked up the green colored cloth(?) then the vision mixer applies the CGI images to the video.
Sorry for confusing you guys..
This is a snapshot from a video about Chroma keying. Though the adjacent scenes doesn't tell exactly that what in this frame is a green screening too, I thought it is because of the video's topic.
So, I need to know if this is possible?

Is this meant to be a question, are you looking for information, advice, etc, the image you have provided and the question (what seems to be half a question) dont make sense as there is no greenscreen in the image. please be more specific and clear so to what you are asking or wanting to know

I agree that the picture you have shows on set displays, not examples of chroma keying. On set displays are much more common than chroma keying for most news environments. However, if you were using chroma keying in a professional video environment, see below.

You are correct that the chroma key is typically performed in the vision mixer/video switcher. In order to assist camera operators in framing shots around chroma keys (and other downstream effects like DVE moves, lower thirds, and over the shoulder graphics), professional studio cameras have one or more program returns that allow the vision mixer/technical director or engineer to route an appropriate composited video source back to the camera. The camera operator then presses a button to select the return instead of the through the lens video.
On productions that don't have too many different framing setups, you can also go low-tech and use a grease pencil or apply tape to mark framing areas directly on the viewfinder. Some cameras also have simple box generators that can also mark framing references or safe areas.

And what's that feature (button switching to chroma key return signal) called?

As mentioned in the answer, it is a program return.

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


text:
Compensate or fix VHS artefacts in areas of high contrast
Take a look at the man in a tuxedo. To the right of the black leg, there is a bright vertical line.
Is there some kind of filter in something like VirtualDub or Vapoursynth which could improve this aspect of the picture?

.... crickets..

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


text:
Starter Camera(s)
I'd like to get into creating amateur videos (think YouTube).  I'd like to have a few cameras to set up around a room to capture several angles.
I don't know anything about cameras and would like some advice for getting into this as a hobby.
Are there any starter cameras you would recommend?  I was thinking of getting a better camera as the primary camera and a lower-end camera for the other angles.  Would there be problems with this?
I'd also like to have a wireless mic (or boom mic) that I can connect to the primary camera.
Any suggestions or direction would be greatly appreciated.  Thanks in advance!
Edit:
To give more details about my intended use.  A good example of the need for multiple camera angles is for showing people playing a board game.  One would be a wide angle of the people to discuss tactics.  An overhead camera would be fixed to show the board.

Can you say more about why you think you need coverage for multiple angles?

Do you plan to use the cameras mostly to shoot other subjects (such as cats and dogs) or do you plan to mostly include yourself in the shots (such as unboxing or demonstrations)?

Interesting challenge!  Here's what comes to mind:
The Board Camera: if your game is Go, a camera placed 3 feet above the board should give a relatively accurate and undistorted overview of the game.  If your game is Chess, with 2.25" squares, and kings that range from 3.75-4.25", then near the edges, the tops of the taller pieces could appear to cross the line of an adjacent square that, from the camera's perspective, are "behind" the piece.  You must decide whether having all the outer pieces appearing to tilt up to 17 degrees away from the camera looks distracting.  If you can get the camera 6' above the board, this perspective distortion is cut in half and each piece will appear to occupy only its own square.  And if you want to fix the perspective distortion this way, you'll likely need a telephoto lens to fill your frame with an 18"x18" board.
Placing a camera high above a board requires some kind of support platform.  If you cannot screw things into your ceiling, a C-stand, a boom arm, and a heavy sandbag should give you a stable platform where you can then mount the camera using an adjustable ball head.  This Matthews platform may be overkill, but don't underestimate how much support you need when lever arms get long.
Good external microphones can pick up speech clearly to about 3', though 18" is better for them.  You can likely rig two microphones from the aforementioned camera platform so that they are close enough to the players and out of the field of view of the board camera.  The cost of such grip equipment might bother you at first, but if you don't get good sound, you will quickly regret all the other money you spent on the rest of your gear.
I think you definitely want to shoot the board in FullHD (1080p) because when action is limited to a quarter of the board, you'll want to digitally crop in to see more detail.  A 2:1 digital zoom, which shows one quadrant of the board, would have 540p resolution--better than SD, and good enough for the YouTube crowd.
I know you didn't ask about lighting, but it does inform your camera choices in multiple ways.  In the cinema world, there's the "180 degree" rule, which basically says you should keep all your cameras on the same side of an imaginary 180 degree line.  Doing so ensures that the cameras see the same key lighting (which is what makes faces pretty, or at least visible) and the same rim lighting (which is what makes profiles pop from the background).  You probably won't start out worrying about 3-point lighting, but if you have any success at all, it's the one thing that can make your hundred dollar cameras look like thousand dollar cameras, and your thousand dollar cameras look like $10,000 cameras.  Keeping that in mind, you want your side-view cameras to all be on the same side.
If you are the sole camera operator, you can manually cover the rest of the game from a tripod with a fluid head.  Speaking from experience, whenever one manually follows the action, action inevitably happens somewhere else, or in a slightly wider or more narrow view than the one selected.  Additional static cameras can provide security against that.  A static wide camera gives you the freedom to roam with a view toward details.  A pair of static cameras looking at the players from across the board gives you the freedom to focus on actual hands-on game play.  Etc.
Now, for camera suggestions, I would recommend getting an actual camcorder rather than a photo camera with video functions.  The latter are restricted, for tax reasons, to 29 minutes of continuous recordings.  Unless you are recording speed matches, you'll want longer continuous run times.  I also recommend getting cameras that are more similar to one another than different.  The board camera probably needs to be the highest resolution, but the cameras that have humans in the view need the best color (because our eyes will tolerate wrongly-colored game pieces, but not wrongly colored hands and faces).  In the end, they probably need to both be about the same level of quality.
Now it comes down to numbers.  I cannot make a more specific recommendation without knowing the budget, don't scrimp on sound, lighting, and grip.  Overspending on cameras and underspending on other stuff is like buying a car without being able to afford gas or maintenance.  Hopefully the above considerations give you a much better picture of how to narrow down your selections and execute a plan.


text:
what graphics card features effect NVIDIA NVENC hardware encoding speed?
I have a web project I am working on that requires transcoding of multiple short video clips (6-10 seconds) uploaded by users into a web friendly H.264 format on my linux server.  I have been able to enable NVIDIA NVENC hardware acceleration with ffmpeg and a 4 year old GeForce GTX 670, and I'm getting hardware encoding speeds twice that of my software encoding (Xeon E5-1620 v3).  With an $800 video card budget, I'd like to be able to transcode these short video clips as fast as possible because I will have multiple users uploading them simultaneously.
The NVENC engine does have licensing limitations when implemented on a consumer level NVIDIA card: only 2 video transcoding threads can be run simultaneously, even if you have multiple cards.  If I decide to go with one of the pricy quadro card line, then I am only limited by the other hardware elsewhere in my system in terms of how many threads I can run.  However, with my specific project I'm a lot better off transcoding these clips in a series rather than parallel because the clips will be viewed in the order they're uploaded. Clips later in the queue can be transcoded as earlier clips are viewed. If clips are transcoded in parallel on the same card, performance is inversely proportional to the number of simultaneous threads.
Having stated this, my plan is to set up two NVIDIA cards and run a single thread on each one to maximize throughput.  The NVIDIA codec SDK is vague on NVENC performance difference between various cards, but it seems that there is a major difference between GPU generations Maxwell Gen 2> Maxwell Gen 1> Kepler.  I can find no reliable benchmarks for NVENC encoding (opposed to CUDA benchmarking, which is easy to find).
In the absence of hard benchmarking data comparing various cards, what features of the currently available cards would have to largest impact on single thread NVENC encoding speed?  Since the actual GPU is not utilized fully during transcoding, does GPU and memory clock speed affect this function much?  I have $400/card to spend, but if the entry level Maxwell Gen 2 GeForce GTX 960 is as good as the more recent cards, then I will put extra money into other aspects of the server (CPU/RAM/SSD etc).  I know this might seem like a subjective question (what's best), but I am trying to make a self-educated guess based on an understanding of the transcoding hardware.

I just wanted to say that I love this post and hope for an equally interesting answer.
I wonder why the GPU doesn't get utilized completely, is it lack of optimization? A bottle neck somewhere else in the pipeline?

From what I've read there is a completely separate NVENC chip doing most of the work, so my guess would be that it is bottleneck.  NVIDIA is quite vague in explaining it for some reason.

Will you 1+ this question to bump it up?

There are two main features in NVIDIA NVENC encoding:

Video memory if you need to transcode many streams.
NVENC SIP - than better this SIP than better encoding performance
is. It depends on GPU. You can find the best explanation related GPU
and NVENC SIP generation on Wikipedia website. Maxwell Gen 2 is the best at the moment(for 2016).

According to the license limitation: it's possible to run only 2 encoding threads simultaneously on the consumer level NVIDIA cards (any GTX card). It's regulated on the driver level, however it’s possible to remove this limitation. In this case, the value of maximum transcoding threads will depend on  video memory size and video engine utilization.
Video memory size which is necessary for one transcoding stream is various and depends on a video card model. For encoding SD stream on QUADRO K4200(4GB) is necessary 100 MB of video memory, but for encoding the same stream on GTX 980TI(6GB) we need 170MB.
My results in transcoding SD sources in real time are:

QUADRO K4200(4GB): one transcoding thread costs 100 MB and we can run in parallel about 36 threads, but the bottleneck is the video engine utilization. I can run about 30 parallel threads with "-preset hp -vcodec nvenc_264"
GTX 980TI(6GB): the bottleneck is the video memory. I can run about 32
threads (32*170=5440) in parallel. I did it for my education, of
course. But the video engine results is better then on K4200 in 2.5
times. These 32 threads with "-preset slow -vcodec nvenc_264 -vf
yadif=0" and video engine utilization are only 80%.
I also tested it on GTX 660(2GB, Maxwell Gen 2). It was about 15
parallel threads due to video memory.

My conclusion(for 2016): If you need to transcode no more than 2 threads in parallel, then  GTX 960 is a good variant. Also,  you can save some money to another hardware and look for another video card with Maxwell Gen1. If you go to the hack way, then GTX 960 is a good variant but only with 4GB of video memory.
UPDATE FROM 2018:
Nowadays the situation in this area has changed in  better direction. The card with the best encoder is Tesla V100, but it's too expensive. The best work variant is the video cards based on Pascal CHIPs. If you prefer the hack way then GTX1050TI(4GB), it will be perfect for your budget in 800$. Otherwise, Quadro P2000 doesn’t have license limitations and also very comfortable for the same budget.

Thanks for your answer.  After some testing I realized that the overhead time it takes to initiate the transcoding becomes a huge issue with multiple short clips.  Have you experienced this?  I'm seeing maybe 1s/clip overhead.  When my clips take average 1s/clip to transcode using CPU only, the GPU benefit vanishes.  Thoughts?

Unfortunately, I don't have experience with multiple short clips.
One idea: you need maintain maximum possible NVENC threads. It will be faster then on CPU. For this you need to use variant with many transcoding streams in parallel for this need to buy QUADRO video card or go to the hack way.

Then you can to find out a maximum possible NVENC threads and  always maintain it or you can try to run new FFmpeg instance if the maximum number of streams will be exceeded then will be occurs the following error: "Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height".

Unfortunately the clips will be uploaded sporadically, sometimes a bunch, sometimes a few.  I'm leaning towards a CPU only solution as this seems to be fool proof.

You can try QuickSync in this case:
http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/quicksync-video-ffmpeg-install-valid.pdf

Have you any experience with QS?  I've been looking for overhead/delay examples with QS to no avail.

Unfortunately, I haven't real work experience with QS, but some sources from Intel says what QT faster than NVENC in a four times.

I have an i7 3770k in a Hackintosh.  Guess I'll boot from a live USB and try running QS on it to see how it fares.  I hope the Broadwell-E CPUs to be released in June will support QS.

At the very top of your $800 budget, you can get a Quadro M4000 that does NOT have the license limitation of 2 concurrent transcodes. We use these cards to transcode 5-10 incoming live streams to 2-3 output bitrates.

Can you comment on the time it takes to initiate a transcoding steam?  On my consumer card it was about a full second.  Since I have dozens of short clips coming in at the same time, a one second overhead per clip ends up costing me dearly.


text:
How to stop ffmpeg from interlacing when converting from m2ts to mkv
I have a m2ts video file that contains a h264 video stream and an ac3 audio stream. The quality is not the best, but it is okay, but converting it with ffmpeg without any additional options makes the video interlaced and very ugly with that:
ffmpeg -i input.m2ts output.mkv

Output:
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 6.2.1 (GCC) 20160916 (Red Hat 6.2.1-2)
  configuration: --arch=x86_64 --bindir=/usr/bin --datadir=/usr/share/ffmpeg --disable-debug --disable-static --disable-stripping --enable-avfilter --enable-avresample --enable-bzlib --enable-cuda --enable-cuvid --enable-libnpp --enable-doc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gpl --enable-iconv --enable-libass --enable-libbluray --enable-libcdio --enable-libdc1394 --enable-libebur128 --enable-libfdk-aac --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libkvazaar --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxvid --enable-libzvbi --enable-lzma --enable-nonfree --enable-openal --enable-opencl --enable-nvenc --enable-opengl --enable-postproc --enable-pthreads --enable-sdl2 --enable-shared --enable-version3 --enable-x11grab --enable-xlib --enable-zlib --extra-cflags='-I/usr/include/nvenc -I/usr/include/cuda' --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --prefix=/usr --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  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
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, mpegts, from 'input.m2ts':
  Duration: 01:15:49.44, start: 0.984822, bitrate: 19636 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 384 kb/s
File 'output.mkv' already exists. Overwrite ? [y/N] y
[libx264 @ 0xf21240] using SAR=1/1
[libx264 @ 0xf21240] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0xf21240] profile High, level 4.0
[libx264 @ 0xf21240] 264 - core 148 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=18 lookahead_threads=3 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, matroska, to 'output.mkv':
  Metadata:
    encoder         : Lavf57.56.100
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 1k tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.64.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: vorbis (libvorbis) (oV[0][0] / 0x566F), 48000 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc57.64.101 libvorbis
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help

Additional options, like presets and crf did not change that and I could not find anything on the Internet except that ffmpeg is supposed to always use progressive unless told otherwise. I also tried hardware transcoding on my GPU, which made the transcode much much faster, but the result was about the same, still heavily interlaced video.
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i input.m2ts -c:v hevc_nvenc -preset slow output.mkv

Any idea what might be causing this and how to fix it? Adding -deinterlace helps with the interlacing, but makes the quality worse.

FFmpeg will not create interlacing unless told to do so. Show the full console output of your first command.

I added the output to the question.

The source is interlaced. To deinterlace it, you can use the yadif filter.
To use it with the default values:
ffmpeg -i input.m2ts -vf yadif=parity=auto output.mkv

But when watching the input file in VLC, the interlacing is not visible, when watching the output, it looks terrible. Could VLC be automatically deinterlacing the m2ts file but not the mkv produced by ffmpeg? Or why else would the results look like that?

Since source contains interlaced field order, VLC can display it with  correct deinterlacing. When converting without a filter, ffmpeg will mark the output as progressive, but it won't actually have been deinterlaced.

@Gyan, that comment should be in the answer, it provides a good explanation of what's going on

I get Unable to find a suitable output format for 'yadif=parity=auto' when trying this.

That's a syntax error - double check all arguments and - in front of option names.

You can try deinterlacing it at the decoding step with the following command, via the CUVID deinterlacer:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 2 -drop_second_field 1 \
-i input.m2ts -c:v hevc_nvenc -qp:v 19 -rc:v constqp \
-tune:v hq -preset:v p7 output.mkv

Or better still, the yadif_cuda filter, with NVDEC in use:
ffmpeg -threads 1 -hwaccel nvdec -hwaccel_output_format cuda -i input.m2ts \
-vf 'yadif_cuda=0:-1:0' -c:v hevc_nvenc \
-qp:v 19 -rc:v constqp -tune:v hq -preset:v p7 \
-b:v 0 output.mkv

Note that NVDEC is a true HWAccel, unlike CUVID.
Where possible, migrate from CUVID to NVDEC.
Or keep interlacing with the next command:
ffmpeg -i input.m2ts -flags +ildct -c:v hevc_nvenc -preset:v p7 \
-tune:v hq -rc:v constqp -b:v 0 -qp:v 19 output.mkv

Note:

The changes above to the encoder, regarding presets, the tune value and selected rate control mode are required as the ffnvcodec package  and FFmpeg's NVENC wrapper implementations require valid values to be set. Failure to do so will result in an error: "The specified rc mode is deprecated. Use -rc constqp/cbr/vbr, -tune and -multipass instead" and your transcode will  fail.

Interlaced encoding for NVENC is not supported on Turing and above. To encode interlaced content as-is, use a Pascal GPU or lower.


text:
ffmpeg transcoding H264 interlaced and keep interlacing via H264_NVENC codec
I have the following interlaced H264 file:

Stream #0:0[0x335]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
  yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25
  fps, 50 tbr, 90k tbn, 50 tbc

And this is a frame from the source video:

When I use:

ffprobe -show_frames -i source.mpg | grep interlaced_frame

All frames are interlaced:
interlaced_frame=1
interlaced_frame=1
         .
         .
         .
interlaced_frame=1
I whant to transcode this file and keep interlacing and try to do it with the following command:

ffmpeg -i source.mpg -vcodec h264_nvenc -flags +ildct+ilme -acodec copy -f mpegts out.mpg

after transcode the same frame from the "out.mpg" file is looks like follow:

This is a console output:
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] decode_slice_header error
[h264 @ 0x2b546c0] no frame!
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] decode_slice_header error
[h264 @ 0x2b546c0] no frame!
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] decode_slice_header error
[h264 @ 0x2b546c0] no frame!
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] SPS unavailable in decode_picture_timing
[h264 @ 0x2b546c0] non-existing PPS 0 referenced
[h264 @ 0x2b546c0] decode_slice_header error
[h264 @ 0x2b546c0] no frame!
[h264 @ 0x2b546c0] mmco: unref short failure
    Last message repeated 1 times
[mpegts @ 0x2b4fcc0] PES packet size mismatch
Input #0, mpegts, from 'source.mpg':
  Duration: 01:00:00.95, start: 44661.794367, bitrate: 3336 kb/s
  Program 2101
    Metadata:
      service_name    : ?������ �����
      service_provider: TricolorTV
    Stream #0:0[0x335]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x336](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:2[0x337](rus): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Output #0, mpegts, to 'out.mpg':
  Metadata:
    encoder         : Lavf57.56.100
    Stream #0:0: Video: h264 (h264_nvenc) (Main), yuv420p, 720x576 [SAR 16:11 DAR 20:11], q=-1--1, 2000 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.64.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: -1
    Stream #0:1(rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 0x2b91360] reference picture missing during reorder
[h264 @ 0x2b91360] Missing reference picture, default is 2147483647
[h264 @ 0x2bf1f40] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x2bf1f40] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 0x2c7bf80] reference picture missing during reorder
[h264 @ 0x2c7bf80] Missing reference picture, default is 65736
[h264 @ 0x2c979e0] mmco: unref short failure
[h264 @ 0x2ccefa0] mmco: unref short failure
[h264 @ 0x2bf1f40] mmco: unref short failure
frame= 1232 fps=169 q=34.0 Lsize=   13581kB time=00:00:51.04 bitrate=2179.7kbits/s speed=6.99x

$ffprobe -i out.mpg
  Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 25 tbr, 90k tbn, 50 tbc

But when I tried the same command with libx264 codec everythin looks fine:

ffmpeg -y -i source.mpg -vcodec libx264 -flags +ildct+ilme -acodec copy -f mpegts libx264_out.mpg

And console output:
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] decode_slice_header error
[h264 @ 0x22ef6c0] no frame!
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] decode_slice_header error
[h264 @ 0x22ef6c0] no frame!
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] decode_slice_header error
[h264 @ 0x22ef6c0] no frame!
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] SPS unavailable in decode_picture_timing
[h264 @ 0x22ef6c0] non-existing PPS 0 referenced
[h264 @ 0x22ef6c0] decode_slice_header error
[h264 @ 0x22ef6c0] no frame!
[h264 @ 0x22ef6c0] mmco: unref short failure
    Last message repeated 1 times
[mpegts @ 0x22eacc0] PES packet size mismatch
Input #0, mpegts, from 'source.mpg':
  Duration: 01:00:00.95, start: 44661.794367, bitrate: 3336 kb/s
  Program 2101
    Metadata:
      service_name    : ?������ �����
      service_provider: TricolorTV
    Stream #0:0[0x335]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x336](rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:2[0x337](rus): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
[libx264 @ 0x2332720] interlace + weightp is not implemented
[libx264 @ 0x2332720] using SAR=16/11
[libx264 @ 0x2332720] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x2332720] profile High, level 3.0
Output #0, mpegts, to 'libx264_out.mpg':
  Metadata:
    encoder         : Lavf57.56.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 720x576 [SAR 16:11 DAR 20:11], q=-1--1, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.64.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(rus): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[h264 @ 0x2327140] reference picture missing during reorder
[h264 @ 0x2327140] Missing reference picture, default is 2147483647
[h264 @ 0x23757e0] mmco: unref short failure
    Last message repeated 1 times
[h264 @ 0x23757e0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[h264 @ 0x2415500] reference picture missing during reorder
[h264 @ 0x2415500] Missing reference picture, default is 65736
[h264 @ 0x2430f60] mmco: unref short failure
[h264 @ 0x2468520] mmco: unref short failure
[h264 @ 0x23757e0] mmco: unref short failure
[mpegts @ 0x22eacc0] PES packet size mismatchme=00:59:59.40 bitrate=1368.5kbits/s speed=4.97x
[h264 @ 0x2483fe0] error while decoding MB 16 8, bytestream -6
frame=89975 fps=124 q=-1.0 Lsize=  601846kB time=01:00:00.68 bitrate=1369.3kbits/s speed=4.97x

$ffprobe -i libx264_out.mpg
  Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(top first), 720x576 [SAR 16:11 DAR 20:11], 25 fps, 25 tbr, 90k tbn, 50 tbc

How to correct transcode H264 file to H264 and keep interlacing via h264_nvenc codec?

The output is flagged as interlaced and with the same order as source. The output screencap looks like the field pair mismatch in your player, or ffmpeg dropped frames during encode. What does the console output say?

@Mulvya thank you for the help! I updated the question the problem in nvenc encoder. Please check this issue. Have you any ideas?

@Mulvya As I understand from your post on ffmpeg forum http://ffmpeg.gusari.org/viewtopic.php?f=11&t=3078 ffmpeg is not supported interlaced encoding via nvenc. Is this correct at the moment for ffmpeg 3.2 and nvenc sdk 7 ?

It's an issue with new video drivers. Everything is fine with video driver 361.28 and lower.
I already sent this issue to NVIDIA Support with Reference Number 161118-000164
UPDATE: This issue has been resolved from the 375.39 driver. It allows keep interlacing on Pascal 10x video cards.


text:
hardware cuda decoding error
Please see my input udp stream information:

ffprobe udp://IP:PORT

Input #0, mpegts, from 'udp://IP:PORT':
  Duration: N/A, start: 29796.225911, bitrate: N/A
  Program 16
    Stream #0:3[0x641]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:5[0x642](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s (clean effects)
  Program 39
    Stream #0:7[0xf3d]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:8[0xf3e](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s (clean effects)
  Program 11
    Stream #0:2[0x13ed]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:6[0x13ee](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s (clean effects)
  Program 3
    Stream #0:9[0x10ce]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:4[0x10cf](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 96 kb/s
  Program 1
    Stream #0:0[0x1006]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1007](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 256 kb/s

I want to decode the video stream (Stream #0:0[0x1006]) with Program id 1  And doing it with the following command:

ffmpeg -analyzeduration 2G -probesize 11M -y -hwaccel cuvid -c:v
  h264_cuvid -i udp://IP:PORT -map
  0:#0x1006 -f rawvideo cuda_decoded.yuv

Please see the log:
[mpegts @ 0x2351d60] decoding for stream 0 failed
Input #0, mpegts, from 'udp://IP:PORT':
  Duration: N/A, start: 30271.455156, bitrate: N/A
  Program 16
    Stream #0:5[0x641]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:6[0x642](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s (clean effects)
  Program 39
    Stream #0:2[0xf3d]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:4[0xf3e](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s (clean effects)
  Program 11
    Stream #0:3[0x13ed]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt470bg, top first), 720x576 [SAR 12:11 DAR 15:11], 25 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0:8[0x13ee](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s (clean effects)
  Program 3
    Stream #0:7[0x10ce]: Video: h264 ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 16:15 DAR 4:3], 26.17 fps, 2.08 tbr, 90k tbn, 50 tbc
    Stream #0:9[0x10cf](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 96 kb/s
  Program 1
    Stream #0:0[0x1006]: Video: h264 ([2][0][0][0] / 0x0002), yuvj420p(pc, progressive), 16x32, 2.08 fps, 2.08 tbr, 90k tbn, 2514.04 tbc
    Stream #0:1[0x1007](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 256 kb/s
[h264_cuvid @ 0x240ca20] ctx->cvdl->cuvidCreateDecoder(&cudec, &cuinfo) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_cuvid) -> rawvideo (native))
Error while opening decoder for input stream #0:0 : Generic error in an external library

Also I can decode it without any problems with the next command:

ffmpeg -analyzeduration 2G -probesize 11M -y -i udp://IP:PORT -map
  0:#0x1006 -f rawvideo -pix_fmt yuv420p software_decoded.yuv

This issue affects only for some input streams.
Have you any ideas why this issue occurs and any recommendations how to fix it?

Try removing the -hwaccel cuvid and comment back if that works (for now, as a test)

Stream 0 is Stream #0:0[0x1006]: Video: mpeg2video for which you need -c:v mpeg2_cuvid

It's a bug in ffmpeg. When you explicitly specify a type of the HW acceleration (i.e. cuvid), ffmpeg assigns 0 to CUVIDDECODECREATEINFO::ulNumDecodeSurfaces and to CUVIDDECODECREATEINFO::ulNumOutputSurfaces. Consequently, a call to cuvidCreateDecoder fails, since NVDEC doesn't have surfaces to output decoded pictures.


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

ffprobe udp://IP:PORT

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

And run this command again:

ffprobe udp://IP:PORT

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

Please pay attention to FPS value. In the first execution it 24.67 and in the second it 24.58
I want to transcode this stream with the following command:

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

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

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

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

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

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

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

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

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

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

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

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

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

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


text:
Transcode FROM MPEG-DASH
I have an input MPEG-DASH stream and I want to transcode it.
First of all, need to decode it and then route an output to FFmpeg and encode it, but not have any ideas how to decode MPEG-DASH. Please advise how to transcode from DASH, any suggestion will be helpfull.

How's the media packaged?

@Mulvya I thinks it's mpegts. For example, need to dash transcode from this link: http://irtdashreference-i.akamaihd.net/dash/live/901161/bfs/manifestARD.mpd

@Mulvya Can you please explain how to determine the media package from MPEG-DASH? If the link, for example, is http://irtdashreference-i.akamaihd.net/dash/live/901161/bfs/manifestARD.mpd


text:
HLS to RTP multicast FFmpeg
I want to transmit HLS stream to RTP multicast via FFmpeg and use the following command:

ffmpeg -re -i HLSstream -c copy -f rtp_mpegts rtp://ip:port

But the output source сrumbles sometimes (I can't understand periodicity of it). I playing it via VLC and it shows the following errors:

[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS
  discontinuity (received 7, expected 2) for PID 0
[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS
  discontinuity (received 7, expected 2) for PID 4096
[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS
  discontinuity (received 8, expected 7) for PID 17
[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS
  discontinuity (received 2, expected 14) for PID 0
[00007fe17800b508] ts demux error: libdvbpsi error (PSI decoder): TS
  discontinuity (received 2, expected 14) for PID 4096

It works well when I copy the HLS stream to local file and play it.
Is the way to fix it? Or please advice other tool to transmit HLS to UDP.

RTP/UDP is a lossy protocol. You should expect lost packets.

ok. thanks! I routed output from ffmpeg to vlc2 with the following command:
ffmpeg -re -i HLSstream -c copy -f mpegts - 2>/dev/null | vlc - --ttl=255 -I dummy --sout '#rtp{access=rtp,mux=ts,dst=IP,port=PORT}' :sout-all :sout-keep
And it works without errors. In previous variant I saw crumbles each 5-40 seconds.

It's not the best variant, but in my case it helped. I getting data with ffmpeg then routing output to vlc2 via pipe and transmitting it to rtp with the following command:

ffmpeg -re -i HLSstream -c copy -f mpegts - 2>/dev/null | vlc -
  --ttl=255 -I dummy --sout '#rtp{access=rtp,mux=ts,dst=IP,port=PORT}' :sout-all :sout-keep


text:
How to encode from Premiere using nvenc Nvidia codec but still output to mp4/avi
Using Nvidia's gpu accelerated codecs to encode videos is a massive time saver, it brings my encoding times down from 2 hours to 2 minutes with pascal GPU's however the problem with the codec that I am using (https://forums.adobe.com/thread/1243687) is that it outputs mkv or mk4 files which are all but useless as I can skip through the outputted video and youtube doesn't accept them at all.
I have tried running the NVenc through a filter/wrapper to package it up as an mp4 but either I was doing something wrong or it didn't work as the audio on the outputted file was always running at a different speed than the video itself, or the other way around.
Does anyone have any advice or instructions by chance?  Would really appreciate it!

It's funny how you can try solutions for hours but the moment you post a question online or to IRC you find the answer yourself within minutes.. Anyways, digging around I found tat instead of using mp4box as my multiplexer I changed to TsMux as per the thread instructions and that still didnt' work however I noticed I had one more option, mkvmerge, so I tracked that down here: http://www.videohelp.com/software/MKVtoolnix , installed it and used that instead and viola, it did the trick.  Was able to use the nvenc codec and get a video in the end that was accepted by youtube.
Now of course because I have solved this problem it would appear that the nvenc codec is no longer using my gpu at all after upgrading to the latest nvidia drivers so there's that issue to solve but at least I can use the codec and get useable vids.  Hopefully this is useful to someone else experiencing the same issue down the road


text:
Desktop grabbing with FFmpeg at 60 fps using NVENC codec
I'm having trouble recording my desktop at 60FPS using the latest Windows compiled FFmpeg with NVENC codec. Metadata says the file is 60 fps but when I play it, I can see clearly see it is not 60FPS.
The command-line I use is the following:
ffmpeg -y -rtbufsize 2000M -f gdigrab -framerate 60 -offset_x 0 -offset_y 0 -video_size 1920x1080 -i desktop -c:v h264_nvenc -preset:v fast -pix_fmt nv12 out.mp4

I tried using a real time buffer, using another DirectShow device, changing the profile or forcing a bitrate, but the video always seems to be at 30fps.
Recording the screen using NVIDIA's ShadowPlay works well, so I know it's feasible on my machine.
Using FFprobe to check the ShadowPlay's output file I can see:

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
  smpte170m/smpte170m/bt470m), 1920x1080 [SAR 1:1 DAR 16:9], 4573 kb/s,
  59.38 fps, 240 tbr, 60k tbn, 120 tbc (default)

But If I force my output to have the same bitrate and profile I get:

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
  1920x1080 [SAR 1:1 DAR 16:9], 5519 kb/s, 60 fps, 60 tbr, 15360 tbn,
  120 tbc (default)

I can see tbr and tbn are different, so I know my output is duplicating frames.
For testing, all of my recordings had this 60 frame rate test page on the background, and I could clearly see the differences.
I know ShadowPlay probably does a lot more under the hood than FFmpeg using the same codec. I know OBS can do it quite easily but I want to understand what I am doing wrong. Maybe it's some FFmpeg limitation ?
Full console output
Using -v trace command:
[gdigrab @ 0000000002572cc0] Capturing whole desktop as 1920x1080x32 at (0,0)
[gdigrab @ 0000000002572cc0] Cursor pos (1850,750) -> (1842,741)
[gdigrab @ 0000000002572cc0] Probe buffer size limit of 5000000 bytes reached
[gdigrab @ 0000000002572cc0] Stream #0: not enough frames to estimate rate; consider increasing probesize
[gdigrab @ 0000000002572cc0] stream 0: start_time: 1467123648.275 duration: -9223372036854.775
[gdigrab @ 0000000002572cc0] format: start_time: 1467123648.275 duration: -9223372036854.775 bitrate=3981337 kb/s
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1467123648.275484, bitrate: 3981337 kb/s
    Stream #0:0, 1, 1/1000000: Video: bmp, 1 reference frame, bgra, 1920x1080 (0x0), 0/1, 3981337 kb/s, 60 fps, 1000k tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file out.mp4.
Applying option c:v (codec name) with argument h264_nvenc.
Applying option pix_fmt (set pixel format) with argument nv12.
Successfully parsed a group of options.
Opening an output file: out.mp4.
[file @ 0000000000e3a7c0] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 000000000257ec00] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 000000000257ec00] Setting 'pix_fmt' to value '30'
[graph 0 input from stream 0:0 @ 000000000257ec00] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 000000000257ec00] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 000000000257ec00] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 000000000257ec00] Setting 'frame_rate' to value '60/1'
[graph 0 input from stream 0:0 @ 000000000257ec00] w:1920 h:1080 pixfmt:bgra tb:1/1000000 fr:60/1 sar:0/1 sws_param:flags=2
[format @ 000000000257ffc0] compat: called with args=[nv12]
[format @ 000000000257ffc0] Setting 'pix_fmts' to value 'nv12'
[auto-inserted scaler 0 @ 00000000025802c0] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 0 @ 00000000025802c0] w:iw h:ih flags:'bicubic' interl:0
[format @ 000000000257ffc0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0000000000e373c0] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 00000000025802c0] w:1920 h:1080 fmt:bgra sar:0/1 -> w:1920 h:1080 fmt:nv12 sar:0/1 flags:0x4
[h264_nvenc @ 0000000000e3ca20] Nvenc initialized successfully
[h264_nvenc @ 0000000000e3ca20] 1 CUDA capable devices found
[h264_nvenc @ 0000000000e3ca20] [ GPU #0 - < GeForce GTX 670 > has Compute SM 3.0 ]
[h264_nvenc @ 0000000000e3ca20] supports NVENC
[mp4 @ 0000000000e3b580] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'out.mp4':
  Metadata:
    encoder         : Lavf57.40.101
    Stream #0:0, 0, 1/15360: Video: h264 (h264_nvenc) (Main), 1 reference frame ([33][0][0][0] / 0x0021), nv12, 1920x1080, 0/1, q=-1--1, 2000 kb/s, 60 fps, 15360 tbn, 60 tbc
    Metadata:
      encoder         : Lavc57.47.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> h264 (h264_nvenc))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[gdigrab @ 0000000002572cc0] Cursor pos (1850,750) -> (1842,741)
*** 35 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1850,750) -> (1842,741)
*** 7 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1850,649) -> (1850,649)
*** 1 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1858,535) -> (1858,535)
*** 3 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1859,454) -> (1859,454)
*** 2 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1865,384) -> (1865,384)
*** 2 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1846,348) -> (1846,348)
*** 3 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1770,347) -> (1770,347)
*** 2 dup!
[gdigrab @ 0000000002572cc0] Cursor pos (1545,388) -> (1545,388)
*** 4 dup!
frame=   69 fps=0.0 q=35.0 size=     184kB time=00:00:00.63 bitrate=2384.0kbits/[gdigrab @ 0000000002572cc0] Cursor pos (1523,389) -> (1519,378)

tbr is the codec frame rate, and it looks to be correct. Shadowplay, has in fact, a lower effective rate as it seems to have dropped some frames. tbn is the timescale and doesn't have anything to do with framerate, other than setting an upper bound on how many frames can be shown per second, and 15k is plenty for 60 frames. Were there other errors such as queue_size or framesync warnings? Show the full console output.

@Mulvya Added the full console output.


text:
Simple Editing of RGB Channels On Mac
In older versions of iMovie you could edit the RGB channels of a clip independently. In the current iMovie 10 you can't. It doesn't seem to be a widespread feature, tried Shotcut and Video Pad so far as well as QuickTime Player and VLC.
Do you know of a free or low priced Mac app that can do this? Final Cut and After Effects are overkill for just this quite basic function.

What do you mean by "edit", manipulate gamma curves etc. Or edit as in cut / trim etc? Depending on your computer, you can use davinci resolve, which is free and can definitely separate rgb channels, or fusion (both now belong to blackmagic design). If you want to try something open-source with lower system requirements and are not looking for editing but image manipulation, try Natron: http://natron.fr

Well, in this case it's about doing an RGB split effect and I couldn't find a suitable video effect in iMovie for this. I actually haven't tried any third party effects as those 2 free ones I found were long gone and commercial alternative are hard to evaluate. My objective here was to be able to animate the separate channels somewhat. I'd prefer a video effect with controllable parameters, but though I'd do it with 3 clips of pure R, G and B channels stacked on top of each other.
Thanks for the suggestions. I'm trying both. I'll let you know if any of these two work out for me.

Do you mean the dynamic RGB delay effect? Could you please link us to the specific effect you are trying to achieve? Also, do you want to process the whole video or a selected clip? Would you mind using a separate software to process an individual video file?

Apple's Motion has a wide variety of useful effects for this sort of thing. It's not clear which iMovie filter you were using (a built-in one, or a 3rd party one?), but Motion offers a Channel Mixer filter, and includes a Levels filter which can work on individual channels. (You can see the docs for Color Correction Filters here.) In addition, Motion also supports 3rd party effects, and there are a ton of them that could do what you need. (It's hard to give exact details without more info from you about what you need, though.)

Thanks for the suggestion. Motion is interesting but probably overkill for the application I intended (RGB Split). I'll keep it in mind. I didn't know it was still around.


text:
Link audio to opacity effect of an image in After Effects
I have 3 audio files from a podcast. 1 file from Steve, one from john, and the other is from me.
I have a composition with the three audio files and also 3 png images of our faces, one for each of our faces. Each image has an opacity keyframe set to 50% by default. Now i want to connect each audio track to the right image and animate as follows:

✖ When audio intensity of a track is more than x decibels then gradually animate the image that's linked to that track from 50% opacity to 100% opacity. To give the
  visual effect of who is currently talking.
✖ When the sound intensity drops below the x decibels i have set before, then gradually animate the opacity back to 50%

How can i achieve that?

Have you seen this article on Reddit?

@bret7600 Thank you, but that didn't quite give me the full answer :)

The easiest way to do this is to use an expression. First you convert audio to keyframes. Then set an expression on your opacity channel. If you drag the pick-whip for the expression to the audio keyframe property you'll get an opacity that bounces all over the place like crazy, so we're going to have to do a bit more to it.
First, in the opacity channel for your layer, set up a variable like so:
var audioAmp = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");

(the expression on the right of the = is just what you get if you drag the pickwhip to the 'Both Channels' property).
We want to sample that property over time, to allow for slow fadeouts.
First, to make it easier to tweak we can set some properties that we can edit until we get the best results.
var numSamples = 200;
var sampleSpacing = thisComp.frameDuration;
var threshold = 5.0 //<--you set this

numSamples is the number of times we sample the amplitude to get a smooth average. The higher it is, the smoother the result, but also the slower the script is. If you set it really high you may want to convert the expression to keyframes once you've got it working right. The values I put in here are just pulled out of my hat, you'll have to tweak them until they work for you. This is the main setting that you can tweak. Have a go at setting it really high, like 2000 or low like 10, and see how it works.
sampleSpacing is the time between samples. Setting it to thisComp.frameDuration means one sample per frame. You could do a smaller sample, but given that the audio amplitude property only has one keyframe per frame it might not really help.
Threshold is the audio threshold above which no fading happens. Again you will have to tweak this depending on the audio level of your material.

Ok, here comes the hoo-hah.
var sum = 0;
for (var i = 0; i < numSamples; i++){
  sum += audioAmp.valueAtTime(time - i * sampleSpacing);
}
avAudio = sum / numSamples; //the average audio for all the samples
//now decide if the audio is low enough to start fading
if (avAudio < threshold) {
  //normalises it to 0-100% where 100% = the threshold
  100 * avAudio / threshold;
} else { //audio is above threshold
  100;
}

Basically it just averages the audio out for the last numSamples samples. When you have a sound followed by silence the average will go from the volume of the sound to zero in numSamples * sampleSpacing seconds, or in this case 200 frames.


text:
Customize Date/Time title for Final Cut Pro X
I am trying to "recreate" FCPX's title Date/Time in Apple Motion 5. Reason is that the the original Title is in English. I want the date to be at least numeric only (26.10.2016).
I am able to achieve this in new Final Cut Title, but then in FCPX the title does not use time of the connected clip in Timeline.
I also tried to open the original Title in Apple Motion, but I am unable to find any setting of date generator value. Also in this title I am unable to change region of the the date.
Region control for my Time date generator

No region control for Time date generator from original title

Update:
I was able to change the region in Motion, but it is not reflected in FCPX and the Title goes crazy

The reason the one from Final Cut Pro doesn't have the "Region" control is because it has the "Animate" flag set. If you set the animate flag on yours, then select something else, and then select yours again, the Region setting goes away. I don't know if that's a bug or if there's some user interface design reason for it.
So if you want to change the region, I suggest turning on the animate flag, select something else, select the generator again and set the region. Then turn the animate flag off again. I'm not sure if it will take or not, but I bet it would.

Thank you for the tip. I did not work much. I was able to change the region, but I don't like the result ;) (see Update of question)

This effect is not editable. If you make a copy, it won't work.
Actually the title does not go crazy. All it does is, if "Animate" is ticked, go from "Start" to "End" timestamps as fast as needed depending on the effect duration in your timeline.

I found a way to edit this date & time title:

edit a copy of the date & time title in the common way using motion
rename the copied and edited *.moti file in the user template path to "Date:Time.moti". It will be displayed in finder as "Date/Time.moti"
rename (with admin rights) the "Date:Time.moti" (displayed as "Date/Time.moti) to "Date:Time.moti_save" in the original template path "/Applications/Final Cut Pro.app/Contents/PlugIns/MediaProviders/MotionEffect.fxp/Contents/Resources/Templates.localized/Titles.localized/Lower Thirds.localized/Date:Time.localized". This is only for safety reasons to have a way back to the old configuration
copy (with admin rights) the edited and renamed "Date:Time.moti" file from the user template path to the original path above
now Final Cut Pro will use the edited "Date:Time.moti" file and everything should work as aspected


text:
Reason behind the clarity
I have seen many videos with nearly same size and same length, but the clarity of the video changes or differs. I wanted to know the reason or fact behind this.

The Q isn't clear. Are you asking about image quality or focus/DoF? Can you illustrate with screenshots?

I am asking about video quality. For instance, consider a video with two different type but the size is almost the same, then why is the one blurred then other?

Attach examples.

I always download the movies after 2-3days of realise with nearly 700MB thinking that it will be clear, and the same movie after a month with same size of nearly 700MB gives a more clear view to the one earlier download.

That probably comes down to source quality.

But anyways it is related to the question only.

There can be too many factors involved to properly answer your question. One is the image quality of the source footage, there are objective and subjective parameters influencing this. Examples:

proper lighting
set design
image framing

Etc.
Then there are technical parameters in the image aqcuisition involved:

quality of the cameras sensor
quality of the post production (grading etc)

Then there are parameters in the delivery:

delivery Codec
compressibility of the images

As for the "subjective" parameters, there are a lot of psychological things involved: a lot of people consider these things as "better" while really only being a matter of taste:

sharpened image
enhanced contrasts
less grain

So unless being more specific, your question IMHO cannot be answered.


text:
Add an intro screen with YouTube Capture?
I have been watching a variety of videos on YouTube, the majority of which are being made with YouTube Capture (at least I'm pretty sure that's the case). I have played around with the app on a iPhone 5S and I cannot figure out how to add title (bumper) screens to the beginning of the videos. Some of the videos I've been watching have an intro picture, with music, and then have text overlayed on the picture. Is this not a feature related to Capture? Or are they doing this in a different way? I've been watching content from 4 different creators and they all have the same font/color etc so I know it has to be a standardized tool they are using. Is this not possible with Capture?

Are you sure it is YouTube Capture? My kids vlog daily and they have intro graphics, music and text etc. But they use free 3rd party tools on their phones - options seem very standard.


text:
Unable to make HD videos in Premiere Pro
I'm not sure where else to go. I'm completely clueless about technology and video editing, so bear with me.
I've been making videos of games I play using avi clips recorded by Fraps. I was using WMM, exporting to HD 1440x1080. Quality obviously wasn't great, it sapped the color and sharpness.
I got a trial version of Premiere Pro to make actual HD videos. The online tutorials were a bit complicated so I followed instructions from someone who makes HD videos using Fraps avi clips from the same game with no quality loss. Despite this, my exported videos ended up the same quality I got from WMM.
I'm clearly doing something wrong but I have no idea what it is. The person I spoke to wasn't adept at video editing either but they got it to work in a few steps. I let the program pick the best sequence for the file and tried multiple settings when exporting based off tutorials. The best quality I got came from exporting it as an MP4.
This is a comparison of the original AVI file to exported MP4. You can see the exported one is flatter and duller:

A few things to check -
Is your export file set to Maximum Render Quality (enable before you export)? This may help if the MP4 compression is to blame for reducing the contrast of your video. Are you recording uncompressed AVI with fraps?

When you export, do you have any Effects turned on in the export settings - particularly the Limiter? This should be off.

Lastly, your installation of Premiere should include the GoPro Cineform codecs. These are as close to visually lossless as you will get with a compressive codec, and while they are NOT the best route for an eventual YouTube upload (and YouTube will remind you of that if you try it), it would be a good baseline to determine what the issue actually is.

To expand on the answer given by @mike.thorn above, Adobe Premiere supports (and by supporting, I mean "allows anybody to become confused by") both full swing and studio swing levels.  Wolfcrow.com has a three-part series explaining this terminology, but Part Three likely gets to the heart of your question.  If your clip starts life with video levels 0-255 and then gets compressed to 16-235, and then you play it as if it's still 0-255, that would explain the loss of contrast you see.  The Maximum Bit Depth setting tells Adobe to not compress full swing to studio swing.

This is a great explanation. This is what I was getting at by "check maximum render bit depth" but I couldn't remember the actual technical reason. Thanks for expanding.

You are welcome.  As always, the best way to thank somebody on StackExchange for a good answer is to actually upvote the answer.


text:
Best low cost software for lightsaber effect on a macintosh?
I'm interested in creating lightsaber effects with a Macintosh on home videos with my children.
What is the best low cost software for recreating this effect today? I don't have Adobe CC, and have no desire to subscribe to it, nor do I have Final Cut Pro X.
Does iMovie support this effect? Are there any good free or cheap rotoscoping or canned effect programs to accomplish this?
Edited to add: "Would the free (non-commercial) edition of Nuke for Macintosh" be a good solution? (I discovered it after asking.)
Thank you.

You could try the HitFilm Express 4, they have the sci-fi pack (25usd) which contains the VFX you want and specific tutorials for lightsaber (https://hitfilm.com/express/the-force) and it works on mac :)
Link: https://hitfilm.com/store/hitfilm-4-express

They have a free tutorial where you don't need to buy any plugin: https://www.youtube.com/watch?v=Rf0e9Ngx8KE

You could use Nuke. It's certainly capable of the effect you want. However, it may be very difficult to use as it's a fairly complex program.
It may be easier to use something like Apple's Motion. (It's relatively cheap at $49.) A quick way to get the effect would be to draw a line where you want the light saber to be using the line tool, then add a Bloom or Glow filter over it. You should be able to track the ends of your stand-in saber (if you have one), and pin the ends of the line to those points. (Or, for another $20, you could download the Sabre Blade plug-in from FxFactory.)

MotionVFX makes an excellent saber plugin for Motion. Not as wallet-friendly as the FxFactory version, but probably somewhat more versatile.

Video Copilot has an interesting plugin, Saber, that's free. It requires some manual tracking on the lightsabers and most likely some masking / roto, but it's a great solution that works with After Effects CS5.5 and up on Mac and PC:
http://www.videocopilot.net/blog/2016/03/new-plug-in-saber-now-available-100-free/

EDIT: I assumed because you mentioned Adobe CC, you had an older version of After Effects. That doesn't seem to be the case. Regardless, this might help another person who's looking for an answer.


text:
Missing video codec in Quicktime
I have a quicktime video recorded on a Atoms Shogun.
When I tried to play the file it is only playing the audio and no video is coming up at all.
Delving deeper, I found out that no codec for the video was embedded in the file, only audio.
Is there any way to add the file codec to it?

General
Complete name                    : L:\9e550a82-d3ed-460f-a10d-f25be5c87a03.mov
Format                           : MPEG-4
Format profile                   : QuickTime
Codec ID                         : qt
File size                        : 33.3 GiB
Duration                         : 1h 52mn
Overall bit rate                 : 42.3 Mbps
Encoded date                     : UTC 2024-12-01 19:09:30
Tagged date                      : UTC 2024-12-01 19:09:30
Writing library                  : Apple QuickTime

Video
ID                               : 2
Duration                         : 1h 52mn
Bit rate mode                    : Constant
Bit rate                         : 36.0 Mbps
Width                            : 1 920 pixels
Height                           : 1 080 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Constant
Frame rate                       : 25.000 fps
Bits/(Pixel*Frame)               : 0.694
Stream size                      : 28.4 GiB (85%)
Language                         : English
Encoded date                     : UTC 2024-12-01 19:09:30
Tagged date                      : UTC 2024-12-01 19:09:30

Audio
ID                               : 1
Format                           : PCM
Format settings, Endianness      : Big
Format settings, Sign            : Unsigned
Codec ID                         : in24
Duration                         : 1h 52mn
Bit rate mode                    : Constant
Bit rate                         : 4 608 Kbps
Channel(s)                       : 4 channels
Sampling rate                    : 48.0 KHz
Bit depth                        : 24 bits
Stream size                      : 3.63 GiB (11%)
Language                         : English
Encoded date                     : UTC 2024-12-01 19:09:30
Tagged date                      : UTC 2024-12-01 19:09:30

Open the file in Mediainfo and show its full readout here.

@Mulvya I have, which is where I saw the missing codec information. It is supposed to have Avid DNxHD but it is missing

Yes, you have, but paste it here.

@Mulvya sorry, its updated now

I think it would be helpful if you described what happened and how you broke the file. If I should guess, I would think you tried to take out the video stream of a mxf file and messed up the file structure - but that's just a guess. In any case, I don't understand why you think you need dnxhd if mediainfo outputs your file as mp4. As far as I know dnxhd is not a valid codec to be encapsulated in a  mp4 container.

@HansMeiser we recorded the session, and now it isn't playable. there was nothing out of the ordinary to it. the reason we say the codec info is because another file from the same recorder has it listed in mediainfo, so the comparison between them is that's whats missing. and when you put the hard drive back in the recorder to just keeps alternating between dnxhd and prores because it doesn't know what format to play it as

Did you try ffmpeg repair?

I would try two solutions, obviously on backups of the files, not the originals. First there is the 'untrunc' tool which tries to copy over additional information from a working file into a broken file: https://github.com/ponchio/untrunc
Then there is AtomicParsley which allows you to view file information on Mov / mp4 files on a very detailed level. Probably you can compare a working and a broken file and try to manually add the codec information.
http://atomicparsley.sourceforge.net

You can try to repair the file with ffmpeg, a free command-line tool, like so
ffmpeg -analyzeduration 1G -i input.mov -c copy -map 0 out.mov

If you need the Avid DNxHD codec, Avid offer it for free, for Quicktime (Mac and Windows):
http://avid.force.com/pkb/articles/en_US/download/en423319

I don't need the codec itself, I need the codec data in the header of the file


text:
Loop image over audio, as AvidDV codec with ffMPEG
I have been trying to understand ffMPEG and outputting a file with the DNxHD codec.
I keep getting an error [swscaler @ 0x7feec601a200] deprecated pixel format used, make sure you did set range correctly
Here is what I've been working with:
ffmpeg -loop 1 -i image.jpg -i audio.mp3 -shortest -c:v dnxhd -b:v 120M -s 1920x1080 -pix_fmt yuv422p -r 25 -c:a pcm_s16le -ar 48000 out.mov

But I was wondering if it was possible to make an AvidDV SD version of the output? 1024x576 or 720x576 at 25fps? I know you can make other codecs, but an Avid one would make for fast import.

deprecated pixel format used
This is a warning, not an error, and you can ignore it.
DNxHD
The FFmpeg DNxHD encoder only supports valid DNxHD profiles. ffmpeg will output the list if you attempt to output unsupported width x height, frame rate, bitrate, and/or pixel format. Or view the list at another answer.
DV
FFmpeg can output DV, but I'm not quite sure why you would want to. This is an old format and there are better, modern, lossless alternative intermediate formats for editing such as UT video (ffmpeg can encode and decode that too). Like DNxHD it will only output certain DV profiles, but it can use the -target option to make it arguably easier to use:
ffmpeg -i input -target ntsc-dv output.dv

Understandable to the codec choice, but we are using SD footage and there is no need to import HD, as it is to be muxed to DVD. With the above, would this work: ffmpeg -loop 1 -i image.jpg -i audio.mp3 -shortest -target pal-dv -c:v dnxhd -b:v 120M -s 1920x1080 -pix_fmt yuv422p -r 25 -c:a pcm_s16le -ar 48000 out.mov or would the mix between the DNxHD and DV be wrong?

@Ahhhhhhhhhhhhhdfgbv No, that won't work. -target options are vcd, svcd, dvd, dv, or dv50  with optional prefixes pal-, ntsc-, or film-. To generalize, it's only useful for encoding to DV and DVD formats.

Understood. I may go for the -target pal-dv50 or -target dvd as the output would be DVD anyway


text:
Can running a video over ethernet be split?
Running video over ethernet isn't something new, but is it possible to split the video signal (over short runs) without losing video signal - or at all?
I know you can buy these sort of items (just an example): http://www.aten.com/global/en/products/professional-audiovideo/video-extenders/ve800/ but if you were to run the ethernet into a switch, would the receiving end be able to be multiple Rx boxes?
I know this deviates from the normal ffmpeg question, but was curious if anyone had any proper insight into the way these boxes work.

Not with those boxes, but the broadcast industry version of video over IP (SMPTE 2022-6 and the 2110 suite) can do this as they are actually IP Multicast based.
The gotcha is that they typically run uncompressed so you are looking at up to several Gb/s per multicast flow (4k60 you are looking at 12Gb/s), and you really want non blocking switching fabric.
It does work, but you will hate the price.
HDCP with consumer gear is also a bit of a pain (There are ways around that however).

Short answer: No.
Long answer: Cat5 ≠ ethernet. Just because you're using the same cables as ethernet doesn't mean you're using the same protocols. The boxes you link to just boosts the HDMI signal so that it can go further down a copper wire without too much electrical interference, they don't turn it into TCP/IP packets that a router would understand.
You'd need a HDMI splitter with enough outputs, and then either more extender boxes or HDMI cable to go from the splitter to the TVs. Random example just to illustrate, not recommend here.


text:
Imitate letters in text falling down as if under gravity AE
I have a tricky (seems to me) task: I need to make 3 layers of text lose their shape and fall down to the bottom of the screen like a heavy mass of letters, so that in the end all the letters lay there in one heap. Here is what the text looks like from the beginning:

Is it at all possible in AE? I remember doing per character animation with text once, but it doesn't seem to be the way to go here, or am I missing something? Please tell me it's doable! :)

If the text is random characters, you could possibly do this using a particle engine.  Assign one character per frame to a comp, then apply those frames to the particles texture... Something like Particular from Trapcode would work with this.
Alternatively if it's a full page of actual text:
I reckon Newton 2 could do this..
http://www.motionboutique.com/newton/
Or Cinema 4D, but I don't think the free version that comes with AE now has the physics plugins included.