-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware encoding seems to wipe off the timestamp #1564
Comments
Why you not using built-in timestamp preset? |
Oh, I didn't quite grasp it, sorry! Without the leading I tried it now, but unfortunately it doesn't seem to work this way either. Here are the two specs I have tried:
Both result in the same error:
I suspect this has to do with the same
Can that be so? |
You may have a complicated situation here. When a raw image comes in. Then timestamp is drawn on it and then everything is encoded to h264 by hardware. Probably this kind of pipeline is not supported yet. |
Gotcha! Thank you for taking your time to look into it! I ended up going full manual I suppose we can either close the issue, or turn it into a future feature request. I appreciate the hard work! |
Please show your working version. I will add support when have time. |
Of course. Not sure if it's particularly useful since I'm using h264_qsv, but nonetheless here's what makes it tick for me: streams:
living_room: "exec:ffmpeg -f v4l2 -input_format yuyv422 -framerate 5 -video_size 800x600 -i /dev/video0 -vf \"drawtext=fontfile=DroidSansMono.ttf: text='%{localtime}': x=w-tw-10: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099\" -c:v h264_qsv -f rtsp {output}" |
Thank you for the wonderful product! I've spent hours fighting ffmpeg before I was able to find a turnkey go2rtc solution.
I am however experiencing some issues while trying to replicate my setup: have both hardware accelerated encoding and add a timestamp to the video. Performance is a non-issue for me, since I am transcoding a webcam stream into H264 anyway.
I am using
go2rtc version 1.9.7 () linux/amd64
.Here's the setup that works:
Here's the setup that doesn't (note the
#hardware
thing):Changing the order to
#video=h264#hardware#raw=timestamp
doesn't seem to fix anything.I suspect this is due to the way go2rtc calls ffmpeg:
Making this ffmpeg call more verbose reveals that only the last
-vf
gets used, so that my drawing code is ignored:Is that a bug or am I doing something wrong? Please advise.
The text was updated successfully, but these errors were encountered: