Skip to content

Instantly share code, notes, and snippets.

View J0sueTM's full-sized avatar
:shipit:

Josué Teodoro Moreira J0sueTM

:shipit:
View GitHub Profile
@J0sueTM
J0sueTM / enc.c
Created October 24, 2023 11:39
ffmpeg encode video
#include <stdio.h>
#include <libavcodec/avcodec.h>
#include <libavutil/opt.h>
#include <libavutil/imgutils.h>
#include <libavutil/error.h>
static void print_ret_error(int ret) {
char buf[AV_ERROR_MAX_STRING_SIZE];
av_strerror(ret, buf, sizeof(buf));
printf("%s\n", buf);