Skip to content

Instantly share code, notes, and snippets.

View mekwall's full-sized avatar
Coffee. Coffee. Coffee.

Marcus Ekwall mekwall

Coffee. Coffee. Coffee.
View GitHub Profile
@garoto
garoto / ffmpeg-hevc-encode-nvenc.md
Created July 10, 2017 17:15
This gist shows you how to encode specifically to HEVC with ffmpeg's NVENC on supported hardware, with a two-pass profile and optional CUVID-based hardware-accelerated decoding.

Encoding high-quality HEVC content with FFmpeg - based NVENC encoder on supported hardware:

If you've built ffmpeg as instructed here on Linux and the ffmpeg binary is in your path, you can do fast HEVC encodes as shown below, using NVIDIA's NPP's libraries to vastly speed up the process.

Now, to do a simple NVENC encode in 1080p, (that will even work for Maxwell Gen 2 (GM200x) series), start with:

ffmpeg  -i <inputfile>  \
-filter:v hwupload_cuda,scale_npp=w=1920:h=1080:format=nv12:interp_algo=lanczos,hwdownload \

-c:v hevc_nvenc -profile main -preset slow -rc vbr_hq \

@andrewgleave
andrewgleave / AnimatableComponent.js
Last active November 27, 2018 20:41
Keyframe animation support for React. Enables integration between React components and JS animation events.
/** @jsx React.DOM */
'use strict';
var React = require('react');
var AnimatableComponent = React.createClass({
propTypes: {
tag: React.PropTypes.component.isRequired,
@kmark
kmark / plexDownload.php
Last active April 6, 2022 23:46
The Plex Universal Transcoder Downloader mimics the actions of the Plex/Web media flash player to download transcoded media. The differences begin when the downloader saves the streamed data and pieces it together. First a start.m3u8 playlist file is requested from the server with a query string that defines the transcoding options. Inside the …
<?php
/*******************************************************************************
* Plex Universal Transcoder Downloader v1.3 *
* See --help or --usage for more info *
*******************************************************************************
* Copyright 2013 Kevin Mark *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *