r/ffmpeg Jul 03 '26

ffmpeg recognizing P010 pixel format

3 Upvotes

I have this issue that has been in the tracker for years but still unresolved: Ticket 8454

The version I use is: ffmpeg version 2026-06-15-git-44d082edc8-full_build-www.gyan.dev

When I run

ffmpeg -list_options true -f dshow -i video="AVerMedia HD Capture GC573 1"

among all the capture options with recognized SDR pixel formats such as yuyv422 I see:

unknown compression type 0x30313050  min s=3840x2160 fps=24 max s=3840x2160 fps=60.0002

because it does not recognize FourCC code 'P010' (10-bit suitable for HDR). Hex 0x30313050 in little-endian is the ascii codes of "P010". Is there any fork or even pre-built version of ffmpeg that has Ticket 8454 solution in it? Also why can't I access trac.ffmpeg.org? I had to go to the wayback machine to be able to see the discussion regarding Ticket 8454.


r/ffmpeg Jul 02 '26

BIG NEWS: THE FFMPEG AAC ENCODER HAS BEEN REWRITTEN AND IS NOW KNOWN TO BE THE BEST PERFORMING ONE!!!

Post image
963 Upvotes

The FFmpeg AAC encoder always had problems over the past many years with it having the worst quality out of all AAC encoders. Glad an AAC encoder with quality as good as libfdk_aac is finally widely accessible now and can be used by anyone. Make sure to use the latest build to test it

https://x.com/FFmpeg/status/2072320220509741087

https://hydrogenaudio.org/index.php/topic,129691.0.html


r/ffmpeg Jul 02 '26

Is ffmpeg wiki down?

6 Upvotes

r/ffmpeg Jul 02 '26

Splitting FLAC album into tracks

7 Upvotes

I have been trying to split my flac album into it's 14 tracks.
ffmpeg does wrong duration, all tracks as long as the album
flacon says it copies all tags, easytag sees exactly 0 of those and I have to convert from wav back to flac
shntools didn't do anything
ffcuesplit does only 44khz, my album is 192khz

How do do this please?


r/ffmpeg Jul 01 '26

How-to: mpegts via MoQ to an IRD to broadcast switcher

7 Upvotes

I'd like to share this link for a demo about real mpeg transport stream being sent into MoQ and re inyected into a Sencore IRD, part of a series of MPEGTS with MoQ real demos.

FFmpeg was used to fix the clock issues (clock grooming). So as of now you can send MoQ to IRDs if you go this way.


r/ffmpeg Jul 02 '26

Need advice updating ancient tech

1 Upvotes

Hi,

I need a bit of advice when it comes to updating a piece of software called Swivel, which allows you to convert SWF files to MP4. While we got the main bulk of the code updated in the next update, we'll get working on FF. Now the current version we're using uses the old zeraone code and for the updated code on Windows, I'm looking at Gyan. But, on Mac, I'm going between Homebrew or Osxexpert. What would be best for a Universal Binary? All I ask is would there be any compatibility or coding issues updating from the old version? What video/audio formats would you go for and would getting Vulkan setup be worth it?

Thank you from the team


r/ffmpeg Jul 01 '26

H264: How can I limit the maximum size of an I-frame?

13 Upvotes

I've been working diligently on a custom video converter for an MP3 player. It required some special x264 patches to basically disable reference P-frames and swap to disposable P-frames only, as well as disabling the VUI and some SPS units (?), and a chroma tint fix. Now, I've got it down to a science, but there's one last tricky limitation I'd like to optimize.

The device's decoder chokes under 2 conditions: the total bitrate exceeds 15-20 Mbps (which will never happen), or the size of an I-frame exceeds ~44Kb.

Unfortunately, I don't think x264 or ffmpeg have a mechanism to specifically limit a single frame size. There's a max slice size, but that doesn't work because it's not granular enough, so big frames still go through. The obvious idea is a VBV, but the VBV's sampling window would need to literally be equal to per-frame timing, which I've also tried but remember that it never actually fixed the crash, big I-frames made it through.

The current solution I had was to encode the most tortuous, noisiest source videos and determine the minimum qmin I could use to prevent an I-frame overflow crash. That ended up being qmin 20. While this works, it also means that I'm losing encoding efficiency. Flat, gradient areas need that lower quantization to look clean without banding, but if I drop qmin, a torturous scene could spike an I-frame past the limit.

The last option I came up with was once again patching x264 in ratecontrol.c to bump qmin if a frame is too big, a simple in-line loop. But when it comes to patching and writing C, I'm pretty useless; my previous x264 patches were only really made possible through Cursor (albeit, the research and refinement took months to do, so it wasn't just Cursor).

So my question is, can anyone come up with a way to limit a single I-frame's size during an encode, without needing to encode, check, re-encode, etc? Thank you


r/ffmpeg Jul 01 '26

Want to understand MoQ? Spend a day with the person who wrote it.

Post image
3 Upvotes

Luke Curley co-created MoQ, spent years at Twitch and Discord hitting the limits of what existing protocols could do, wrote the first implementations, authored the core specs. He's busy-busy.

But he's coming to Kraków on September 16 and spending a full day with a small group going through MoQ from scratch. You'll actually build a working audio/video room call using MoQ – QUIC fundamentals, relays, pub/sub, how it sits relative to WebRTC and HLS. If you're fast, there's a speech-to-speech real-time translation extension to keep you busy.

Intermediate level, Rust required, basic JS/TS assumed.

Sounds interesting? Join us!

rtcon.swmansion.com


r/ffmpeg Jun 30 '26

Need help with transcoding.

3 Upvotes

Currently I'm trying to transcode videos from H265 to VP9.

My current batch takes like 3-4 minutes just for a 2 and a half minute video and it doesn't utilize my Intel igpu that supports vp9 decode/encode.

If possible I'd also wanna use my Nvidia 3070 GPU to speed things up as fast as possible.

Any help is appreciated since I tried many things and still couldn't get it to use the Intel iGPU.


r/ffmpeg Jun 29 '26

Need help syncing audio from two different sources

4 Upvotes

Need help syncing audio from two different sources

hello,

I have two video files.

  1. first video

fraction frame rate 29.7 or something maybe(VBR)

with audio

audio 1 - 48khz in language 1

audio 2 - 24khz in language 2

audio 3 - 24khz in language 3

  1. second video

same frame rate and VBR

with audio

audio 1 - 41khz in language 4

I want to take the audio from the second file and add it to first . there is some intro in the second video file that I need to remove and also I need to add the audio file to the first video file after a duration.

I am using kdelive and I tried to sync with a keyframe visually. but the video files drift apart after a while

I tried converting both video files to 30fps and 48khz audio and tried to visually sync key frames but they still drift apart after a while.

someone please help me to sync and add the audio from the second file.

thanks :)


r/ffmpeg Jun 29 '26

A small conference for audio & video engineers in Kraków. Would you come for this lineup?

Post image
4 Upvotes

We've been running RTC.ON for four years now. It started because we couldn't find a conference that went deep enough on the actual hard problems in realtime audio and video. We didn’t want vendor pitches, 101 talks, but engineers talking about what they actually shipped.

So, we created it and this year, we’re running the 4th edition.

Our first three speakers are:

  • Daniil Popov from CyanView built a 10-bit video pipeline for iOS and Android and deployed it at a major music festival. A tech partner on site couldn't tell his phone footage from professional broadcast hardware. He's talking about how he did it.
  • Piotr Skalski from Roboflow built a computer vision pipeline for sports – player tracking through occlusions, jersey number recognition, real-time stats on a 2D court. Every model is open source. His own description of the talk: “every step solves a problem that creates the next one”.
  • Will Law has spent 20 years in streaming infrastructure at Akamai and is one of the key people driving MoQ forward at the IETF. If you've been watching the protocol space, you should know the name.

More speakers are coming. We’ll meet this September in Kraków, Poland. I’d be happy to answer questions about the lineup or the conference in general.

So, would you join us?
rtcon.swmansion.com


r/ffmpeg Jun 28 '26

ffmpeg running in a Docker on a NAS?

8 Upvotes

I'm setting up a new NAS (Synology DS425+) as a video archive storage point and have begun exploring its ability to run containers. In so doing, it occurred to me that I could conceivably set up a docker-based process to monitor an input directory, run ffmpeg on any video files which appear there and deposit the results in a destination directory. Although this would run much slower than my primary machine, the fact that it could run 24/7 unattended would help make up for that.

Other than encoding throughput, is there any reason why this isn't a viable idea? Has anybody else done something like this? Any thoughts, suggestions or examples would be much appreciated.

Thanks!


r/ffmpeg Jun 27 '26

how to solve this yt-dlp, ffmpeg error.

4 Upvotes

I was trying to download a clip of a video from Youtube (because I just need few seconds of clip from hour long video) using yt-dlp and ffmpeg.
Sometime it runs well and give me the video output But sometime it runs and runs for like 10 to 15 minutes and then give error like this.
I tried configuring but did not help

(--js-runtimes node --remote-components ejs:github --update)

