2.6.8 Qt on Linux Mint 17 (ubuntu14.04) Many problems

Started by nebbish, January 19, 2015, 08:08:22 PM

Previous topic - Next topic

nebbish

I have used Avidemux 2.6 GTK version on Linux Mint 16 (ubuntu 13.04) for some time with no problems
After Clean install of Mint17 AVIDemux 2.6.8 GTK would not run ( Failed to pen Glade file) couldn't find a solution to that.
Some forums indicated that QT is better maintained so went with that. Installation Fine and it runs.

I need to convert a bunch mp4(H264&AAC)  to MP4ASP & MP3 to play on a hardware DVD Player
Set up the conversion and manually converted a file - OK
Added the next few to the queue with same settings from same session without restarting AVIDemux - All Failed. retried several times
Went back to manual
The video Converts nicely - Reports as DIVX in Avidemux, and XVID in VLC
But, although I have Audio set to MP3 (Lame) it produces AAC in the output file (Seems to have copied rather than converted)

Tried Creating a preset for the job, following the Wiki How To, but it doesn't show up in the Auto Menu (I presume that's what you mean by Preset?)

I am confused?  I suspect that some of the documentation has not kept up with the latest releases

any pointers in the right direction would be appreciated.

Thanks


nebbish

Update

The Audio copy/conversion issues seems to have been an anomaly. After re-booting and starting over the audio converts as expected.

The Job / Queuing system is still behaving strangely
I found that checking the "Use Qt4 Version" helps. 
Checking in Synaptic it appears I have Qt 4 & 5 installed, presumably my system would default to the latest, Qt5, so the fact the the checkbox helps suggests that AVIDemux does NOT work with Qt5 only Qt4, is this the case?

Now the 9 jobs at least attempt to run. It runs 2 jobs at a time.
How is this decision made? # cores maybe?
How can I limit it to 1 Job at a time?
Although they are all identical except input and output files, some still fail.
Does AVIDemux keep any kind of log so I can troubleshoot? if so where? I don't see any entries in SysLog, and there are no logs in /var/log.

How sensitive is AVIDemux and the queueing system to spaces in paths and  / or filenames? I have not used Quotes for these.
The jobs which passed had spaces in the path but not the filename
The job which failed had spaces in both the path and the filename and was roughly twice the size of the other jobs.

Jan Gruuthuse

#2
Quoteso the fact the the checkbox helps suggests that AVIDemux does NOT work with Qt5 only Qt4, is this the case?
not exactly:
- avidemux runs only QT4, not QT5
- marking [V] use QT4 version, tells just not to use avidemux3_cli

Queue and Queue Job:
------------------------
avidemux3_cli is somewhat broken (my understanding)
In Avidemux Jobs, bottom left corner next to [Run jobs[Cleanup], mark [V] use QT4 version.

batch processing (condition: all files have the same amount of audio tracks)
First load a representative video of the videos you want to process.
Make all your required settings when finished from Menu:
-> File -> Tinypy Project -> Save As Project ->
- Give a recognisable name like mp3-22050, so you know what the job does.
- notice where you saved it.

Now edit the tinypy project:
adm = Avidemux()
adm.loadVideo("/media/jan/Werk/0xp1000/20150108 1614 - 4fun_TV - instant record.ts")
adm.clearSegments()
adm.addSegment(0, 0, 64160000)
adm.markerA = 0
adm.markerB = 64160000
adm.videoCodec("xvid4", "params=CQ=2", "profile=244", "rdMode=3", "motionEstimation=3", "cqmMode=0", "arMode=1", "maxBFrame=2", "maxKeyFrameInterval=200", "nbThreads=99", "qMin=2", "qMax=25", "rdOnBFrame=True", "hqAcPred=True"
, "optimizeChrome=True", "trellis=True")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"pol")
adm.audioAddTrack(0)
adm.audioCodec(0, "Lame", "bitrate=96", "preset=1", "quality=2", "disableBitReservoir=False");
adm.audioSetMixer(0, "STEREO");
adm.audioSetResample(0, 22050)
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MKV", "forceDisplayWidth=False", "displayWidth=1280")


add  info behind these lines, so next year you still know what it's supposed to do.
#PY  <- Needed to identify #
#--automatically built--
Each line starting with # and a space like:
# 4fun TV
# mp2 audio to mp3, 1 track
# mp2 audio to mp3, 1 track, bitrate 96 re sampled to 22050 Khz


You don't want to process the same video over and over again, just setting parameters for the same bunch of videos
Delete these lines:
adm.loadVideo("/media/jan/Werk/0xp1000/20150108 1614 - 4fun_TV - instant record.ts")
adm.clearSegments()
adm.addSegment(0, 0, 64160000)
adm.markerA = 0
adm.markerB = 64160000

Save the py job, it should look like this more or less depending on the settings applied to audio, video and

