Ffmpeg Ipad

0 views
Skip to first unread message

Elisabet Schwartzkopf

unread,
Aug 5, 2024, 12:06:28 PM8/5/24
to crawkunveylo
Iget a message telling me that I need to configure ffmpeg before I proceed. It then says I can configure it at Preferences > Libraries. I have no idea where that is or how to configure it. Please help!

This package is open source on GitHub nin9tyfour/FFmpeg-iOS-build-script which you can use to build a more recent version and manually install it yourself if the version of ffmpeg provided by this package is insufficient for your needs.


You can also use an SSH app from the App Store, however this requires you to change your SSH port from 22 since iOS prevents localhost access to port 22, so suggestions for apps and instructions are out of scope for this question.


(Yes I know all about jailbreaking and what is possible, command lines and alternative applications, etc. But we do not discuss or support people with Jailbreaking issues, there are other places for that)


ffmpeg is both a command line utility and a software library allowing modification of various media files. As a command line utility you won't find ffmpeg in the App Store, as there's no command line support in iOS.


However parts of ffmpeg are also used as a software library (usually in the form of libavcodec) in a wide range of applications, some on iOS as well. For example VLC on iOS uses it to decode and display media files. My searches did not show up unfortunately any good apps that use either ffmpeg or libav for encoding & editing purposes, but it's likely a few of the video editor apps you'll find will use these software packages as their backend.


I decided to share my almost "hands free" approach to installing Tidal on Ubuntu 20.04 box with the help of this wonderful community. I'm putting this post into the "Installation" section as it mostly deals with successful installation process with a minimal headache on a Linux Ubuntu system. This post is by no means meant to replace the official installation guidelines.


I share my brief experience on how to set up the configured system to work with iPad for coding Tidal with Emacs editor and also set up audio output from iPad speakers (or AirPods / bluetooth earphones/speakers).


Lastly, most of the commands below are issued form the Terminal (aka shell). I tried to be more or less overly verbose with commands and some explanations for people who have minimal exposure of working with the Terminal.


The motivation for this combo is that you'll end up with a leaner system that is optimized for audio work and looks like a regular Ubuntu 20.04 install. Any other packages you're using can be installed on top of it.


After the install, update the system sudo apt update && sudo apt upgrade -y and install Ubuntu Studio Installer package sudo apt install ubuntustudio-installer (accept real-time jack setting during the installation).


Run Ubuntu Studio installer sudo ubuntustudio-installer This gives you a choice to install various creativity related packages, low latency kernel and system tweaks and will install along side almost all dependencies needed to work with audio etc that I skipped during Ubuntu install in the first step (see ubuntustudio-installer and Ubuntu Studio audio features ).


I'm gearing my linux box towards audio work so I chose to install everything with audio, low latency, performance and carla in the name of given install options and left alone other packages. If you ever need any other offered non-audio related packages to install you can run the installer again to do so. A word of caution - refrain from installing gnome-branding package as it will turn your plain vanilla Ubuntu install into Ubuntu Studio distribution install. In my opinion, it will be easier to download and install Ubuntu Studio distro in the first place instead.


Follow this instructions for the excellent minimal interaction approach written by the forum member cleary. Cleary provides installs with different editors - I chose tidalcycles + vscode. This will configure everything you need by simply clicking on programs' icons to launch them (ie SuperCollider and VSCode).


Once installation is complete you can test that everything is working - (1) start jack server via Ubuntu Studio Controls or QjackCtl, (2) start SuperCollider (3) start your chosen editor from the above step (VSCode in my case) and (4) run Tidal code to make a sound. Everything worked flawlessly for me (very happy).


