Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Where to download avcodec.dll ? [closed]
29 juin, par Олег Ю.I see in the folder of some application FFMPEG files avcodec.dll, avformat.dll, avutil.dll, etc. They are all old version of FFMPEG. I wanted to update them, but I did not find where to download them on the FFMPEG website. Are these complete libraries available for download? Or do they exist only in development files and the authors of some application create FFMPEG .dll files themselves? In other words, avcodec.dll files from different applications are not interchangeable? Help me figure it out.
-
Manim Animation Rendering Fails on Google Cloud Run : Segment Combination Issues [closed]
28 juin, par Ahaskar KashyapProblem Summary
I'm running a Manim animation server on Google Cloud Run that successfully creates video segments but fails during the FFmpeg combination step. The behavior is inconsistent based on the number of segments created.
Environment
- Platform: Google Cloud Run (8GB RAM, 4 CPU)
- Container: Debian 12 (bookworm) with Python 3.9.23
- FFmpeg: 5.1.6 (with h264 support enabled)
- Manim: Latest version with
-ql
(480p15) quality setting - Timeout: 240 seconds
Observed Behavior
Animation Complexity Segments Created Final Video Status Simple (2 segments) ✅ Success ✅ Created (7,681 bytes) ❌ Reports "failed" Complex (8+ segments) ✅ Success ❌ Not created ❌ Actually fails Code Structure
# Manim command used manim_cmd = [ 'manim', python_file, scene_class, '--media_dir', output_dir, '-ql', # Low quality (480p15) '--disable_caching', '--output_file', f"{output_filename}.mp4", '--verbosity', 'ERROR', '--progress_bar', 'none', '--write_to_movie' ]
Specific Issues
Issue 1: False Negatives (Simple Animations)
- What happens: Manim creates 2 segments successfully, FFmpeg combines them into final video
- Problem: Final video exists and is playable, but process reports "Manim failed (code 1)"
- Evidence: Can download the "failed" video via
/videos/filename.mp4
and it plays correctly
Issue 2: Real Failures (Complex Animations)
- What happens: Manim creates 8+ segments successfully
- Problem: FFmpeg combination step genuinely fails, no final video created
- Error: Process exits with code 1, only partial segments remain
Key Questions
- Why does FFmpeg combination work for 2 segments but fail for 8+ segments?
- Why does the same code work locally but fail on Cloud Run?
- Is this a Cloud Run container limitation, FFmpeg configuration issue, or Manim-specific problem?
- How can I debug FFmpeg combination failures in a containerized environment?
File Structure (When Working)
/app/manim_animations/ └── animation_name/ └── videos/ └── animation_name_1234/ └── 480p15/ ├── partial_movie_files/ │ └── SceneClass/ │ ├── uncached_00000.mp4 │ └── uncached_00001.mp4 └── final_animation.mp4 # This gets created for 2 segments
Error Output
🔒 ISOLATED: Manim return code: 1 Manim failed (code 1): [stderr contains FFmpeg errors]
Has anyone encountered similar issues with Manim + FFmpeg on Cloud Run or other containerized environments? Any insights into why segment count affects combination success would be greatly appreciated.
Investigation Results
What Works:
- ✅ Local development (identical code works perfectly)
- ✅ FFmpeg installation (
ffmpeg -version
works, h264 encoders available) - ✅ Segment creation (all
uncached_*.mp4
files created with correct sizes) - ✅ Simple animations after container restart
What Doesn't Work:
- ❌ Segment combination for 8+ segments
- ❌ Status detection for 2-segment animations
- ❌ Animations after multiple renders (resource accumulation?)
Theories Tested:
- Resource constraints: Upgraded to 16GB/8CPU - made things worse
- FFmpeg version: Upgraded 5.1.6→7.x - broke basic functionality
- File accumulation: Container restart helps temporarily
- Path detection: Isolation script may look in wrong directories
-
I can't understand how to use ffmpeg in javascript (if it's even possible)
28 juin, par Laimonas RupeikaStraight to the problem, I want to use ffmpeg in my javascript project for video editing. So I found cdn:
which references to "https://github.com/Kagami/ffmpeg.js", which is ffmpeg port to javascript as I understand? I don't get any errors on import, but if I try loading ffmpeg:<script src="https://cdn.jsdelivr.net/npm/@salomvary/ffmpeg.js-umd@3.1.9001/ffmpeg-mp4.min.js"></script>
// Initialize FFmpeg after the GAPI client is loaded const ffmpeg = createFFmpeg({ log: true }); // // Load the FFmpeg library await ffmpeg.load();
I get error:
Uncaught (in promise) ReferenceError: createFFmpeg is not defined at initializeGapiClient (index:89:18)
and it also messes my whole project. So if possible, how can I use ffmpeg in pure javascript, not Node.js. Should I download ffmpeg library files and then include them in project, I'm totally lost at this. -
ffplay video playing with slider where i can slider to any position of the video
27 juin, par Eswar Tis it possible to slide to a specific location of video in FFplay?
Like how we do in VLC when we open a video a slider will be a bottom using which we can move to any part of the video is it possible in ffplay? using either commands or any GUI
-
Camera2 API switching camera during recording
27 juin, par Max EfimovI'm working with Camera2 API and in my app it's important to switch the camera during recording. After each camera switch I save video fragment to disk, and after stopping the recording I merge videos into one using
-f concat -safe 0 -i listPath -c copy finalPath
command of FFmpeg for Android. When I open a separate video fragment, it looks correct, but when I open the merged video, videos recorded on the back camera are rotated 180 degrees. The problem is only in the merged video.In meta-tag of videos if video recorded on back camera, then "rotate" tag has 90 degrees, otherwise 270 degrees.
As I understood when ffmpeg merges a videos it automatically rotates the video if it has different "rotate" tag in he's metatags.
How I can solve this problem?
P.S Also I tried to use MP4Parser Library for merging, but it has the same problems.
P.P.S.-noautorotate
param for ffmpeg does not help me.