ffmpeg trim .mp3 - output length forced to 2 seconds - ffmpeg

I have just downloaded the latest version of ffmpeg and I am trying to trim the first 14 and the last 6 seconds from a 40 seconds .mp3 file.
The problem I have is that doesn't matter what -t X I use, the output is always only 2 seconds in length. It's my first using ffmpeg but it seems like something is forcing it to limit the output to 2 seconds.
I tried a lot of commands including
ffmpeg -ss 00:00:14.358 -i input.mp3 -ab 32k -t 00:00:20.04 -c:a copy output.mp3 -y
ffmpeg -ss 14 -i input.mp3 -ab 32k -t 20 -c:a copy output.mp3 -y
ffmpeg -ss 14 -i input.mp3 -t 20 -acodec copy output.mp3 -y
ffmpeg -ss 14 -i input.mp3 -acodec copy output.mp3 -y
ffmpeg -ss 14 -t 20 -i input.mp3 output.mp3
ffmpeg -ss 14 -i input.mp3 -t 20 output.mp3
but the result is almost always a 2 sec mp3 file.
Now I'm out of ideas.
As requested this is the output from the console:
> Input #0, mp3, from 'C:\Track7.mp3': Duration: 00:00:40.49, start:
> 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 1kB time=00:00:00.00 bitrate= 752.3kbits/s video:0kB
> audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 110.287079%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -t 5 -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 0000000002fb02c0] Skipping 0 bytes of junk at 0. [mp3 #
> 0000000002fb02c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -c:a copy
> "C:\Track7.mp3" -t 5 -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 Trailing options were found on the commandline. [mp3 # 0000000003020300] Skipping 0
> bytes of junk at 0. [mp3 # 0000000003020300] Estimating duration from
> bitrate, this may be inaccurate Input #0, mp3, from 'C:\Track7.mp3':
> Duration: 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -c:a copy -t 5
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 00000000003102c0] Skipping 0 bytes of junk at 0. [mp3 #
> 00000000003102c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -t 5 -i "C:\Track7.mp3" -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 0000000002fb02c0] Skipping 0 bytes of junk at 0. [mp3 #
> 0000000002fb02c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -i "C:\Track7.mp3"-ss 00:00:14.358 -acodec copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 C:\Track7.mp3-ss: No such file or directory
>
> C:\Je>ffmpeg -i "C:\Track7.mp3" -ss 00:00:14.358 -acodec copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 0000000002fb0240] Skipping 0 bytes of junk at 0. [mp3 #
> 0000000002fb0240] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 0kB time=00:00:00.00 bitrate=N/A video:0kB audio:0kB
> subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
> unknown Output file is empty, nothing was encoded (check -ss / -t /
> -frames parameters if used)
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 0000000002fb0220] Skipping 0 bytes of junk at 0. [mp3 #
> 0000000002fb0220] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -ab 32k -c:a copy
> "C:\Track7.mp3" -y ffmpeg version N-75463-g53e8bef Copyright (c)
> 2000-2015 the FFmpeg developers built with gcc 4.9.3 (GCC)
> configuration: --enable-gpl --enable-version3 --disable-w32threads
> --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 0000000002fb02c0] Skipping 0 bytes of junk at 0. [mp3 #
> 0000000002fb02c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
>
> C:\Je>ffmpeg -ss 00:00:14.358 -i "C:\Track7.mp3" -ab 32k -t
> 00:00:20.04 -c:a copy "C:\Track7.mp3" -y ffmpeg version
> N-75463-g53e8bef Copyright (c) 2000-2015 the FFmpeg developers built
> with gcc 4.9.3 (GCC) configuration: --enable-gpl --enable-version3
> --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnu tls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enab le-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
> -libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --ena ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --e nable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib libavutil 55. 2.100 / 55. 2.100 libavcodec 57. 3.100 /
> 57. 3.100 libavformat 57. 2.100 / 57. 2.100 libavdevice 57. 0.100 / 57. 0.100 libavfilter 6. 6.100 / 6. 6.100 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.100 /
> 2. 0.100 libpostproc 54. 0.100 / 54. 0.100 [mp3 # 00000000031903c0] Skipping 0 bytes of junk at 0. [mp3 #
> 00000000031903c0] Estimating duration from bitrate, this may be
> inaccurate Input #0, mp3, from 'C:\Track7.mp3': Duration:
> 00:00:40.49, start: 0.000000, bitrate: 128 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s Output #0, mp3, to 'C:\Track7.mp3': Metadata:
> TSSE : Lavf57.2.100
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 128 kb/s Stream mapping: Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help
> size= 32kB time=00:00:02.04 bitrate= 129.5kbits/s video:0kB
> audio:32kB subtitle:0kB other streams:0kB global headers:0kB muxing
> overhead: 1.410433%
What am I doing wrong ?

The following work for me. Here is first 14 seconds:
ffmpeg -i input.mp3 -ab 32k -c:a copy -t 00:00:14 output.mp3 -y
Last 4 seconds (start from 6 seconds before end -> 40-6=34):
ffmpeg -ss 00:00:34 -i input.mp3 -ab 32k -c:a copy -t 00:00:06 output.mp3 -y

Related

How to deal with "[asf XX] too long payload" message in ffmpeg?

I am trying to cut a small section of a video using the following sentence:
ffmpeg.exe -i video.wmv -ss 00:20:02 -to 00:20:09 -crf 22 "C:\test.mp4" -y
However, ffmpeg hangs showing messages like:
[asf # 03327b00] too long payload 0kB time=00:00:00.00 bitrate=N/A speed= 0x
Last message repeated 352 times
[asf # 03327b00] too long payload 0kB time=00:00:00.00 bitrate=N/A speed= 0x
Last message repeated 331 times
I have waited for more than 30 minutes and ffmpeg did not finish the cutting. Does anyone have any idea how to solve this?
Any suggestion will be appreciated
PD. the ffprobe output of the source file is the following:
ffprobe version N-81831-g97e7f03 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 32.100 / 55. 32.100
libavcodec 57. 60.101 / 57. 60.101
libavformat 57. 51.102 / 57. 51.102
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 63.100 / 6. 63.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100
[asf # 03b7afe0] too long payload
Last message repeated 159 times
Input #0, asf, from 'F:\video.wmv':
Metadata:
WMFSDKVersion : 11.0.5721.5145
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
DeviceConformanceTemplate: M
Duration: 01:41:25.95, start: 0.000000, bitrate: 1649 kb/s
Stream #0:0(eng): Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 640x480, 1500 kb/s, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc
Stream #0:1(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 128 kb/s

Raspberry pi live stream to youtube stopped working

I have a working setup for streaming a video to youtube with my raspberry pi 3.
It was work until yesterday. Nothing changed but I have an error when I try to start the stream.
Running the following command:
raspivid -o - -t 0 -w 1280 -h 720 -p -hf -fps 25 -b 2560000 | avconv -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/my_key
And get this error:
ffmpeg version 3.2.10-1~deb9u1+rpt1 Copyright (c) 2000-2018 the FFmpeg
developers built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1+rpt1'
--toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 /
57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 /
54. 1.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, s16le, from '/dev/zero': Duration: N/A, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s Input #1, h264, from 'pipe:': Duration: N/A, bitrate: N/A
Stream #1:0: Video: h264 (High), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
rtmp://a.rtmp.youtube.com/live2/my_key: Input/output error
It worked more over a month, but now (I don't know why) stopped working.
Can anyone help me?
Cheers,
Greg
I figured it out!
If you have the same problem just go to youtube stream now / encoder setup / stream name/key, push the reveal button and then the reset button to get a new stream name/key string.
Use the new key!

FFMpeg is dropping video track when clipping an mpg video

I am extracting a clip from an mpg video using the following command.
ffmpeg.exe -i 271b.mpg -ss 00:00:05.000 -t 00:00:03.200 -c copy out_271b.mpg
I am using the copy parameter to avoid reencoding the clip.
The resulting mpg file only has the audio track, no video.
The following is the FFMpeg screen dump.
C:\ffmpeg-20170615\bin>ffmpeg.exe -i 271b.mpg -ss 00:00:05.000 -t 00:00:03.200 -c copy out_271b.mpg
ffmpeg version N-86482-gbc40674 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 66.100 / 55. 66.100
libavcodec 57. 99.100 / 57. 99.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Input #0, mpeg, from '271b.mpg':
Duration: 00:01:11.44, start: 0.460000, bitrate: 2154 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, bt470bg, progressive), 640x480 [SAR 1:1 DAR 4:3], 2000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, mono, s16p, 128 kb/s
[mpeg # 0000000000666aa0] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'out_271b.mpg':
Metadata:
encoder : Lavf57.73.100
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bt470bg, progressive), 640x480 [SAR 1:1 DAR 4:3], q=2-31, 2000 kb/s, 25 fps, 25 tbr, 90k tbn, 25 tbc
Stream #0:1: Audio: mp2, 44100 Hz, mono, s16p, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 74 fps=0.0 q=-1.0 Lsize= 786kB time=00:00:03.17 bitrate=2027.2kbits/s speed= 198x
video:730kB audio:50kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.843343%
Thanks
Addition: I tried to open the generated clip file with ffplay and got the following results. Note that ffplay was able to open and play the original mpg file.
ffplay.exe out_271b.mpg
ffplay version N-86482-gbc40674 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
libavutil 55. 66.100 / 55. 66.100
libavcodec 57. 99.100 / 57. 99.100
libavformat 57. 73.100 / 57. 73.100
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 92.100 / 6. 92.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
[mpeg # 00000000023cde80] probed stream 2 failedB sq= 0B f=0/0
[mpeg # 00000000023cde80] start time for stream 0 is not set in estimate_timings_from_pts
[mpeg # 00000000023cde80] Could not find codec parameters for stream 2 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpeg, from 'out_271bb.mpg':
Duration: 00:00:03.22, start: 0.500000, bitrate: 2068 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet 0KB sq= 0B f=0/0
Stream #0:1[0x1c0]: Audio: mp2, 44100 Hz, mono, s16p, 128 kb/s
Stream #0:2[0x1e0]: Video: none, none, 25 fps, 25 tbr, 90k tbn
SDL_OpenAudio (1 channels, 44100 Hz): DirectSoundCreate: No audio device found
No more combinations to try, audio open failed
No codec could be found with id 0
Failed to open file 'out_271b.mpg' or configure filtergraph

Audacity FFmpeg 7.1 AAC export Unsupported number of channels

Here is the error I am getting, I took a 7.1 AAC file, and remixed one of the tracks, and now I am trying to export back to the original format.
ffmpeg -i - -strict experimental -c:a aac -ac 8 -b:a 240k "F:\Something.aac"
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on May 22 2014 19:56:44 with gcc 4.8.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-
libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Guessed Channel Layout for Input Stream #0.0 : 7.1
Input #0, wav, from 'pipe:':
Duration: N/A, bitrate: 5644 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 7.1, s16, 5644 kb/s
[aac # 02567320] Unsupported number of channels: 8
Output #0, adts, to 'F:\Something.aac':
Stream #0:0: Audio: aac, 44100 Hz, 7.1, fltp, 240 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (pcm_s16le -> aac)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Your ffmpeg is too old.
You can get a new build for Windows at Zeranoe. Users of other OSs can find links to builds at the FFmpeg Download page.

ffmpeg not converting entire file

I'm trying to convert a .tak file to .flac, but ffmpeg stops converting before the end (with no error message).
>ffmpeg -i CDImage.tak CDImage.flac
ffmpeg version N-69659-gc0367f7 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 21.102 / 56. 21.102
libavformat 56. 19.100 / 56. 19.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 9.104 / 5. 9.104
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, tak, from 'CDImage.tak':
Duration: 00:17:35.95, start: 0.000000, bitrate: 1013 kb/s
Stream #0:0: Audio: tak, 44100 Hz, 2 channels, s16p
Output #0, flac, to 'CDImage.flac':
Metadata:
encoder : Lavf56.19.100
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc56.21.102 flac
Stream mapping:
Stream #0:0 -> #0:0 (tak (native) -> flac (native))
Press [q] to stop, [?] for help
size= 83540kB time=00:10:54.19 bitrate=1046.1kbits/s
video:0kB audio:83532kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.009689%
As you can see, the input file is 17:35.95, but ffmpeg is only converting 10:54.19 of it. Does anyone know what's going on here?
edit: I tried it with a different tak file and got the same result. Only 27 minutes of a 50 minute tak was converted to flac. I get the exact same output file times when converting to wav, so I'm guessing it must either be something with the tak files I have, or with ffmpeg's tak decoder.

Resources