Batch mode doesn't work in version 3.0.2

Bug #1858881 reported by Andy Jenkins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
soundconverter (Ubuntu)
Incomplete
Undecided
GautierPortet

Bug Description

Version 3.0.0 works fine on Ubuntu 18.04.
However, in 19.10 version 3.0.2 does not work.

Steps to reproduce:
for some audio file, e.g. "venus.flac"

`soundconverter -b venus.flac`

Expected output (from version 3.0.0):
Progress indicator, converted file venus.ogg created in same directory

Actual output:
  faac gstreamer element not found
SoundConverter 3.0.2

checking files and walking dirs in the specified paths...

Changed in soundconverter (Ubuntu):
assignee: nobody → GautierPortet (kassoulet)
Revision history for this message
jccdkct (jccdkct) wrote :

Same problem for me with same ubuntu 19.10 and soundconverter version 3.0.2 .

Revision history for this message
GautierPortet (kassoulet) wrote :

Could you please try to run with "soundconverter --debug -b venus.flac" and paste here the result. Batch mode is working normally with the machines I tested on...

Changed in soundconverter (Ubuntu):
status: New → Incomplete
Revision history for this message
Andy Jenkins (andy-jenks) wrote :

Here is the command I ran and the output:

~ $ soundconverter --debug -b venus.flac
  faac gstreamer element not found
SoundConverter 3.0.2

checking files and walking dirs in the specified paths...

Revision history for this message
Christodoulos Stavrou (stavrou-christodoulos) wrote :

I did a quick fix to make it work (in Linux Mint), as per the below

In file:
/usr/share/soundconverter/python/soundconverter/batch.py

locate the below text and add the line shown below ending with <<< (with out the <<<).

def prepare_files_list(input_files):
    """ Takes in a list of paths and returns a list of all the files in those
    paths. Also converts the paths to URIs.

    Also returns a list of relative directories. This is used to reconstruct
    the directory structure in the output path if -o is provided. """

    # The GUI has its own way of going through subdirectories.
    # Provide similar functionality to the cli.
    # If one of the files is a directory, walk over the files in that
    # and append each one to parsed_files if -r is provided.
    subdirectories = []
    parsed_files = []
    for input_path in input_files:

        input_path = input_path[7:] <<<

    # accept tilde (~) to point to home directories

Revision history for this message
Andy Jenkins (andy-jenks) wrote :

I can confirm that what Christodoulos has said works.

I had a look at the upstream source and I'm surprised that you found it working on the machines you tested on. It appears that soundconverter.batch.prepare_files_list() can't deal with the uri-encoded filenames which are given in line 218 of bin/soundconverter.py:

files = [vfs_encode_filename(f) for f in files]

Reverting commit 51757e "Fix filename encoding issue" (after checking out 3.0.2) fixed batch mode for me but presumably whichever issue was solved by this commit is reintroduced.

I can also confirm that batch mode works properly for me in version 3.1.0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.