Hello all,

I am using ffmpeg/ffprobe, both release 6.1, running on Windows 11 Family.

In the following, I name :
-> "initial movie" : the movie to be reencoded ;
-> "final movie" : the movie produced by the reencoding process.

In order to obtain audio informations about any movie, I use the following 
command :

ffprobe "any movie" -v error -select_streams a -print_format json -show_format 
-show_streams

When I apply this command to an initial movie :

ffprobe "initial movie" -v error -select_streams a -print_format json 
-show_format -show_streams

this is the result of the command :

            "index": 1,
            "codec_name": "truehd",
            "sample_rate": "48000",
            "channels": 8,
            "channel_layout": "7.1",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
                "language": "eng",
                "title": "TrueHD with Dolby Atmos 7.1",
                "BPS-eng": "4211333",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES"
            "index": 2,
            "codec_name": "ac3",
            "sample_rate": "48000",
            "channels": 6,
            "channel_layout": "5.1(side)",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "bit_rate": "448000",
                "language": "eng",
                "title": "Dolby Digital 5.1",
                "BPS-eng": "448000",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES"
            "index": 3,
            "codec_name": "ac3",
            "sample_rate": "48000",
            "channels": 6,
            "channel_layout": "5.1(side)",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "bit_rate": "448000",
                "language": "spa",
                "title": "Dolby Digital 5.1",
                "BPS-eng": "448000",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES"
            "index": 4,
            "codec_name": "ac3",
            "sample_rate": "48000",
            "channels": 6,
            "channel_layout": "5.1(side)",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "bit_rate": "448000",
                "language": "fre",
                "title": "Dolby Digital 5.1",
                "BPS-eng": "448000",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES"

After, in order to reencode the considered initial movie, I executed the 
following command :

ffmpeg -i "initial movie" -y -loglevel error -sn ^
-map 0:a:0 -c:a:0 aac -b:a:0 128k -ar:0 48k -metadata:s:a:0 language=eng ^
-map 0:a:3 -c:a:3 aac -b:a:3 112k -ar:3 48k -metadata:s:a:3 language=fre ^
-map 0:v:0 -vcodec libsvtav1 -vf "scale=960:540" -sws_flags 
lanczos+accurate_rnd -b:v 1344k -minrate 1344k -maxrate 1360k ^
-bufsize 2688k "final movie"

When the process is finished, I execute the command for audio infos, for the 
final movie :

ffprobe "final movie" -v error -select_streams a -print_format json 
-show_format -show_streams

this is the result of the command :

            "index": 0,
            "codec_name": "aac",
            "sample_rate": "48000",
            "channels": 8,
            "channel_layout": "7.1",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
                "language": "eng",
                "title": "TrueHD with Dolby Atmos 7.1",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES",
                "BPS-eng": "4211333",
            "index": 1,
            "codec_name": "vorbis",
            "sample_rate": "48000",
            "channels": 6,
            "channel_layout": "5.1",
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
                "language": "fre",
                "title": "Dolby Digital 5.1",
                "BPS-eng": "448000",
                "_STATISTICS_TAGS-eng": "BPS DURATION NUMBER_OF_FRAMES 
NUMBER_OF_BYTES",

As you can see, in the final movie, the wished audio codec specified in the 
ffmpeg command :
-> has been respected for the english audio track ;
-> but has been ignored for the french audio track ; the program replaced 
unilaterally the wished codec, by another codec.

Then the question is : why did ffmpeg make such a replacement ?

What are the audio characteristics of the initial movie, that led ffmpeg to use 
a different audio codec than the one specified ?

Thank you in advance for your replies and advices.

Regards,
HA
_______________________________________________
ffmpeg-user mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to