[FFmpeg-user] Reencoding video from image sequence doesn't work (sometimes)

Moritz Barsnick barsnick at gmx.net
Fri Jan 19 22:31:48 EET 2018


On Thu, Jan 18, 2018 at 13:27:47 -0800, DopeLabs wrote:
> just with a quick glance.. -c copy means stream copy.. as in not to re-encode.. you should use -c copy OR -vcodec h264(-c:v h264), not both...

That's not true. As you can see from serialhex's command line and
output:

> > D:\programmin\Projects\reencode> .\ffmpeg.exe -y -framerate 28752/1499 -f image2 -i ".\inp-full-20s.mkv\seq-%09d.png" -i "full-20s.mkv" -map 0:v -map 1 -map -1:v -c copy -vcodec h264 -pix_fmt yuv420p out.mkv
[...]
> > Stream mapping:
> >  Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
> >  Stream #1:1 -> #0:1 (copy)
> >  Stream #1:2 -> #0:2 (copy)
> >  Stream #1:3 -> #0:3 (copy)

it works just fine. The documentation says:

"For each stream, the last matching c option is applied, [...]"

Which is really quite practical, if you want to e.g. reencode only one
of many streams, and copy the rest.

Cheers,
Moritz


More information about the ffmpeg-user mailing list