Giter Site home page Giter Site logo

Comments (12)

nyanmisaka avatar nyanmisaka commented on July 16, 2024

Which chip are you using?

from ffmpeg-rockchip.

bjw1107 avatar bjw1107 commented on July 16, 2024

from ffmpeg-rockchip.

nyanmisaka avatar nyanmisaka commented on July 16, 2024

You can reduce the latency to a certain extent by disabling async mode in both rkrga filter and rkmpp encoder.

Add :async_depth=0 to scale_rkrga filter and -surfaces 1 to h264_rkmpp encoder.

from ffmpeg-rockchip.

bjw1107 avatar bjw1107 commented on July 16, 2024

谢谢你的回复,但是我发现还是没有并没有起到很大的效果,用vlc拉流后依然会过很长时间才显示第一帧,然后开始长时间的卡顿,之后恢复到流畅,测试了一下延迟大概在800ms左右,请问如何进一步地降低延迟以及避免一开始的卡顿现象?
hank you for your reply, but I found that it still did not have a great effect. After using vlc to pull the stream, it will still take a long time to display the first frame, and then it will start to freeze for a long time, and then it will return to smoothness. Test The delay is about 800ms. How can I further reduce the delay and avoid the initial lag?

from ffmpeg-rockchip.

nyanmisaka avatar nyanmisaka commented on July 16, 2024

Can you try this branch? https://github.com/nyanmisaka/ffmpeg-rockchip/commits/refactor-dec-logic/

from ffmpeg-rockchip.

bjw1107 avatar bjw1107 commented on July 16, 2024

再次感谢您的回复。我尝试了这个方法,这个方法对于减低延迟是有效的,它将延迟从730ms降低到了570ms。但是我又发现了一个新的问题,在长时间的运行后,它的延迟似乎在逐渐增加,在将近5分钟的运行后延迟达到了1400ms,请问有没有解决的方法?
Thanks again for your reply. I tried this method and it was effective in reducing the latency, it reduced the latency from 730ms to 570ms. But I discovered a new problem. After running for a long time, its delay seemed to be gradually increasing. After nearly 5 minutes of running, the delay reached 1400ms. Is there any solution?

from ffmpeg-rockchip.

nyanmisaka avatar nyanmisaka commented on July 16, 2024

I've run out of ideas. This branch adopts the rockchip maintainer's logic to reduce decoder latency.

1400ms sounds abnormal and may be caused by overheating of the chip and frequency reduction. Please check the temperature and use taskset -c 4-7 ffmpeg ... to bind the transcoding task to the cortex-A76 big core.

Alternatively, you can switch to gstreamer-rockchip instead and see if it helps.
https://github.com/JeffyCN/rockchip_mirrors/tree/gstreamer-rockchip

from ffmpeg-rockchip.

bjw1107 avatar bjw1107 commented on July 16, 2024

OK, I got it, I'll try again, thank you very much for your help!

from ffmpeg-rockchip.

geiliwanghaichao avatar geiliwanghaichao commented on July 16, 2024

@bjw1107 when you push and pull streaming, just try set protocol tcp mode. eg: ffmpeg -hwaccel rkmpp -hwaccel_output_format drm_prime -afbc rga -f rtsp -rtsp_transport tcp -i rtsp://xxxx/Channels/101 -c:a copy -strict -2 -c:v h264_rkmpp -rc_mode CBR -b:v 400k -f rtsp -rtsp_transport tcp rtsp://xxxx/amera1

from ffmpeg-rockchip.

bjw1107 avatar bjw1107 commented on July 16, 2024

from ffmpeg-rockchip.

geiliwanghaichao avatar geiliwanghaichao commented on July 16, 2024

@bjw1107 specifiy transmission protocol is TCP, which can alleviate lag and screen flicker issues, but whether there will be cumulative delays requires long-term testing。You can also tell me your test results

from ffmpeg-rockchip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.