18:24
I have a function for decoding audio in C using ffmpeg:
int read_and_decode(const char *filename, float **audio_buffer, int *sample_rate, int *num_samples)
AVFormatContext *fmt_ctx = NULL;
AVCodecContext *codec_ctx = NULL;
AVCodec *codec;
AVPacket packet;
AVFrame *frame = av_frame_alloc();
if (!frame)
fprintf(stderr, "Could not allocate memory for AVFrame\\n");
return -1;
int audio_stream_index = -1, ret;
if (avformat_open_input(&fmt_ctx, filename, NULL, NULL) != 0)
fprintf(stderr, "Could not open the file: %s\\n", (...)
18:16
I'm trying to change FFMPEG encoder writing application with FFMPEG -metadata and for whatever reason, it's reading the input but not actually writing anything out.
map_metadata -metadata:s:v:0 -metadata writing_application, basically every single stack overflow and stack exchange thread, but they all won't write to the file at all.
ffmpeg -i x.mp4 -s 1920x1080 -r 59.94 -c:v h264_nvenc -b:v 6000k -vf yadif=1 -preset fast -fflags +bitexact -flags:v +bitexact -flags:a +bitexact -ac 2 x.mp4
ffmpeg -i x.mp4 -c:v copy -c:a copy -metadata (...)
18:13
I'm developing a simple scene with A-Frame and React.JS where there is a videosphere that will create and render when video are fully loaded and ready to play.
My goal is to render 4k (to device who can reproduce it) video on videosphere to show at the users the environment.
On desktop versions all works fine also with 4K videos while on mobile works only for 1920x1080.
I already check if my phone can render a 4k texture video and it can render untill 4096, I checked also that video.videoWidth are 4096.
The error I have is with decoder
MediaError code: 4, (...)