Closed schjonhaug closed 5 years ago
It seems that it's only the transcoding to mp4
that crashes, not flac
.
var proc = ffmpeg("./radioresepsjonen_2018-12-11_1313_356.MP3")
.format("mp4")
.on("error", function(err) {
console.error("an error happened: " + err);
})
.on("end", () => {
console.log("file has been converted succesfully");
})
.save("./transcoded-" + new Date().getTime() + ".m4a");
➜ node m4a.js
an error happened: Error: ffmpeg exited with code 1: Conversion failed!
ffmpeg -i radioresepsjonen_2018-12-11_1313_356.MP3 -y -ac 2 -f mp4 output.m4a
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[mp3 @ 0x7fed41801200] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'radioresepsjonen_2018-12-11_1313_356.MP3':
Metadata:
title : 11.12.2018 Radioresepsjonen
album : p13 - Radioresepsjonen
artist : p13 - Radioresepsjonen
genre : Podcast
ShortDescription: Radioresepsjonen med Steinar, Bjarte og Tore
publisher : NRK
date : 2018
Duration: 01:15:31.34, start: 0.000000, bitrate: 192 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 192 kb/s
Stream #0:1: Video: bmp, pal8, 300x300, 90k tbr, 90k tbn, 90k tbc
Metadata:
title : Poddkast bilde
comment : Cover (front)
Stream mapping:
Stream #0:1 -> #0:0 (bmp (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
[mp4 @ 0x7fed42010e00] Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libx264 @ 0x7fed42000c00] MB rate (32490000) > level limit (16711680)
[libx264 @ 0x7fed42000c00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fed42000c00] profile High 4:4:4 Predictive, level 6.2, 4:4:4 8-bit
[libx264 @ 0x7fed42000c00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=9 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x7fed42010e00] Could not find tag for codec h264 in stream #0, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
[aac @ 0x7fed42002400] Qavg: nan
Conversion failed!
The error was due to mmpeg trying to extract video from bmp stream. Solution was to run command with -vn
, ignoring video.
-vn
worked perfectly. Many thanks
https://podkast.nrk.no/fil/radioresepsjonen/radioresepsjonen_2018-12-11_1313_356.MP3
media info: General Complete name : radioresepsjonen_2018-12-11_1313_356.MP3 Format : MPEG Audio File size : 104 MiB Duration : 1h 15mn Overall bit rate mode : Constant Overall bit rate : 192 Kbps Album : p13 - Radioresepsjonen Track name : 11.12.2018 Radioresepsjonen Performer : p13 - Radioresepsjonen Publisher : NRK Genre : Podcast Recorded date : 2018 Writing library : LAME3.97 Cover : Yes Cover description : Poddkast bilde Cover type : Cover (front) Cover MIME : image/bmp Comment : Radioresepsjonen med Steinar ShortDescription : Radioresepsjonen med Steinar, Bjarte og Tore Copyright/Legal information : Opphavsrett NRK © 2014
Audio Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Duration : 1h 15mn Bit rate mode : Constant Bit rate : 192 Kbps Channel(s) : 2 channels Sampling rate : 44.1 KHz Frame rate : 38.281 fps (1152 SPF) Compression mode : Lossy Stream size : 104 MiB (100%) Writing library : LAME3.97
Crashes with error: