-
Notifications
You must be signed in to change notification settings - Fork 29
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
Max bitrate dosen't work #5
Comments
[*] latest ffmpeg4.4 release compatibility [*] ffmepg6.0 async api support
Hi! |
Okay greate thanks i will test ! Is it possible to have all the parameters with the name you've configured for your codec? |
Hey @Keylost I just tried with '-rc_max_rate', '-max_rate', '-maxrate', '-maxbitrate', '-max-bitrate' and nothing works. I've tried adding '-rc', 'cbr' it doesn't change the result, would it be possible to implement a constant bitrate mode? ` stderr: libavutil 58. 2.100 / 58. 2.100 stderr: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x558ecd1ac0] Auto-inserting h264_mp4toannexb bitstream filter Durée de la vidéo : 2641.618141 stderr: Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3681 kb/s, 60 fps, 60 tbr, 15360 tbn stderr: Input #1, png_pipe, from 'images/logo.png': stderr: Stream #1:0: Video: png, rgba(pc), 4000x3001 [SAR 5669:5669 DAR 4000:3001], 25 fps, 25 tbr, 25 tbn stderr: Stream mapping: stderr: NvMMLiteOpen : Block : BlockType = 4 stderr: ===== NVMEDIA: NVENC ===== stdout: Opening in BLOCKING MODE stderr: H264: Profile = 100, Level = 51 stderr: NVMEDIA_ENC: bBlitMode is set to TRUE stderr: NvMMLiteOpen : Block : BlockType = 4 stderr: ===== NVMEDIA: NVENC ===== stdout: Got 0 size buffer in capture stderr: H264: Profile = 100, Level = 51 stderr: Output #0, flv, to 'rtmp://live.twitch.tv/app/API_key': stderr: handler_name : ISO Media file produced by Google Inc. stderr: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.02 bitrate= 135.4kbits/s speed=0.0371x stderr: frame= 17 fps= 15 q=-0.0 size= 189kB time=00:00:00.34 bitrate=4440.4kbits/s speed=0.308x my command : |
Weird, I can't reproduce this issue:( But I have an idea. The nvmpi library ignored the bufsize option. Perhaps this is the reason that the previous fix didn't help. Fixed in the last commit. Try to rebuild ffmpeg and lib.
|
vbr:
|
@Keylost
every time, I do a make uninstall and empty my folders in /var/local to be sure, then start again with a freshly compiled installation. I've also tried again with my nodejs script (which uses exec to run the ffmpeg command) and I'm sending you 2min40 of logs in the pastebin. my command :
pastebin : https://pastebin.com/5vRgRn3k Could this be due to the flv output format? I can suggest that you try your tests with my configuration on the twitch servers. Can you tell me that the problem is with the live... Because the big problem is that if I send more than 6M to Twitch my live is black screen and many lags occur on the stream. |
New tested, other paramters same results : https://pastebin.com/hcYmYjDg |
What board are you using? What version of jetpack/l4t? |
i'm using : nVidia Kit de developpment Jetson Nano 4 Go => https://www.digitec.ch/en/s1/product/nvidia-jetson-nano-4gb-development-kit-cortex-a57-development-boards-kits-24227789?supplier=406802 My version is :
With jetson I hardly ever use h264lib because my processor quickly goes up to 80-90%, with I'm around h264_nvmpi. I'm testing your command and back with logs |
I've tried your command. It seems to be fine in terms of lags on the stream, but in the logs I'm still going higher than the max authorized bitrate. here my last pastebin with your command : https://pastebin.com/svAhK9Ye Updating : Mai 31 22:48:25 tchoune-desktop node[12409]: stderr: frame=156987 fps= 60 q=-0.0 size= 2088209kB time=00:43:36.43 bitrate=6538.1kbits/s speed= 1x But for the time being, I have the impression that the log side remains fairly close to 6,500k. |
any ideas ? :) |
@YannickPerret Unfortunately, I have no new ideas at the moment. :( |
hello @Keylost
I'm trying to stream on twitch sending a 6000k bitrate (maxrate), but the codec doesn't seem to take my settings into account. I end up with a bitrate of 10'000k and twitch crashes because I send it too much bitrate.
Do you have any idea why?
logs :
● BeyondStream.service - BeyondSpeedRuns
Loaded: loaded (/etc/systemd/system/BeyondStream.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-05-25 18:59:37 CEST; 2min 30s ago
Main PID: 12147 (node)
Tasks: 48 (limit: 4181)
CGroup: /system.slice/BeyondStream.service
├─12147 /home/tchoune/.nvm/versions/node/v16.20.0/bin/node /home/tchoune/Twitch/Speedrun/server.js
└─12193 ffmpeg -nostdin -f concat -safe 0 -i concat:playlist.txt|control.txt -i images/logo.png -filter_complex [0:v]scale=1920:-1,fps=60[video]; [1:v]scale=200:-1[logo]; [video][logo]overlay=W
Mai 25 19:02:03 tchoune-desktop node[12147]: Video stderr: frame=17252 fps=120 q=-0.0 size= 280988kB time=00:04:47.64 bitrate=8002.3kbits/s speed= 2x
Mai 25 19:02:04 tchoune-desktop node[12147]: Video stderr: frame=17311 fps=120 q=-0.0 size= 282092kB time=00:04:48.57 bitrate=8007.9kbits/s speed= 2x
Mai 25 19:02:04 tchoune-desktop node[12147]: Video stderr: frame=17370 fps=120 q=-0.0 size= 283079kB time=00:04:49.50 bitrate=8010.1kbits/s speed= 2x
Mai 25 19:02:05 tchoune-desktop node[12147]: Video stderr: frame=17435 fps=120 q=-0.0 size= 284108kB time=00:04:50.56 bitrate=8009.9kbits/s speed= 2x
Mai 25 19:02:05 tchoune-desktop node[12147]: Video stderr: frame=17499 fps=120 q=-0.0 size= 285082kB time=00:04:51.63 bitrate=8008.0kbits/s speed= 2x
Mai 25 19:02:06 tchoune-desktop node[12147]: Video stderr: frame=17555 fps=120 q=-0.0 size= 286108kB time=00:04:52.56 bitrate=8011.1kbits/s speed= 2x
Mai 25 19:02:06 tchoune-desktop node[12147]: Video stderr: frame=17611 fps=120 q=-0.0 size= 287427kB time=00:04:53.50 bitrate=8022.5kbits/s speed= 2x
Mai 25 19:02:07 tchoune-desktop node[12147]: Video stderr: frame=17671 fps=120 q=-0.0 size= 288588kB time=00:04:54.61 bitrate=8024.4kbits/s speed= 2x
Mai 25 19:02:07 tchoune-desktop node[12147]: Video stderr: frame=17737 fps=120 q=-0.0 size= 289672kB time=00:04:55.60 bitrate=8027.7kbits/s speed= 2x
Mai 25 19:02:08 tchoune-desktop node[12147]: Video stderr: frame=17803 fps=120 q=-0.0 size= 290722kB time=00:04:56.70 bitrate=8026.9kbits/s speed= 2x
my command :
js ffmpegVideo = spawn('ffmpeg', [ '-nostdin', '-f', 'concat', '-safe', '0', '-i', 'concat:playlist.txt|control.txt', '-i', 'images/logo.png', '-filter_complex', '[0:v]scale=1920:-1,fps=60[video]; [1:v]scale=200:-1[logo]; [video][logo]overlay=W-w-5:5[main]; [main]drawtext=fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf:textfile=runne$ '-s', '1920x1080', '-c:v', 'h264_nvmpi', '-pix_fmt', 'yuv420p', '-r', '60', '-g','60', '-b:v', '6000k', '-minrate', '5000k', '-maxrate', '6000k', '-bufsize', '6000k', '-keyint_min', '60', '-preset', 'slow', '-rc', 'vbr', '-acodec', 'aac', '-ac', '2', '-f', 'flv', ]);
The text was updated successfully, but these errors were encountered: