elonen / clapshot

Self hosted web based collaborative video review tool
GNU General Public License v2.0
89 stars 6 forks source link

ARM64 version and Audio only version? #56

Closed tomakorea closed 5 months ago

tomakorea commented 5 months ago

Hi, I'm working at home and I have a server based on Debian ARM64 (raspberry pi 5, 8gb). I tried to install Clapshot but unfortunately it seems like there is no ARM64 compiled version. Is there a way to do that ? I have all the dependencies installed and working. I think it would really benefit artists and creators that need this kind of feature without investing on a X64 CPU or expensive power electric bills. Also, as a sound designer, I wanted to ask you if it would be possible to add an "audio only" version based on Wavesurfer for example : https://github.com/katspaugh/wavesurfer.js/ There is no alternative to mixup.audio in the open source community and I think it would be very appreciated by a lot of musicians if you could add this feature.

Thanks for your answer and your hard work

elonen commented 5 months ago

Hi, ARM build is actually already implemented, as I'm not developing on an M2 Macbook. I'll add a prebuilt arm64.deb in the next minor release, which I'll likely make quite soo as I'm planning to fix #55. In the meantime, you can also build it yourself by issuing make debian-docker on an ARM machine, if you wish.

As for audio file upload, I'll have to think about it. There's a customization/plugin system implemented in the dev branch, which might be the correct place to implement it. (I've been dragging my feet with releasing that branch, however, as I feel it's somewhat over-engineered and haven't figured out how to simplify it to a proper degree.)

I'd probably implement audio files by making the ffmpeg transcoder turn them into a video so the current codebase can handle them without too much changes, which would additionally allow uploading image files. Would that work for you or does Waversurfer offer something you'd miss?

tomakorea commented 5 months ago

Thanks for your answer, that's awesome !

I'd probably implement audio files by making the ffmpeg transcoder turn them into a video so the current codebase can handle them without too much changes, which would additionally allow uploading image files. Would that work for you or does Waversurfer offer something you'd miss?

I think you can definitely use your actual logic to handle audio files, the good side of wavesurfer is that the user can visualize the audio waveform and click directly on it to navigate (which is convenient), and all the process of navigation and display is handled directly by wavesurfer. The audio waveform display also indicate where are the loud and quiet parts, so it's nice too.

For ffmpeg, actually when sending master audio files for review, we try to stay as close as the original format as possible. For example, converting 48khz 24bits master file to 44khz 16bits creates aliasing, and lower the details. Ideally, when the user is sending a WAV file, FFmpeg could convert it to FLAC without altering bit depth or sample rate. If the user upload an mp3, flac, aac or m4a file, then it could be used as it is.

It's just my ideas, let me know if I can help. Thank you !

zen85 commented 5 months ago

oh i would love the ARM version. i just tried to create a docker-compose.yml and while this seems to work i fail because i am also using a rpi:

version: '3.8'

services:
  clapshot:
    image: elonen/clapshot:latest-demo-htadmin
    container_name: clapshot-demo
    ports:
      - "8085:80"  # Map port 8085 on the host to port 80 in the container
    volumes:
      - /dockers/clapshot/clapshotdata:/mnt/clapshot-data/data  # Map /dockers/clapshot/clapshotdata on the host to /mnt/clapshot-data/data in the container
    restart: unless-stopped
elonen commented 5 months ago

Oh, actually, looks like I forgot the last release already had a precompiled arm64 binary: https://github.com/elonen/clapshot/releases/download/0.5.6/clapshot-server_0.5.6_arm64.deb

If you want to use the Clapshot Debian Bookworm Deployment Script to install on an arm64 Debian 12, you should be able to just download the script and replace "amd64" with "arm64" (in addition to the PUBLIC_ADDRESS) before running it.

zen85 commented 5 months ago

hmm.. funny enough i just tried this myself and while it went right for some time the install ran into this problem:

`clapshot-server_0.5.6_arm64.deb                  100%[========================================================================================================>]   1.64M  10.6MB/s    in 0.2s

2024-04-30 17:15:05 (10.6 MB/s) - ‘clapshot-server_0.5.6_arm64.deb’ saved [1721892/1721892]

File ‘clapshot-client_0.5.6_all.deb’ already there; not retrieving.

FINISHED --2024-04-30 17:15:05--
Total wall clock time: 1.2s
Downloaded: 1 files, 1.6M in 0.2s (10.6 MB/s)
+ dpkg -i clapshot-client_0.5.6_all.deb clapshot-server_0.5.6_amd64.deb clapshot-server_0.5.6_arm64.deb
(Reading database ... 148280 files and directories currently installed.)
Preparing to unpack clapshot-client_0.5.6_all.deb ...
Unpacking clapshot-client (0.5.6) over (0.5.6) ...
dpkg: error processing archive clapshot-server_0.5.6_amd64.deb (--install):
 package architecture (amd64) does not match system (arm64)
Selecting previously unselected package clapshot-server.
Preparing to unpack clapshot-server_0.5.6_arm64.deb ...
Unpacking clapshot-server (0.5.6) ...
Setting up clapshot-client (0.5.6) ...
Setting up clapshot-server (0.5.6) ...
clapshot-server.service is a disabled or a static unit, not starting it.
Errors were encountered while processing:
 clapshot-server_0.5.6_amd64.deb
`
zen85 commented 5 months ago

oh i just found the mistake... i had to remove the files from the former try where i tried amd64. a fresh install using arm64 worked now. thank you!

elonen commented 5 months ago

Thanks for confirming it works.

elonen commented 4 months ago

FYI @tomakorea, v0.7.0 now implements audio and image file support (through FFmpeg transcoding).