Opened 5 years ago

Closed 5 years ago

#477 closed defect (needs_more_info)

Unnecessary h264 -> libx264 conversion when using copy video codec

Reported by: redirect77 Owned by: michael
Priority: minor Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm trying to multiplex video and audio stream into a single file, by using the "copy" codec for both video and audio.

The video stream is a H.264 encoded, stored in MKV file format.
The audio stream is an AAC encoded, stored in MKV file format.

The command line I'm using is:
ffmpeg.exe -y -i video.mkv -vcodec copy -i audio.mkv -acodec copy -f matroska clip.mkv

, which, according to documentation should multiplex video and audio stream into a single MKV file without re-conversion. This is indeed the case for the audio stream, however for the video stream it performs completely unnecessary h264 -> libx264 conversion.

The ffmpeg executable in question is statically built with MinGW build environment to include libx264, using the Git repository source code, downloaded on 16.09.2011.

It should be also noted, that such problem doesn't occur, when the executable is build from the 0.8.3 release source code.

Change History (4)

comment:1 Changed 5 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed

(complete, uncut output missing.)

To affect the output file (clip.mkv), -vcodec copy has to be put in front of it (like -acodec copy).
The way you use it, -vcodec copy affects the input file audio.mkv (where it has no effect):

$ ffmpeg.exe -y -i video.mkv -i audio.mkv -vcodec copy -acodec copy clip.mkv

comment:2 Changed 5 years ago by redirect77

  • Resolution invalid deleted
  • Status changed from closed to reopened

Modification of the command line to:

ffmpeg.exe -y -i video.mkv -i audio.mkv -vcodec copy -acodec copy clip.mkv

doesn't remedy the problem with binaries, compiled from Git repository source code.

Also, in 0.8.3 release code, the problem doesn't occur no matter of the sequence of the parameters - both command lines perform a multiplex without recoding as expected.

comment:3 Changed 5 years ago by cehoyos

Complete, uncut output missing.

comment:4 Changed 5 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from reopened to closed

Please re-open this ticket if you can provide complete, uncut console output of the failing command line.

Note: See TracTickets for help on using tickets.