Comments (14)
@sugatoray I don't have an M1 to test with. It looks like downloading ffmpeg via the extension is working per the comment above, have you tried that yet?
from vscode-chronicler.
Operating system would be really helpful. And how did you install ffmpet? The plugin supports auto installing it for you so it could also be using a different version potentially.
The easiest way to debug is to get a CLI command that reproduces the issue to help narrow it down.
from vscode-chronicler.
@pjc1288 Wanted to follow up if you were able to find any more information about the issue?
from vscode-chronicler.
@pjc1288 If you can, please run npx @arcsine/screen-recorder test.mp4
from the command line, and the output should help identify the problem.
from vscode-chronicler.
Same issue as @pjc1288
@arciisine This is the output on Mac M1 after running a brew install ffmpeg
+ npx @arcsine/screen-recorder test.mp4
:
bash-3.2$ npx @arcsine/screen-recorder test.mp4
/usr/local/homebrew/bin/ffmpeg -f avfoundation -list_devices true -i ""
Invalid exit status: 1
/usr/local/homebrew/bin/ffmpeg -capture_cursor 1 -threads 4 -f avfoundation -i 2:none -preset ultrafast -crf 10 -pix_fmt yuvj444p -c:v libx264 -y -vf 'scale=2560:1080:flags=lanczos,crop=2560:993:0:25' test.mp4
Recording for 5 seconds...
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.5 (clang-1205.0.22.11)
configuration: --prefix=/usr/local/homebrew/Cellar/ffmpeg/4.4_2 --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-avresample --enable-videotoolbox
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVFoundation indev @ 0x7fefd0535180] Configuration of video device failed, falling back to default.
[avfoundation @ 0x7fefd0816a00] Selected pixel format (yuv420p) is not supported by the input device.
[avfoundation @ 0x7fefd0816a00] Supported pixel formats:
[avfoundation @ 0x7fefd0816a00] uyvy422
[avfoundation @ 0x7fefd0816a00] yuyv422
[avfoundation @ 0x7fefd0816a00] nv12
[avfoundation @ 0x7fefd0816a00] 0rgb
[avfoundation @ 0x7fefd0816a00] bgr0
[avfoundation @ 0x7fefd0816a00] Overriding selected pixel format to use uyvy422 instead.
[avfoundation @ 0x7fefd0816a00] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, avfoundation, from '2:none':
Duration: N/A, start: 119449.999000, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 2560x1080, 1000k tbr, 1000k tbn, 1000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x7fefc0008000] deprecated pixel format used, make sure you did set range correctly
[mp4 @ 0x7fefd4815000] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x7fefd083c200] MB rate (10080000000) > level limit (16711680)
[libx264 @ 0x7fefd083c200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7fefd083c200] profile High 4:4:4 Predictive, level 6.2, 4:4:4, 8-bit
[libx264 @ 0x7fefd083c200] 264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=6 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=10.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to 'test.mp4':
Metadata:
encoder : Lavf58.76.100
Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj444p(pc, progressive), 2560x993, q=2-31, 1000k fps, 1000k tbn
Metadata:
encoder : Lavc58.134.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 1 fps=0.0 q=0.0 size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
More than 1000 frames duplicated
Done
Notes:
- the first time the npx script is executed, MacOS asks to allow "Screen Recording" for VSCode in the "Security & Privacy" settings.
- the npx script hangs even if it shows "Done" at the end. Pressing "q" also does not stop the script
- the generated
test.mp4
file has a size of 60Mb but QuickTime can't open it (message: The file isnβt compatible with QuickTime Player)
from vscode-chronicler.
Thanks @willgarcia. Looking at this there are a few things:
First (and primarily),
/usr/local/homebrew/bin/ffmpeg -f avfoundation -list_devices true -i ""
Invalid exit status: 1
is somewhat concerning. I don't have access to an M1 Mac, but I have run ffmpeg with the latest OSX version and don't recall having seen this issue. If you are able to run the command directly
/usr/local/homebrew/bin/ffmpeg -f avfoundation -list_devices true -i ""
and post the output, that would be fantastic.
Second, the ffmpeg behavior of not honoring q
is most likely tied to how the program is launched (and specifically the stdin stream is most likely not connected). It is not usually used in a method of interactive behavior like this, so that was not the inteded experience. Something to try is invoking the command manually (outside of the library) and see what happens:
/usr/local/homebrew/bin/ffmpeg -capture_cursor 1 -threads 4 -f avfoundation -i 2:none -preset ultrafast -crf 10 -pix_fmt yuvj444p -c:v libx264 -y -vf 'scale=2560:1080:flags=lanczos,crop=2560:993:0:25' test.mp4
Lastly, QuickTime is weird in what it considers to be a valid mp4 output. FFmpeg/VLC/Chrome/Windows Media all understand the outputted file, the issue is that QuickTime for some reason does not. I have a placeholder issue (#5) that allows for making a quicktime compatible mp4, but at the cost of the reduced color space (the image looks washed out mainly). When converting the final output to an animated GIF, this issue is entirely mitigated.
from vscode-chronicler.
Thanks @arciisine
A few more logs to troubleshoot:
bash-3.2$ /usr/local/homebrew/bin/ffmpeg -f avfoundation -list_devices true -i ""
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.5 (clang-1205.0.22.11)
configuration: --prefix=/usr/local/homebrew/Cellar/ffmpeg/4.4_2 --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-avresample --enable-videotoolbox
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVFoundation indev @ 0x7fa52862d380] AVFoundation video devices:
[AVFoundation indev @ 0x7fa52862d380] [0] FaceTime HD Camera
[AVFoundation indev @ 0x7fa52862d380] [1] Capture screen 0
[AVFoundation indev @ 0x7fa52862d380] AVFoundation audio devices:
[AVFoundation indev @ 0x7fa52862d380] [0] MacBook Pro Microphone
: Input/output error
and similar issue with the next command:
bash-3.2$ /usr/local/homebrew/bin/ffmpeg -capture_cursor 1 -threads 4 -f avfoundation -i 2:none -preset ultrafast -crf 10 -pix_fmt yuvj444p -c:v libx264 -y -vf 'scale=2560:1080:flags=lanczos,crop=2560:993:0:25' test.mp4
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.5 (clang-1205.0.22.11)
configuration: --prefix=/usr/local/homebrew/Cellar/ffmpeg/4.4_2 --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-avresample --enable-videotoolbox
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[AVFoundation indev @ 0x7fb842d09b40] Invalid device index
2:none: Input/output error
I'll do another test to see if I reproduce on another MBP pro x86 instead of my m1 arm.
from vscode-chronicler.
Yeah the issue looks to be around the output of the first call:
[AVFoundation indev @ 0x7fa52862d380] AVFoundation video devices:
[AVFoundation indev @ 0x7fa52862d380] [0] FaceTime HD Camera
[AVFoundation indev @ 0x7fa52862d380] [1] Capture screen 0
[AVFoundation indev @ 0x7fa52862d380] AVFoundation audio devices:
[AVFoundation indev @ 0x7fa52862d380] [0] MacBook Pro Microphone
The video device, index [1] is the one we would want to pass into the subsequent call. But because first call is ending in an error, this is getting missed, and causing an issue. The first call shouldn't end in an error, but it does seem to be doing just that. Also, the library has the ability to download it's own version from a set of statically compiled binaries. It might be worth trying that as well, and seeing if its possibly a difference in the binary from brew vs the pre-existing ones.
from vscode-chronicler.
I tried to use the pre-compiled version available here: https://github.com/arciisine/vscode-chronicler/blob/master/binaries/osx/ffmpeg and it seems to confirm the problem has to do with the screen device not being found:
bash-3.2$ npx @arcsine/screen-recorder test.mp4
/usr/local/bin/ffmpeg -f avfoundation -list_devices true -i ""
Successfully terminated
/Users/will/.npm/_npx/c71e018737289961/node_modules/@arcsine/screen-recorder/lib/os.js:65
throw new Error('Cannot find screen recording device');
^
Error: Cannot find screen recording device
at Function.getMacInputDevices (/Users/will/.npm/_npx/c71e018737289961/node_modules/@arcsine/screen-recorder/lib/os.js:65:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Function.getDarwinArgs (/Users/will/.npm/_npx/c71e018737289961/node_modules/@arcsine/screen-recorder/lib/ffmpeg.js:56:22)
at async Function.startRecording (/Users/will/.npm/_npx/c71e018737289961/node_modules/@arcsine/screen-recorder/lib/ffmpeg.js:120:24)
at async run (/Users/will/.npm/_npx/c71e018737289961/node_modules/@arcsine/screen-recorder/lib/cli.js:20:20)
from vscode-chronicler.
This effects me. Tunneling over SSH.
from vscode-chronicler.
@chozandrias76 When you say tunneling over ssh, do you mean you are forwarding the XSession over ssh? The scenario of using this and SSH doesn't seem to be clicking for me. Could you describe your use case in a little more depth?
from vscode-chronicler.
This issue still persists. I'm on MacOS Monterey 12.3.1
Probably something related to permissions? For me, if I download the ffmeg binary in Downloads, then it works.
But if download it somewhere else (and point to it in settings.json. of VSCode), e.g in Documents, then I get the same error "Cannot find screen recording device
from vscode-chronicler.
Has this been resolved? I tried with my macbook pro m1, and am getting the same error.
I added the path to PATH
variable in addition to declaring the ffmpeg-executable in vscode settings. That fixed this part.
Had used
brew install ffmpeg
from vscode-chronicler.
I have tried with both brew and direct installation via Chronicler. But have not been able to make it work yet. Chronicler stays stuck as Chronicler stopping...
forever, when you try stopping it.
from vscode-chronicler.
Related Issues (20)
- Chronicler stopping never finishes. HOT 26
- Error Parsing Data, Invalid Exit HOT 18
- Invalid Exit Status: 1 now happening even with default directory! HOT 3
- Error parsing data HOT 4
- Command failed (can't record) HOT 13
- Error: "Cannot read property 'uri' of undefined" when no folder in workspace HOT 2
- Getting error on start HOT 3
- Error: Server Execution Failed HOT 3
- Can't get the plugin to record. Maybe issue with being in a remote container? HOT 2
- ffmpeg for mac HOT 2
- Cannot read properties of undefined (reading 'width') HOT 11
- Command failed (X11, Manjaro/Arch) HOT 6
- Support/pass through other ffmpeg flags HOT 3
- Template string, or a list of arguments (rather than an associative object) for "duplicate" parameters HOT 3
- ubuntu 22 lts - records black screen HOT 2
- Recording delay HOT 3
- [Suggestion] Auto Record feature HOT 3
- Does not work
- video is blank after recording
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-chronicler.