Author Topic: Concatenating 3 mp3s to 1 larger mp3 that is loaded as VDF file  (Read 46 times)

stinga

  • Full Member

  • Offline
  • ***
  • 136
    • CoastFM
Concatenating 3 mp3s to 1 larger mp3 that is loaded as VDF file
« on: October 11, 2018, 01:06:36 PM »
G'day all,

Got a real problem....

We randomly play ads at :15 and :45

I am using ffmpeg -i "concat:a.mp3|b.mp3|c.mp3" -acodec copy ad_to_play.mp3

RDJ refuses to play the mp3 in its entirety reliably
We just played a.mp3 and c.mp3 portions of the concatenated mp3 file. Why did it not play b.mp3 part????
Nothing in events to say what maybe wrong.

When I play it with other mp3 players it seem fine...

RDJ reports the file as 00:00:59 long but it was 00:01:30.25 according to ffmpeg:

Code: [Select]
root@nostromo:/shares/mp3/Audio/Adverts/auto_ads# ffmpeg -i "concat:/shares/mp3/Audio/Adverts/auto_ads/Carpet_Home_Store.mp3|/shares/mp3/Audio/Adverts/auto_ads/FIX_AUTO_2017_VER_1.mp3|/shares/mp3/Audio/Adverts/auto_ads/TJs_Carpets.mp3" -acodec copy blah.mp3
ffmpeg version 3.2.10-1~deb9u1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --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 --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
[mp3 @ 0x564060bfed80] invalid concatenated file detected - using bitrate for duration
[mp3 @ 0x564060bfed80] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'concat:/shares/mp3/Audio/Adverts/auto_ads/Carpet_Home_Store.mp3|/shares/mp3/Audio/Adverts/auto_ads/FIX_AUTO_2017_VER_1.mp3|/shares/mp3/Audio/Adverts/auto_ads/TJs_Carpets.mp3':
  Duration: 00:01:30.31, start: 0.023021, bitrate: 320 kb/s
    Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 320 kb/s
    Metadata:
      encoder         : LAME3.99r
Output #0, mp3, to 'blah.mp3':
  Metadata:
    TSSE            : Lavf57.56.101
    Stream #0:0: Audio: mp3, 48000 Hz, stereo, 320 kb/s
    Metadata:
      encoder         : LAME3.99r
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=    3529kB time=00:01:30.25 bitrate= 320.3kbits/s speed=1.26e+03x   
video:0kB audio:3528kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.027185%

I am very confused....
Helps run CoastFM in Penzance UK
Running 4 x 1.8.2.0
mariaDB and tracks on a central server.

stinga

  • Full Member

  • Offline
  • ***
  • 136
    • CoastFM
Re: Concatenating 3 mp3s to 1 larger mp3 that is loaded as VDF file
« Reply #1 on: October 13, 2018, 02:20:22 PM »
I gave up and converted the whole lot to flac, that solved the issue.

I now concatenate the ads using shntool and it works.

Code: [Select]
13-OCT-2018 13:10:02.468106    [ 6215]0000013[ 406] /usr/bin/shntool join /shares/mp3/Audio/Adverts/auto_ads/TJs_Carpets.flac /shares/mp3/Audio/Adverts/auto_ads/FIX_AUTO_2017_VER_2_Recruit.flac /shares/mp3/Audio/Adverts/auto_ads/TEMP_GOLD_BLUE_CHIP_EDIT_29AUG.flac -rnone -Oalways -Pnone -oflac -a/shares/mp3/Audio/Adverts/auto_ads/ad_to_play 2>&1 - main::
13-OCT-2018 13:10:03.92312     [ 6215]0000014[ 408]
Joining [/shares/mp3/Audio/Adverts/auto_ads/TJs_Carpets.flac] (0:30.07) --> [/shares/mp3/Audio/Adverts/auto_ads/ad_to_play.flac] (1:30.02) : OK
Joining [/shares/mp3/Audio/Adverts/auto_ads/FIX_AUTO_2017_VER_2_Recruit.flac] (0:29.74) --> [/shares/mp3/Audio/Adverts/auto_ads/ad_to_play.flac] (1:30.02) : OK
Joining [/shares/mp3/Audio/Adverts/auto_ads/TEMP_GOLD_BLUE_CHIP_EDIT_29AUG.flac] (0:29.70) --> [/shares/mp3/Audio/Adverts/auto_ads/ad_to_play.flac] (1:30.02) : OK
Post-padded output file with 1648 zero-bytes. - main::

That coupled with some web pages, a cron job and RDJ events that fire and we have random ads playing.
Helps run CoastFM in Penzance UK
Running 4 x 1.8.2.0
mariaDB and tracks on a central server.