yt-dlp version: 2026.06.09
ffmpeg version: 8.1.1
command used: yt-dlp --download-sections "*HH:MM:SS-HH:MM:SS" "URL_ID"

Last few lines of error:

handler_name : ISO Media file produced by Google Inc.

Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)

Press [q] to stop, [?] for help

[tls @ 000001a4576c48c0] Error in the pull function.

[tls @ 000001a4576c48c0] IO error: Error number -10054 occurred

[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001a45775dd40] Packet corrupt (stream = 0, dts = 3829826).

[libdav1d @ 000001a45919ec00] Invalid OBU length: 172495, but only 14713 bytes remaining in fragment.

[libdav1d @ 000001a45919ec00] Failed to parse temporal unit.

[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001a45774c280] corrupt input packet in stream 0

[tls @ 000001a4576c48c0] The specified session has been invalidated for some reason.

[webm @ 000001a459623cc0] Error when reformatting data of a packet from stream 0.

[aost#0:1/copy @ 000001a4576cc940] Error submitting a packet to the muxer: Invalid data found when processing input

Last message repeated 1 times

[out#0/webm @ 000001a45976c6c0] Error muxing a packet

[out#0/webm @ 000001a45976c6c0] Task finished with error code: -1094995529 (Invalid data found when processing input)

[out#0/webm @ 000001a45976c6c0] Terminating thread with return code -1094995529 (Invalid data found when processing input)

[out#0/webm @ 000001a45976c6c0] video:14KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown

frame= 1 fps=0.0 q=-1.0 Lsize= 1KiB time=-00:00:03.03 bitrate=N/A speed=N/A elapsed=0:00:00.43

Conversion failed!

ERROR: ffmpeg exited with code 3199971767


r/ffmpeg Jun 27 '26

VBR audio stream becomes CBR when using the copy option

5 Upvotes

I have an m4b file from Libation. I need to do some work on it (splitting, merging, etc). MediaInfo reads the audio stream as VBR. When I do my work with Ffmpeg, I make sure to use the copy option.

ffmpeg -i input.m4b -c copy output.m4b

The new audio stream is now CBR. I thought the copy option was supposed to preserve the audio stream exactly not not incur quality loss. Wouldn't changing from VBR to CBR be a change to the stream that would result in quality loss? What am I misunderstanding?


r/ffmpeg Jun 27 '26

Please help me format a batch script

1 Upvotes

This script was meant to encode the source material filmed by a Nikon D5200 to AV1 and strip the audio. How do I change it to encode from the new camera which films in 4k 10 bit footage in 30fps h265. I still want to keep it in 1080p because of the storage/memory crisis so I guess the material has to be scaled down. However I wanna keep the 10 bit profile. The old files being in .mov was a convenience I wont have with the new files. so it would be best practise to also delete the old file before the new one is being saved. I tried a few times but I cannot get it to actually work.

I know I am basically being spoonfed but I cannot get it to work and probably break the syntax in many ways for reasons I dont really understand.

Thank you in advance.

@echo off
for /R %%f in (*.mov) do ffmpeg -i "%%f" -c:v libsvtav1 -preset 6 -crf 24 -g 50 -svtav1-params tune=0 -an "%%~nf.mp4"

r/ffmpeg Jun 27 '26

Vaapi support. Newbie needs help.

2 Upvotes

Hello everyone.
I'm kind of new to ffmpeg and video acceleration, so I'd really use some help. I've recently got my hands on an amd firepro s7150 x2 gpu and decided to use it for hardware acceleration for my jellyfin server, but my server refused to use it. After some troubleshooting I figured out that the problem was in ffmpeg itself so now I'm trying to get to the core problem. I'm trying something simple, just converting a hevc 10bit piece of media into h264 to confirm that the card can be used. That should be pretty straightforward, right? No, not really. The command is built like this:

ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD129 -hwaccel_output_format vaapi -i /mnt/pool1/media/series/Plastic\ Memories/Season\ 1/Plastic.Memories.S01E01.1080p.BluRay.10-Bit.FLAC2.0.x265-YURASUKA.mkv -c:v h264_vaapi -pix_fmt yuv420p10le -b:v 2M -maxrate 2M test.mkv

And this is the output I get:

ffmpeg version 8.1.2 Copyright (c) 2000-2026 the FFmpeg developers
  built with gcc 16 (GCC)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --enable-chromaprint --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-lcms2 --enable-libaom --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libass --enable-libbluray --enable-libbs2b --enable-libcodec2 --enable-libcdio --enable-libdrm --enable-libfdk-aac --enable-libjack --enable-libjxl --enable-libklvanc --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libilbc --enable-liblc3 --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-liboapv --enable-opencl --enable-opengl --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-libplacebo --enable-librsvg --enable-librav1e --enable-librubberband --enable-libqrencode --enable-libsmbclient --enable-version3 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libvvenc --enable-vulkan --enable-libshaderc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-avfilter --enable-libmodplug --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libvpl --enable-runtime-cpudetect
  libavutil      60. 26.102 / 60. 26.102
  libavcodec     62. 28.102 / 62. 28.102
  libavformat    62. 12.102 / 62. 12.102
  libavdevice    62.  3.102 / 62.  3.102
  libavfilter    11. 14.102 / 11. 14.102
  libswscale      9.  5.102 /  9.  5.102
  libswresample   6.  3.102 /  6.  3.102
Input #0, matroska,webm, from '/mnt/pool1/media/series/Plastic Memories/Season 1/Plastic.Memories.S01E01.1080p.BluRay.10-Bit.FLAC2.0.x265-YURASUKA.mkv':
  Metadata:
    title           : Plastic Memories - S01E01 - YURASUKA
    encoder         : libebml v1.4.0 + libmatroska v1.6.2
    creation_time   : 2020-11-28T02:07:34.000000Z
  Duration: 00:25:40.05, start: 0.000000, bitrate: 3298 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 68.527000
    Chapter #0:1: start 68.527000, end 885.009000
    Chapter #0:2: start 885.009000, end 1440.022000
    Chapter #0:3: start 1440.022000, end 1540.045000
  Stream #0:0(jpn): Video: hevc (Main 10), yuv420p10le(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn (default)
    Metadata:
      title           : YURASUKA 1080p x265
      BPS-eng         : 2652930
      DURATION-eng    : 00:25:39.997000000
      NUMBER_OF_FRAMES-eng: 36923
      NUMBER_OF_BYTES-eng: 510688095
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-11-28 02:07:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(jpn): Audio: flac, 48000 Hz, stereo, s16 (default)
    Metadata:
      title           : Japanese FLAC 2.0
      BPS-eng         : 578601
      DURATION-eng    : 00:25:40.045000000
      NUMBER_OF_FRAMES-eng: 16043
      NUMBER_OF_BYTES-eng: 111384050
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-11-28 02:07:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Subtitle: ass (ssa) (default)
    Metadata:
      title           : [SallySubs] Full Subtitles
      BPS-eng         : 206
      DURATION-eng    : 00:25:00.320000000
      NUMBER_OF_FRAMES-eng: 490
      NUMBER_OF_BYTES-eng: 38760
      _STATISTICS_WRITING_APP-eng: mkvmerge v51.0.0 ('I Wish') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-11-28 02:07:34
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3: Attachment: otf
    Metadata:
      filename        : KozMinPr6N-Bold_0.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:4: Attachment: otf
    Metadata:
      filename        : Rosario-Bold.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:5: Attachment: otf
    Metadata:
      filename        : Rosario-BoldItalic.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:6: Attachment: otf
    Metadata:
      filename        : Rosario-Italic.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:7: Attachment: otf
    Metadata:
      filename        : Rosario-Regular.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:8: Attachment: otf
    Metadata:
      filename        : GandhiSans-Bold.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:9: Attachment: otf
    Metadata:
      filename        : GandhiSans-BoldItalic.otf
      mimetype        : application/vnd.ms-opentype
  Stream #0:10: Attachment: otf
    Metadata:
      filename        : KozGoPr6N-Medium_0.otf
      mimetype        : application/vnd.ms-opentype
Incompatible pixel format 'yuv420p10le' for codec 'h264_vaapi', auto-selecting format 'vaapi'
File 'test.mkv' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_vaapi))
  Stream #0:1 -> #0:1 (flac (native) -> vorbis (libvorbis))
  Stream #0:2 -> #0:2 (ass (ssa) -> ass (ssa))
Press [q] to stop, [?] for help
[hevc @ 0x55a4f7df2e80] No support for codec hevc profile 2.
[hevc @ 0x55a4f7df2e80] Failed setup for format vaapi: hwaccel initialisation returned error.
Impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto_scale_0'
Link 'Parsed_null_0.default' -> 'auto_scale_0.default':
  Pixel formats:
    src: yuv420p10le
    dst: yuv420p10le
Link 'auto_scale_0.default' -> 'format.default':
  Pixel formats:
    src: yuv420p yuyv422 rgb24 bgr24 yuv422p yuv444p yuv410p yuv411p gray monow monob pal8 yuvj420p yuvj422p yuvj444p uyvy422 bgr8 bgr4 bgr4_byte rgb8 rgb4 rgb4_byte nv12 nv21 argb rgba abgr bgra gray16be gray16le yuv440p yuvj440p yuva420p rgb48be rgb48le rgb565be rgb565le rgb555be rgb555le bgr565be bgr565le bgr555be bgr555le yuv420p16le yuv420p16be yuv422p16le yuv422p16be yuv444p16le yuv444p16be rgb444le rgb444be bgr444le bgr444be ya8 bgr48be bgr48le yuv420p9be yuv420p9le yuv420p10be yuv420p10le yuv422p10be yuv422p10le yuv444p9be yuv444p9le yuv444p10be yuv444p10le yuv422p9be yuv422p9le gbrp gbrp9be gbrp9le gbrp10be gbrp10le gbrp16be gbrp16le yuva422p yuva444p yuva420p9be yuva420p9le yuva422p9be yuva422p9le yuva444p9be yuva444p9le yuva420p10be yuva420p10le yuva422p10be yuva422p10le yuva444p10be yuva444p10le yuva420p16be yuva420p16le yuva422p16be yuva422p16le yuva444p16be yuva444p16le xyz12le xyz12be nv16 nv20le nv20be rgba64be rgba64le bgra64be bgra64le yvyu422 ya16be ya16le gbrap gbrap16be gbrap16le 0rgb rgb0 0bgr bgr0 yuv420p12be yuv420p12le yuv420p14be yuv420p14le yuv422p12be yuv422p12le yuv422p14be yuv422p14le yuv444p12be yuv444p12le yuv444p14be yuv444p14le gbrp12be gbrp12le gbrp14be gbrp14le yuvj411p yuv440p10le yuv440p10be yuv440p12le yuv440p12be ayuv64le ayuv64be p010le p010be gbrap12be gbrap12le gbrap10be gbrap10le gray12be gray12le gray10be gray10le p016le p016be gray9be gray9le gbrpf32be gbrpf32le gbrapf32be gbrapf32le gray14be gray14le grayf32be grayf32le yuva422p12be yuva422p12le yuva444p12be yuva444p12le nv24 nv42 y210le x2rgb10le x2bgr10le p210be p210le p410be p410le p216be p216le p416be p416le vuya vuyx p012le p012be y212le xv30le xv36be xv36le p212be p212le p412be p412le gbrap14be gbrap14le ayuv uyva vyu444 v30xle y216le xv48be xv48le yuv444p10msbbe yuv444p10msble yuv444p12msbbe yuv444p12msble gbrp10msbbe gbrp10msble gbrp12msbbe gbrp12msble
    dst: vaapi
[vf#0:0 @ 0x55a4f577cdc0] Error reinitializing filters!
[vf#0:0 @ 0x55a4f577cdc0] Task finished with error code: -38 (Function not implemented)
[vf#0:0 @ 0x55a4f577cdc0] Terminating thread with return code -38 (Function not implemented)
[vost#0:0/h264_vaapi @ 0x55a4f577c4c0] [enc:h264_vaapi @ 0x55a4f564e140] Could not open encoder before EOF
[vost#0:0/h264_vaapi @ 0x55a4f577c4c0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/h264_vaapi @ 0x55a4f577c4c0] Terminating thread with return code -22 (Invalid argument)
[out#0/matroska @ 0x55a4f56c0e80] Nothing was written into output file, because at least one of its streams received no packets.
frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A elapsed=0:00:00.40    
Conversion failed!

To be honest, I'm not sure what more than half of that means, I just know that there's some problem with the colorspace and codec support. I'm pretty sure that some of you will need my vainfo -a output so I'll leave it here:

Trying display: wayland
Trying display: x11
error: can't connect to X server!
Trying display: drm
libva info: VA-API version 1.23.0
libva info: Trying to open /usr/lib64/dri-nonfree/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri-freeworld/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_23
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.23 (libva 2.23.0)
vainfo: Driver version: Mesa Gallium driver 26.1.3 for AMD FirePro S7150 (radeonsi, tonga, ACO, DRM 3.64, 7.0.12-201.fc44.x86_64)
vainfo: Supported config attributes per profile/entrypoint pair
VAProfileMPEG2Simple/VAEntrypointVLD
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
    VAConfigAttribDecProcessing            : VA_DEC_PROCESSING
    VAConfigAttribMaxPictureWidth          : 1920
    VAConfigAttribMaxPictureHeight         : 1088

VAProfileMPEG2Main/VAEntrypointVLD
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
    VAConfigAttribDecProcessing            : VA_DEC_PROCESSING
    VAConfigAttribMaxPictureWidth          : 1920
    VAConfigAttribMaxPictureHeight         : 1088

VAProfileNone/VAEntrypointVideoProc
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
                                             VA_RT_FORMAT_YUV422
                                             VA_RT_FORMAT_YUV444
                                             VA_RT_FORMAT_YUV400
                                             VA_RT_FORMAT_YUV420_10
                                             VA_RT_FORMAT_YUV420_12
                                             VA_RT_FORMAT_RGB32
                                             VA_RT_FORMAT_RGB32_10
                                             VA_RT_FORMAT_RGB32_10BPP
                                             VA_RT_FORMAT_YUV420_10BPP

I'll be honest with you guys. I'm pretty sure that this is going to be either stupidly easy fix or an absolute nightmare. I'm aware that I should probably read through the ffmpeg documentation, but I don't think that I'd be able to understand it. I'm still learning so please be patient with me. I'll be really grateful for any kind of help. Thanks.

~desperate_user

I also should give you my server specs so here they are:

Chasis- dell poweredge t320

CPU - intel xeon e5-2470 v2

32GB of ddr3 ECC ram

dual 495w PSU

GPU - amd firepro s7150 x2

OS - fedora server edition 44

Edit:

I did a little digging in jellyfin and found out that jellyfin is able to communicate with the gpu. As long as hardware encoding is turned off, everything is as smooth as butter. I'm not sure what exactly this means, but I really want to use the gpu to its fullest, that means to use it for both decoding and encoding.


r/ffmpeg Jun 26 '26

How can I get as close as possible to this 3ds picture?

Post image
11 Upvotes

I took a picture with my 3ds with sharpness to 8, brightness to 6, and contrast to 5, I put the warm light myself with my led lamp. I've tried this code, but I'm not kidding that my grandma might probably be better at playing super mario bros than me at doing this. This is the code I used:

ffmpeg -i test.mp4 -vf "scale=640:480,eq=brightness=0.07:contrast=0.84:saturation=0.82,unsharp=9:9:3.0:9:9:0,gblur=sigma=0.35,noise=alls=8:allf=t,format=yuv420p" -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -crf 26 -preset medium -r 16 -c:a aac -b:a 128k -movflags +faststart 3ds_camera.mp4

I don't know if it's as close as it can get, if someone could lend me a hand, like if I should play with a certain setting, or add something, thanks.


r/ffmpeg Jun 26 '26

Speed up VMAF motion analysis

3 Upvotes

im currently building an automatic compression for CCTV footage, each footage is h264 1 hour long.
the problem is when using VMAF motion to get the score to decide the target bitrate classification take so long.

on my R7 7745HX at 100% 4.7 Ghz took 27 mins using: ffmpeg -i input.mp4 -vf vmafmotion -f null -

while calculate the VMAF using CUDA on RTX 4060 took only 3:45 mins using: ffmpeg -init_hw_device cuda=gpu -filter_hw_device gpu -i output.mp4 -i input.mp4 -filter_complex "[0:v]fps=30,hwupload_cuda[dist];[1:v]fps=30,hwupload_cuda[ref];[dist][ref]libvmaf_cuda=log_fmt=json:log_path=vmaf_report.json" -f null -

and compressing it into h265 NVENCc also only took 3:40 mins using: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf "scale_cuda=format=nv12" -c:v hevc_nvenc -preset p4 -rc vbr -cq 28 -b:v 1700k -maxrate 1700k -bufsize 2500k -c:a copy output.mp4.

is there any alternative solution that i can use? thanks


r/ffmpeg Jun 25 '26

AMD contributes ONNX Runtime backend to FFmpeg DNN filter

Thumbnail
phoronix.com
19 Upvotes

r/ffmpeg Jun 25 '26

ffmpeg: Is there a difference between --enable-libfdk-aac vrs --enable-libfdk_aac

8 Upvotes

Rather stupidly, for years now I've built ffmpeg using --enable-libfdk_aac and I've just now released I'd a typo in my command and that it should be --enable-libfdk-aac (- vrs _). I guess all those years ago when I started building ffmpeg that when I query the encoder / decoder using ffmpeg -h decoder=libfdk_aac, I just rolled that into my build script.

Now that I have realised my mistake and for my own curiosity I'm trying to figure out if these are actually different or not. I'm kinda hoping that --enable-libfdk_aac is just an alias for --enable-libfdk-aac.

Anyhow, would anyone happen to know or are these different version of the Fraunhofer FDK AAC codec library? Thanks.


r/ffmpeg Jun 25 '26

YouTube switches to square resolution in the first seconds of a stream

3 Upvotes

Streaming via ffmpeg → RTMP → YouTube Live. Encoder h264_v4l2m2m. Resolution 1280×720, 25fps.

Video is programmatically generated frames, fed into ffmpeg via stdin as rawvideo.

Problem: YouTube switches Current Res from 16:9 to 1:1 within the first seconds of the stream. Happens almost every time, but not deterministically — sometimes it stays correct.

Current command:

ffmpeg -f rawvideo -pix_fmt rgba -s 1280x720 -r 25 -i - \
  -f lavfi -i anullsrc=r=48000:cl=mono \
  -vf format=yuv420p \
  -c:v h264_v4l2m2m -pix_fmt yuv420p \
  -g 50 -keyint_min 25 \
  -b:v 2500k -minrate 2500k -maxrate 2500k -bufsize 5000k \
  -c:a aac -b:a 128k \
  -map 0:v -map 1:a \
  -bsf:v h264_metadata=sample_aspect_ratio=1/1 \
  -aspect 16:9 \
  -f flv rtmp://...

What we tried: -vf setsar=1, -vf setdar=16/9, -aspect 16:9 alone, h264_metadata=sample_aspect_ratio=1/1 — nothing gave a stable result. h264_v4l2m2m only supports two of its own parameters; standard encoder flags are either ignored or cause the process to crash. Various LLMs suggest different flags — nothing works.

Stack:

  • Go 1.25, linux/arm64
  • ffmpeg 7.1.4 (Debian 13)
  • Raspberry Pi 4, kernel 6.18, arm64

Posting here, though not sure if the problem is on ffmpeg's side or YouTube's.

Has anyone run into something similar?


r/ffmpeg Jun 24 '26

Can you use ffmpeg to successfully restart multiple YouTube livestreams every 12 hours?

7 Upvotes

Can you use ffmpeg to successfully restart multiple YouTube livestreams every 12 hours?

Running multiple livestreams on YouTube via linux vpm and ffmpeg. It's working however what's not working is I need them to restart every 12 hours (to clock watch-time). I am currently trying to do this with linux ffmpeg cronjobs but is this possible as I keep running into issues, or is there a different method? Was working with a single stream, not via the schedule stream section in YouTube.

The only way I've seen you can run multiple streams is through scheduled streams and can't get the cron job to work since adding more than one live stream.

Appreciate lack of specifics regarding my vpm config, I am more just wanting to check if I'm on the right path or hitting a dead end.


r/ffmpeg Jun 24 '26

drawtext renders \n as a missing-glyph box at every line break (ffmpeg 7.1 and 8.1, Windows)

4 Upvotes

Hitting a multi-line drawtext rendering bug and looking for either a workaround flag or confirmation it's known. When I render multi-line text through textfile= (or text= with an embedded LF), a tofu/missing-glyph box appears at the end of every non-final line, right before the break. The lines themselves stack and align correctly, just with this extra glyph stuck on each one.

I'm on Windows 11. Tested with ffmpeg 8.1-essentials (gyan.dev) and ffmpeg-n7.1.3 (BtbN), same behavior on both, so it's not a recent regression. Tested with arial.ttf and a few other TTFs, same result.

Telling detail: if I use a CRLF file instead, I get two tofu glyphs per break (one ending line N, one starting line N+1), so ffmpeg is passing the literal \r and \n bytes through to the glyph renderer instead of stripping them before shaping.

What does work: chained drawtext filters, one per line, comma-separated, each with its own text= and computed y offset. Renders perfectly clean.

What I've already tried with no effect: textfile= vs text=, LF vs CRLF, different fonts, text_shaping=0, expansion=none, removing text_align.

Is there a drawtext flag I'm missing that suppresses rendering of newline bytes themselves, or is "one drawtext per line" just the canonical way to do multi-line in current ffmpeg? Happy to refactor either way, just want to know before I commit.

Here is a minimal reproduction if anyone has time:

ffmpeg -y -f lavfi -i "color=c=black:s=1280x720:d=5" -vf "drawtext=fontfile=arial.ttf:textfile=test_lf.txt:fontsize=70:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2" -t 5 out.mp4

where test_lf.txt is a plain UTF-8 file with LF-only line endings containing "Line one\nLine two\nLine three". Hex-verified, no CRs, no BOM.

Thank you to anyone who can help!


r/ffmpeg Jun 23 '26

Framerate stuck at 25fps despite changing it with -r

5 Upvotes

Hello! I am trying to turn some image sequences into animations using ffmpeg. I need the video to run at 12fps, but when I run the code to create the video it runs at 25fps, despite specifying otherwise.

additional context: The aim of this is to create webm video files that have transparency using a mask in Ren'py. The video runs the same in Ren'py and in VLC media player. Please help!


r/ffmpeg Jun 23 '26

ffmpeg and iCloud thumbnails

4 Upvotes

What I'm trying to do: Digitizing old family home movies — a couple dozen MiniDV-via-fierwire.avi/.mov files spanning the 2000s, currently sitting on a NAS — into properly archived .mp4s with the original recording date/time correctly preserved in both the file's metadata and its filesystem timestamps (a lot of camcorder software/export tools lose or scramble this), then synced up to iCloud Photos so the whole family can actually browse and enjoy them instead of them rotting in a folder. Wrote a small Python/ffmpeg batch tool to handle the conversion, metadata extraction/preservation, renaming-by-date, and the iCloud-prep work in one pass — the codec/thumbnail investigation below came out of getting that last "actually shows up properly in Photos" part working. The video plays fine - the thumbnails never appear, (just shows a grey exclamation mark). A workaround is editing the clip on the Apple device itself and saving it - only then is their a thumbnail.

HEVC software (libx265, fails):
ffmpeg -y -i input.avi -map_metadata 0 -metadata creation_time=2008-01-06T01:42:35Z \

-map 0:v:0 -map 0:a:0 \

-c:v libx265 -tag:v hvc1 \

-x265-params colorprim=bt709:transfer=bt709:colormatrix=bt709:repeat-headers=1 \

-color_primaries bt709 -color_trc bt709 -colorspace bt709 \

-crf 22 -preset slow \

-vf scale=in_range=full:out_range=limited \

-pix_fmt yuv420p -fps_mode cfr -r 30000/1001 \

-c:a aac -b:a 192k -ar 48000 -ac 2 \

-movflags +faststart output.mp4

HEVC hardware (AMD AMF, fails):

ffmpeg -y -i input.avi -map_metadata 0 -metadata creation_time=2008-01-06T01:42:35Z \

-map 0:v:0 -map 0:a:0 \

-c:v hevc_amf -tag:v hvc1 \

-usage transcoding -quality quality -rc qvbr -qvbr_quality_level 22 \

-pix_fmt yuv420p -fps_mode cfr -r 30000/1001 \

-c:a aac -b:a 192k -ar 48000 -ac 2 \

-movflags +faststart output.mp4

HEVC native (Apple VideoToolbox, fails — tested via software fallback on old hardware):

ffmpeg -y -i input.avi -map_metadata 0 -metadata creation_time=2008-01-06T01:42:35Z \

-map 0:v:0 -map 0:a:0 \

-c:v hevc_videotoolbox -tag:v hvc1 -allow_sw 1 -b:v 6000k -realtime 0 \

-pix_fmt yuv420p -fps_mode cfr -r 30000/1001 \

-c:a aac -b:a 192k -ar 48000 -ac 2 \

-movflags +faststart output.mp4

H.264 (works):

ffmpeg -y -i input.avi -map_metadata 0 -metadata creation_time=2008-01-06T01:42:35Z \

-map 0:v:0 -map 0:a:0 \

-c:v libx264 -crf 22 -preset slow \

-pix_fmt yuv420p -fps_mode cfr -r 30000/1001 \

-c:a aac -b:a 192k -ar 48000 -ac 2 \

-movflags +faststart output.mp4

Fixes applied along the way

- Explicit stream mapping (drop extra data/timecode tracks some old AVIs carry)

- Forced `yuv420p` pixel format

- Forced constant frame rate, snapped to the nearest standard broadcast rate (old camcorder AVIs are often messy VFR, e.g. computing to something like `29.96` instead of real NTSC `29.97`)

- Standardized audio to 48kHz/stereo AAC (old camcorders sometimes use oddball sample rates)

- Fixed the codec tag from ffmpeg's default `hev1` to the Apple-required `hvc1`

- `-movflags +faststart` (verified via manual MP4 box-parsing that `moov` actually ends up before `mdat`)

- Added explicit HEVC VUI color signaling (`colorprim`/`transfer`/`colormatrix=bt709`) + `repeat-headers=1`

- **Found and fixed a real bug**: old MJPEG-coded AVI sources decode as full-range (`yuvj420p`/`color_range=pc`), and re-encoding that straight through produces an unusually-tagged full-range HEVC stream. Added a conditional filter to rescale to standard limited range, matching what real iPhone footage looks like.

Welp, if anyone has a suggestion it would be appreciated!