-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
gstreamer 1.20.0 breaks video on Linux #6871
Comments
Additional information: My computer runs an AMD iGPU and an NVIDIA eGPU. My second computer, which only has an intel iGPU, shows the same behavior: works perfectly fine before upgrade, no joy after. |
I downgraded now to 1.18, and all is well. Of course, this is not good still, as it effectively locks my computer to a specific point in time, excluding any updates until this works. I am very inexperienced with c++ in general, but if somebody could point me in the right direction I might take a stab at working on a fix? |
Starting to look into this a bit more now... How can I set the path to the gstreamer binary that oF looks for? I am thinking of keeping a separate build of gstreamer 0.18 on my system, so that I can use this for my oF projects. Processing has released a new version of the video library that bundles the old version, and this works on my system. |
I can confirm this problem. It works on Debian 11 Stable with GStreamer 1.18 I get the following error in case 2:
I will try to get more information on the error. |
Thanks for confirming! I was starting to wonder if I am the only one with a 1.20 problem :-) For what it's worth, I wrote a guide on how to revert to 1.18 on Arch Linux. Not exactly recommended practices, though... https://roosnaflak.com/tech-and-research/restoring-gstreamer-to-1-18-on-arch-linux/ |
Thank you for the link @kflak! I will check it out. I tried to debug the issue, using the videoGrabberExample program. ofApp.cpp: which calls
(in ofGstutils.c line1076) This function seems to work, but when it returns (line 1164) my program seg faults. |
Unfortunately I am not able to do a debug anymore, since I am back on 1.18, however I never got a segfault. In my case the plugin was simply disabled, and I got a gray screen instead of video. The program kept running, which makes me a bit suspicious if we are dealing with the same bug...? |
Good question, @kflak! In the OF forums there is a similar report (to mine, with the seg fault): |
Last try: I am now on GStreamer 1.20.1, and using the OF nightly build from 4th of April. Still a seg fault, unfortunately. Going forwards with debugging and fixing is beyond my abilities. But I will gladly help making more tests, providing info etc! :) |
Not sure if it is related but I've seen an issue on GStreamer itself posted here |
I reverted to the newest possible version of 1.18, which is 1.18.5. |
A bit silly of me not to raise an issue on gstreamer immediately, but I wasn't sure if this was just an idiosyncratic quirk of my system or not. I will soon install arch on a new computer, and will take the opportunity to test 1.20 then on a fresh install. PS: the work on your website looks great, @dimitre! |
I don't really know how to move further with this. I get a seg fault even when trying to do video capture... |
I confirm I have the same issue in GStreamer Core Library version 1.20.1 when playing the well-known 4K demo video from SONY "Sony Swordsmith HDR UHD 4K Demo" in parole. The error I get is
It is reliably reproducible with that video on a freshly updated ArchLinux with packages from the standard Arch repositories. This looks like something of a pretty high priority to me |
great @cherio I think you should add this info to the gstreamer gitlab so they have more info to reproduce the issue (hopefully fix) |
I have posted a link to this thread on the Gitlab thread for the issue (the similar one) for GStreamer. I hope this can be of some help. I hope I did the right thing! :) |
Great! Hope this will find a resolution soon... |
This error and the one in the gstreamer gitlab don't seem related. This is not a segfault and is likely related to the latest gstreamer using hardware accelerated components to decode video for which we don't have very good support yet since we recover the pixels of each frame to be able to access them from the cpu. There is a similar fix for a previous version to avoid using the hardware accelerated path but it seems that doesn't work anymore. The support for that is also probably much better now and it might be easier to integrate rather than completely avoid it, which would also make playback of big videos way less cpu consuming |
Sounds really good if this could be integrated. A lot of my use-cases are simple video playback + processing, and getting hardware acceleration going would be very good... I'd be happy to guineapig any solutions on my arch linux laptop. |
To add some salt, I get same issue using a Magewell Capture SDI USB3 (and also when trying to capture from laptop webcam). Arch linux also, gstreamer 1.20.1. Segfault at same point However, if I attempt to run gstreamer directly, using the pipeline that ofVideoGrabber example prints on init, it works:
Above test will not show a image but will show that the pipeline is running. To see an image I used this:
For what it is worth running under valgrind seems to imply an invalid dereference:
|
Here is another report on the issue from the oF forum: |
This is becoming more than a bit of a problem, not just in terms of openFrameworks, but also in terms of other pieces of software that depend on it and no longer work after update... Is there any way to specify which binaries openFrameworks will look for when linking to gstreamer? I would prefer to keep a separate gstreamer 1.18 + plugins around for oF until the issue has been resolved, but I have no idea how to go around pointing oF in the right direction... Any help is MUCH appreciated! |
@kflak I've seen some serious regressions introduced in Fontforge project, (which is large and complex) I think GStreamer project could use this strategy to identify exactly where things stopped working |
My hunch is that it's probably a bunch of breaking changes on the gstreamer side, and that the oF side of things needs to be updated to catch up, unfortunately. Would be happy to lean into it, but I don't know nearly enough about these things to contribute much, except for testing the results... |
Now things are a bit different, though, from when I first reported the bug. Using all the latest updates on everything (including oF nightly 20220528), I simply get a segfault and a coredump that looks like this:
|
I managed to get the videoPlayerExample program to compile and run with gstreamer 0.10, which is helpfully packaged in the Arch Linux AUR repository. I installed gstreamer0.10 and gstreamer0.10-{bad,base,base-plugins,good}, and changed $OF_ROOT/libs/openFrameworksCompiled/project/makefileCommon/config.linux.common.mk like this:
lines 42-63. The problem remains, however, that the video still doesn't play back, and I get the error
The videoGrabberExample compiles as well, but segfaults immediately with:
Which is clear enough... no support for fancy video grabbing in 0.10. So, that's the state of play right now. Will keep looking if it's possible to point the makefile to 0.18 instead. |
Thank you for your efforts @kflak! I would like to contribute, but this is beyond me at this point. It is annoying because for the next step of my project (https://forum.openframeworks.cc/t/dstudio-make-music-with-openframeworks-v1-0-released) I would really like to integrate video. |
Everything seems to be complete - I compared the install_codecs.sh scripts from a couple of different linux distros (just to rule out if Fedora had magically repackaged some stuff), but nothing jumped out. (If anything, the Fedora scripts install an extra package: ffmpeg & gstreamer-ffmpeg)
Wot, it's only triple-boot right now? 😁 I've attached two logs: one using playbin (without video), and one using playbin3 (with video) |
Thanks @edovino - that is helpful. Basically the On my laptop it uses the same NV12 but can decode to RGB - so it doesn't seem to be an issue with the format, but I think the decoder is not connecting or inserting the convertors needed. I guess playbin3 which uses decodebin3 is doing that conversion in your case. I think for now I updated the PR to use playbin3 as that seems to work for all platforms. I'll try and get F36 installed next week and see if I can narrow it down further, but will merge the PR in the meantime so at least the nightly builds work for Linux users. Thanks for all the help!! |
@edovino copying from the forum: I just installed Fedora 36 and got similar warnings. But one I got was: So I looked into it and it seems that not all the gstreamer plugins are getting installed in Fedora. To fix that I installed the equivalent of Ubuntu restricted via: Configuration - RPM Fusion And then once it was installed ( via software manager ).
and it installed the codecs the video needed. Doing this makes the videoPlayerExample work without playbin3. Def some extra steps, but curious if that works for you too? |
Hmm - what packages does |
@edovino huh - weird. For me I did:
I can't remember exactly what it installed but it did add an H264 package that wasn't installed. Anyway, good to know that was unrelated to the issues you were having. I left Thanks again for testing this all! |
The videoGrabberExample seems to work on my ubuntu studio 22.04.1 LTS. When i press "f" to stop and use the arrow keys, the example freezes with following output: [ error ] ofGstUtils: gstHandleMessage(): embedded video playback halted for plugin, module vaapidecode0 reported: No valid frames decoded before end of stream on: commit bd40423 (HEAD -> master, origin/master, origin/HEAD)
On start following messages: ➜ videoPlayerExample git:(master) ✗ make RunRelease [notice ] ofGstUtils: Got context from element 'vaapipostproc0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"(GstVaapiDisplayEGL)\ vaapidisplayegl0", gst.vaapi.Display.GObject=(GstObject)"(GstVaapiDisplayEGL)\ vaapidisplayegl0"; |
Thanks @f00b455 for checking! Just to note the current 0.11.2 with earlier GStreamer versions don't really work for frame by frame advancing either. I don't get the error message you do, but it still doesn't work and I think we could open some issues to address this. |
What desktop did you install? I'm now wondering if this could be a Wayland vs Xorg issue. I'm going to experiment a bit more. |
I am getting exactly the same behavior on sway (wayland) and i3 (xorg). The player works (YEEAAAAH!), but I get this message when moving the mouse over the app window:
(videoPlayerExample:122253): GStreamer-CRITICAL **: 17:28:27.688: gst_sample_set_caps: assertion 'gst_sample_is_writable (sample)' failed
After pressing `f` and arrow key, I am able to advance one frame. Pressing `f` again restarts the playback, with the accompanying error code.
--
Roosna & Flak - Contemporary Dance & Music
Web: roosnaflak.com
Code: {github,gitlab}.com/kflak
Mastodon: @***@***.***
On 31 Aug 2022 23:54, Edwin van Ouwerkerk Moria wrote:
@edovino huh - weird. Someone on the forum said the same thing.
* a clean install of F36
What desktop did you install? I'm now wondering if this could be a Wayland vs
Xorg issue. I'm going to experiment a bit more.
Anyway, thanks for this fix!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.*Message ID: <openframeworks/
***@***.***>
… |
Oh, and forgot to mention this is on Arch... |
Thanks @ofTheo for the updates on this! I am getting few issues after changing
If I don't change it to |
@dnabanita7 - I just sent a reply on the forum, but the Hope that works for you! |
Thank you! It works perfectly fine for me
…On Mon, Sep 5, 2022 at 9:32 PM Theodore Watson ***@***.***> wrote:
@dnabanita7 <https://github.com/dnabanita7> - I just sent a reply on the
forum, but the playbin3 change alone isn't everything needed.
If you try the nightly builds at the bottom of the download page
<https://openframeworks.cc/download/> it should work now - the relevant
PR is #7050 <#7050>
( with most of the changes in ofGSTUtils.cpp ) if you wanted to update both
the files from there.
Hope that works for you!
—
Reply to this email directly, view it on GitHub
<#6871 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHQZX566Z5YEKZ35AJHDHPDV4YKTDANCNFSM5OA6R2ZA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
*nabanita*
|
Although, webcam works fine. The video is not played. I get an error
and it is not loading up the GstVideoUtils.cpp file. |
* commit '68f3abe4520cd10de81880fc8319d7f16899c7f4': get 26.6 fixed-point type fix remove comment fix stringWidth WIP: Fixes for gstreamer 1.20 broken video playback. closes openframeworks#6871 (openframeworks#7050) json format (openframeworks#7052) ofAVFoundationMediaPlayer - fix 'self' warning (openframeworks#7026)
…fixes * commit 'd0d5939390c4e09dd4cefd3b623472b85771c4a9': (103 commits) AVSound iOS Xcode changes AVEngine get 26.6 fixed-point type fix remove comment fix stringWidth WIP: Fixes for gstreamer 1.20 broken video playback. closes openframeworks#6871 (openframeworks#7050) json format (openframeworks#7052) ofAVEngineSoundPlayer fixes for changing device output ofAVEngineSoundPlayer Fixes for Crashes interruptions ofxXmlSettings fix for sprintf overflow exploit ofAVEngineSoundPlayer Fixes for Crashes / nil / null / AVEngine failure / epsilon float compare fix ofAVFoundationMediaPlayer - fix 'self' warning (openframeworks#7026) ARC warning off Adding packages now not included on Ubuntu 22.04 (openframeworks#7035) update subdmodules pbxproj json conversion (openframeworks#7028) pragma ignored (openframeworks#7027) XCode preparing for AppStore (openframeworks#7003) ... # Conflicts: # libs/openFrameworks/graphics/ofTrueTypeFont.cpp # libs/openFrameworks/graphics/ofTrueTypeFont.h # libs/openFrameworks/sound/ofSoundStream.cpp # libs/openFrameworks/utils/ofConstants.h # libs/openFrameworks/utils/ofURLFileLoader.cpp # libs/openFrameworks/utils/ofUtils.cpp # scripts/templates/ios/Project.xcconfig
Hi! Can you share more details?
Do you have issues with the examples/video/videoPlayerExample or examples/computer_vision/openCVExample ? ( in the night download )
And did you run install_codecs.sh in the scripts/Linux/Ubuntu folder?
|
Unfortunately the gstreamer bogey is back in town, at least on my system. The videoGrabber example works fine, but with the videoPlayer I am getting
So the big question is which plugin I am missing here... I have run the install_dependencies script in the archlinux script folder, and I verified that all gst-plugins exist on my system. The openCV example gives me the same error. Additional information: I created a very minimal video playback app, and the sound from the video is played back just fine.
This gives me the following error:
|
It still works on my Debian 11 Testing, just updated, using the latest nightly of oF. libgstreamer is now 1.20-3. I also have |
Aha! Figured out the problem. I needed to install |
@kflak - thanks for this! |
Sure! Will try to get to it today.
…On Thu, Oct 20, 2022 at 20:51, Theodore Watson ***@***.***> wrote:
***@***.***(https://github.com/kflak) - thanks for this!
Would you want to do a Pull Request for the archlinux install_dependencies scripts?
—
Reply to this email directly, [view it on GitHub](#6871 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ADHRJIHVWEGWN7CZWBFI5BTWEGBBDANCNFSM5OA6R2ZA).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hi,
I just updated my system, and it seems gstreamer breaks any video playback. Getting this when running the videoPlayer example:
Needless to say, this is a HUGE bug. Please, please, please wait with upgrading gstreamer until this is fixed.
Running this on Arch Linux, oF version 0.11.2. Tested on xorg (bspwm) and wayland (sway).
EDIT: tested now with the latest nightly build, of_v20220210_linux64gcc6_nightly, and getting the same result.
The text was updated successfully, but these errors were encountered: