Results 1 to 3 of 3

Thread: /usr/local/sbin/flac2m4a.sh and ffmeg fails on commas in directory

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    13

    /usr/local/sbin/flac2m4a.sh and ffmeg fails on commas in directory

    Hello,

    I am using the latest vortexbox and is yum 'up-to-date':

    My storage layout in /storage/music/flac/ is /storage/music/flac/ArtistName/YYYY – AlbumName/## – SongTitle.flac

    I am trying to mirror the .flac files to .m4a. When I do, I notice that it fails to convert .flac files to .m4a when any component in the directory path contains a comma.

    I have artists with names such as "10,000 Maniacs", "Crosby, Stills & Nash", "Earth, Wind & Fire", "Grover Washington, Jr", etc.

    When flash2m4a.sh gets to these artists and tries to convert the files under that directory, it outputs:
    """
    01/25/2012 10:41:41 – ########################################
    Encoding A Campfire Song
    Artist: 10,000 Maniacs
    Album: In My Tribe (1987)
    AlbumArtist:
    Composer:
    DiscNumber:
    Track#: 10
    Genre:

    ERROR: encoding failed, continuing
    """

    After manually testing on the command line:

    cd /storage/music/flac/

    And then either one of the following:

    ffmpeg -i "10\,000\ Maniacs/1987\ -\ In\ My\ Tribe/01\ -\ Whats\ the\ Matter\ Here-.flac" -acodec alac /tmp/delme.m4a
    ffmpeg -i "10,000 Maniacs/1987 – In My Tribe/01 – Whats the Matter Here-.flac" -acodec alac /tmp/delme.m4a

    ffmpeg outputs "No such file or directory" for the input file

    It appears to me that ffmpeg cannot handle commas in the input directory (uncertain for the output directory as I have not tested).

    My mental work around for the script is for the flac2m4a.sh script 'cd' into the final directory, perform the conversion there, and then 'cd' move to the next directory. This is a work-around to a probable bug in ffmpeg not being able to handle commas in the directory path. I do not know if ffmpeg can handle commas in the output filename path. I will try altering the flac2m4a.sh bash script to get around the ffmpeg bug.

    Anyone else seen this behavior in flac2m4a.sh not processing their .flac files that contain commas in the directory path?

  2. #2
    Administrator Ron Olsen's Avatar
    Join Date
    Dec 2009
    Location
    Boulder CO USA
    Posts
    5,023
    ffmpeg can handle commas in the directory path; so there is something else causing the problem.

    For a test, I ran the command
    Code:
    ffmpeg -i /storage/music/test/flac/10,000_Maniacs/In_My_Tribe/01_What\'s_The_Matter_Here.flac -acodec alac /storag
    
    e/music/test/m4a/10,000_Maniacs/In_My_Tribe/01_What\'s_the_Matter_Here.m4a
    and it worked on my VB.

    However, the command
    Code:
    flac2m4a.sh /storage/music/test/flac /storage/music/test/m4a
    failed on the 10,000 Maniacs album in /storage/music/test/flac/10,000_Maniacs/In_My_Tribe

    so I suspect a bug in the way flac2m4a.sh handles directory pathnames.

    For a workaround, try running flac2m4a.sh as follows:

    Code:
    flac2m4a.sh "/storage/music/flac/10,000 Maniacs" "/storage/music/m4a/10,000 Maniacs"
    and see if that works.

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    13
    Yes...
    Code:
    flac2m4a.sh "/storage/music/flac/10,000 Maniacs" "/storage/music/m4a/10,000 Maniacs"
    ...does work.

    Since this is a bash shell script, let me see if I can refactor how it traverses the directories to make it work without generating the ffmpeg errors. I'll post a patch here once I have it working.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •