Open nikhiltree opened 1 year ago
My first guess is that the OS of the container is not compatible with the binary ffmpeg executable that is shipped with imageio-ffmpeg. The system's ffmpeg is then used, which seems to behave differently. If ffmpeg is not available I would expect a different error, but it could be that the detection in ffmpeg_reader.py let it slip through.
To be honest, this looks to me like a bug in moviepy, since the code wrongfully assumes that the lines
object is not empty.
I am using minikube it's running inside docker-container i don't how to make this ffmpeg executable inside docker-container i didn't find any solution since 3 week and my project is hold on now
What OS are you using in the container? You could try using a recent Ubuntu to see if that works, which would at the least narrow down the problem.
My first guess is that the OS of the container is not compatible with the binary ffmpeg executable that is shipped with imageio-ffmpeg. The system's ffmpeg is then used, which seems to behave differently. If ffmpeg is not available I would expect a different error, but it could be that the detection in ffmpeg_reader.py let it slip through.
To be honest, this looks to me like a bug in moviepy, since the code wrongfully assumes that the
lines
object is not empty.
I don't think there is bug in moviepy if there is bug in moviepy then it will not work in docker-compose i thinks issue is between minikube and ffmpeg executable Os : Ubuntu 20.04 LTS
from __future__ import division
import logging
import os
import re
import subprocess as sp
import warnings
import numpy as np
from moviepy.compat import DEVNULL, PY3
from moviepy.config import get_setting # ffmpeg, ffmpeg.exe, etc...
from moviepy.tools import cvsecs
is_GIF = False
cmd = [get_setting("FFMPEG_BINARY"), "-i", "https://videorenderingbucket.s3.ap-south-1.amazonaws.com/video_file/The+Breathtaking+Beauty+of+Nature+-+HD.mp4"]
if is_GIF:
cmd += ["-f", "null", "/dev/null"]
popen_params = {"bufsize": 10**5,"stdout": sp.PIPE,"stderr": sp.PIPE,"stdin": DEVNULL}
if os.name == "nt":
popen_params["creationflags"] = 0x08000000
proc = sp.Popen(cmd, **popen_params)
(output, error) = proc.communicate()
infos = error.decode('utf8')
print(infos)
this code is working fine in host machine as well as docker-compose but issue with minikube
I don't think there is bug in moviepy if there is bug in moviepy then it will not work in docker-compose i thinks issue is between minikube and ffmpeg executable
You're right, it's more subtle ... I agree there's likely a problem in ffmpeg not working or producing different output than expected with minicube. But moviepy has not taken this case into account - which results in an error that hides the real cause.
this code is working fine in host machine as well as docker-compose but issue with minikube
Can you also make it print cmd
and show what it prints in minicube?
cmd : ["/usr/local/lib/python3.8/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2"," -i", "https://videorenderingbucket.s3.ap-south-1.amazonaws.com/video_file/The+Breathtaking+Beauty+of+Nature+-+HD.mp4"]
And what does print(infos)
show?
ubuntu22.04 ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 段错误 (核心已转储)
Problem : based on my understanding ffmpeg-linux64-v4.2.2 needs some of depedancies which is i don't know ffmpeg_reader.py used this ffmpeg-linux64-v4.2.2 for subprocess start more info : link line 257 minikube path : /usr/local/lib/python3.8/site-packages/imageio_ffmpeg/binaries/ffmpeg-linux64-v4.2.2
Expected Behavior
Actual Behavior
Specifications
Requirement.txt