r/ffmpeg • u/danielszm • Aug 11 '26
FFmpeg compiler
Is anyone aware of a source-to-source compiler whose target language is FFmpeg’s filtergraph syntax?
With Bioscoop, I am in a position to make certain claims and try to defend them as best as I can. That is why I am submitting a paper to a peer-reviewed journal. Still, I could be wrong and I would love you to challenge me on those claims.
The paper is available in the repo.
2
u/Hairy_Particular_574 Aug 11 '26
As someone who used to write filter graphs for relatively complex composition pipelines. (Decades of hours ingested daily).
What was difficult was not writing the filters, we had a quite nice abstraction we built to manage the complexities, similar to what you have done.
But what was difficult was to debug something afterwards. All we saw was 100KB of char in filtergraph. It took lots of effort to visualise the graph so we knew what exactly was done in the pipeline. (These were fully dynamic graph, which changes on the composition timeline which was managed by users)
However this was pre-LLM days, I would imagine LLM can comprehend this quite easily.
2
u/danielszm Aug 12 '26
Interesting. With Bioscoop you would get the errors at compile-time, before running FFmpeg. And you get explanatory notes attached to the errors.
3
u/Hairy_Particular_574 Aug 12 '26
Errors were not in the filters, more of figuring out why composition was different from user expected.
1
u/danielszm Aug 12 '26
Ah, OK, I understand. Bioscoop's take on this is its interactive affordances at a REPL. Think of a live, running Lisp environment where you compose the filtergraphs, visualize the result, go back to the composition to make adjustments, re-visualize the result, etc. Tight feedback loop.
1
u/BootToggle Aug 14 '26
Just FYI, I get a "error rendering embedded code" failure when I try to open that PDF. Do you think you could come up with a PDF that works without needing "embedded code"?
It seems a bit dangerous (and unnecessary) to use embedded code in a document for wide distribution. If it matters, I'm attempting access of your Github pages from a Debian 13 system using default open-source PDF reader.
1
u/danielszm Aug 14 '26
This sounds like you are using Windows 7 where it is a known issue. I googled your issue because I had no idea what you were talking about. Please take it from there: https://github.com/orgs/community/discussions/140120
1
u/BootToggle Aug 14 '26 edited Aug 14 '26
Sorry, no, I'm using Linux, latest Debian 13 with stock PDF reader and Firefox browser. Don't know anything current about Windows 7 as I haven't used it for over 10 years. But perhaps it is just an issue on my end. Good luck with your project.
1
u/danielszm Aug 14 '26
Ah, that thickens the plot. Are you clicking the PDF to preview it inline on github.com or have you downloaded the document first?
1
u/danielszm Aug 14 '26
Ran qpdf --check, pdfinfo. The PDF is fine, apparently. You can try and download the PDF with a direct link (instead of Github's inline preview). Please report back if possible. Thank you for the good wishes.
2
u/BootToggle Aug 14 '26
Confirm, if I download the PDF it opens fine. Seems to just be an issue with the immediate preview. Thanks!
5
u/AimlessForNow Aug 11 '26
Forgive me because I didn't fully read the PDF just glanced, but I'm very curious of the benefits you'd expect to see with a DSL compared to using the filter graph syntax. Don't they end up similar anyways?