[digiKam-users] Extracting audio from .mp4 file

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[digiKam-users] Extracting audio from .mp4 file

Tac Tacelosky
Is there any way to use digikam to extract the audio from a movie clip to a wav or mp3 file?

Thanks,

Tac

Reply | Threaded
Open this post in threaded view
|

Re: Extracting audio from .mp4 file

AndriusWild
No but ffmpeg can easily do that.

It is a cross platform command line utility.


Sent from my Samsung Galaxy smartphone.


-------- Original message --------
From: Tac Tacelosky <[hidden email]>
Date: 2020-01-26 12:18 p.m. (GMT-07:00)
To: digiKam - Home Manage your photographs as a professional with the power of open source <[hidden email]>
Subject: [digiKam-users] Extracting audio from .mp4 file

Is there any way to use digikam to extract the audio from a movie clip to a wav or mp3 file?

Thanks,

Tac

Reply | Threaded
Open this post in threaded view
|

Re: Extracting audio from .mp4 file

Mick Sulley
In reply to this post by Tac Tacelosky
Pretty sure you can do it with kdenlive


On 26/01/2020 19:18, Tac Tacelosky wrote:
> Is there any way to use digikam to extract the audio from a movie clip
> to a wav or mp3 file?
>
> Thanks,
>
> Tac
>
Reply | Threaded
Open this post in threaded view
|

Re: Extracting audio from .mp4 file

Tac Tacelosky
Thanks.  Yes, I'm using both those tools now, and they work fine for me.  But I need to come up with an easy-to-use cross-platform system for an interviewing workflow with limited internet.  My idea was to use digikam, since it has such explicit support for importing media from SD cards.  I could then ask the users to select the photos and videos they want for the project (crop the photos, etc.)

The next step of the process needs just the audio, or a super-low-quality video (e.g 1 fps), so the files can be quickly uploaded to a website, where computers and people can transcribe and translate the content.  That's the step I'm trying to solve right now.  I'm using kdenlive for some of the photo/video selection, but it lacks customized batch jobs, customized proxies (which prompted this question), and extracting audio puts the .flac file in the same directory as the video, etc.

I'm trying to avoid asking the users to install ffmeg, so thought there might be a way to set something in a batch queue manager to create the lower-quality videos or extract the audio, and skip kdenlive for this part.

I use Ubuntu, but others who want to use this use Windows and Mac.  If I knew docker better, I'd probably wrap everything in a docker container, especially now that Windows 10 has much better support for it.  But some of the computers are older, and probably not even running Windows 10.

I guess my feature request would be that ffmpeg and ffprobe be available as customizable tools.

Anyway, thanks for the suggestions, I'll play around with the User Shell Script.

Tac

On Mon, Jan 27, 2020 at 4:19 AM Mick Sulley <[hidden email]> wrote:
Pretty sure you can do it with kdenlive


On 26/01/2020 19:18, Tac Tacelosky wrote:
> Is there any way to use digikam to extract the audio from a movie clip
> to a wav or mp3 file?
>
> Thanks,
>
> Tac
>
Reply | Threaded
Open this post in threaded view
|

Re: Extracting audio from .mp4 file

AndriusWild
You can write a shell script that does what you need using ffmpeg and call the script from digiKam.
I guess you will need two scripts - one for Linux (e.g. bash), one for Windows (power shell if it is available on Win 7).
It should not take too long to figure out the script.

Thanks,
Andrey


On Mon, Jan 27, 2020 at 6:33 AM Tac Tacelosky <[hidden email]> wrote:
Thanks.  Yes, I'm using both those tools now, and they work fine for me.  But I need to come up with an easy-to-use cross-platform system for an interviewing workflow with limited internet.  My idea was to use digikam, since it has such explicit support for importing media from SD cards.  I could then ask the users to select the photos and videos they want for the project (crop the photos, etc.)

The next step of the process needs just the audio, or a super-low-quality video (e.g 1 fps), so the files can be quickly uploaded to a website, where computers and people can transcribe and translate the content.  That's the step I'm trying to solve right now.  I'm using kdenlive for some of the photo/video selection, but it lacks customized batch jobs, customized proxies (which prompted this question), and extracting audio puts the .flac file in the same directory as the video, etc.

I'm trying to avoid asking the users to install ffmeg, so thought there might be a way to set something in a batch queue manager to create the lower-quality videos or extract the audio, and skip kdenlive for this part.

I use Ubuntu, but others who want to use this use Windows and Mac.  If I knew docker better, I'd probably wrap everything in a docker container, especially now that Windows 10 has much better support for it.  But some of the computers are older, and probably not even running Windows 10.

I guess my feature request would be that ffmpeg and ffprobe be available as customizable tools.

Anyway, thanks for the suggestions, I'll play around with the User Shell Script.

Tac

On Mon, Jan 27, 2020 at 4:19 AM Mick Sulley <[hidden email]> wrote:
Pretty sure you can do it with kdenlive


On 26/01/2020 19:18, Tac Tacelosky wrote:
> Is there any way to use digikam to extract the audio from a movie clip
> to a wav or mp3 file?
>
> Thanks,
>
> Tac
>
Reply | Threaded
Open this post in threaded view
|

Re: Extracting audio from .mp4 file

Tac Tacelosky
Curiously, the options for OUTPUTFILE in the Custom Shell Script are "Same as Input", JPG, TIFF and PNG.  Is that configurable somewhere?  I need flac, mp3 and wav as options.  But yes, that's likely the approach I'll take, I want to delay using kdenlive until it's absolutely necessary (mostly to make documentation / training easier).

