-
Notifications
You must be signed in to change notification settings - Fork 97
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
For some reason, Ubuntu no longer switches threads for me... #44
Comments
Hey thanks for the bug report. What version of OF and Ubuntu are you on? Are you using the latest master branch of ofxVideoRecorder or an older release? |
Hey, thanks for the reply Also, I apologise for being ambiguous before: when I said "without changing code", I meant not changing OF versions or getting new versions of ofxVideoRecorder! The bug was introduced somewhere between 14.10 and 15.04, when I decided to revisit some old code. Since I had just done a rewrite of my own code, and Right now I'm on the latest stable versions of both: OpenFrameworks 9.3 and Ubuntu 16.04; I hoped that this might have been fixed in the newer versions, but it's still mysteriously broken. I'm kind of wondering if this isn't an Ubuntu threading bug, but I wouldn't know how to check for that. I could dual-boot into windows, see if the code works there, but that's quite a big hassle just to set this up.. edit: oh, windows isn't supported anyway :P |
I have not yet upgraded to 16.04 but I plan to do so soon. I will run some tests once I upgrade and see what I can find. |
What version are you on? I could try running it off a USB stick and see if my program miraculously starts working again. |
I'm on ubuntu 15.04 LTS. I have noticed that sometimes ffmpeg will wait a few seconds before it starts doing anything, so if your videos are very short then it may not have had time to start encoding. |
Ok, I'll see if I can find a spare USB stick and run the program from that. And I doubt that's the issue: the movies are very long. Or at least, the process to encode them takes very long, because I'm loading in 4GB worth of full HD frames into an array and then encode images extracted from the generated volume. It's the kind of thing where it easily takes a few hours to render a movie of only a few minutes (this is actually why I need a direct export to video; exporting to PNG or even JPG and converting those to a movie afterworks would require more hard drive space than I have available, not to mention that it would take so much more time it wouldn't be possible to do this). |
I am getting exactly the same output on Ubuntu 16.04, the video files end up being something like 200 bytes. |
I have since upgraded to 16.04 and I have tested the current HEAD with 0.9.4, and I have not seen this issue yet. It could have something to do with the version of ffmpeg as well. |
The funny thing is that it worked for me on an upgraded 16.04, but not on a
clean 16.04 installation.
|
I tried on Ubuntu 14.04 (same computer, clean install) but I had to install ffmpeg from the PPA as 14.04 has no native ffmpeg in the repo. I got the same problem there though, I guess it's an ffmpeg version issue. |
Here is the complete output of the application using Ubuntu 16.04, ffmpeg 3.2.2
|
Ok, a new year, a new attempt. Still not working. I used SimpleScreenRecorder to capture the screencast, maybe it shows you more useful information that I would miss: https://www.youtube.com/watch?v=Ho4TISFpo14 Could this be a bug in Poco on certain versions of Ubuntu specifically? |
So to test the hypothesis if the cause if ffmpeg, I downloaded This has to be a threading bug, somehow; ffmpeg consistently starts the moment the pipes are closed! The question is if the cause of this bug is inside ofxVideoRecorder, openFrameworks or Ubuntu @timscaffidi, if it's alright with you, I'd like to open a topic about this on the OF forums. Maybe others who are more familiar with |
@JobLeonard just tested again on ubuntu 16.04, OF 0.9.8, and ffmpeg 2.8.11. Again it works as expected for me, so I am at a loss. Feel free to post on the forums about this because I am not sure how else to troubleshoot at this point.
|
I get the same issue with ubuntu 16.04, oF 0.9.8, ffmpeg 3.2 |
Oh, I never mentioned this here, I'm sorry, but I got it to "work" if I turned the audio off. That is, requested a videostream only Now that I think about it, didn't Ubuntu switch from ALSA to PulseAudio? Could that be related? |
thanks for the reply @JobLeonard ! |
Did it also fix your problem? Because then we can safely point to the audio as the culprit somehow |
If I had to guess, the reason that turning off audio works is because there is then only a single pipe into the ffmpeg process. If you open both audio and video pipes, ffmpeg will only read from the audio pipe if sufficient video frames have been read, and vice-versa. Thus, there must be some reason why ffmpeg cannot read from one of the pipes and is stuck waiting for more data. I have seen cases where the maximum amount of memory allocated to a FIFO pipe at the system level is too low can cause odd behavior such as this. I don't have the time to properly look into this issue at the moment but maybe this can point some one in the right direction. |
Would muting the mic affect it? |
Basically, the addon used to work perfectly, then it suddenly stopped working (without me changing any code anywhere). Now, ffmpeg no longer starts to encode until after I try to close the program, so all my files end up being empty. This is the output of compiling and running the
ofxVideoRecorderExample
code:The text was updated successfully, but these errors were encountered: