Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #77665

Re: fmpeg drift (2) - solved?

From "Carlos E.R." <robin_listas@es.invalid>
Newsgroups comp.os.linux.misc
Subject Re: fmpeg drift (2) - solved?
Date 2025-11-16 23:56 +0100
Message-ID <6d1qulxl09.ln2@Telcontar.valinor> (permalink)
References (8 earlier) <jsokulxo6q.ln2@Telcontar.valinor> <ffmpeg-20251115002632@ram.dialup.fu-berlin.de> <89fnulx8b7.ln2@Telcontar.valinor> <codec-20251116142803@ram.dialup.fu-berlin.de> <p43pulxqdv.ln2@Telcontar.valinor>

Show all headers | View raw


On 2025-11-16 15:19, Carlos E.R. wrote:
> On 2025-11-16 14:34, Stefan Ram wrote:
>> "Carlos E.R." <robin_listas@es.invalid> wrote or quoted:
>>> ffmpeg -i movie.mkv -vf "scale=-1:802,format=yuv420p" -map 0
>>> -c:v libx264 -preset fast -crf 22 -tune fastdecode -profile:v
>>> main -c:a aac -b:a 192k -c:s copy -disposition:a:0 default
>>> 8c_movie.mkv
>> . . .
>>> [00007f0014f467d0] main decoder error: Codec `mp4a' (MPEG AAC
>>> Audio) is not supported.              <============
>>
>>    When the audio codec is not supported by the player,
>>    it might help to try a different codec. For a start,
>>    the following line should request no audio-transcod-
>>    ing at all:
>>
>> ffmpeg -i movie.mkv -map 0 -c:v libx264 -vf
>> "scale=-1:802,format=yuv420p" -preset fast -crf 22 -tune
>> fastdecode -profile:v main -c:a copy -c:s copy 8c_movie.mkv
>>
>>    by "-c:a copy".
> 
> I tried that before, different failure.
> 
>>
>>    Then, you could try to downmix the six channels to stereo
>>    if acceptable, replacing, "-c:a copy" with,
>>
>> |-c:a aac -b:a 192k -ac 2
>>
>>    , or you could try another audio encoding, replacing
>>    "-c:a copy" with,
>>
>> |-c:a ac3 -b:a 640k
> 
> I tried "-c:a libopus -ac 6 "
> 
> Vlc barfed:
> 
> [00007f2468f46ab0] opus decoder error: cannot read Opus header
> [00007f2468f46ab0] opus decoder error: initial Opus header is corrupted
> 
> 
> I can try your suggestion later, thanks.

Old attempts:

ffmpeg -i movie.mkv \
     -vf "scale=-1:802,format=yuv420p" -c:v libx264 -preset fast \
     -crf 22 -tune fastdecode -profile:v main -c:a copy \
     -c:s copy output.mkv

I got audio not supported on VLC, and only one subtitle stream. On 
version 3 and 4, same line gets working audio, and one subtitle stream. 
Attempts to produce the two subtitles on version 4 killed the audio.


Tried also this concoction suggested by chatgpt, VLC also refused to 
play the audio but generated the two subtitles:

ffmpeg -i movie.mkv -vf "scale=-1:802,format=yuv420p" -map 0 \
    -c:v libx264 -preset fast -crf 22 -tune fastdecode -profile:v main \
    -c:a aac -b:a 192k -c:s copy -disposition:a:0 default 8c_movie.mkv

Mail list suggested:

ffmpeg -t 10:0 -i movie.mkv -vf "scale=-1:802,format=yuv420p" \
   -map 0 -c:v libx264 -preset fast -crf 22 -tune fastdecode
   -profile:v main -c:a libopus -ac 6 -c:s copy 8d_movie.mkv

vlc said:

[00007f2468f46ab0] opus decoder error: cannot read Opus header
[00007f2468f46ab0] opus decoder error: initial Opus header is corrupted


I just tried again - chatgpt line, with your audio suggestion:

ffmpeg -t 10:0 -i movie.mkv -vf "scale=-1:802,format=yuv420p" \
    -c:v libx264 -preset fast -crf 22 -tune fastdecode \
    -profile:v main -c:a aac -b:a 192k -ac 2 -c:s copy \
    -disposition:a:0 default 9c_movie.mkv

Plays with audio.
One subtitle track (there are two in the original)

Your other audio suggestion:

ffmpeg -t 10:0 -i movie.mkv -vf "scale=-1:802,format=yuv420p" \
    -c:v libx264 -preset fast -crf 22 -tune fastdecode \
    -profile:v main -c:a ac3 -b:a 640k -c:s copy \
    -disposition:a:0 default 9d_movie.mkv


Plays with audio.
One subtitle track (there are two in the original)
Bigger file.

-rw-r--r-- 1 cer users  176863870 Nov 16 23:02 9c_movie.mkv
-rw-r--r-- 1 cer users  210290095 Nov 16 23:27 9d_movie.mkv


Attempting to generate the two subtitle tracks

ffmpeg -t 10:0 -i movie.mkv -vf "scale=-1:802,format=yuv420p" \
   -c:v libx264 -preset fast -crf 22 -tune fastdecode \
   -profile:v main -c:a ac3 -b:a 640k -c:s copy -c:s copy \
   -disposition:a:0 default 9dd_movie.mkv

produces warning:

[sost#0:2 @ 0x55dd76ca2880] Multiple 
-codec/-c/-acodec/-vcodec/-scodec/-dcodec options specified for stream 
2, only the last option '-codec:s copy' will be used.

Although the documentation at some point said to use that syntax.

So:

    I still need to test in the low power laptop at the sitting room, 
but the audio problem appears to be solved.

    There is a problem with the subtitles, only one stream is copied.

Got it. -map 0

ffmpeg -t 10:0 -i movie.mkv -vf "scale=-1:802,format=yuv420p" \
   -map 0 -c:v libx264 -preset fast -crf 22 -tune fastdecode \
   -profile:v main -c:a ac3 -b:a 640k -c:s copy \
   -disposition:a:0 default 9ee_movie.mkv

Well, I now have to choose which audio version to use:

  |-c:a aac -b:a 192k -ac 2

  |-c:a ac3 -b:a 640k		six channels

I should choose the six channel version, it is more accurate, even if 
don't have the hardware, just in case I have it in the future.


-- 
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-12 23:20 +0000
  Re: My 2 favorite tools for reading Linux manual pages the easy way Nuno Silva <nunojsilva@invalid.invalid> - 2025-11-12 23:51 +0000
    Re: My 2 favorite tools for reading Linux manual pages the easy way ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-13 11:01 +0000
      Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-13 20:05 +0000
  Re: My 2 favorite tools for reading Linux manual pages the easy way Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-11-13 08:29 -0500
    Re: My 2 favorite tools for reading Linux manual pages the easy way vallor <vallor@vallor.earth> - 2025-11-13 14:46 +0000
      Re: My 2 favorite tools for reading Linux manual pages the easy way Chris Ahlstrom <OFeem1987@teleworm.us> - 2025-11-13 11:35 -0500
  Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-13 14:56 +0100
    Re: My 2 favorite tools for reading Linux manual pages the easy way vallor <vallor@vallor.earth> - 2025-11-13 14:54 +0000
      Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-13 23:14 +0100
    Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-13 20:03 +0000
      Re: My 2 favorite tools for reading Linux manual pages the easy way vallor <vallor@vallor.earth> - 2025-11-13 20:12 +0000
        Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-13 22:23 +0100
          Re: My 2 favorite tools for reading Linux manual pages the easy way not@telling.you.invalid (Computer Nerd Kev) - 2025-11-15 07:25 +1000
            Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-14 22:58 +0100
              Re: My 2 favorite tools for reading Linux manual pages the easy way ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-14 22:12 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-15 00:00 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-14 23:27 +0000
                fmpeg drift (1) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 00:29 +0100
                Re: fmpeg drift (1) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 00:39 +0000
                Re: fmpeg drift (1) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 03:00 +0100
                Re: fmpeg drift (1) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 02:33 +0000
                Re: fmpeg drift (1) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 15:03 +0100
                Re: fmpeg drift (1) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 21:25 +0000
                Re: fmpeg drift (1) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-17 12:48 +0100
                Re: fmpeg drift (1) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-18 01:00 +0000
                Re: fmpeg drift (1) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-18 07:22 +0100
                fmpeg drift (2) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 00:34 +0100
                Re: fmpeg drift (2) ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-16 13:34 +0000
                Re: fmpeg drift (2) "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 15:19 +0100
                Re: fmpeg drift (2) - solved? "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 23:56 +0100
                Re: fmpeg drift (2) - solved? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-17 00:49 +0000
                Re: fmpeg drift (2) - solved? "Carlos E.R." <robin_listas@es.invalid> - 2025-11-17 03:17 +0100
                Re: fmpeg drift (2) - solved? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-17 02:39 +0000
                Re: fmpeg drift (2) Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 21:21 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way Joerg Walther <joerg.walther@magenta.de> - 2025-11-15 09:50 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-15 22:09 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 00:00 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 00:32 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 03:01 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 02:33 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 23:09 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-16 22:41 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-16 22:45 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way Joerg Walther <joerg.walther@magenta.de> - 2025-11-16 11:32 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way "Carlos E.R." <robin_listas@es.invalid> - 2025-11-16 00:26 +0100
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-15 02:35 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-15 02:37 +0000
            Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-15 02:33 +0000
              Re: My 2 favorite tools for reading Linux manual pages the easy way not@telling.you.invalid (Computer Nerd Kev) - 2025-11-16 07:31 +1000
                Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-15 22:08 +0000
                Re: My 2 favorite tools for reading Linux manual pages the easy way not@telling.you.invalid (Computer Nerd Kev) - 2025-11-17 07:00 +1000
  Re: My 2 favorite tools for reading Linux manual pages the easy way candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2025-11-13 18:50 +0000
    Re: My 2 favorite tools for reading Linux manual pages the easy way ram@zedat.fu-berlin.de (Stefan Ram) - 2025-11-13 19:20 +0000
      Re: My 2 favorite tools for reading Linux manual pages the easy way Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-11-13 20:12 +0000
        Re: My 2 favorite tools for reading Linux manual pages the easy way Nuno Silva <nunojsilva@invalid.invalid> - 2025-11-13 23:32 +0000

csiph-web