Convert just audio and preserve original video?

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

Convert just audio and preserve original video?

Ron Barnes
Hello All,

I have a few movies and the Audio on them for some reason plays very, very low and I have to turn the volume on my TV to near max in order to hear.  I have noticed that a separate video encoded with EAC3 works perfect.

Here is the O/P from ffprobe of the good audio...

Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
Stream #0:1(eng): Audio: eac3, 48000 Hz, 6 channels, fltp  <==

I am trying to compile the correct line command to convert JUST the existing audio stream or streams (there may be multiple) to the above  yet preserve all existing data such as Subtitles and video quality.

Can someone help with this?

Thanks,

-Ron

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Convert just audio and preserve original video?

Moritz Barsnick
Hi Ron,

On Sun, Apr 28, 2019 at 07:48:20 -0400, Ron Barnes wrote:
> I have a few movies and the Audio on them for some reason plays very,
> very low and I have to turn the volume on my TV to near max in order
> to hear.

Have you checked whether the volume on the audio track is actually low?

$ ffmpeg -i input -map 0:a -af volumedetect -f null -

> I have noticed that a separate video encoded with EAC3 works perfect.

As a side note, I have the same effect, because (E)AC3 gets passed on
to my TV by my media player, while other codecs are converted to PCM.
(My player isn't outputting as much volume as it could, apparently. Or
the TV has different internal "data paths".)

Anyway:

> I am trying to compile the correct line command to convert JUST the
> existing audio stream or streams (there may be multiple) to the above
> yet preserve all existing data such as Subtitles and video quality.

Yes, that's easy and I do it quite often:
$ ffmpeg -i input -map 0 -c copy -c:a ac3 output

"-map 0" tells ffmpeg to use all input streams, as you requested.
"-c copy" tells ffmpeg to not re-encode.
"-c:a ac3 tells ffmpeg to re-encode audio.
(You can replace "ac3" with "eac3" if you actually need EAC3.)

You may need to tweak the output audio bandwidth for quality using
"-b:a". I *believe* ac3/eac3 automatically uses 96 kBits/s per channel.

If, instead of going to a different codec, want to actually boost the
volume (probably a different use-case than yours), you would do:

$ ffmpeg -i input -map 0 -c copy -c:a aac -af volume=+6dB output

Note that this can lead to clipping if you boost more is technically
feasible. The volume filter tells you how much headroom you have. (I
believe there's a new soft-clip filter to avoid all too heard clipping
effects.) If only some audio segments are too silent, while some are okay,
the dynaudnorm filter is also very helpful.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Convert just audio and preserve original video?

Ron Barnes
Thank you, Moritz!

-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Moritz Barsnick
Sent: Sunday, April 28, 2019 12:21 PM
To: FFmpeg user discussions <[hidden email]>
Subject: Re: [FFmpeg-user] Convert just audio and preserve original video?

Hi Ron,

On Sun, Apr 28, 2019 at 07:48:20 -0400, Ron Barnes wrote:
> I have a few movies and the Audio on them for some reason plays very,
> very low and I have to turn the volume on my TV to near max in order
> to hear.

Have you checked whether the volume on the audio track is actually low?

$ ffmpeg -i input -map 0:a -af volumedetect -f null -

> I have noticed that a separate video encoded with EAC3 works perfect.

