Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: poutnik on January 19, 2015, 07:24:04 PM

Title: Adding job to "live" queue being processed
Post by: poutnik on January 19, 2015, 07:24:04 PM
I have tested and later also read, that one cannot add a job to the queue already being in progress.
I suppose it is due jobs.sql file, being picky in concurrent accesses.

It is IMHO rather unlucky implementation, compared to e.g. MyGUI, where one can add new jobs anytime.
If ADM queue finishes e.g. at 3 AM, I will not be able to add another job  in the evening, but have to wait until it next day.
Or, eventually, to postpone waiting jobs, finish current one, add new job, remove finished jobs and continue...... ( not tested )

Why not to implement a queue as a dedicated queue folder with separated job script files ?
A new job file could be added any time, and the queue processor would just pick up another job file when finished the previous one...

The solution is almost ready, as there is general jobs folder with job py files.
Just the output filename are missing, as they are stored in jobs.sql.

If there was used similar folder for queue, and with stored output filenames...
Files could have internally added index to determine the order.
Title: Re: Adding job to "live" queue being processed
Post by: Jan Gruuthuse on January 19, 2015, 08:03:29 PM
Have you tested? If I remember correctly, you can add a job to queue while the queue is being processed. I never use jobs: as I mostly edit in real time and while not re-encoding the processing is really fast: 5/6 hours recording. 2-3 minutes edit 1/2 hour of video and 2-3 minutes saving the edited part. The longest it takes is loading 20 to 36 GB video (indexing): coffee time.
Title: Re: Adding job to "live" queue being processed
Post by: poutnik on January 19, 2015, 08:20:46 PM
Quote from: Jan Gruuthuse on January 19, 2015, 08:03:29 PM
Have you tested? If I remember correctly, you can add a job to queue while the queue is being processed. I never use jobs: as I mostly edit in real time and while not re-encoding the processing is really fast: 5/6 hours recording. 2-3 minutes edit 1/2 hour of video and 2-3 minutes saving the edited part. The longest it takes is loading 20 to 36 GB video (indexing): coffee time.

Yes, I have tested.  ( ADM Win64 Nighly Jan11 )
Created a queued job
Exited ADM
Launched ADM jobs
Launched 1 item queue
Launched ADM
Created new job
Trying to queue it - refuted by concurrent access issue to jobs database.

I do reencoding  TS(MPEG2,MP2) --<MP4/MKV(AVC,AAC), with encoding duration of about recording duration.
Title: Re: Adding job to "live" queue being processed
Post by: poutnik on January 19, 2015, 08:29:23 PM
Could it be Windows  issue only
because of different SQL implementation,
or because of different way how Windows ADM works with SQL ?  ( Just guessing )
Title: Re: Adding job to "live" queue being processed
Post by: Jan Gruuthuse on January 20, 2015, 08:16:45 AM
I don't know if it is possible what you want currently?
See if you can figure out a better workflow, so you don't need to add a new job to queue?
Also take a look at batch file processing or scripting.
Organise source file videos in to folders with the same video content (videocodec / used audio channels) so you can apply one job to a batch.
some use full info batch or scripting: can be found here:
Documentation & Tips  (http://avidemux.org/smuf/index.php/board,10.0.html)
You have some nice tools available, don't expect the developer(s) to fine tune avidemux to your (windows) wishes. The time is not available for doing so.
If it is to time consuming (test with small files, to check what it can do and what it can't do. Keep notes, on what/how you do it. So if something changes program wise, you can track down what you have to change to make it happen again.
Tip: don't always use avidemux command line use avidemux GUI in batch or script if command line fails.

That is all I can give you.
Title: Re: Adding job to "live" queue being processed
Post by: poutnik on January 20, 2015, 10:51:58 AM
I suppose it is currently not possible, but possible in general. But, what you offer seems to me rather as acceptable workaround than solution.

For unattended batch processing is easier to use for me queue management of MeGUI, and then do i-frame cut in ADM. In fact, the only reason I am considering using ADM is subjectively more convenient cutting generally, and cutting without re-encoding.

I still have to review ADM scripting way of processing saved jobs with defined cutting to bypass queueing inabilities. But it is like rubbing your left ear by right hand over a head.

Idea of adding item into queue is not Windows one, but one of normal human thinking. If there is a queue inside or before a shop, you do not wait until the queue gets empty to join it.

I do Use QT4 processing in batch,  as CLI triggers untamed opening of several console windows with unnecessery frame level details.

I already used some info from documentation and tips, e.g. I have a CMD batch to preventively fix MPEG TS by ProjectX and index it in ADM. It is good source of information.

Thanks you for your time and tips.

BTW, if I talk about an application I am not aware if it is Windows or Linux application, I can tell it after short communication with its users, even if they do not use platform specific terminology...   One need to involve a big portion to diplomacy to one of these 2 groups, as it may be dangerous to suggest anything, whatever nice way you choose.

Title: Re: Adding job to "live" queue being processed
Post by: Jan Gruuthuse on January 20, 2015, 11:40:42 AM
Quote from: poutnik on January 20, 2015, 10:51:58 AM
I suppose it is currently not possible, but possible in general. But, what you offer seems to me rather as acceptable workaround than solution.
That's the way it is General possible: yes (maybe).
- Time is currently not there. So it may happen @ some point of time.
- as user I have no influence in development or great insight how al works together.
- so I can only offer workaround

Possible work flow:
Edit file in avidemux: save as tinypy project.
close video
load new video, edit new video: save as tinypy project.
...

When avidemux jobs start a new job: stop avidemux jobs and close.
Open avidemux:
load tinypy project 1, add to queue
load tinypy project 2, add to queue
...
When finished loading each project separately: close avidmux.
Start avidemux jobs:
the existing jobs and new jobs should be showing.
jobs
- still need to run show as Ready
- done show as v Success
- failed jobs show as Failed, probably the one you just stopped avidemux jobs. Right click on these and select Force Status as Ready
....


You need to test with some small sample files if loading the tinypy project does exactly as if you would adding directly job to queue.
Title: Re: Adding job to "live" queue being processed
Post by: poutnik on January 20, 2015, 01:30:51 PM
Thanks.
Yes, I am aware of this possible workaround way. It works AFA I remember when trying.

It would be great if Jobs offered option to stop queue after current job, but lets deal what it offers.
Title: Re: Adding job to "live" queue being processed
Post by: Jan Gruuthuse on January 20, 2015, 02:43:20 PM
Take note what jobs were done (Success) and what jobs still need processing (Ready)
I guess:
Right click every job below the one processing and select Force status to success

Avidemux should stop after processing current job.
Now should be possible to follow above work flow when avidemux job stopped.
Reset all not done jobs back to Ready and run jobs again.

Multiple selection is working, change is only applied to one selection
Title: Re: Adding job to "live" queue being processed
Post by: poutnik on January 20, 2015, 05:33:26 PM
Aah, thanks for hint. 
In fact, I could get such idea, but I did not.  I probably would, looking  on jobs window long enough.