[FFmpeg-user] transcode/convert /copy

Gyan ffmpeg at gyani.pro
Mon Mar 4 06:41:13 EET 2019



On 04-03-2019 03:32 AM, Ron Barnes wrote:
> Hello all,
>
> I am transcoding a movie to h.265 and converting the 1st audio stream to MP3.  My question is this, is there a way to convert the 1st audio stream to MP3 AND THEN copy the exact same audio stream as it was originally encoded?
> My goal is to have two copies, one of them as original and one of them as MP3.
>
> Please see my script below..
>
>
> ffmpeg -i "INPUT.mkv" -c:v libx265 -analyzeduration 6000M -probesize 6000M -preset medium -map 0 -c:s copy -c:a:0 libmp3lame -b:a:0 128k -reserve_index_space 2500k -crf 23 -pix_fmt yuv420p -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -color_range tv -ac 2 -metadata title="SOMETHING" OUTPUT.mkv
>

Use

     ffmpeg -analyzeduration 6000M -probesize 6000M -i "INPUT.mkv" -map 0:v -map 0:a:0 -map 0:a -map 0:s? -map 0:d?
  -c:v libx265 -preset medium -crf 23 -pix_fmt yuv420p -color_primaries bt2020 -color_trc smpte2084 -colorspace bt2020nc -color_range tv
  -ac:a:0 2 -c:a copy -c:a:0 libmp3lame -b:a:0 128k -c:s copy -reserve_index_space 2500k -metadata title="SOMETHING" OUTPUT.mkv

Gyan



More information about the ffmpeg-user mailing list