bug: video display corrupt on multiple instances of codec use

Started by Papou, December 15, 2013, 04:44:38 PM

Previous topic - Next topic

Papou

Note: post restarted cleanly in http://avidemux.org/smuf/index.php/topic,16284

Ever since I use 2.6 on Ubuntu 12.04, I get corrupted video display.
I have finally found the circumstances...
It happens when another program, including another instance of Avidemux itself, uses an AVC codec, be it the system's codec or (I suppose) libADM_coreVideoCodec6.so that's bundled with 2.6.
The bug can be demonstrated as simply as having such a second program paused in the background and avidemux frame stepping with the arrow key. A stripe like in #17 picture occurs say every 20 frames.

Horizontal blocks of the same window are repeated randomly.
For example, the bottom 1.5 cm of the image is repeated in its middle.
The stripe may not be full width.
There may be several stripes, all containing the same picture.
But it may be a visual effect and only one stripe at a time like said above.
See reply #17 for an image of one duplicated stripe;

TIA. Cheers.

mean

What is the display driver ? Xv ?
It might be a bug in the display driver where it does not reply ko when the resource is already taken

Papou

Avidemux QT (2.6.7 now), Driver is Xvideo.
But it happens with any video driver (X11, Xvideo, VDPAU, OpenGL)
Note that the first window displays a still picture while another exhibits the problem.
Also, when I test VDPAU, a SINGLE Avidemux instance exhibits the problem.
And possibly as soon as Avidemux is launched, with the first frame still still if I may say.
After this, a SINGLE X11, VDPAU or OpenGL Avidemux instance exhibits the problem too.
Xvideo has to be configured again for returning to normal operation.
I wanted to compare with GTK, but this 2.6.7 now fails to start, see attachment.

Hoping this can help.

Papou

It only occurs with H.264 / AVC codec, not ASP, flash ...
It also occurs when another program is using that codec simultaneously.
But other programs' display themselves are not affected.

Jan Gruuthuse

#4
Don't use Gtk, use QT flavour. If your on 64-bit version 12.04 ubuntu, try one of these: avidemux Cli/Qt 2.6.8 64-bit deb download ubuntu.
It would help if you give more info on your used hardware and desktop.
I have avidemux running on:
- core I5-2500K 16 GB ram
- core i7-3770K 16 GB ram with a nvidia GT520 (1024 MB).
vdpau only works with some nvidia GPU
opengl if vdpau not possible
xvideo if none of above works
x11 is only last resort if nothing else works


Papou

Thanks for your attention.
As I wrote, I'm using QT (and GTK fails to start).
I was using 2.6.7 but now 2.6.8 for some time http://archive.getdeb.net/getdeb/ubuntu/pool/apps/a/avidemux2.6/
HW is TK11-BZ-015BE 16GB AMD combo: E450 2Ãâ€"1.65MHz + Radeon HD6326 256MB
None of  X11, Xvideo, VDPAU, OpenGL has apparent defect except all for this report.
Switching Display: default Xvideo -> VDPAU at your advice. Deblocking vertival+horizontal
HW accel: using VDPAU
Hoping this can help.




Jan Gruuthuse

#6
Only one avidemux instance should be used. Netbook cpu could be to light. Don't have experience with netbook.
Could be a AMD Catalyst proprietary driver issue and may require replacing with Open Source Driver. Not certain again about this.
Perhaps others may have more info and experience with this.
some info: https://help.ubuntu.com/community/RadeonDriver

Don't think vdpau should be used on radeon cards, perhaps developer 'mean' can confirm this.
Certainly don't mix opengl with vdpau.

Combo: does that means 2 video cards? If so could be issues there to.

Papou

Quote from: Jan Gruuthuse on June 05, 2014, 07:06:38 AM
Combo: does that means 2 video cards? If so could be issues there to.
It means that the CPU and GPU are in the same chip. Why an issue? I don't think AMD is incompetent.
Quote
Only one avidemux instance should be used.
That's one thing a developer wouldn't be proud of hearing: having to exit avidemux which is in the paused state after having written a video to be able to launch a second avidemux instance to watch that output. Also to have to stop the Web browser to be able to run avidemux because the browser plugin keeps the video driver open (even with no video window open). Etc.
Quote
Netbook cpu could be to light. Don't have experience with netbook.
Laptop. What would be the problem of a CPU that's able to run 5 moving displays of a video before reaching 100% when the problem happens with one avidemux instances displaying that video in the paused state (not yet started) and another paused program, avidemux or not?
Quote
Could be a AMD Catalyst proprietary driver issue and may require replacing with Open Source Driver.
Not certain again about this.
I would certainly not trash such a nice Radeon driver when Linux cries because vendors do not support Linux!
Especially with such a nice AMD Catalyst Control Center.  I'll investigate Catalyst options.
I waited one year before buying this great laptop because the Open Source driver was completely failing with the E450.

Please let us recall that this Radeon "card" is working extremely well with all applications except the 2.6 version of avidemux  (2.5 is OK) and not well only in respect of this issue.
Fix only what is broken they say.  I would rather compare 2.6 and 2.5.

Thanks for the advices.

Jan Gruuthuse

Watching video: use vlc for that.
QuoteWhy an issue?
If you have 2 GPU (one on cpu, one on card) that can be an issue.

Avidemux uses all available resources. That is why it is not a good idea to run multiple avidemux.
QuoteLaptop. What would be the problem of a CPU that's able to run 5 moving displays of a video before reaching 100%
Playing video is another thing then editing/re-encoding video, that is why. There are other bottle necks to in pc/laptop/nettop: data transfer: hard disk, memory, ....

QuoteI don't think AMD is incompetent.
I never said AMD is incompetent.

Anyway that is all I can help you with.

Papou

I attached 2 pictures of avidemux in the paused state. Youtube's filename in title.

First has been single stepped through with the right cursor. (other player paused in background)
Note that artifacts last 1 frame (but can repeat consecutively).

Second, while we are at it, is showing image when not multiple of 8.

I was on the edge of not posting the image because that thing was telling me that 168 KiB shots are too large!!!
I finally cropped them.

Quote from: Jan Gruuthuse on June 05, 2014, 04:17:54 PM
Watching video: use vlc for that.
I don't "watch" videos with avidemux.   I am only unable to edit them without seeing them.
And when I modified one I check that avidemux will be able to edit it again, what vic will certainly not tell me.
Quote
Avidemux uses all available resources. That is why it is not a good idea to run multiple avidemux.
Playing video is another thing then editing/re-encoding video, that is why. There are other bottle necks to in pc/laptop/nettop: data transfer: hard disk, memory, ....
If  two side by side paused instances of avidemux, or one stepping frame by frame, use all available resources and cause the bottlenecks and all that you say, then certainly 2.6 has a very big problem that 2.5 does not have.

Thanks for trying to help.



Papou

avidemux screen in stopped state reached with right arrow when another program using an AVC codec is paused in the background.

Jan Gruuthuse

#11
Even when paused the video is still loaded in memories (video/ram).
: Go to previous black frame ââ,¬â€œ searching for black frames may take some time and may not be 100% accurate.
: Go to next black frame.
This black frame search function does not always work in 2.6 branch.

You need to understand:
- my input is from user experience only, I'm not a developer.
- the difference between 2.5 and 2.6 brnaches of avidemux!
avidemux editor 2.5 is frame based, 2.6 is time based due to the nature of the newer codecs!
More info you can find here: Avidemux versions
Use 2.5.6 for none HD videos where you require frame editing, and 2.6 for HD video that does not work with 2.5.

Jan Gruuthuse

Testing 2 times avidemux running on ubuntu 14.04 LTS desktop core I7-3770K with nividia GT520 card.
Sometimes this works (playing) sometimes it doesn't.
unzip, keep 2 files in same folder (.mkv + .srt) and play 2TimesAvidemuxon1404Ubuntu.mkv
Download 41.8 MB zip: https://www.dropbox.com/s/omzor1b9neo8n3y/2xAvidemuxRunning.zip

conclusion as before:
avidemux is very demanding on system (core I7-3770K with nividia GT520 card)
this system is more or less, 5 times more powerful then a TK11-BZ-015 BE laptop

download from dropbox will be available for approx. 1 month from posting date

AQUAR

My solution: Use 2 PC's if you really cannot live without editing 2 media files at the same time.

Seriously:
1) Avidemux 2.6 plus AVC simply requires a lot of system resources (accept it or leave it!),
2) Video editing requires a lot of human resources (who does 2 at the same time?) and,
3) Human's are bad at multitasking complex tasks (especially males!).

So:

4: Obsessing about running multiple instances of avidemux is just weird (IMHO).

However, on my lowly first gen core2duo, with windows 7 for its OS:
I am running 3 instances of avidemux all loaded with AVC,
Get no display corruption when each one in turn gets the focus to do some action (ie frame stepping),
And I can still type this entry on the avidemux forum.
So it must be a linux thing!

Jan Gruuthuse

Quote from: AQUAR on June 06, 2014, 11:18:56 AM
However, on my lowly first gen core2duo, with windows 7 for its OS:
I am running 3 instances of avidemux all loaded with AVC,
Get no display corruption when each one in turn gets the focus to do some action (ie frame stepping),
And I can still type this entry on the avidemux forum.
So it must be a linux thing!
You should take note this was on a of 3000 by 1920 desktop (real monitor estate), playing 2 720p videos 7 GB each in memory and recording + encoding this  3000 by 1920 desktop in avc.
Hard disc activity is recording the desktop with kazam.
So I would not call "its a Linux thing"
If your 1st gen core2duo is a mobile processor, you should compare against the AMD E-450. If the core2duo is a Intel Core 2 Duo U7500 then the  AMD E-450 should probably do the same.
mobile cpu's: http://www.notebookcheck.net/Mobile-Processors-Benchmarklist.2436.0.html