charmbracelet / vhs

Your CLI home video recorder 📼
MIT License
14.72k stars 247 forks source link

Running a tape made with `new` fails due to missing directory #206

Closed mntlty closed 1 year ago

mntlty commented 1 year ago

Running

$ vhs new demo.tape

creates a file based on https://github.com/charmbracelet/vhs/blob/bee17de24747c91ad4f59568ffc000b9fd9b6646/examples/demo.tape#L47

unlike the example in the readme, this outputs to examples/demo.gif which can fail if the examples/ directory doesn't already exist (running on OS X)

vhs < demo.tape
# commands output...
Creating GIF...
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, image2, from '/var/folders/5y/0bvpm1nd0s18h0t237hzx61h0000gn/T/vhs3003759080/frame-text-%05d.png':
  Duration: 00:00:26.80, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: png, rgba(pc), 1026x418, 25 fps, 25 tbr, 25 tbn
Input #1, image2, from '/var/folders/5y/0bvpm1nd0s18h0t237hzx61h0000gn/T/vhs3003759080/frame-cursor-%05d.png':
  Duration: 00:00:26.80, start: 0.000000, bitrate: N/A
  Stream #1:0: Video: png, rgba(pc), 1026x418, 25 fps, 25 tbr, 25 tbn
examples/demo.gif: No such file or directory
rm-dr commented 1 year ago

Yep, this is a problem,

Related to #121 and #179.

bashbunni commented 1 year ago

Hey @mntlty and @rm-dr,

This should be fixed in this merged PR. Can you please confirm if you're still experiencing this issue?

mntlty commented 1 year ago

@bashbunni looks like there may need to be a new release? https://github.com/charmbracelet/vhs/releases/tag/v0.2.0 is from Nov. 22 and doesn't include that fix

I'm using brew to install vhs as per the instructions

caarlos0 commented 1 year ago

fixed in v0.3.0

mntlty commented 1 year ago

@caarlos0 works for me in the latest version! ✨