0

I'm trying to get rid of the 1st of two audio tracks in an mp4 file. But each time I run:

ffmpeg -i test.mp4 -map 0:0 -map 0:2 -acodec copy -vcodec copy new_file.mp4

ffmpeg seems to reencode the file. The output says:

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mp4':
  Duration: 01:01:37.25, start: 0.-83411, bitrate: 4086 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 1280x720, 23.98 tbr, 90k tbn, 180k tbc
    Stream #0.1(deu): Audio: aac, 48000 Hz, 5.1, s16
    Stream #0.2(eng): Audio: aac, 48000 Hz, 5.1, s16
    Stream #0.3(und): Subtitle: text / 0x74786574
File 'new_file2.mp4' already exists. Overwrite ? [y/N] y
Output #0, mp4, to 'new_file2.mp4':
    Stream #0.0(und): Video: 0x0000, yuv420p, 1280x720, q=2-31, 90k tbn, 90k tbc
    Stream #0.1(eng): Audio: 0x0000, 48000 Hz, 5.1, s16
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.2 -> #0.1
Press [q] to stop encoding
frame=33700 fps=944 q=-1.0 size=  583098kB time=1405.53 bitrate=3398.5kbits/s 

And this process takes quite some time, that's why I think it reencodes instead of copying. Any idea why this is? Maybe the different frame rate between container and codec? Thanks!

2
  • 1
    Upgrade ffmpeg first. Your version is at least 7 years old.
    – Gyan
    Commented May 11, 2019 at 15:31
  • Will try, I’m running on a PowerPC architecture tho. Commented May 11, 2019 at 15:33

1 Answer 1

1

The first line of the output you provided explains the problem:

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 23.98 (24000/1001)

and then the last three values in the 4th line tell about it in detail:

    Stream #0.0(und): Video: h264, yuv420p, 1280x720, 23.98 tbr, 90k tbn, 180k tbc

which mean, in words:

  • I guess the frame rate 23.98 fps from the input video stream.
  • The time base in the input container is set to (1/90000) seconds.
  • The time base in its video stream is set to (1/180000) seconds.

Now, return to the the first line of your output, after the semicolon:

180000.00 (180000/1) -> 23.98 (24000/1001)

It means: Your stream's framerate is 180,000 frames per second, but I will convert it to 23.98 fps.

The same is in the mentioned 4th line, in the form 23.98 tbr. It's the FFmpeg's guessed value.

So you are right, the conversion occurs, for both selected streams (video and audio one). You may see it from other lines of your output:

Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.2 -> #0.1
Press [q] to stop encoding

because in the case of copying them it would be as these:

Stream mapping:
  Stream #0.0 -> #0.0 (copy)
  Stream #0.2 -> #0.1 (copy)
Press [q] to stop

The conclusion:

Your command is correct, but your input file is damaged.

You may convince yourself about it by applying the same command to other, correct input file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.