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-30

@startreksteve

Are you asking how to just manually install the ffmpeg arm binary?

If you are, the instructions for that are in the get_iplayer wiki as user-2 said.

As I mentioned, I used the manual installation and on the manual installation page in the wiki there are instructions under the External Programs heading on how to install the ffmpeg binary:

https://github.com/get-iplayer/get_iplay...l-programs

At the time of testing, the Wiki didn't contain the note to tell you to (obviously) pick the arm binary and don't just use the x86/x86_64 one, but the instructions are easy to follow.

The only thing that needs a note in that section is the fact that you shouldn't install AtomicParsley from the system repo on a Raspbian (to maintain consistency of instruction contained in the unixpkg page). I installed AtomicParsley from Jon's Wheezy repo as I mentioned. If memory serves (it was late) it was a simple wget of the .deb and dpkg -i to install.

user-9

Looks like its working!
slow but sure, it didnt delete the m4a though, is there a switch for that?
Had to use the Armel 32 bit though. the Armhf didnt work.
Steve

user-30

Which Pi do you have?

Did you use the example command here? That's the one I used and it worked on mine.

user-9

Im currently running it on a Pi3 and a Pi Zero, pi3 successful, Zero still running..

Yes, I used the examples you show. Is there a way to incorporate the presets as a permenant setting without having to call --preset= every time?

user-9

Never mind, I found it, its tacked onto the end of the preset..

Steve

If anyone wants me to put together all the info on here about getting mp3 working on Rasberry Pi, I can do that.

Steve

user-9

correction,
I added && rm etc to the preset, and it converted the m4a to mp3, but didnt delete the m4a on completion.
Any ideas?

user-30

It would help if you posted the command you have set up.

user-9

Yeah,
it was the last bit of this:
get_iplayer --get 12345 --command-radio='ffmpeg -loglevel error -i "<filename>" -c:v copy -c:a libmp3lame -q:a 0 -y "<dir>/<fileprefix>.mp3" && rm "<filename>"'


Steve

user-1749

Hi,
   I have a batch file which attempts to download multiple radio programmes and CONVERT them  to mp3.

 I have initially set some preferences which should reduce the verbosity of later ;commands'.


Code:
Call get_iplayer --prefs-add --type=radio --output="C:\__RTMPDUMP\++Downloads"
Call get_iplayer --prefs-add --radiomode=vgood
Call get_iplayer --prefs-add --preset aactomp3 --command-radio="ffmpeg -i \""<filename>"\" -c:v copy -c:a libmp3lame -b:a 128k -id3v2_version 3 -write_id3v1 1 -y \""<dir>/<fileprefix>.mp3"\" && del \""<filename>"\""

Now, initially I processing each of the 'downloads' as indicated below.

REM %1 Processing...Radio Programme: The Late Paul Barnes
REM ========================================================================
IF EXIST "The Late Paul Barnes 2017-04-29 29-04-2017.mp3" (echo "The Late Paul Barnes 2017-04-29 29-04-2017.mp3" already exists)  else (Call get_iplayer --pid=p04zysmk --preset=aactomp3 --force --whitespace --file-prefix "The Late Paul Barnes 2017-04-29 29-04-2017" )

This works fine...great...but the time elapsed for the post processing conversion from .M4A to MP3 is time intensive so I wanted to change to something like...

REM %1 Processing...Radio Programme: The Late Paul Barnes
REM ========================================================================
IF EXIST "The Late Paul Barnes 2017-04-29 29-04-2017.mp3" (echo "The Late Paul Barnes 2017-04-29 29-04-2017.mp3" already exists)  else (Call get_iplayer --pid=p04zysmk --force --whitespace --file-prefix "The Late Paul Barnes 2017-04-29 29-04-2017" )

i.e. => without the switch --preset=aactomp3
OK, I 'could' just build a batch file (conversion) with no reference to get_iplayer and just use ffmpeg standalone, so here is my question.

What would be the succeeding command line be to JUST do the conversion using get_iplayer?

By throwing out the --force I 'would' have thought that it would proceed to the conversion whilst acknowledging that the file had already been downloaded.

get_iplayer --pid=b08n1bxv --preset=aactomp3 --whitespace --file-prefix "The Organist Entertains 2017-04-25 Japanese Sandman"

By stacking commands like these at the END of the batch file and using a 'currently downloading' logical gate (via existence of a stub file) for the first commands I could initiate several instances of the batch file.

user-2

Quote:What would be the succeeding command line be to JUST do the conversion using get_iplayer?
There is none. As you said, use ffmpeg standalone.

user-1749

Thanks user-2...it's probably just as well that there are no assumptions involved in the get_iplayer logic.

Cheers.
Pages: 1 2 3

These forums are archived

See this post for further info