As a side note, I have the same effect, because (E)AC3 gets passed on to my TV by my media player, while other codecs are converted to PCM.
(My player isn't outputting as much volume as it could, apparently. Or the TV has different internal "data paths".)

Anyway:

> I am trying to compile the correct line command to convert JUST the
> existing audio stream or streams (there may be multiple) to the above
> yet preserve all existing data such as Subtitles and video quality.

Yes, that's easy and I do it quite often:
$ ffmpeg -i input -map 0 -c copy -c:a ac3 output

"-map 0" tells ffmpeg to use all input streams, as you requested.
"-c copy" tells ffmpeg to not re-encode.
"-c:a ac3 tells ffmpeg to re-encode audio.
(You can replace "ac3" with "eac3" if you actually need EAC3.)

You may need to tweak the output audio bandwidth for quality using "-b:a". I *believe* ac3/eac3 automatically uses 96 kBits/s per channel.

If, instead of going to a different codec, want to actually boost the volume (probably a different use-case than yours), you would do:

$ ffmpeg -i input -map 0 -c copy -c:a aac -af volume=+6dB output

Note that this can lead to clipping if you boost more is technically feasible. The volume filter tells you how much headroom you have. (I believe there's a new soft-clip filter to avoid all too heard clipping
effects.) If only some audio segments are too silent, while some are okay, the dynaudnorm filter is also very helpful.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Convert just audio and preserve original video?

Ron Barnes
In reply to this post by Moritz Barsnick
Hi Again Moritz,

Is there a way to assign a frequency to the audio when converting? The good sounding version has EAC @ 48000 Hz.  When I convert it, it says EAC and unknown, no Hz.  It sounds better but still low.

I have googled this command but I just keep getting links to the FFMPG document site but I am unable to fine the switch command to assign a frequency.

Can you assist?

-Ron


-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Moritz Barsnick
Sent: Sunday, April 28, 2019 12:21 PM
To: FFmpeg user discussions <[hidden email]>
Subject: Re: [FFmpeg-user] Convert just audio and preserve original video?

Hi Ron,

On Sun, Apr 28, 2019 at 07:48:20 -0400, Ron Barnes wrote:
> I have a few movies and the Audio on them for some reason plays very,
> very low and I have to turn the volume on my TV to near max in order
> to hear.

Have you checked whether the volume on the audio track is actually low?

$ ffmpeg -i input -map 0:a -af volumedetect -f null -

> I have noticed that a separate video encoded with EAC3 works perfect.

As a side note, I have the same effect, because (E)AC3 gets passed on to my TV by my media player, while other codecs are converted to PCM.
(My player isn't outputting as much volume as it could, apparently. Or the TV has different internal "data paths".)

Anyway:

> I am trying to compile the correct line command to convert JUST the
> existing audio stream or streams (there may be multiple) to the above
> yet preserve all existing data such as Subtitles and video quality.

Yes, that's easy and I do it quite often:
$ ffmpeg -i input -map 0 -c copy -c:a ac3 output

"-map 0" tells ffmpeg to use all input streams, as you requested.
"-c copy" tells ffmpeg to not re-encode.
"-c:a ac3 tells ffmpeg to re-encode audio.
(You can replace "ac3" with "eac3" if you actually need EAC3.)

You may need to tweak the output audio bandwidth for quality using "-b:a". I *believe* ac3/eac3 automatically uses 96 kBits/s per channel.

If, instead of going to a different codec, want to actually boost the volume (probably a different use-case than yours), you would do:

$ ffmpeg -i input -map 0 -c copy -c:a aac -af volume=+6dB output

Note that this can lead to clipping if you boost more is technically feasible. The volume filter tells you how much headroom you have. (I believe there's a new soft-clip filter to avoid all too heard clipping
effects.) If only some audio segments are too silent, while some are okay, the dynaudnorm filter is also very helpful.

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Convert just audio and preserve original video?

Moritz Barsnick
On Wed, May 08, 2019 at 08:25:07 -0400, Ron Barnes wrote:

> Is there a way to assign a frequency to the audio when converting?
> The good sounding version has EAC @ 48000 Hz. When I convert it, it
> says EAC and unknown, no Hz. It sounds better but still low.

Who says "EAC and unknown, no Hz"? Possibly you are just tinkering with
cosmetics here, without improving anything.

ffmpeg retains the input's sample rate. If it was 44100, the output
will have that as well. It won't sound better if you convert it to
48000. (If you do need to convert, use the output option "-ar 48000".)

You failed to write which of my suggestions you actually followed, and
"Have you checked whether the volume on the audio track is actually
low?".

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Convert just audio and preserve original video?

Ron Barnes
Thank you Moritz!
I have been away from my computer for a few days.  I will go back to your original response and re-evaluate my audio.

Thanks again!

-Ron

-----Original Message-----
From: ffmpeg-user <[hidden email]> On Behalf Of Moritz Barsnick
Sent: Thursday, May 9, 2019 5:18 AM
To: FFmpeg user discussions <[hidden email]>
Subject: Re: [FFmpeg-user] Convert just audio and preserve original video?

On Wed, May 08, 2019 at 08:25:07 -0400, Ron Barnes wrote:

> Is there a way to assign a frequency to the audio when converting?
> The good sounding version has EAC @ 48000 Hz. When I convert it, it
> says EAC and unknown, no Hz. It sounds better but still low.

Who says "EAC and unknown, no Hz"? Possibly you are just tinkering with cosmetics here, without improving anything.

ffmpeg retains the input's sample rate. If it was 44100, the output will have that as well. It won't sound better if you convert it to 48000. (If you do need to convert, use the output option "-ar 48000".)

You failed to write which of my suggestions you actually followed, and "Have you checked whether the volume on the audio track is actually low?".

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".