Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Error: Error exporting file #74

Open
dunstan opened this issue May 15, 2018 · 14 comments
Open

error: Error: Error exporting file #74

dunstan opened this issue May 15, 2018 · 14 comments
Assignees
Labels

Comments

@dunstan
Copy link

dunstan commented May 15, 2018

I have a question about an error, and two small additional questions:

  1. I tried running this for the first time and got the error shown below. Could anyone explain it to me, please? I have FFmpeg installed.
  2. I specified a 2 second silence gap, but it says "Silence gap added duration=3". Why the extra second?
  3. Is there a way to add silence to the start of the track, too?

Thanks very much.


$ audiosprite -s 2 -o combo1 'AARON GERVAIS (LOUIS CK AM SPINRADE).mp3' 'ALICIA WALTER (REAL TALK).mp3 BIRTHMARK' '(LOVE POWER).mp3'

info: Silence gap added duration=3
info: 0=AARON GERVAIS (LOUIS CK AM SPINRADE).mp3
info: File added OK file=/var/folders/qq/wjmnhkns4vjb1r77hqv2f1pr0000gn/T/audiosprite.14227197977886363, duration=155.37632653061223
info: Silence gap added duration=1.623673469387768

error: Error: Error exporting file
at /usr/local/lib/node_modules/audiosprite/audiosprite.js:312:27
at /usr/local/lib/node_modules/audiosprite/node_modules/async/lib/async.js:148:21
at ChildProcess. (/usr/local/lib/node_modules/audiosprite/audiosprite.js:190:18)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

@SargoDarya
Copy link
Collaborator

I have to admit that the error isn't really descriptive. I won't be able to fix that today but I will take a look into this later tomorrow.

@SargoDarya SargoDarya self-assigned this May 22, 2018
@SargoDarya SargoDarya added the bug label May 22, 2018
@metalim
Copy link

metalim commented Jul 26, 2018

Getting the same issue. Without audiosprite, ffmpeg converts files just fine.
OS: macOS 10.13.6
ffmpeg version 4.0.2
Tried node 10.7.0, 8.11.3 LTS - same results.
Also tried different input file formats - no diff.

└> ffmpeg -i hit1.wav test.ogg test.m4a test.mp3 test.ac3
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'hit1.wav':
  Duration: 00:00:00.12, bitrate: 708 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, mono, s16, 705 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> flac (native))
  Stream #0:0 -> #1:0 (pcm_s16le (native) -> aac (native))
  Stream #0:0 -> #2:0 (pcm_s16le (native) -> mp3 (libmp3lame))
  Stream #0:0 -> #3:0 (pcm_s16le (native) -> ac3 (native))
Press [q] to stop, [?] for help
Output #0, ogg, to 'test.ogg':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #0:0: Audio: flac, 44100 Hz, mono, s16, 128 kb/s
    Metadata:
      encoder         : Lavc58.18.100 flac
Output #1, ipod, to 'test.m4a':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #1:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 69 kb/s
    Metadata:
      encoder         : Lavc58.18.100 aac
Output #2, mp3, to 'test.mp3':
  Metadata:
    TSSE            : Lavf58.12.100
    Stream #2:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p
    Metadata:
      encoder         : Lavc58.18.100 libmp3lame
Output #3, ac3, to 'test.ac3':
  Metadata:
    encoder         : Lavf58.12.100
    Stream #3:0: Audio: ac3, 44100 Hz, mono, fltp, 96 kb/s
    Metadata:
      encoder         : Lavc58.18.100 ac3
size=       4kB time=00:00:00.13 bitrate= 247.0kbits/s speed=14.7x
video:0kB audio:7kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x7fe12f00bc00] Qavg: 32823.285
└> npx audiosprite -o test2 hit1.wav
info:  0=hit1.wav
info: File added OK file=/var/folders/g6/rcz0f35x0vlbftdcmwzl_y2w0000gn/T/audiosprite.02731945986870543, duration=0.11501133786848072
info: Silence gap added duration=1.8849886621315193
error:  Error: Error exporting file
    at /Users/metalim/Sites/metalim/games/arkanoid/node_modules/audiosprite/audiosprite.js:312:27
    at /Users/metalim/Sites/metalim/games/arkanoid/node_modules/async/lib/async.js:148:21
    at ChildProcess.<anonymous> (/Users/metalim/Sites/metalim/games/arkanoid/node_modules/audiosprite/audiosprite.js:190:18)
    at ChildProcess.emit (events.js:182:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)

Also, I'm pretty sure it was working just fine in WSL environment (read: Ubuntu) on windows a week ago.

@metalim
Copy link

metalim commented Aug 5, 2018

Ping!

@SargoDarya
Copy link
Collaborator

Sorry, haven't had the time yet to look into it. Can you maybe prepare a zip file containing your setup so I have an exact thing to test this easier?

@etall
Copy link

etall commented Aug 29, 2018

the same error

/usr/local/lib/node_modules/audiosprite/audiosprite.js:312:27

mac 10.13.5
ffmpeg version 4.0.1
node v10.8.0

@SargoDarya
Copy link
Collaborator

@etall @metalim Can you guys provide a sample zip with the setup you used so I can investigate that further?

@maksmaers
Copy link

@SargoDarya I had the same issue, after debugging I found result for ffmpeg command
ffmpeg -y -ar 44100 -ac 1 -f s16le -i /tmp/audiosprite.9684745136330044 -acodec libvorbis -f ogg -ab 128k output.ogg
and I got console error
/tmp/audiosprite.9684745136330044: No such file or directory
if I create this file it is ok

Debug log

debug: Parsed arguments _=[src/assets/sounds/source/*.mp3], l=debug, log=debug, output=output, o=output, path=, u=, export=ogg,m4a,mp3,ac3, e=ogg,m4a,mp3,ac3, format=jukebox, f=jukebox, autoplay=null, a=null, loop=null, silence=0, s=0, gap=1, g=1, minlength=0, m=0, bitrate=128, b=128, vbr=-1, v=-1, vbr:vorbis=-1, q=-1, samplerate=44100, r=44100, channels=1, c=1, rawparts=, p=, ignorerounding=0, i=0, $0=/usr/bin/node ./node_modules/.bin/audiosprite
/tmp/audiosprite.9760795878685962
debug: Created temporary file file=/tmp/audiosprite.9760795878685962
debug: Spawn cmd=ffmpeg -version
ffmpeg -version
info:
debug: Start export format=ogg
debug: Spawn cmd=ffmpeg -y -ar 44100 -ac 1 -f s16le -i /tmp/audiosprite.9760795878685962 -acodec libvorbis -f ogg -ab 128k output.ogg
ffmpeg -y -ar 44100 -ac 1 -f s16le -i /tmp/audiosprite.9760795878685962 -acodec libvorbis -f ogg -ab 128k output.ogg
null
error: Error: Error exporting file

@maksmaers
Copy link

const tempFile = mktemp('audiosprite');
  
  fs.writeFile(tempFile, '', (err) => {
    if (err) throw err;
    opts.logger.debug("The file was succesfully saved!");
  })

@danclong
Copy link

If you're on Mac, you have to install the dependencies exactly as the documentation states:

brew install ffmpeg --with-theora --with-libvorbis

I had installed ffmpeg previously with Homebrew, but not with the options above. Re-installed as above and it works fine now.

@SargoDarya
Copy link
Collaborator

Even if that works we probably should add better error reporting. Error exporting file just doesn't cut it.

@mnovbaalen
Copy link

I had the same error: Error exporting file.
Running the ffmpeg command manually was working without problems.

It seems to be that audiosprite does not work with ffmpeg 4.x:

At first I installed ffmpeg with snap on Ubuntu 18 LTS. (This is ffmpeg version 4.x.)
When de-installing this version of ffmpeg and installing ffmpeg with the command

sudo apt install ffmpeg

ffmpeg 3.x is installed, and the problem is solved!

see also: https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-18-04/

@madclaws
Copy link

I had the same error: Error exporting file.
Running the ffmpeg command manually was working without problems.

It seems to be that audiosprite does not work with ffmpeg 4.x:

At first I installed ffmpeg with snap on Ubuntu 18 LTS. (This is ffmpeg version 4.x.)
When de-installing this version of ffmpeg and installing ffmpeg with the command

sudo apt install ffmpeg

ffmpeg 3.x is installed, and the problem is solved!

see also: https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-18-04/

This worked for me

@ruthgrace
Copy link

on mac osx. upgraded from ffmpeg version 3.4.2 to 4.4 using brew, and was able to get over this error. maybe audiosprite has been updated to only work with ffmpeg 4 now?

@RedRoosterMobile
Copy link

I circumvented the bug by using -e mp3 option..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants