These forums are archived

See this post for further info

get_iplayer forums

Forum archived. Posting disabled.

Is it possible to run multiple '--command's?

user-1088

Hi

(Windows 7, Get_iplayer 2.97, ffmpeg 3.0)

I'm attempting to use ffmpeg within get_iplayer to extract the .aac file from a .m4a & then delete the original .m4a. ffmpeg appears to have no internal delete option so I'm trying to use Windows old DOS commands.
<snip> of relevant command:
 
Code:
--command="ffmpeg.exe -i \""<filename>"\" -acodec copy \""C:\Downloads\R&M\<fileprefix>.aac"\" ren \""<filename>"\" \""zxc.mp3"\""

To test it I'm using DOS 'ren' rename command. The full command downloads the m4a, but ffmpeg creates a zero size .aac file & then finishes. If I run one of either 'ffmpeg or 'ren' without the other, they both work as expected.

 I've tried separating them out so there are two '--command' but whichever order they're in it only processes the latter.

I've run out of ideas. Anybody able to help?

2 side questions:
Is there a difference between --fileprefix & --file-prefix?

Is there a 'paste code' option in this forum?

Cheers
Dave F.

user-2

(24-11-2016, 08:57 PM)--command="ffmpeg.exe -i \""<filename>"\" -acodec copy \""C:\Downloads\R&M\<fileprefix>.aac"\" ren \""<filename>"\" \""zxc.mp3"\""

To test it I'm using DOS 'ren' rename command. The full command downloads the m4a, but ffmpeg creates a zero size .aac file & then finishes. If I run one of either 'ffmpeg or 'ren' without the other, they both work as expected.
Hint 1: Your shell needs some way to separate the two commands. Hint 2: It's the same as specifying multiple commands on one line in a batch file or at the command prompt. Google is your friend here. Work out the syntax at a command prompt before using --command.
Quote:I've tried separating them out so there are two '--command' but whichever order they're in it only processes the latter.
You can only have one --command option. Last one wins if multiple specified.
Quote:Is there a difference between --fileprefix & --file-prefix?
No
Quote:Is there a 'paste code' option in this forum?
Toolbar in post editor

user-1088

Thanks.

For others users who may have the same problem, I used the '&' symbol. Full Windows documentation:
https://www.microsoft.com/resources/docu...x?mfr=true

From what I've read in the documentation I'm unsure how I was to deduce it was a shell with a shell or that multiple commands could be used. Could a couple of sentences be added to clarify that multiple commands are possible & tips on how to achieve it?

Cheers
DaveF

user-2

I've added some text in the usage examples to indicate that multiple commands can be used, but I'll stop there. Things vary between platforms, and we assume users will know how to use their command shells. Feel free to add tips or examples, though. Just make sure it's clear what platform(s) they're for.

These forums are archived

See this post for further info