CodecPrivateData is empty when h264_vaapi encoder used
I am trying to use new CPU with VA-API enabled h264 encoder on FFmpeg (ffmpeg version n3.2.4-4-g36fff6c). I have no issues encoding "offline" files with h264_vaapi encoder, but when I try to encode live streams and push output to SmoothStream server (using ISMV muxer) new streams do not work. Exactly same configuration works fine with libx264 encoder. So far I figured that after libx264 encoder ffmpeg correctly sets "CodecPrivateData" field data but h264_vaapi sends empty data field. Old command line (works fine): ffmpeg -y -i "udp://235.1.1.136:392" -g 30 -r ntsc -movflags isml+frag_keyframe -sc_threshold 0 -c:v libx264 -c:a aac -ac 2 -b:a 128k -b:v 3072k -f ismv "http://10.100.1.14/testenc1.isml/Streams(testenc1)" New command line (encoding works, but streams do not play): ffmpeg -y -vaapi_device /dev/dri/renderD128 -i "udp://235.1.1.136:392" -vf 'format=nv12,hwupload' -g 30 -r ntsc -movflags isml+frag_keyframe -sc_threshold 0 -c:v h264_vaapi -c:a aac -ac 2 -b:a 128k -b:v 3072k -f ismv "http://10.100.1.14/testenc1.isml/Streams(testenc1)" -- View this message in context: http://www.ffmpeg-archive.org/CodecPrivateData-is-empty-when-h264-vaapi-enco... Sent from the FFmpeg-users mailing list archive at Nabble.com.
I forgot to add: "CodecPrivateData" attribute is "required" for SmoothStream according to MS document: https://msdn.microsoft.com/en-us/library/ff728116%28v=vs.95%29.aspx -- View this message in context: http://www.ffmpeg-archive.org/CodecPrivateData-is-empty-when-h264-vaapi-enco... Sent from the FFmpeg-users mailing list archive at Nabble.com.
On 28/02/17 17:25, w_boba wrote:
I forgot to add: "CodecPrivateData" attribute is "required" for SmoothStream according to MS document:
https://msdn.microsoft.com/en-us/library/ff728116%28v=vs.95%29.aspx
I'm not familiar with this format at all, but it looks like it will be generating that field from the stream extradata? Try applying <http://git.videolan.org/?p=ffmpeg.git;a=commit;h=51020adcecf4004c1586a708d96acc6cbddd050a>, or try with any version after that change. - Mark
Mark, As I have mentioned in my first post, I am working with ffmpeg version n3.2.4-4-g36fff6c, which is near-current, and commit you have mentioned is dated Dec 2016. I believe that commit is already included in my branch, last commit I see there is dated Feb 2017. W. -- View this message in context: http://www.ffmpeg-archive.org/CodecPrivateData-is-empty-when-h264-vaapi-enco... Sent from the FFmpeg-users mailing list archive at Nabble.com.
On 28/02/17 18:52, w_boba wrote:
Mark,
As I have mentioned in my first post, I am working with ffmpeg version n3.2.4-4-g36fff6c, which is near-current, and commit you have mentioned is dated Dec 2016. I believe that commit is already included in my branch, last commit I see there is dated Feb 2017.
W.
You believe incorrectly: the branchpoint was before the commit in question. $ git log HEAD | grep 51020ad commit 51020adcecf4004c1586a708d96acc6cbddd050a $ git log 36fff6c | grep 51020ad $
Thank you, Mark! I am not very familiar with GIT. I have just rebuilt FFmpeg from master and now everything is fine. W. -- View this message in context: http://www.ffmpeg-archive.org/CodecPrivateData-is-empty-when-h264-vaapi-enco... Sent from the FFmpeg-users mailing list archive at Nabble.com.
Am 28.02.2017 um 20:20 schrieb w_boba:
Thank you, Mark!
I am not very familiar with GIT.
I have just rebuilt FFmpeg from master and now everything is fine
next time just go to https://ffmpeg.org/releases/ and scroll at the bottom, you can even download https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 blindly
Thank you, Reindl I know about snapshots, I tend to stick to "latest stable" branch, which is 3.2.4-4 at the moment. -- View this message in context: http://www.ffmpeg-archive.org/CodecPrivateData-is-empty-when-h264-vaapi-enco... Sent from the FFmpeg-users mailing list archive at Nabble.com.
Am 28.02.2017 um 20:32 schrieb w_boba:
I know about snapshots, I tend to stick to "latest stable" branch, which is 3.2.4-4 at the moment
there is no "3.2.4-4" there is only "3.2.4" and while i am normally not a friend of the "only latest git supported"-attitude if you need to solve a problem and it don#t go away while you are already talking about specific commits (and talking abotu what you believe is there or not) the only thing you have to use is that snapshot really nobody cares about a distro binary blob with unknown build envirnoments
2017-02-28 20:32 GMT+01:00 w_boba <w_boba@hotmail.com>:
I know about snapshots, I tend to stick to "latest stable" branch, which is 3.2.4-4 at the moment.
Please be assured that there is nothing "stable" about our release branches and - fortunately for you - nothing "unstable" about current FFmpeg git head. Note that your version is over four months old. Please do not top-post here, Carl Eugen
participants (4)
-
Carl Eugen Hoyos -
Mark Thompson -
Reindl Harald -
w_boba