Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Papou on December 15, 2013, 04:44:38 PM

Title: bug: video display corrupt on multiple instances of codec use
Post by: Papou on December 15, 2013, 04:44:38 PM
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.
Title: Re: bug: video display corrupt on successive instances
Post by: mean on December 15, 2013, 04:57:24 PM
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
Title: Re: bug: video display corrupt on successive instances
Post by: Papou on December 25, 2013, 06:56:12 PM
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.
Title: Re: bug: video display corrupt on successive instances
Post by: Papou on June 04, 2014, 12:37:51 AM
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.
Title: Re: bug: video display corrupt on successive instances
Post by: Jan Gruuthuse on June 04, 2014, 05:52:09 AM
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 (http://avidemux.org/smuf/index.php/topic,16159.0.html).
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

Title: Re: bug: video display corrupt on successive instances
Post by: Papou on June 04, 2014, 04:17:34 PM
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.



Title: Re: bug: video display corrupt on successive instances
Post by: Jan Gruuthuse on June 05, 2014, 07:06:38 AM
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.
Title: Re: bug: video display corrupt on successive instances
Post by: Papou on June 05, 2014, 03:19:05 PM
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.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 05, 2014, 04:17:54 PM
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.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on June 05, 2014, 06:41:36 PM
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.


Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on June 05, 2014, 06:46:50 PM
avidemux screen in stopped state reached with right arrow when another program using an AVC codec is paused in the background.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 06, 2014, 03:53:31 AM
Even when paused the video is still loaded in memories (video/ram).
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.avidemux.org%2FadmWiki%2Flib%2Fexe%2Ffetch.php%3Fmedia%3Dusing%3Aprevious_black_frame-qt.png&hash=7ba0dddb206da23db6244c075f0aa8e50b224373): Go to previous black frame ââ,¬â€œ searching for black frames may take some time and may not be 100% accurate.
(https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.avidemux.org%2FadmWiki%2Flib%2Fexe%2Ffetch.php%3Fmedia%3Dusing%3Anext_black_frame-qt.png&hash=521d67a6b9421e8b58e5d891c25b229f7fc9a6e1): 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 (http://www.avidemux.org/admWiki/doku.php?id=versions:main)
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.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 06, 2014, 06:29:11 AM
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
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: AQUAR on June 06, 2014, 11:18:56 AM
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!
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 06, 2014, 12:45:30 PM
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
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 06, 2014, 01:10:56 PM
Tested again, 4 avidemux instances 3 playing and one stepping thru movie: no problem.
The problem starts when encoding using VDPAU and using playback for VDPAU. Avidemux will protest vdpau is already in use. As op wrote he uses VDPAU for AMD GPU.
As far I understood VDPAU avidemux is only geared to nvidia (CUDA Cores), unless mean states otherwise.
So I don't know if OP should run VDPAU with the Radeon HD6326, my opinion probably not.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: AQUAR on June 06, 2014, 01:46:06 PM
First gen core2duo's are really old and are not mobile processors (E6400 at 2.13 Ghz!).
I'm guessing its less capable than the cpu in the OP's setup.

On my crappy PC, as long as only one instance is working out of the multiple instances, everything is fine under windows (GPU is also a very basic ATI Radeon here). However, the OP gets display corruption and is using linux.
VDPAU is a linux thing and should work with open source video drivers for ATI HD-Radeons (limited by avidemux?). 

Multi-tasking two active avidemux instances is not do-able on this PC (could try and assign each instance to a core?).

Anyway, the whole thing is moot regardless of PC performance.


Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on June 06, 2014, 03:36:35 PM
Quote from: AQUAR on June 06, 2014, 11:18:56 AM
Obsessing about running multiple instances of avidemux is just weird (IMHO).
...
So it must be a linux thing!
What is really weird instead is claiming, while Movie Player is paused in the background,
that making avidemux (a single one) step frame by frame with the right arrow
means running multiple instances of avidemux to edit several videos at the same time,
that it consumes a lot of human and system resources: CPU & GPU & disk are practically 0 and real memory is 15%, 5 yo pushing the key,
that vic should be used instead,
that I should discard this computer on which all of the video and the rest runs super fine except 2.6 in this case
that getting the picture I posted is normal in stopped state after pushing the right arrow once
and that it is not an avidemux bug.

Obsessing about resources stress is really weird.
I told you that I get 5 instances of that video running correctly with avidemux 2.5, or with 2.6 and only that bug.

I also am only a user but I think that if all of Linux is running file including avidemux 2.5, the bug is in 2.6 and most probably in libADM_coreVideoCodec6.so when it meets some conditions.
Note the title of this thread.
Would it perchance be possible to have for a test avidemux display a video with the system's codec or an application with avidemux codec?
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 07, 2014, 06:51:30 AM
As you insist this is a avidemux 2.6.x bug, then it stops for me here.

Check this out: Reporting bugs (http://www.avidemux.org/admWiki/doku.php?id=general:bugtracker)
Good luck
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: AQUAR on June 07, 2014, 07:55:19 AM
@ Papou
My perception of your problem is based on your title and your various descriptors.

When you make statements like those below, its not unreasonable to think that you are executing multiple instances of avidemux and getting display corruption.
These are your statements:
"video display corrupt on multiple instances of codec use" 
"It happens on a second, third... Avidemux windows"
"the first window displays a still picture while another exhibits the problem"
"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".

So if my perception of your issue is wrong, why are you responding with heat to this association?
Certainly has killed my enthusiasm to provide explorative help.

I'll just finish with this thought: Issues with codecs used by avidemux should not be bug attributed to avidemux but instead to the relevant project.   

Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on June 07, 2014, 11:56:03 AM
Quote from: AQUAR on June 07, 2014, 07:55:19 AM
@ Papou
My perception of your problem is based on your title and your various descriptors.

When you make statements like those below, its not unreasonable to think that you are executing multiple instances of avidemux and getting display corruption.

And that's exactly what I may do but it's not necessary to insist on my PC being defective crap when I have said that it occurs in paused state consuming no resources and that I am a fool editing several videos simultaneously when I do not and that running multiple instances of avidemux is unsupported, it certainly is.

Quote from: Papou on June 04, 2014, 12:37:51 AM
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.

That's full reply #3 that was written asap.
Unfortunately, one cannot say something before finding it.
And the rest of the 20 posts is my replying that it's not a matter of resource stress or of multi editing.
But I do launch a second instance of avidemux just after an encoding to check it and even that was said to be unsupported.
And I was accused of obsession !!!

By saying that it's an avidemux bug, I mean a bug in the packaged bundle.
If it's in the codec, the avidemux should better discuss that with its authors than poor me.
I have reworked the bug description.

Thanks for your attention.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on June 07, 2014, 03:51:20 PM
Quote from: Papou on June 07, 2014, 11:56:03 AM
But I do launch a second instance of avidemux just after an encoding to check it and even that was said to be unsupported.
You're good at getting things out of context.
Quote from: Jan GruuthuseOnly one avidemux instance should be used. Netbook cpu could be to light.
Then you post a lot of blabla about wunderfull AMD and their closed source Radeon driver.
Quote from: PapouI would certainly not trash such a nice Radeon driver when Linux cries because vendors do not support Linux!
Quote from: PapouI'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.

You're not here for help, just picking a fight and blaming avidemux and the developers.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: AQUAR on June 08, 2014, 03:54:13 AM
@ Papou
No one called you a fool here.
I simply said its weird to edit 2 videos at the same time - since you are not doing that -  its a moot point.

Ignoring suggestions that don't support your conclusion is what you prefer to do.
You have had at least 3 plausible broad based thoughts that we think might lead to such a problem.
And verification that, with windows 7 on lesser hardware, there is no display corruption.

But, since you are closed minded on exploring what might be behind this issue we (other endusers) cannot help you.

So, that leaves you with trying to convince the developer that this is an Avidemux bug.
Do you think your approach so far has been conducive to that objective?

Wish I had followed my instinct to not contribute to this post. 
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on June 09, 2014, 07:14:14 AM
Quote from: Jan Gruuthuse on June 07, 2014, 03:51:20 PM
You're not here for help, just picking a fight and blaming avidemux and the developers.

I mostly am here not to get help indeed but to report an issue that will help making a better avidemux for everybody and the least that can be said is that your calling that picking a fight is highly appropriate.
You call reporting issues blaming avidemux and the developers.
I'm dodging bullets.

Quote from: Jan Gruuthuse on June 07, 2014, 03:51:20 PM
Quote from: Papou on June 07, 2014, 11:56:03 AM
But I do launch a second instance of avidemux just after an encoding to check it and even that was said to be unsupported.
You're good at getting things out of context.

It is the exact context of the problem. Who could know better?

Talking your way would be rude and I am not.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: AQUAR on June 09, 2014, 08:34:13 AM
@ Papou

Lots of people report issues and can have beneign discussions about them.
You have reported an issue and claimed it to be an Avidemux Bug.

When people try to get you to consider other plausible reasons, you just continued to insist its a bug.
And your insistance is padded by reflecting comments made by respondents in an out of context manner.

Now if you feel like you are dodging bullets, its because we raised our shields of apathy to reflect those bullets.

If all you wanted to do is report an issue, then its mission accomplished.
And let me thank you for that component.

But since its being presented as an avidemux bug, expect others to explore/argue that point.
That flow on is not meant to come across as rude and you very well know that.
IMHO You should retract that kind of implication.
I am sure we can be more elegant in our responses but for goodness sake we are just trying to help.

Really wish I had followed my instinct to not contribute to this post.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: mean on June 25, 2014, 05:23:40 AM
Are you using some sort of hw accelerated decoding, such as vdpau or intel ?
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on November 08, 2014, 01:01:34 AM
I have posted a workaround there...

Quote from: Papou on November 07, 2014, 01:55:07 PM
I have found how to work around both artifacts. That's configuring
Editer>Preferences>Display> both Activer OpenGL and Affichage vidéo: OpenGL
Everything is now normal, meaning great!
...
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Jan Gruuthuse on November 08, 2014, 04:04:16 AM
So it was not a bug after all. User settings configuration was cause of your issue. Thank you for posting your findings.
Title: Re: bug: video display corrupt on multiple instances of codec use
Post by: Papou on November 25, 2014, 02:34:03 PM
If the whole of the system is perfect and Avidemux 2.5 is alright in ALL video modes and Avidemux 2.6 produce these artifacts in ALL video mode, it is obviously NOT a bad configuration issue but a PROBLEM somewhere in the code that's common to all modes but that is bypassed when the OpenGL option is used.  This is valuable information for a developer to locate where the problem is.  Unfortunately, no one will read this thread down to here through all those so-called plausible causes that I had to reject one by one, showing that they're irrelevant, with the result  that I got accused to not accept advices and to have come here to "pick a fight". It finally turns out that I simply was right and cooperative all along. Thanks for trying but not for accusations.