Audioworks feedback thread

Hi. I just released v1.5.0 which adds a chorus effect (which is hit and miss) and adds an odd fix.

Somewhere between 4.2 and 4.5, python libraries loaded in a python that’s included via qml stopped being able to run ffmpeg. Sooo, that meant that saving to ogg and flac (let along mp3), was no longer working. Must be a Sailjail ++.

The solution was to move the file saving to the python file included directly. So, reproduce the library calls in calling file. The library in question is pydub.

Edit: Let me know if it works for you :slight_smile:
So, I’m either going nuts, or Sailjail is even more complicated that I suspected.

Edit, 2: To be more clear:

  1. load python file A
  2. in said python file A, load pydub library (having include path /usr/share/appname/libraryfolder)
  3. run ffmpeg from library call, fail
  4. run ffmpeg call in A, succeed.

If you run from the terminal, all calls work (including to lame, which never works in sailjail context)

1 Like

And some time later, I just realized that the chum build is broken. The Jolla store version is fine and I believe openrepos, too. But the chum version is K.O. … FYI

3 Likes

I’ve just published a couple of updates, one bug fix and some improvements. I have one user on a C2 phone with the SFOS 5 version who are having issues with ffmpeg.

I’d appreciate any feedback from C2 users if they can actually use Audioworks (harbour-audiocut) on that device. Thanks!

2 Likes

This seems to also affect my app SShazam which uses ffmpeg too. If you find a solution please lmk.

I just tested with 5 …55 on the x 10III and audiocut works fine. So I’m not sure it has anything to do with ffmpeg, per se.

What are the symptoms with SShazam?

Audiocut works fine on my X10III to, it’s just my C2 that is affected. SShasam though, works perfect on C2. Tested a minute ago.

1 Like

The person who reported the bug provided the logs, and they contained an error from a python library pydub I am using:

/usr/share/harbour-sshazam/lib/deps/pydub/utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)

And then app just hangs at generating the song signature, where this library is used. This error did not show up for me on Xperia XZ2 (SailfishOS 4.6.0.15). I have the compatibility permission for SailJail, and in the recent release I even disabled SailJail completely but app still didn’t work for that person.

To note, the person who provided logs is not the only one experiencing this, some other people also reported the bug but provided no logs.

Ok, that does look like a similar issue for @eson on the C2:

[D] onError:427 - python error: Return value of PyObject call is NULL: Traceback (most recent call last):

  File "/usr/share/harbour-audiocut/qml/py/audiox.py", line 174, in createWaveformImage
    subprocess.run([ "ffmpeg", "-hide_banner", "-y", "-i", "/"+inputPathPy, "-filter_complex", stretch+"showwavespic=s="+waveformPixelLength+"x"+waveformPixelHeight+":colors="+waveformColor, "-frames:v", "1", "/"+outputWaveformPath ])

  File "/usr/lib64/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib64/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1720, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] Filen eller katalogen finns inte: 'ffmpeg'

EDIT:

ONe thing I noticed is that I had a call with a relative file name. Just in case, I changed all to absolute paths (/usr/bin/ffmpeg) but that didn’t help …

1 Like

I think I found the solution. You should add ffmpeg-tools to the requirenments, as /usr/bin/ffmpeg is provided by that package and not ffmpeg.

2 Likes

Yep, that worked! :smiley: …plus twenty chars

1 Like

I’m not so sure about this. Searching, on 4.6/5 on a 10III get’s me:

S  | Name               | Summary                                    | Type
---+--------------------+--------------------------------------------+-----------
i  | ffmpeg             | FFmpeg video encoding and decoding library | package
...
i+ | ffmpeg-tools       | FFmpeg tools package                       | package

I believe we need BOTH ffmpeg and ffmpeg-tools.

ffmpeg-tools has a requirenment to ffmpeg.

[defaultuser@XperiaXZ2:~]$ rpm -q --requires ffmpeg-tools
ffmpeg = 5.1.4+git1
...

But, just to make sure, in my app, I still added both and I would recommend you doing it too.

1 Like

Yes, thank you. I will add both since I need ffmpeg-tools for some things anyway (Videoworks uses it). And it’s not big :slight_smile: