baowenbo / DAIN

Depth-Aware Video Frame Interpolation (CVPR 2019)
https://sites.google.com/view/wenbobao/dain
MIT License
8.18k stars 839 forks source link

CalledProcessError - DAIN Google Colab #152

Open heraldob opened 1 year ago

heraldob commented 1 year ago

Hello, how are you, I get this error, I don't know how to solve it, what am I doing wrong?

Create output video

%cd {FRAME_OUTPUT_DIR} %shell ffmpeg -y -r {60} -f image2 -pattern_type glob -i '*.png' '/content/gdrive/My Drive/{OUTPUT_FILE_PATH}'

/content/DAIN/output_frames ffmpeg version 3.4.11-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04) configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libavresample 3. 7. 0 / 3. 7. 0 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 libpostproc 54. 7.100 / 54. 7.100 [image2 @ 0x55c2d93c8000] Could not open file : .png [image2 @ 0x55c2d93c8000] Could not find codec parameters for stream 0 (Video: png, none(pc)): unspecified size Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, image2, from '.png': Duration: 00:00:00.02, start: 0.000000, bitrate: N/A Stream #0:0: Video: png, none(pc), 60 tbr, 60 tbn, 60 tbc Output #0, mp4, to '/content/gdrive/My Drive/DAIN/output.mp4': Output file #0 does not contain any stream

CalledProcessError Traceback (most recent call last) in 1 # Create output video 2 get_ipython().run_line_magic('cd', '{FRAME_OUTPUT_DIR}') ----> 3 get_ipython().run_line_magic('shell', "ffmpeg -y -r {60} -f image2 -pattern_type glob -i '*.png' '/content/gdrive/My Drive/{OUTPUT_FILE_PATH}'")

2 frames /usr/local/lib/python3.7/dist-packages/google/colab/_system_commands.py in check_returncode(self) 133 if self.returncode: 134 raise subprocess.CalledProcessError( --> 135 returncode=self.returncode, cmd=self.args, output=self.output) 136 137 def _reprpretty(self, p, cycle): # pylint:disable=unused-argument

CalledProcessError: Command 'ffmpeg -y -r 60 -f image2 -pattern_type glob -i '*.png' '/content/gdrive/My Drive/DAIN/output.mp4'' returned non-zero exit status 1.

AlphaGit commented 1 year ago

Hi! I've seen this happening when it cannot find the frame files (png files) to generate the final video.

You can try interpolation again, making sure you're using the latest notebook (at this location), or:

heraldob commented 1 year ago

Thank you very much for your answer, I was able to understand the problem. I solved it by moving the "outup_frames" folder to /content/drive/MyDrive/output_frames. I then ran the command:

%cd /content/drive/MyDrive/output_frames

next:

%shell ffmpeg -y -r {TARGET_FPS} -f image2 -pattern_type glob -i '*.png' '/content/drive/MyDrive/output_frames/output.mp4'

and I was able to get the video.