Sample Header Ad - 728x90

How can I automate via command line a process to prepare video files when my Mac starts?

0 votes
1 answer
309 views
This is an improvement to previously discussed: https://apple.stackexchange.com/questions/468042 I used to love Automator for such tasks, but found in this task passing arguments with filenames in Automator steps failing for me. I'm open to good script as well. I have an Intel and M2 Macs, old one is portable and I found M2 is recoding (lower res and crop) video faster than Intel would even with sending results over WiFi. Puzzling myself to do following 1. Samba share on M2 accessible over WiFi 2. Either edit (if was emptied in step 4) or new file queue.txt with YouTube link. Folder MMi is needed in step 4 for correct work 3. A nifty programs entr and yt-dlp looking at updates in queue.txt and if there is new - downloading 720p .webm video as example https://www.youtube.com/watch?v=WO2b03Zdu4Q
ls queue.txt | entr yt-dlp -q -f "best[height yt.txt
        ' _ {} \;
    done
5. As it's finished, need to rsync it back to Intel Mac over WiFi (ssh keys are already exchanged)
rsync MMi/*.mp4 user@intel_mac/MMi
Is there a way to combine everything in one script, other than maintaining three "daemon", maybe launchctl on a .plist or python program? Are there guides or templates to get this script running as a daemon on macOS?
Asked by Pavel Pervoy (31 rep)
Jan 5, 2024, 06:30 PM
Last activity: Jan 11, 2024, 05:31 AM