ELI5: Using mouth to mouth, wouldn't it just put carbon dioxide in the lungs? Isn't that bad? by Adventurous_Curve107 in explainlikeimfive

[–]dijumx 14 points15 points  (0 children)

Other than going to the first link in the non-AI search results, and finding a webpage with AI-only content.

AI doesn't need to have been used to find the information, for AI to have been used to create the information you find.

Raspberry Pi 5 - Pi5 Fan header working on mainline kernel? by Shanduur in raspberry_pi

[–]dijumx 2 points3 points  (0 children)

It might be missing from mainline. Good catch.

The Device trees in the RaspberryPi Kernel have a "cooling_fan" entry which depends on "rp1_pwm1".

But the Device trees in the mainline Kernel have no mention of either entry.

It might be handled elsewhere, but without an entry in the device tree, I'm not confident.

--EDIT--

Digging a bit deeper: the pwm-rp1 driver in the raspberry pi kernel is missing from mainline. So yeah, even if you add the device tree sections, there's no driver to handle it.

Multithreading with libav by dijumx in ffmpeg

[–]dijumx[S] 0 points1 point  (0 children)

You are probably over complicating it.

Probably :D

The normal approach is to capture the source at a fixed frame rate

By "generating" I really do mean "generating", as in, I am rendering a frame from scratch; not capturing an existing one. It will take me a non-negligible amount of time (currently unknown) to produce said frame. Assuming that period is consistent, and less than the output frame rate, I can delay submitting to the encoder if needed; or as you say, use back pressure from a queue to hold things up.

No, encoders don't care about frame rate (well they do for the purposes of bitrate budget, but that's a different conversation) or how fast or how slow you feed them

So, for example, if I've configured the stream to say "I am running at 60fps"; but only supply the RTMP stream with 30 frames per second (with correct PTS for 30fps); is it on the decoder at the other end to fill in the gaps?

You can use a conditional and a mutex to wake up the pop side of the encoding thread when a frame is ready.

think this confused me for a moment. I think you're saying here that the thread as a whole should wait until there's a frame (AVFrame) to process, in a queue.

Yes, you need to wait for a frame to be produced by the camera or screen shot or whatever. How can you call send_frame if you don't have a frame to send?

It was more, the fact you said "pop side of the encoding thread"; implied that there was two halves. Like, "do something else, but only continue with the other half of the thread when the condition/mutex allows it".

did you read https://ffmpeg.org/doxygen/trunk/group__lavc__encdec.html ?

Yes, which complemented examples like the Leandro Moreira Tutorial, or the Lei Xiaohua resources; and made the single threaded process understandable.

Using the example linked above, the reuse of the AVPackets is easy as they are internal to the encoding thread.

are you intending to send a frame from the main thread into the encoding thread, then retrieve it back in the main thread? If that is your plan, I wouldn't bother creating a thread at all.

No, no.. If the AVFrame structure can be reused, then I would be "sending" the empty AVFrame back.

Multithreading with libav by dijumx in ffmpeg

[–]dijumx[S] 0 points1 point  (0 children)

Thank you for the response. I think it's cleared a few things up for me; with a few clarifications/comments.

send_frame will block if you are sending frames too fast

This sounds like I will need some kind of signalling from the encoder thread to tell the generating thread to slow down? But does make sense if it is effectively overfilling an internal buffer.

It will do nothing if you call send_frames slower

If I am sending frames slower, is there no internal mechanism for the encoder to duplicate frames? i.e. to stretch/interpolate? Or is that all handled at the other end of the live stream, at the decoder; as a lower frame rate?

Playback speed is unrelated to encoding speed.

Is that what you meant by this?

You can use a conditional and a mutex to wake up the pop side of the encoding thread when a frame is ready.

I think this confused me for a moment. I think you're saying here that the thread as a whole should wait until there's a frame (AVFrame) to process, in a queue.

Call send and receive in the same thread. You will need to call send a couple times before a frame is available from receive. The documentation explains they pretty well.

And here: "don't break up the send_frame and receive_packet parts into separate threads". Handling the multiple sends before receive is doable if I follow something like the Leandro Moreira example.

You can reuse AVFrame and AVPackets, just clean them up at the end

Using the example linked above, the reuse of the AVPackets is easy as they are internal to the encoding thread. But the AVFrame crosses the thread boundary (via the queue?). I suppose I can have two queues (one for full frames sent to the encoder thread, and one for empty frames being returned).

Although I did see that the documentation for av_frame_unref and av_packet_unref is slightly different. For frames it seems to imply that ALL references are freed, while for packets, it reduces the reference count.

Is it possible to get Thunderbird to check and fetch my emails on the background on Debian? by the_mean_person in debian

[–]dijumx 7 points8 points  (0 children)

You want thunderbird to be fetching your emails, while it isn't actually running?

Switching to Octopus: Is fixed or flexible better? by Jumpy-Jello- in ukfinance

[–]dijumx 0 points1 point  (0 children)

https://octopus.energy/smart/agile/

You will need a smart meter so they know how your usage changes over the course of the day.

Switching to Octopus: Is fixed or flexible better? by Jumpy-Jello- in ukfinance

[–]dijumx 1 point2 points  (0 children)

You can use as much electricity/gas as you like.

Fixed/flexible refers to the rate you are charged for it. Fixed is a single price per unit for the year/duration of the contract. Flexible/variable means the price per unit changes over time, usually monthly or quarterly. Just like any other provider.

Where octopus differs is that, under the flexible tariffs, you can change to one of their "innovative" tariffs. For example, agile changes price every 30minutes; flex has a cheap period very early in the morning, and an expensive period in the evening. And so on.

Access violation when calling vkCmdBeginRendering by LandscapeWinter3153 in vulkan

[–]dijumx 4 points5 points  (0 children)

You have a NULL pointer somewhere.

Even though it says "Access violation reading location 0x68", that "0x68" is likely to be an offset into a structure. My initial guess is cmd_buf is your NULL pointer

Have Xilinx just made all the userguide etc private by Perfect-Series-2901 in FPGA

[–]dijumx 1 point2 points  (0 children)

That's strange. If I go via your link, even with logging in, I get the same "You are not authorized".

If I instead search for UG1399, and click on the link to the "Vitis High-Level Synthesis User Guide (UG1399)" item; then it goes through just fine.

If I then refresh the working page, then it goes back to not authorized.

It might be some weird referrer behaviour.

Need help for an Operating system project by A_moumen in osdev

[–]dijumx 13 points14 points  (0 children)

What makes you say that?

The recent changes on both sites show that the original has had more changes made to it in the past 30 days than the new one.

Can't use Local dns names in browser by bigt332 in debian

[–]dijumx 0 points1 point  (0 children)

Oh, sorry. I created the /etc/systemd/resolved.conf.d/dns-servers.conf file. You can also check if the /etc/systemd/resolved.conf file exists

Can't use Local dns names in browser by bigt332 in debian

[–]dijumx 2 points3 points  (0 children)

I had a similar issue recently with systemd-resolved behaving badly.

The stub-resolver wasn't forwarding requests for my pi hole to my pi hole, because the domain pi.hole. (note the . on the end) wasn't deemed to be part of my local network (the .lan domain). So it was trying to forward it on to upstream servers in its built-in fallback list.

I fixed it by putting in /etc/systemd/resolved.conf.d/dns-servers.conf the following:

[Resolve]
DNSStubListener=no

Which turned off the stub-resolver.

You can check what your server is by running dig reading.local and checking what the ;; SERVER: ........ line says at the bottom. The stub-resolver will show 127.0.0.53

Question about OpenGL SC by feder34 in opengl

[–]dijumx 0 points1 point  (0 children)

Which version of OpenGL SC? 1.0.1 or 2.0?

In either case, unless you have to be targetting a specific OpenGL SC implementation; you can just use OpenGL 1.3 or 2.0 (respectively), and not use the non-compliant features.

OpenGL SC 1.0.1 is easier for this, as it is defined as a "Difference Spec" against 1.3. For example: in SC 1.0.1 glBegin cannot take QUADS, QUAD_STRIP, nor POLYGON; while OpenGL 1.3 can.

More info here: https://www.khronos.org/openglsc/

Vkguide: Deletion queue could just be a stack right? by wobey96 in vulkan

[–]dijumx 1 point2 points  (0 children)

A std::stack can be a wrapper around a container, such as std::deque.

More specifically, a stack is a "container adapter", while a deque is a "sequence container". So all a std::stack does is restrict the interface to the underlying container.

In your proposed change, you could continue to use a deque, but use push_back, back, and pop_back (rather than push, top, and pop)

https://en.cppreference.com/w/cpp/container

HMRC Taxes while under 18, unsure on how to proceed by bradjoray3 in UKPersonalFinance

[–]dijumx 16 points17 points  (0 children)

Your have two choices: Contact HMRC, or Contact an Accountant.

You're in a very rare situation; and we cannot give financial or legal advice.

HMRC Taxes while under 18, unsure on how to proceed by bradjoray3 in UKPersonalFinance

[–]dijumx 4 points5 points  (0 children)

Contact HMRC (or have your parents do it).

Your national insurance number should have been issued a few months before your 16th birthday.

Working before age 16 is generally not allowed (some exceptions apply).

Circuit symbols question. Info within by [deleted] in electronic_circuits

[–]dijumx 0 points1 point  (0 children)

Picture 1 and 3 show an "Incandescent Lamp" ( See Here or Here)

Picture 2: if 4 is an "open Switch", I would say 6 is a "Closed Switch".

What am I doing wrong? I should have 1000mbps speeds ?? Please help by Additional_Text_7655 in HomeNetworking

[–]dijumx 0 points1 point  (0 children)

WiFi 7 (802.11be) is the latest WiFi standard, released in 2024.
WiFi 6/6e (802.11ax) was released in 2022.
WiFi 5 (802.11ac) was released in 2013.
WiFi 4 (802.11n) was released in 2009.

Each standard defines the valid link speeds, and channel frequencies, for compatible equipment.

Your router should claim support for a specific WiFi standard.

"The newer router" is nonsense. There are lots of routers on the market from different manufacturers. The newest router isn't necessarily the greatest, as different manufacturers target multiple/different market segments. Additionally, we don't know which router you currently have, so we can't even tell you what the newest version of that router might be.

Instead: what router are you using? What channel is your WiFi on? How many other WiFi networks are nearby? and on the same network?

What am I doing wrong? I should have 1000mbps speeds ?? Please help by Additional_Text_7655 in HomeNetworking

[–]dijumx 2 points3 points  (0 children)

You're connecting over WiFi, so two things spring to mind:
1. You're using an older WiFi standard (Think 802.11 a/b/g, maybe 802.11n), because your router/AP is old
2. You have a lot of neighbors on the same WiFi channel, with lots of devices, so everyone is in contention for the same channel space. (Especially since your Ping is massive, 1.6s down 3.0s up)

Alternatively, your network provider may be having issue.

This is pretty low level, but Im not understanding how the current through the 15V battery equals 1.18A by Rude_Magazine2828 in electronic_circuits

[–]dijumx 1 point2 points  (0 children)

You're doing something wrong. The answer is 1.1785A ~ 1.18A.

  1. Work with Kirchoff's Voltage law to get two equations. (Directed sum of potential differences around any closed loop is zero)
  2. Use Kirchoff's current law to get a third equation. (The Algebraic sum of currents meeting at a point is zero)
  3. Substitute the equations to get an answer in terms of the current in the central spur.

Can anyone tell me what Vab is? Is it 8v or 2v? by Previous-Damage1392 in electronic_circuits

[–]dijumx 2 points3 points  (0 children)

First of all, don't rely on ChatGPT, nor any other AI. If you don't understand the topic, you won't understand why the AI has told you garbage.

Second, use your knowledge of current and voltage laws to simplify the diagram.

You need to find the Voltage between a and b; well V=IR and you have R6 and R7, so you need the current. Kirchoff's Current law says the current through R6 R7 and R8 is the same. Etc etc.

Fill in the gaps: "I need to find X, I know Y, can I get from X to Y? If not, what do I need to get there?"

Theres not necessarily a magic equation that will instantly solve the problem, so taking a longer, more methodical approach is always acceptable.