#PY  <- Needed to identify #
#--automatically built--
# 4fun TV
# mp2 audio to mp3, 1 track, bitrate 96 re sampled to 22050 Khz
# mpeg-ts to xvid4
adm = Avidemux()
adm.videoCodec("xvid4", "params=CQ=2", "profile=244", "rdMode=3", "motionEstimation=3", "cqmMode=0", "arMode=1", "maxBFrame=2", "maxKeyFrameInterval=200", "nbThreads=99", "qMin=2", "qMax=25", "rdOnBFrame=True", "hqAcPred=True"
, "optimizeChrome=True", "trellis=True")
adm.audioClearTracks()
adm.setSourceTrackLanguage(0,"pol")
adm.audioAddTrack(0)
adm.audioCodec(0, "Lame", "bitrate=96", "preset=1", "quality=2", "disableBitReservoir=False");
adm.audioSetMixer(0, "STEREO");
adm.audioSetResample(0, 22050)
adm.audioSetDrc(0, 0)
adm.audioSetShift(0, 0,0)
adm.setContainer("MKV", "forceDisplayWidth=False", "displayWidth=1280")


you can now use this tinypy project two ways:
Manual editing in avidemux from Menu -> Custom
For this purpose you save the tinypy project in ~/.avidemux6/custom (Linux, no idea where folder custom sits in windows)
If you use plenty of these jobs you can create some more folders suiting your needs.
I have these:
~/.avidemux6/custom
~/.avidemux6/custom/Audio
~/.avidemux6/custom/Conversion
This is how Custom looks like after doing so:

nebbish

Hi Jan, thanks for the comprehensive reply, I'll get stuck in to those scripts.

I also verified the Qt 5 & 5 issue

My linux Mint 17 (Ubuntu 14.04) has GTK2 and QT 4 & 5 installed

AVIDemux Qt uses Qt4 as mentioned in the Linux Install Wiki notes.
See http://www.avidemux.org/admWiki/doku.php?id=build:install_2.6

Multi Threading
----------------
I found the Multithreading Options in Preferences and the Wiki note
http://www.avidemux.org/admWiki/doku.php?id=using:multithreading
My understanding is that it is the codecs that are affected by multithreading, so I am surprised that AVIDemux tries to run more than one job at a time. Since a single job will make 100% use of CPU what is the point of running a second one in parallel.

Jan Gruuthuse

while batch processing you can call this tinypy project from a command line using this parameter:
--run ~/.avidemux6/custom/mp3-22050.py

#!/bin/bash
for FIL in `ls *ts | sort` ; do
  /usr/bin/avidemux3_qt4  --load "$FIL" --run ~/.avidemux6/custom/mp3-22050.py --save ${FIL%.*}.mkv --quit
done


Jan Gruuthuse

Quote from: nebbish on January 20, 2015, 07:44:38 AM
Multi Threading
----------------
I found the Multithreading Options in Preferences and the Wiki note
http://www.avidemux.org/admWiki/doku.php?id=using:multithreading
My understanding is that it is the codecs that are affected by multithreading, so I am surprised that AVIDemux tries to run more than one job at a time. Since a single job will make 100% use of CPU what is the point of running a second one in parallel.
Somewhere in the script starting twice avidemux? I'm not an ace in scripting. It all depends what you do exactly.
Starting Avidemux Jobs twice?
Or calling avidemux3 from a script?
You can run several avidemuxes, one running jobs, one for editing, would not recommend running 2 avidemux doing re-encoding.

Jan Gruuthuse

#6
Reason to use avidemux QT instead of GTK: GTK development is already halted for some time. If you have nvidia videocard supporting vdpau, it is worth looking at that to. Processing time improvement.
I don't know if these are usable for you: avidemux Cli/Qt 2.6.8 64-bit deb download ubuntu LTS. Otherwise consider building avidemux yourself.

nebbish

Thanks again for all the feedback, I will check out those details in the next day or so, busy with a sudden project right now.
However in the background I am continuing with my conversion manually.

The Issue with the Audio decoder not being remembered is definitely a problem. It is quite repeateable.
Open Avidemux > Load Video (mp4 H264&AAC) > Set Output to Mpeg4 ASP (xvid4) > set Audio to MP3(Lame) > Set Output to AVI(AVI not auto) > Save new filename.
File is saved. Open it in AVIDemux, INFO reports format as avi with XVID & MP3 - OK that's what we wanted.
Now without touching any settings, open new file > hit save > set output filename
File is saved. open it in AVIDemux, INFO reports format as avi with XVID & AAC - FAIL that's NOT what we wanted.
Now open new file > touch the settings keeping them the same > Save > set output filename
File is saved. Open it in AVIDemux, INFO reports format as avi with XVID & MP3 - OK that's what we wanted.

This is not a serious problem, but it is annoying when you have to wait some hours for the conversion and then discover it is wrong and has to be repeated.

Jan Gruuthuse

I believe audio tracks are reset everytime. For setting audio I use tinypy project:
Partially explained here: http://avidemux.org/smuf/index.php/topic,16339.msg71732.html#msg71732
I added sample of current audio settings (these can differ from provider to provider)