Thanks.

Tac

On Mon, Jan 27, 2020 at 9:38 AM Andrey Goreev <[hidden email]> wrote:
You can write a shell script that does what you need using ffmpeg and call the script from digiKam.
I guess you will need two scripts - one for Linux (e.g. bash), one for Windows (power shell if it is available on Win 7).
It should not take too long to figure out the script.

Thanks,
Andrey


On Mon, Jan 27, 2020 at 6:33 AM Tac Tacelosky <[hidden email]> wrote:
Thanks.  Yes, I'm using both those tools now, and they work fine for me.  But I need to come up with an easy-to-use cross-platform system for an interviewing workflow with limited internet.  My idea was to use digikam, since it has such explicit support for importing media from SD cards.  I could then ask the users to select the photos and videos they want for the project (crop the photos, etc.)

The next step of the process needs just the audio, or a super-low-quality video (e.g 1 fps), so the files can be quickly uploaded to a website, where computers and people can transcribe and translate the content.  That's the step I'm trying to solve right now.  I'm using kdenlive for some of the photo/video selection, but it lacks customized batch jobs, customized proxies (which prompted this question), and extracting audio puts the .flac file in the same directory as the video, etc.

I'm trying to avoid asking the users to install ffmeg, so thought there might be a way to set something in a batch queue manager to create the lower-quality videos or extract the audio, and skip kdenlive for this part.

I use Ubuntu, but others who want to use this use Windows and Mac.  If I knew docker better, I'd probably wrap everything in a docker container, especially now that Windows 10 has much better support for it.  But some of the computers are older, and probably not even running Windows 10.

I guess my feature request would be that ffmpeg and ffprobe be available as customizable tools.

Anyway, thanks for the suggestions, I'll play around with the User Shell Script.

Tac

On Mon, Jan 27, 2020 at 4:19 AM Mick Sulley <[hidden email]> wrote:
Pretty sure you can do it with kdenlive


On 26/01/2020 19:18, Tac Tacelosky wrote:
> Is there any way to use digikam to extract the audio from a movie clip
> to a wav or mp3 file?
>
> Thanks,
>
> Tac
>
Reply | Threaded
Open this post in threaded view
|

Re: Extracting audio from .mp4 file

AndriusWild

Tac,

 

You can either use three different scripts for each output or setup a dialog in a single script.

I took inspiration from this script awhile ago:

https://gist.github.com/steventrux/10815095

 

Here is my Frankenstein script:

https://github.com/AndriusWild/dam_scripts/blob/master/compress2mp4.sh

Take a look at the ffmpeg part as well as on the dialogs in the end (read -p)

https://github.com/AndriusWild/dam_scripts/blob/master/compress2mp4.sh#L242

 

 

Thanks,

Andrey

 

From: Digikam-users <[hidden email]> On Behalf Of Tac Tacelosky
Sent: Tuesday, January 28, 2020 6:40 AM
To: digiKam - Home Manage your photographs as a professional with the power of open source <[hidden email]>
Subject: Re: [digiKam-users] Extracting audio from .mp4 file

 

Curiously, the options for OUTPUTFILE in the Custom Shell Script are "Same as Input", JPG, TIFF and PNG.  Is that configurable somewhere?  I need flac, mp3 and wav as options.  But yes, that's likely the approach I'll take, I want to delay using kdenlive until it's absolutely necessary (mostly to make documentation / training easier).

 

Thanks.

 

Tac

 

On Mon, Jan 27, 2020 at 9:38 AM Andrey Goreev <[hidden email]> wrote:

You can write a shell script that does what you need using ffmpeg and call the script from digiKam.

I guess you will need two scripts - one for Linux (e.g. bash), one for Windows (power shell if it is available on Win 7).

It should not take too long to figure out the script.

 

Thanks,

Andrey

 

 

On Mon, Jan 27, 2020 at 6:33 AM Tac Tacelosky <[hidden email]> wrote:

Thanks.  Yes, I'm using both those tools now, and they work fine for me.  But I need to come up with an easy-to-use cross-platform system for an interviewing workflow with limited internet.  My idea was to use digikam, since it has such explicit support for importing media from SD cards.  I could then ask the users to select the photos and videos they want for the project (crop the photos, etc.)

 

The next step of the process needs just the audio, or a super-low-quality video (e.g 1 fps), so the files can be quickly uploaded to a website, where computers and people can transcribe and translate the content.  That's the step I'm trying to solve right now.  I'm using kdenlive for some of the photo/video selection, but it lacks customized batch jobs, customized proxies (which prompted this question), and extracting audio puts the .flac file in the same directory as the video, etc.

 

I'm trying to avoid asking the users to install ffmeg, so thought there might be a way to set something in a batch queue manager to create the lower-quality videos or extract the audio, and skip kdenlive for this part.

 

I use Ubuntu, but others who want to use this use Windows and Mac.  If I knew docker better, I'd probably wrap everything in a docker container, especially now that Windows 10 has much better support for it.  But some of the computers are older, and probably not even running Windows 10.

 

I guess my feature request would be that ffmpeg and ffprobe be available as customizable tools.

 

Anyway, thanks for the suggestions, I'll play around with the User Shell Script.

 

Tac

 

On Mon, Jan 27, 2020 at 4:19 AM Mick Sulley <[hidden email]> wrote:

Pretty sure you can do it with kdenlive


On 26/01/2020 19:18, Tac Tacelosky wrote:
> Is there any way to use digikam to extract the audio from a movie clip
> to a wav or mp3 file?
>
> Thanks,
>
> Tac
>