These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

How to get FFmpeg to convert downloaded m4a to mp3 on Raspbian/Pi3?

Pages: 1 2 3

user-2

(10-02-2017, 08:08 PM)libmp3lame IS installed
It doesn't matter if ffmpeg isn't configured to use it. Check with ffmpeg -codecs | grep libmp3lame

EDIT: Also check the build configuration: ffmpeg 2>&1 >/dev/null | grep enable-libmp3lame
Quote:Its also not marking shows as downloaded.
Likely due to your broken ffmpeg

user-9

Did that, and got this:

ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Raspbian 4.9.2-10)
  configuration: --prefix=/usr --enable-gpl --enable-libx264 --enable-nonfree --enable-shared --disable-static
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100


Does this mean that liblamemp3 isnt enabled? If so, how do I enable it? forgot to mention Im on Raspbian latest version on a Pi3

Steve

user-2

(11-02-2017, 05:51 PM)Does this mean that liblamemp3 isnt enabled? If so, how do I enable it? forgot to mention Im on Raspbian latest version on a Pi3
Yes. You have to enable it at build time, which I'm guessing is not an option for you.

Try the ARM static builds from:

https://johnvansickle.com/ffmpeg/

which are built with libmp3lame. I no longer have an RPi, so I have no idea if they work. I presume the armhf build would be the preferred version to test first. Extract the ffmpeg binary and use the --ffmpeg option to test it with get_iplayer instead of the earlier version. If it works, post here so I can update the documentation.

user-9

Ok,
Its all sorted and working fine on Ubuntu,
the Raspberry Pi however doesnt have a working version of FFmpeg to convert to mp3, avconv fails, and I cant find a way to get a working copy of FFmpeg.
tried compiling one, but it never finishes..
I guess the one thing I use the Pi Zero for cannot now be done.

Steve

user-2

You should be able to use avconv for MP3 conversion, assuming the Raspbian package is the same as the Debian package. The version numbers match, but I can't verify they work the same. You may need to install libmp3lame0 separately. I can't remember if that was necessary for Debian.

user-9

Second thing I tried...
It tries, then times out and fails with a zero bytes file...
Think Im giving up on Raspbian for GIP until someone makes a good version of FFMPEG, works perfectly on latest Ubuntu.

user-2

I suspect a configuration problem or an obsolete version of avconv, but since I can't test it for myself I will throw in the towel as well. MP3 hasn't been an iPlayer format for 2 years, so it's now left up to users to make it work for whatever old MP3 players they may be using. Since nobody with first-hand knowledge has been willing to help here, I suggest you take your query to Pi forums, if you haven't already. Maybe look into cross-compiling as well.

user-9

Yeah, tried the Pi forums the next day, no joy there either, kept mentioning the pre-built version which doesnt work. AVconv used to work with the downloads in FLV format, no joy with M4A though. Ah well back to trusty old Ubuntu, the Pi appealed to me as I didnt have to have a big hungry desktop humming away all day burning though my carbon footprint.

user-2

ffmpeg will return in the next Raspbian release (stretch), so might be worth another look when that happens.

user-30

I've got three Pi's, 'bout time I pulled my finger out and had a go at this issue.

Half term this week but I'll see if I can spend some time looking into it when I have a minute.

user-2

That would be great. It would help to run down what, if anything, prevents avconv from doing MP3 conversion. I wouldn't expect it to convert raw DASH downloads, but I would expect it to work on raw HLS downloads (MPEG-TS) or final M4A files. It would also help to find out if the ARM builds from https://johnvansickle.com/ffmpeg/ work or not.

user-30

OK, an update:

Raspberry Pi details

Type = Raspberry Pi 2 model b
OS = Raspbian Jessie Lite (Wheezy is not available)

Installation

1) The Raspbian package by Jon didn't have any built packages for Jessie at time of trying and I didn't want to flap around with pinning or priorities or whatever, so...

2) Installation followed manual Unix Package instructions with following points:
  • Installed libwww-perl libxml-simple-perl libxml-libxml-perl from system repo
  • Installed AtomicParsley manually from Jon's Wheezy repo
  • Installed RTMPdump from system repo
  • Installed ffmpeg armhf build from John Van Sickle
  • Installed get_iplayer CLI via standard manual instructions in wiki (in $PATH)
  • Configured get_iplayer to use ffmpeg

ffmpeg build details

libmp3lame

ffmpeg | grep libmp3lame returns:

Code:
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg

Note - --enable-libmp3lame is present.

libx264-142

--enable-libx264 is also present.

Tests

Sparing some details as I can run further tests that are requested and capture the output but...

TV downloads and conversion (hlshd)- SUCCESSFUL
Radio downloads and m4a conversion (dafhigh) - SUCCESSFUL
Radio downloads and conversion from m4a to mp3 - SUCCESSFUL (but takes several minutes)

NOTE - mp3 conversion used standard variable bitrate example from wiki instructions. m4a file was successfully removed after conversion.

So those simple things are working.

Further testing

1) If someone can tell me where a Wheezy install can be found, I'll stick that on a second Pi and test that.

2) If further tests are desired, please post requests and I'll perform them.

user-9

https://johnvansickle.com/ffmpeg/]ffmpeg armhf build from John Van Sickle

And how do I do this?
just file copy ffmpeg to /usr/bin ?

user-2

(15-02-2017, 10:09 AM)https://johnvansickle.com/ffmpeg/]ffmpeg armhf build from John Van Sickle

And how do I do this?
just file copy ffmpeg to /usr/bin ?
You could do worse than to simply read the installation instructions in the wiki.

user-2

@SquarePenguin - many thanks for testing. I'll update the advice in install docs accordingly. I'll presume the Van Sickle builds work on Wheezy as well. If you should find out different, let me know, but it's not worth expending much effort on Wheezy.

user-9

(15-02-2017, 11:20 AM)user-2 Wrote: [ -> ]
(15-02-2017, 10:09 AM)https://johnvansickle.com/ffmpeg/]ffmpeg armhf build from John Van Sickle

And how do I do this?
just file copy ffmpeg to /usr/bin ?
You could do worse than to simply read the installation instructions in the wiki.

I couldnt find any installation instructions...

user-2

That gigantic link at the top labelled "Wiki" doesn't at least arouse your curiosity?

user-2

That gigantic link in the wiki front page labelled "Install guides" doesn't at least arouse your curiosity?

user-9

I was looking on th eJohn Van Sickle website...

Cant see anything of use for a blow by blow installation of static builds on the GIP Wiki Installation guides...

user-2

Why would his site tell you how to install ffmpeg for get_iplayer?
Pages: 1 2 3

These forums are archived

See this post for further info