it requires a purchase of Blink Shell:Mosh & SSH Client app in Apple appstore (although you can compile and sign one yourself for free, as I understand, if you're up to it). Disclaimer - I'm not in anyway affiliated to this app or it's creator. I just happen to use it for a number of years already and find it very useful. Also, note user experience difference between mosh and ssh - mosh will not disconnect your session quickly if, for example, you switch to another app for a while.


your linux box and iPad need to be connected to the same local network (there's nothing to stop you to access you linux box from the remote locations and send the audio stream back but this is outside of scope here).


The main purpose for me to install Emacs is to be able to code Tidal (and just about anything else) on an iPad via ssh or mosh. Hence, the below install steps are for Emacs with no graphical interface or sound. Moreover, I use Spacemacs distro but will refer to it as Emacs for brevity.


Onward with install:

Install SSH server sudo apt install openssh-server -y

Install mosh if you plan to use it sudo apt install mosh -y

Install Emacs build dependencies sudo apt install -y gnutls-dev texinfo build-essential libncurses-dev autopoint debhelper dh-autoreconf dh-strip-nondeterminism libfile-stripnondeterminism-perl


At this point go ahead and see if tidal works in Emacs:

create a test file with tidal extension (for example cd && touch test.tidal)

start Jack server and SuperCollider then

emacs

hit (Alt-x) type tidal-mode select it and hit Enter button

hit Ctrl-x Ctrl-f, navigate and find test.tidal file in your home directory, select it and hit Enter to open it in Emacs

hit Alt-x type tidal-start-haskell select it and hit Enter to start Tidal.


Your Emacs screen should be now split in two horizontal windows. If you don't see any error output on the bottom window then you're ready to code Tidal in Emacs. If you see on the bottom window an error complaining about being unable to locate BootTidal.hs file to launch Tidal then to fix this do the following:


As mentioned above, I use Blink app on my iPad to ssh/mosh into my linux box. This "frees" me form the desk/monitor and I can code Tidal anywhere within the local wi-fi network I'm using. Plus the latest version of iPad OS lets me to connect a keyboard so I don't have to type on screen. Just about any iPad generation should work.


If you installed Ubuntu Studio packages then ffmpeg and all audio codecs are already installed for you. At the moment iOS only understands mp3 streaming so we'll use ffmpeg to capture and stream audio from your linux box to iPad in mp3 format.


Open VLC on iPad, click on Network --> Open Network Stream --> type rtp://192.168.yy.yy:3689 and click on the orange button Open Network Stream. Now your iPad is ready to receive the audio stream as sent by ffmpeg


where hw:PCH,0 is my linux sound card -q:a 3 is the mp3 variable bit rate setting for ffmpeg to use -ac 2 is to capture two channels, rtp is the stream protocol 192.168.yy.yy is the ip address of your iPad and 3689 is an arbitrary port.


Once QjackCtl window is open click on Connect button. A new window will open. In this window select/highlight both system on the left screen and hw on the right screen. Click on the Connect button. You can save this connection as a preset - click on Patchbay --> left hand side Add --> in Output Socket set to Audio, choose system in Client and add capture_1 and capture_2 Plugs. Click OK. Then right hand side Add --> Input Socket Type set to Audio, choose hw in Client (if you don't see it you need to start ffmpeg command as above and try again) and add input_1 and input_2 Plugs. Click OK. Then click Save; give it a name and save it. You can use this preset next time instead.


If no sound is coming - try troubleshooting by ensuring that:

jack server and SuperCollider are running,

system and hw are connected in QjackCtl;

instead of system try connecting SuperCollider and hw;

you have the correct ip address for the iPad in both ffmpeg command line and VLC app;

you chose the correct hw device (your PC probably has more than one audio device);

your linux box and iPad are on the same local network;

ffmpeg comman is runnig in the Terminal.


One note on byobu (if you haven't used it before) - it lets you to open different Terminal windows in tabs by pressing F2 and cycle between them by pressing F4 or F3. That way you can run your linux box without a monitor and ssh from iPad into it to strart jack server, SuperCollider, ffmpeg and Emacs. You can also configure buyobu itself by pressing F9.


Epic post!

I'm glad I was able to help, it should be fairly trivial to add an emacs editor role to my ansible setup - I plan to have a dig into that in the coming weeks (I've committed to not distracting myself too much from actually making music for a bit though)


Thanks! You helped me out al lot. I already had a set up with everything manually compiled but SuperCollider install was a bit shaky. I used Ansible installs somewhere else so I knew that it should a preferable way to go instead of the manual way. So I did a new install from scratch and it was that simple and took way less time also . If you can add an Ansible role for Emacs/Spacemacs that will be cool. Emacs is a thing in itself to learn but as a shell text editor it's great.


Hello, I had a thread about this a while back but we never figure anything out. I'm habing an issue where my son was watching fine all day outside the house, now that he's back in, he keeps getting Playback Error - No compatible streams are currently available. Please try again later or contact your system administrator for details. When he got it, it was only me watching on my PC and no one else, I've attached the server Logs, Hardware Detection logs, and MediaInfo of the media file he's trying to open.

3a8082e126
Reply all
Reply to author
Forward
0 new messages