Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to record if output filename includes colon (":") #5487

Closed
yrtimiD opened this issue Nov 14, 2024 · 1 comment
Closed

Fails to record if output filename includes colon (":") #5487

yrtimiD opened this issue Nov 14, 2024 · 1 comment

Comments

@yrtimiD
Copy link

yrtimiD commented Nov 14, 2024

Environment

  • OS: Ubuntu
  • Scrcpy version: 2.7
  • Installation method: manual
  • Device model:
  • Android version: 14

Describe the bug

If the filename specified with --record parameter includes colon (:) character the app fails to create that file:

$ scrcpy --no-audio --show-touches --record="`date -Iseconds`.mp4"
scrcpy 2.7 </~https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     --> (tcpip)  emulator-5554                   device  sdk_gphone64_x86_64
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 207.8 MB/s (71200 bytes in 0.000s)
[server] INFO: Device: [Google] google sdk_gphone64_x86_64 (Android 14)
ERROR: Failed to open output file: 2024-11-14T22:57:44+02:00.mp4
ERROR: Recording failed to 2024-11-14T22:57:44+02:00.mp4

Such file name is valid on linux and nothing should prevent app from creating it.

@m7stock
Copy link
Contributor

m7stock commented Nov 14, 2024

The filename is passed to ffmpeg, which interprets it as a URL with a protocol. As a workaround, you can explicitly prepend the file protocol like this:

scrcpy --no-audio --show-touches --record="file:`date -Iseconds`.mp4"

I'll see if I can contribute a fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants