[FFmpeg-user] Transcode video problem with h264_nvenc
barsnick at gmx.net
Wed Oct 19 14:17:52 EEST 2016
On Wed, Oct 19, 2016 at 11:46:33 +0200, Gabor Alsecz wrote:
> ffmpeg -i perspective1440.mp4 -c:v h264_nvenc -profile:v high -vf
> format=nv12 -qp 0 -f h264 - > perspective1440_out_nvenc.mp4
> So far this seems fine, the process executed, video file created. But when
> tried to play with any video player it does nothing.
Probably because you created a raw H.264 stream ("-f h264"), but put it
in a file named *.mp4. Some players will thereby certainly expect an
MP4 container (due to the extension). Smarter ones will check the
content... E.g. MPlayer copes fine in my quick tests, VLC not.
If you are intending to create an H.264 stream in an MP4 container,
either use "-f mp4 -", or just use "perspective1440_out_nvenc.mp4" as
the output file name (and no forced format), instead of '-' and piping.
> *While the ffprobe of the original input media is:*
Why are you comparing input and output (with "while")? You converted
from one to the other, so you can expect them to be different.
Especially as you told ffmpeg exactly what to make of the output (and
it did just that). ;-)
Gabor, I just noticed you are neither tellung us your expectations, not
what you think went wrong. If your expectation was for the output H.264
stream to have the colorspace nv12 (were you?), I don't know why the
conversion process tells you it is creating that, but the ffprobe of
the resulting file sees yuv420p.
P.S.: please note that "-qp 0" isn't being used, as ffmpeg is telling
you. And it's probably smarter to use "-pix_fmt" than the "format"
filter to force an output colorspace. But as I wrote, I have no idea
what you're trying to achieve, and which part of the result you don't
More information about the ffmpeg-user