Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
| //The following code is based on the paper "Dancing Links" by D. E. Knuth. | |
| //See http://www-cs-faculty.stanford.edu/~uno/papers/dancing-color.ps.gz | |
| #ifndef DLX_H | |
| #define DLX_H | |
| #include <cstring> | |
| #include <climits> | |
| struct data_object //A module in the sparse matrix data structure. | |
| { | |
| data_object* L; //Link to next object left. | |
| data_object* R; // " right. |
| #include <iostream> | |
| // This is a rewrite and analysis of the technique in this article: | |
| // http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html | |
| // ------- Framework ------- | |
| // The little library required to work this magic | |
| // Generate a static data member of type Tag::type in which to store | |
| // the address of a private member. It is crucial that Tag does not |
| #include <stdio.h> | |
| #include <windows.h> | |
| #include <gdiplus.h> | |
| #include <time.h> | |
| int GetEncoderClsid(const WCHAR* format, CLSID* pClsid) { | |
| using namespace Gdiplus; | |
| UINT num = 0; | |
| UINT size = 0; |
| #include <tuple> | |
| #include <type_traits> | |
| #include <cassert> | |
| template <class T, class... TArgs> decltype(void(T{std::declval<TArgs>()...}), std::true_type{}) test_is_braces_constructible(int); | |
| template <class, class...> std::false_type test_is_braces_constructible(...); | |
| template <class T, class... TArgs> using is_braces_constructible = decltype(test_is_braces_constructible<T, TArgs...>(0)); | |
| struct any_type { | |
| template<class T> |
| #include <string.h> | |
| #include <gst/gst.h> | |
| #include <signal.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| // v4l2src ! tee name=t t. ! x264enc ! mp4mux ! filesink location=/home/rish/Desktop/okay.264 t. ! videoconvert ! autovideosink | |
| static GMainLoop *loop; | |
| static GstElement *pipeline, *src, *tee, *encoder, *muxer, *filesink, *videoconvert, *videosink, *queue_record, *queue_display; |
| // public domain | |
| // | |
| // algorithm adopted from: | |
| // https://dspguru.com/dsp/tricks/fixed-point-atan2-with-self-normalization/ | |
| // | |
| // when ran without arguments, it simply calculates the maximum error between | |
| // the functions below and atan2f | |
| // | |
| // it tests all (x,y) values from -100.00 to +100.00 | |
| // |
| #include "screengrab.h" | |
| void capture() | |
| { | |
| CComPtr<ID3D11Device> pDevice; | |
| CComPtr<IDXGIOutputDuplication> pDeskDupl; | |
| //(...)create devices and duplication interface etc here.. | |
| DXGI_OUTDUPL_DESC OutputDuplDesc; |
| // Windows | |
| // g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1 | |
| // Linux | |
| // g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan | |
| // https://vulkan-tutorial.com/ | |
| #include <iostream> | |
| using namespace std; | |
| #include <SDL2/SDL.h> |
| #pragma once | |
| #include <thread> | |
| #include <google/protobuf/message.h> | |
| #include <grpcpp/grpcpp.h> | |
| #include <grpcpp/alarm.h> | |
| #include <logger.h> |