intel hd4000 h264 encoding with vaapi for quicktime - yuv420p possible?
Hi there, I have an old powerpc mac that can play h264 mp4 files, but they seem to need to be in yuv420p pixel format so as not to get a black screen. I can encode them successfully on my linux laptop with libx264 cpu encoding and -pix_fmt yuv420p option. The cpu is ivybridge, so the gpu can do h264 encode and decode which plays fine in vlc on linux, but not in quicktime on the old imac. My question is: is there a set of options so that the hardware accelerated ffmpeg encoding/decoding/both can output a mp4 file with yuv420p pixel format that is compatible with the quicktime standards? So far, I haven't been able to find one from here: https://trac.ffmpeg.org/wiki/Hardware/VAAPI To get hardware encoding to work I seem to need to use this option with the h264_vaapi encoder: -vf 'hwupload,format=nv12' which seems to be causing the problem. I can't specify the same -pix_fmt option as I can with libx264, because it just doesn't work.
Am Do., 27. Feb. 2020 um 16:08 Uhr schrieb Kevin Smallman <pipeline79@gmail.com>:
I can encode them successfully on my linux laptop with libx264 cpu encoding and -pix_fmt yuv420p option. The cpu is ivybridge, so the gpu can do h264 encode and decode which plays fine in vlc on linux, but not in quicktime on the old imac.
The reason is possibly that you have to avoid cabac etc., try with -profile baseline (which does not force the baseline profile that no decoder supports but the required constrained baseline profile).
My question is: is there a set of options so that the hardware accelerated ffmpeg encoding/decoding/both can output a mp4 file with yuv420p pixel format that is compatible with the quicktime standards?
So far, I haven't been able to find one from here: https://trac.ffmpeg.org/wiki/Hardware/VAAPI
To get hardware encoding to work I seem to need to use this option with the h264_vaapi encoder: -vf 'hwupload,format=nv12'
Unrelated to your quicktime issue: The result of this encode will be a file with yuv420p (there is no semantic difference between nv12 and yuv420p). Carl Eugen
Thanks Carl, OK wil try that. On Thu, 27 Feb 2020 at 15:24, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
Am Do., 27. Feb. 2020 um 16:08 Uhr schrieb Kevin Smallman <pipeline79@gmail.com>:
I can encode them successfully on my linux laptop with libx264 cpu encoding and -pix_fmt yuv420p option. The cpu is ivybridge, so the gpu can do h264 encode and decode which plays fine in vlc on linux, but not in quicktime on the old imac.
The reason is possibly that you have to avoid cabac etc., try with -profile baseline (which does not force the baseline profile that no decoder supports but the required constrained baseline profile).
My question is: is there a set of options so that the hardware accelerated ffmpeg encoding/decoding/both can output a mp4 file with yuv420p pixel format that is compatible with the quicktime standards?
So far, I haven't been able to find one from here: https://trac.ffmpeg.org/wiki/Hardware/VAAPI
To get hardware encoding to work I seem to need to use this option with the h264_vaapi encoder: -vf 'hwupload,format=nv12'
Unrelated to your quicktime issue: The result of this encode will be a file with yuv420p (there is no semantic difference between nv12 and yuv420p).
Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Doesn't seem to work: $ ffmpeg -vaapi_device /dev/dri/renderD128 -i RFK\ Storyville\ 2-90_lf21B-KI.mp4 \
-vf 'hwupload,fps=25,scale_vaapi=w=640:h=360:format=nv12' \ -c:v h264_vaapi -profile:v baseline -level:v 3.0 -aspect 16:9 \ -c:a aac -b:a 128k -ac 2 -f mp4 \ RFK\ Storyville\ 2-90_lf21B-KI.360p.mp4
Gives these errors: [h264_vaapi @ 0x18e75c0] [Eval @ 0x7ffcb0770250] Undefined constant or missing '(' in 'baseline' [h264_vaapi @ 0x18e75c0] Unable to parse option value "baseline" [h264_vaapi @ 0x18e75c0] Error setting option profile to value baseline. Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_vaapi)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height using -profile:v 578 instead will encode, but the output is still unplayable in Quicktime/Frontrow on the PowerPC mac. Well, you can hear the sound, but the video is a green screen. Videos downloaded directly from youtube to mp4s with youtube-dl will play, but this one I wanted to transcode because the aspect was all screwed up. Perhaps if I just change the -aspect and don't transcode... On Thu, 27 Feb 2020 at 18:37, Kevin Smallman <pipeline79@gmail.com> wrote:
Thanks Carl,
OK wil try that.
On Thu, 27 Feb 2020 at 15:24, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
Am Do., 27. Feb. 2020 um 16:08 Uhr schrieb Kevin Smallman <pipeline79@gmail.com>:
I can encode them successfully on my linux laptop with libx264 cpu encoding and -pix_fmt yuv420p option. The cpu is ivybridge, so the gpu can do h264 encode and decode which plays fine in vlc on linux, but not in quicktime on the old imac.
The reason is possibly that you have to avoid cabac etc., try with -profile baseline (which does not force the baseline profile that no decoder supports but the required constrained baseline profile).
My question is: is there a set of options so that the hardware accelerated ffmpeg encoding/decoding/both can output a mp4 file with yuv420p pixel format that is compatible with the quicktime standards?
So far, I haven't been able to find one from here: https://trac.ffmpeg.org/wiki/Hardware/VAAPI
To get hardware encoding to work I seem to need to use this option with the h264_vaapi encoder: -vf 'hwupload,format=nv12'
Unrelated to your quicktime issue: The result of this encode will be a file with yuv420p (there is no semantic difference between nv12 and yuv420p).
Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (2)
-
Carl Eugen Hoyos -
Kevin Smallman