Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Compatibility

Reply
 
Thread Tools Display Modes
Old 03-10-2017, 01:01 AM   #1
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default Video is unusable in Linux under Wine :-(

*
**
***

TL;DR: Please see "Ubuntu-Wine.jpg" attachment, and skip to http://forum.cockos.com/showpost.php...41&postcount=5

***
**
*


I've tested various combinations all of the following configurations - none of these seem to work properly with h.264 .MP4 video, running REAPER on Linux under Wine:

- Wine 1.8, 1.9, 2.0, 2.3
- XFCE, Unity Desktop, MATE
- Video playback via ffmpeg DLL + libavcodec DLLs from Zeranoe
- Video playback via VLC
- Both 64-bit and 32-bit versions of REAPER, VLC/codecs, and Wine
- One VM and two hardware installations

In all of these situations, the Video Window displays badly aliased video with color artifacts. Also, unless all three checkboxes at the top of Preferences -> Media -> Video are turned OFF, either the video won't display at all, or it will display upside down (flipped, not rotated).

On MacOS using AVFoundation and on Windows with either VLC or libav/ffmpeg, the video displays fine.

Attached is a comparison between the three OSes. Is there any way around this issue?

Thanks in advance,

Matt
Attached Images
File Type: jpg MacOS.jpg (54.7 KB, 387 views)
File Type: jpg Windows.jpg (52.9 KB, 379 views)
File Type: jpg Ubuntu-Wine.jpg (61.7 KB, 386 views)

Last edited by Matt Mayfield; 03-10-2017 at 12:30 PM. Reason: tl;dr
Matt Mayfield is offline   Reply With Quote
Old 03-10-2017, 08:35 AM   #2
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default

Just to double check, I installed Wine on OS X. When running the Windows version of Reaper under Wine on OS X, the same graphical problems happen as on Linux (attached). This is with Wine 2.3.
Attached Images
File Type: jpg OSX-Wine.jpg (61.1 KB, 311 views)
Matt Mayfield is offline   Reply With Quote
Old 03-10-2017, 09:13 AM   #3
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default

On further testing, the graphical issues are worst when the video is scaled up or down from its original size... There are the weird aliasing and color artifacts shown in the screenshots when scaled down, and what looks like blocky, ugly nearest-neighbor interpolation when scaled up. (Edit: even when at 100%, many videos still show bizarre color artifacts, lines within gradients.)

Is this even something that can be fixed within Reaper, or is this the fault of Wine? Might there be a little-known tweak in Wine's settings to improve this?

Last edited by Matt Mayfield; 03-10-2017 at 09:15 AM. Reason: still issues when not scaled on some videos
Matt Mayfield is offline   Reply With Quote
Old 03-10-2017, 11:55 AM   #4
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default

Couple more tests...

Windows VLC (standalone app, not within REAPER) running under Wine does not show this issue, so it seems less likely to be (entirely) Wine's fault.

Also, I tried building my own Wine from latest sources but there was no improvements. I also tried adding a patch ( https://forum.winehq.org/viewtopic.php?t=7780&p=40206 ) to Wine's xrender.c so that it would explicitly use bilinear filtering but that did not help either.

Wine config setting to a different Windows version doesn't seem to make a difference.

I'd really like to get this working; does anyone have any suggestions?

Thanks,

Matt
Attached Images
File Type: jpg VLCapp-Ubuntu-Wine.jpg (63.8 KB, 296 views)
Matt Mayfield is offline   Reply With Quote
Old 03-10-2017, 12:23 PM   #5
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default

In further testing, setting my video window to EXACTLY match the video source 1:1 (going to fullscreen and turning off "Window manager controls windows" in winecfg to get the image big enough) *does* seem to eliminate the artifacts in Reaper.

Adding a Video Processor and scaling/panning/etc. the video does not re-introduce artifacts *as long as* the final output window/screen size exactly matches the original source video's size pixel-for-pixel.

In another test, I added a smaller video (560x322; previous tests were all 1920x1080) and right-clicked the video window to have it resize to the video size. At 1:1, I don't see any strange color artifacts, and using a Video Processor to shrink or enlarge the video doesn't introduce them (although it's still fast/low-quality resizing).

It seems like Reaper is rendering the video to an image buffer correctly, but then when that buffer is displayed onscreen, it's scaled incorrectly.

VLC.exe under Wine scales the video image correctly (high quality with no strange color rings), and FFPlay.exe under Wine also scales the image correctly.

VLC native Linux version also scales the video image correctly, as does ffplay.

REAPER on native Windows (either ffmpeg or VLC) scales the video correctly, but REAPER under Wine (either ffmpeg or VLC) does not, and introduces strange color artifacts at any size except perfect 1:1.
Matt Mayfield is offline   Reply With Quote
Old 03-10-2017, 02:38 PM   #6
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default

I found a partial workaround for this, in case it helps anyone else who's been searching and only finding the same two lonely forever-unanswered threads about video on Linux/Wine...

In Project Settings -> Video tab, there is a pair of text fields for Preferred Video Size (Width x Height) and a checkbox for "Always resize video sources to preferred video size."

By setting this to the size you want to work at, then checking the "Resize video window to original video size" in the Options menu of the Video window, it's possible to at least mix videos of different dimensions in a project and have them display correctly.

For example, for my purposes, I want the video window displayed full screen on a projector running at 1280x800 resolution. By choosing those options and "Preserve aspect ratio (letterbox) when resizing," I'm able to at least make the video render correctly on the projector.

It's not a complete fix, though, and the underlying problem still persists.
Matt Mayfield is offline   Reply With Quote
Old 03-16-2017, 06:43 PM   #7
4duhwinnn
Human being with feelings
 
Join Date: Mar 2017
Posts: 859
Default

Hi, I'm guessing you're using laptops, sorry if that's a bad guess.
My linux experience on complex apps always goes better when using
a dedicated video card, that is old enough to be fully supported in
the kernels available, and has solid closed-source factory drivers
you can install. I've always used nvidia, not that choices are aplenty.

Try running all the apps in your session from terminals,
hoping for clues naming names. There may be some wine libs
that you can 'over-ride', replace with the real ones,
and configure as such in winecfg.

Some Phoronix/Steam gaming topics might also reveal
tips and tricks others have uncovered, that will relate
to your video hardwares.
Congrats on not giving in without some success.
The world needs more such fighters!

edit: if you are using wineasio while video testing, try the
wdm, wasapi, waveout or direct-sound, in case they're
more mature for the needs at hand
Cheers

Last edited by 4duhwinnn; 03-16-2017 at 06:49 PM. Reason: mow betta
4duhwinnn is offline   Reply With Quote
Old 03-16-2017, 07:10 PM   #8
Matt Mayfield
Human being with feelings
 
Join Date: Aug 2016
Posts: 62
Default

Hi 4duhwinn,

Thanks for the reply. Unfortunately none of those things made a difference; I was pretty thorough in testing. This issue showed up on:

- An older MacBook booting into AVLinux 16.08 (Debian-based), with Intel GMA 950 graphics
- A PC I built running regular Ubuntu 16.04 LTS, with discrete nVidia graphics
- A macOS host machine running a VirtualBox guest VM on Ubuntu MATE 16.04 LTS, with AMD Radeon discrete graphics

The issue did not show up on:

- A 2011 MacBook Pro running OS X 10.11 with Intel HD 3000 integrated graphics
- A macOS host machine running a VirtualBox guest VM on Windows 7, with AMD Radeon discrete graphics
- A tablet booting into Windows 10, with Intel Atom integrated graphics

I just don't have the tools (or obviously, access to the source code) to thoroughly troubleshoot this, but based on the existence of the workaround outlined above, it must happen somewhere between the final internal render of the video frames and the actual blitting to the screen, but only under Wine and not on Windows.

Thanks for the tip about the sound drivers. I've always used WASAPI on Windows and Wine, since I've seen some stability issues with ASIO, but also did these tests with Dummy Audio, which should eliminate that as a variable entirely.
Matt Mayfield is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.