Skip to content
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

Movie. ffmpeg "Thread message queue blocking" #8394

Closed
Esteban82 opened this issue Mar 5, 2024 · 1 comment
Closed

Movie. ffmpeg "Thread message queue blocking" #8394

Esteban82 opened this issue Mar 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Esteban82
Copy link
Member

Intro

I create this command to create a movie (mp4) with a frame rate of 60 and audio a file (I think that those are the key elements that causes the issue):

gmt movie main.sh -Tdistance_vs_frame.txt -Iin.sh -Sbpre.sh -Etitle.sh+d6s+fo1s -N${FIG} -Mm,png \
	-AIndianaJones_RaidersMarch.mp3+e -Cfhd -Fmp4 -Vi -D60 -K+p # -Zs

and I got the following message on the terminal:

[image2 @ 0x55e57165d400] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)

I similar issue appear to create a WEBM. In this case the files are different (with diff) but I can't see it.

Solution

In both cases, I only have to add -thread_queue_size 4096 in the ffmpeg comand to fix it. I can do it.

Doubt

My doubt is that I don't understand well what is going on, so I don't know if my solution may cause major problems later on or if there is no better solution.

I found an explanation here that it says "that your computer cannot keep up with encoding in real-time." I try the solution

This is what the ffmpeg docs say:

-thread_queue_size size (input/output)
For input, this option sets the maximum number of queued packets when reading from the file or device. With low latency / high rate live streams, packets may be discarded if they are not read in a timely manner; setting this value can force ffmpeg to use a separate input thread and read packets as soon as they arrive. By default ffmpeg only does this if multiple inputs are specified.

For output, this option specified the maximum number of packets that may be queued to each muxing thread.

So, if someone has something to say, please let me know. I will start making the PR.

@Esteban82 Esteban82 added the bug Something isn't working label Mar 5, 2024
@Esteban82 Esteban82 self-assigned this Mar 5, 2024
@Esteban82
Copy link
Member Author

Fix by #8397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant