compiling and running avidemux 2.5.5 on arm - Illegal instruction

Started by KlausDieter, September 09, 2013, 06:55:11 PM

Previous topic - Next topic

KlausDieter

Hello everyone,

this is my first post in this forum. I recently compiled avidemux 2.5.5 on my arm box with two minor patches:

The compile runs smoothly so I thought it would be time to avidemux to some good use. However when I try to do so I get:

avidemux --nogui --force-smart --run project.js --quit
*************************
  Avidemux v2.5.5
*************************
http://www.avidemux.org
Code      : Mean, JSC, Grant Pedersen
GFX       : Nestor Di, nestordi@augcyl.org
Design    : Jakub Misak
FreeBSD   : Anish Mistry, amistry@am-productions.biz
Audio     : Mihail Zenkov
Mac OS X  : Kuisathaverat, Harry van der Wolf
Win32     : Grant Pedersen

Compiler: GCC 4.6.3
Build Target: Linux
User Interface: CLI

Large file available: 1 offset

Initialising prefs
Directory /home/christof/.avidemux exists.Good.
Using /home/christof/.avidemux as base directory for prefs/jobs/...
option "codecs.svcd.enctype" not defined.
option "codecs.svcd.bitrate" not defined.
option "codecs.svcd.quantizer" not defined.
option "codecs.svcd.finalsize" not defined.
option "codecs.svcd.interlaced" not defined.
option "codecs.svcd.bff" not defined.
option "codecs.svcd.widescreen" not defined.
option "codecs.svcd.matrix" not defined.
option "codecs.svcd.gopsize" not defined.
option "codecs.svcd.maxbitrate" not defined.
option "codecs.dvd.enctype" not defined.
option "codecs.dvd.bitrate" not defined.
option "codecs.dvd.quantizer" not defined.
option "codecs.dvd.finalsize" not defined.
option "codecs.dvd.interlaced" not defined.
option "codecs.dvd.bff" not defined.
option "codecs.dvd.widescreen" not defined.
option "codecs.dvd.matrix" not defined.
option "codecs.dvd.gopsize" not defined.
option "codecs.dvd.maxbitrate" not defined.
option "codecs.xvid.enctype" not defined.
option "codecs.xvid.quantizer" not defined.
option "codecs.xvid.bitrate" not defined.
option "codecs.xvid.finalsize" not defined.
option "codecs.preferredcodec" not defined.
option "filters.autoload.path" not defined.
option "filters.autoload.active" not defined.
option "settings.mpegsplit" not defined.
option "feature.use_lavcodec_mpeg2" not defined.
option "feature.threading.x264" not defined.
option "feature.threading.xvid" not defined.
Preferences found and loaded
[cpuCaps]Checking CPU capabilities
[cpuCaps]End of CPU capabilities check (cpuMask :ffffffff)

[Locale] setlocale en_US.UTF-8
[Locale] Textdomain was messages
[Locale] Textdomain is now avidemux
[Locale] Files for avidemux appear to be in /usr/share/locale
[Locale] Test: _File

Initializing Dithering tables
Initializing postproc
Deleting post proc
updating post proc
Enabled type:3 strength:3

Registering Internal Filters
******************************

[ADM_ad_plugin] Scanning directory /usr/lib/ADM_plugins/audioDecoder/
[ADM_ad_plugin] Plugin loaded version 0.0.1, name libADM_ad_vorbis.so, desc: libVorbis decoder plugin for avidemux (c) Mean

[ADM_ad_plugin] Plugin loaded version 0.0.1, name libADM_ad_Mad.so, desc: LibMad decoder plugin for avidemux (c) Mean

[ADM_ad_plugin] Plugin loaded version 0.0.1, name libADM_ad_a52.so, desc: LibAC3 decoder plugin for avidemux (c) Mean

[ADM_ad_plugin] Plugin loaded version 0.0.1, name libADM_ad_faad.so, desc: Faad2 decoder plugin for avidemux (c) Mean

[ADM_ad_plugin] Scanning done, found 4 codec
[ADM_vf_plugin] Scanning directory /usr/lib/ADM_plugins/videoFilter/
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_mcdeint.so as mcDeinterlace
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_soften.so as Soften
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_denoise3dhq.so as MPlayer hqdn3d
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_dropOut.so as Drop
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_avisynthResize_cli.so as Resize
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Hue_cli.so as MPlayer hue
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_chromashift_cli.so as Chroma shift
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_decimate.so as Decomb Decimate
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_addborders.so as Add black borders
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_mSmooth.so as MSmooth by Donald Graft
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_asharp_cli.so as asharp
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_hzStackField.so as Horizontal Stack Field
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_blackenBorders.so as Blacken borders
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_largemedian.so as Median (5x5)
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_crop_cli.so as Crop
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Pulldown.so as Pulldown
/usr/lib/ADM_plugins/videoFilter//libADM_vf_curveEditor_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_fastconvolutiongauss.so as Gauss smooth
/usr/lib/ADM_plugins/videoFilter//libADM_vf_contrast_qt4.so:WrongUI
/usr/lib/ADM_plugins/videoFilter//libADM_vf_cnr2_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_sub_cli.so as Subtitler
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_mergeField.so as Merge fields
/usr/lib/ADM_plugins/videoFilter//libADM_vf_mpdelogo_qt4.so:WrongUI
/usr/lib/ADM_plugins/videoFilter//libADM_vf_contrast_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_ssa.so as ASS
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_fastconvolutionsharpen.so as Sharpen
/usr/lib/ADM_plugins/videoFilter//libADM_vf_eq2_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_fastconvolutionmedian.so as Median
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Tisophote.so as TIsophote
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_keepOddField.so as Keep odd fields
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_resampleFps.so as Resample fps
/usr/lib/ADM_plugins/videoFilter//libADM_vf_colorYUV_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_FluxSmooth.so as FluxSmooth
/usr/lib/ADM_plugins/videoFilter//libADM_vf_asharp_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_telecide.so as Decomb Telecide
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_mSharpen.so as MSharpen
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_vflip.so as Vertical flip
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_fade.so as Fade
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Mosaic.so as mosaic
/usr/lib/ADM_plugins/videoFilter//libADM_vf_sub_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_denoise3d.so as MPlayer denoise3d
/usr/lib/ADM_plugins/videoFilter//libADM_vf_avisynthResize_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_smartSwapField.so as Smart swap fields
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_blendDgBob.so as DG Bob
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_rotate.so as Rotate
/usr/lib/ADM_plugins/videoFilter//libADM_vf_mpdelogo_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_swapuv.so as Swap U and V
/usr/lib/ADM_plugins/videoFilter//libADM_vf_equalizer_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_mplayerResize_cli.so as MPlayer resize
/usr/lib/ADM_plugins/videoFilter//libADM_vf_equalizer_qt4.so:WrongUI
/usr/lib/ADM_plugins/videoFilter//libADM_vf_colorYUV_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_separateField.so as Separate Fields
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vidChromaU.so as Chroma U
/usr/lib/ADM_plugins/videoFilter//libADM_vf_eq2_qt4.so:WrongUI
/usr/lib/ADM_plugins/videoFilter//libADM_vf_hue_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_reverse.so as Reverse
/usr/lib/ADM_plugins/videoFilter//libADM_vf_chromaShift_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Stabilize.so as Light denoiser.
Terminate class is calling in start
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_avsfilter.so as Avisynth script filter (AvsFilter, ver 0.8a)
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_keepEvenField.so as Keep even fields
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_fastconvolutionmean.so as Mean
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_palShift.so as PAL field shift
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_lavDeinterlace.so as libavcodec deinterlacer
/usr/lib/ADM_plugins/videoFilter//libADM_vf_Crop_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_cnr2_cli.so as Cnr2
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_tdeint.so as TDeint
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_logo.so as Logo
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_colorYUV_cli.so as Avisynth ColorYUV
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_forcedPP.so as Forced postprocessing
/usr/lib/ADM_plugins/videoFilter//libADM_vf_chromaShift_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_stackField.so as Stack fields
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_lumaonly.so as Luma only
/usr/lib/ADM_plugins/videoFilter//libADM_vf_mplayerResize_gtk.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_smartPalShift.so as PAL smart
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_blendRemoval.so as Blend Removal
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_yadif.so as yadif
/usr/lib/ADM_plugins/videoFilter//libADM_vf_mplayerResize_qt4.so:WrongUI
/usr/lib/ADM_plugins/videoFilter//libADM_vf_sub_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Whirl.so as Whirl
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_kernelDeint.so as KernelDeint
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_swapField.so as Swap fields
/usr/lib/ADM_plugins/videoFilter//libADM_vf_asharp_gtk.so:WrongUI
/usr/lib/ADM_plugins/videoFilter//libADM_vf_cnr2_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Denoise.so as Denoise
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_unstackField.so as Unstack fields
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vidChromaV.so as Chroma V
/usr/lib/ADM_plugins/videoFilter//libADM_vf_hue_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_equalizer_cli.so as Luma equalizer
/usr/lib/ADM_plugins/videoFilter//libADM_vf_crop_qt4.so:WrongUI
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_mpdelogo_cli.so as MPlayer delogo
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_eq2_cli.so as MPlayer eq2
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_vlad.so as Temporal Cleaner
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_contrast_cli.so as Contrast
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Deinterlace.so as Deinterlace
[Filters] Registered filter /usr/lib/ADM_plugins/videoFilter//libADM_vf_Delta.so as Luma delta
/usr/lib/ADM_plugins/videoFilter//libADM_vf_avisynthResize_gtk.so:WrongUI
[ADM_vf_plugin] Scanning done
[ADM_av_plugin] Scanning directory /usr/lib/ADM_plugins/audioDevices/
Name :Alsa ApiVersion :1
[Filters] Registered filter /usr/lib/ADM_plugins/audioDevices//libADM_av_alsa.so as  Alsa audio device (c) mean
[ADM_av_plugin] Scanning done
[ADM_ae_plugin] Scanning directory /usr/lib/ADM_plugins/audioEncoders/
[AudioEncoder] Loaded LavMP2 version 01.00.00 wavTag :0x50
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_lav_mp2.so as  MP2 LavCodec encoder plugin Mean 2008
[AudioEncoder] Loaded LavAC3 version 01.00.00 wavTag :0x2000
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_lav_ac3.so as  AC3 LavEncoder encoder plugin Mean 2008
[AudioEncoder] Loaded Vorbis version 01.00.00 wavTag :0x676f
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_vorbis.so as  Vorbis encoder plugin Mean 2008
[AudioEncoder] Loaded TwoLame version 01.00.00 wavTag :0x50
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_twolame.so as  TwoLame MP2 encoder plugin Mean 2008
[AudioEncoder] Loaded Faac version 01.00.00 wavTag :0xff
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_faac.so as  Faac AAC encoder plugin Mean 2008
[AudioEncoder] Loaded PCM version 01.00.00 wavTag :0x1
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_pcm.so as  PCM encoder plugin Mean 2008
[AudioEncoder] Loaded Lame version 01.00.00 wavTag :0x55
[AudioEncoder] Registered filter /usr/lib/ADM_plugins/audioEncoders//libADM_ae_lame.so as  Lame MP3 encoder plugin Mean 2008
[ADM_ae_plugin] Scanning done
[ADM_ad_plugin] Scanning directory /home/christof/.avidemux/plugins/audioDecoder/
[ADM_ad_plugin] Cannot parse plugin
[ADM_vf_plugin] Scanning directory /home/christof/.avidemux/plugins/videoFilter/
[ADM_vf_plugin] Cannot parse plugin
[ADM_vidEnc_plugin] Scanning directory /usr/lib/ADM_plugins/videoEncoder/
ignored: avcodec
ignored: mpeg2enc
ignored: xvid
ignored: x264
[ADM_vidEnc_plugin] Plugin loaded version 1.0.0, filename libADM_vidEnc_mpeg2enc.so, desc: MPEG-1 video encoder plugin for Avidemux (c) Mean/Gruntster
[ADM_vidEnc_plugin] Plugin loaded version 1.0.0, filename libADM_vidEnc_mpeg2enc.so, desc: MPEG-2 video encoder plugin for Avidemux (c) Mean/Gruntster
[Xvid] Initialising Xvid
[Xvid] Build: xvid-1.3.2
[Xvid] SIMD supported: (80)
[ADM_vidEnc_plugin] Plugin loaded version 1.0.1, filename libADM_vidEnc_xvid.so, desc: Xvid video encoder plugin for Avidemux (c) Mean/Gruntster
Illegal instruction


Illegal instruction. This looks like something got compiled using the wrong mcpu or march.
Grepping in the built tree I can find a couple of mcpu=armv4t in the ffmpeg tree while this is a armv5te host.

Now I have a couple of questions:

  • Am I on the right track assuming that this is actually ffmpegs fault?
  • Is there a clean set of patches I could try to get avidemux to build properly on my arm box?

Any help in getting avidemux to run on my arm box is greatly appreciated.

mean

It would be better to try with the 2.6.x branch
I had it almost/mostly running on a marvell powered chip

KlausDieter

Hi Mean,

This is a Marvell Chip having the armv5te architecture.

I am hoping to cut video data using without reencoding it on the arm box. Won't I lose frame accuracy when cutting using 2.6 instead of 2.5?

I had tried with 2.6.4 but I got strange errors as well. Since 2.6.5 is out I will re-try using the most recent version.
I am currently trying to compile 2.6 with a minor patch:
I manually defined FPM_ARM in avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/ADM_libMad/fixed.h

Not sure whether the build system should actually do this.

Edit:
I also needed to define FPM_ARM in avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/ADM_libMad/mad.h
however something with the setup of the plugins went wrong so I am rebuilding with a vanilla bootStrap.bash

Edit2:
The build using the vanilla bootStrap.bash worked fine however now I am stuck as I am trying to run a script from avidemux 2.5
That is why I am building avidemux now on my x86-64 machine as well to obtain a sample js-file that I could use to adapt the old 2.5 scripts.

fyi: this is my script:
  //AD                                                                                                                                       
  var app = new Avidemux();                                                                                                                   
  app.load("/mnt/data/temp/multicuttest/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi");                                   
  app.rebuildIndex();                                                                                                                         
  app.clearSegments();                                                                                                                       
  app.addSegment(0,12016,24279)                                                                                                               
  app.addSegment(0,51514,21796)                                                                                                               
  app.addSegment(0,85218,13812)                                                                                                               
  app.video.setPostProc(3,3,0);                                                                                                               
  app.video.setFps1000=25000;                                                                                                                 
  app.video.codec("Copy","CQ=4","0 ");                                                                                                       
  app.audio.reset();                                                                                                                         
  app.audio.codec("copy",128,0,"");                                                                                                           
  app.audio.normalizeMode=0;                                                                                                                 
  app.audio.normalizeValue=0;                                                                                                                 
  app.audio.delay=0;                                                                                                                         
  app.audio.mixer="NONE";                                                                                                                     
  app.audio.scanVBR=1;                                                                                                                       
  app.setContainer="AVI";                                                                                                                     
  setSuccess(app.save("/mnt/data/temp/multicuttest/cut/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi-cut.avi"));         

KlausDieter

I converted the js script knowing that python is the preferred way now but I can migrate when I know avidemux is working properly on arm.

This is my script now:


  //AD                                                                                                                                       
  adm.loadVideo("/mnt/data/temp/multicuttest/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi");                                //adm.rebuildIndex();                                                                                                                       
  adm.clearSegments();                                                                                                                       
  adm.addSegment(0,12016,24279)                                                                                                               
  adm.addSegment(0,51514,21796)                                                                                                               
  adm.addSegment(0,85218,13812)                                                                                                               
  adm.videoCodec("Copy");                                                                                                                     
  adm.audioCodec("copy");                                                                                                                     
  adm.setContainer("AVI", "odmlType=1");                                                                                                     
  adm.save("/mnt/data/temp/multicuttest/cut/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi-cut.avi");


Unfortunately avidemux stops processing the file without generating any output data.
The log is rather large so I posted it here: http://kdserv.dyndns.org/pastebin/avidemux3-output.txt

To cross-reference whether this is an arm issue or not I ran the same js-script on my x86 box and avidemux 2.6.5.
No output was created there either.

What might be the cause of no output file  appearing?

mean

The segment reference is in microseconds,not in frame
(and it must be exactly the right value)

KlausDieter

ok, so I still have to convert the frames to microseconds That is a point I have to take up in the script in order to get the correct cuts.
I noticed however that when I use the --save parameter on the commandline instead of the js I can produce output on my x86 system. On my arm-system however avidemux crashes with that log http://kdserv.dyndns.org/pastebin/avidemux3-output-save.txt

I am assuming that this is not due to the fact that I was wrongly using frames instead of microseconds but a different issue that might be due to the fact that this is arm as it does not happen on x86.
If needed I can run avidemux from gdb but I would only do it if it leads to new information. Please advise for the next step.

mean

That crash seems to be  caused by invalid timestamps (not sure)
If you do just load foobar.avi/save foobar.avi does it work well ?

I assume you are using the cli version on arm ?


KlausDieter

yeah, this is the cli version on arm.

this is how I run avidemux:

avidemux3_cli --nogui --run project.js --save /mnt/data/temp/multicuttest/cut/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi-cut.avi


as per your suggestion I ran

avidemux3_cli --nogui --load /mnt/data/temp/multicuttest/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi --save /mnt/data/temp/multicuttest/cut/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi-cut.avi


this produces an output file having roughly the same size so it seems like avidemux is actually working on arm, which is great news!  :)

However even when using the save option inside a script there is no output generated (logfile: http://kdserv.dyndns.org/pastebin/avidemux-onlyloadandsave.txt )
This is the script that I used:

  //AD
  adm.loadVideo("/mnt/data/temp/multicuttest/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi");                                                                                                                                               
  adm.videoCodec("Copy");                                                                                                                     
  adm.audioCodec("copy");                                                                                                                     
  adm.setContainer("AVI", "odmlType=1");                                                                                                                                                                                                                     
  adm.save("/mnt/data/temp/multicuttest/cut/Battlestar_Galactica_13.06.27_22-15_tele5_60_TVOON_DE.mpg.HQ.avi-cut.avi");     



KlausDieter

now I tried on my x86 box (as it is faster and I actually have local access) to cut the input movie.
However avidemux complains that it cannot find a frame at the specific time interval
The video data has 25fps. I would like to cut at frame 56117 with a duration of 29964 frames.

So I came up with the following times in microseconds:
Start=2244680000
Duration=1198560000


avidemux now tells me:
[addSegment]  Adding a new segment
  [TimeToFrame]  We reached frame 56118 with a PTS of 2244719872 when looking for PTS 2244680000
  [dtsFromPts]  Cannot get frame with pts=2244680 ms


Allright I thought, lets try tocut one frame later and I entered 2244719872 as a time value in my script.
echo "2244719872*25/1000000"|bc -l
56117.99680000000000000000


even though this is not where the frame should be.
That means I am using this js:


//AD
adm.loadVideo("/home/erika/nobackup/cut/uncut/bla.avi");
adm.clearSegments();
adm.addSegment(0,433520000,1424560000);
adm.addSegment(0,2244719872,1198560000);
adm.addSegment(0,3762880000,2454760000);
adm.videoCodec("Copy");
adm.audioCodec("copy");
adm.setContainer("AVI", "odmlType=1");
adm.save("/home/erika/nobackup/cut/blub.avi");


However avidemux3_cli yells at me:

  [checkCutsAreOnIntra]  seg:0 imgDTS=432360000
  [checkCutsAreOnIntra]  Segment 0 does not start on a known DTS ( 00:07:12,360 )
  [checkCutsAreOnIntra]  expected ( 00:07:13,520 )
********************************************************************************
* Question *
* The video is in copy mode but the cut points are not on keyframes.
The video will be saved but there will corruption at cut point(s).
Do you want to continue anyway ? *
********************************************************************************
Yes or No (Y/y or N/n) :
y
[ADM_videoStreamCopy]  Creating copy video stream, start time=0,00 s
  [getPKFramePTS]   No previous previous keyfr for frameTime 1 in ref 0 seg:0 nkTime 432360 refTime:433520 ms startTime=433520 r=1
  [ADM_videoStreamCopy]  Cannot find previous keyframe

*********** BACKTRACK **************
/usr/local/lib/libADM_core6.so(ADM_backTrack+0x5c) [0x7f2a39c0206c]:0:<ADM_backTrack>:-2
avidemux3_cli(_ZN17ADM_EditorSegment16intraTimeToFrameEjm+0x170) [0x43b9e0]:1:<ADM_EditorSegment::intraTimeToFrame(unsigned int, unsigned long)>:0
avidemux3_cli(_ZN12ADM_Composer24GoToIntraTime_noDecodingEmPj+0x84) [0x4379a4]:2:<ADM_Composer::GoToIntraTime_noDecoding(unsigned long, unsigned int*)>:0
avidemux3_cli(_ZN19ADM_videoStreamCopyC2Emm+0xf7) [0x426b47]:3:<ADM_videoStreamCopy::ADM_videoStreamCopy(unsigned long, unsigned long)>:0
avidemux3_cli(_ZN8admSaver10setupVideoEv+0x7e) [0x42472e]:4:<admSaver::setupVideo()>:0
avidemux3_cli(_ZN8admSaver4saveEv+0x93) [0x424b63]:5:<admSaver::save()>:0
avidemux3_cli(_Z6A_SavePKc+0x29) [0x424ec9]:6:<A_Save(char const*)>:0
avidemux3_cli(_Z10automationv+0x343) [0x450473]:7:<automation()>:0
avidemux3_cli(_Z9UI_RunAppv+0x12) [0x451442]:8:<UI_RunApp()>:0
avidemux3_cli(_Z13startAvidemuxiPPc+0x43d) [0x4253fd]:9:<startAvidemux(int, char**)>:0
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f2a36edfea5]:10:<__libc_start_main>:-2
avidemux3_cli() [0x41de31]:11:<avidemux3_cli() [0x41de31]>:-2
*********** BACKTRACK **************
22:20:04 Call terminate!!!
Cleaning up
[deleteAll]  [Editor] Deleting all videos
[lavc] Destroyed
[close]  [Avi] Closing...
  [~ADM_aviAudioAccess]  Deleting audio track from avi
  [close]  [Avi] Closing...
  [~ADM_edAudioTrackFromVideo]  Destroying edAudio from video track 0 at 23d79e0
  [deleteAll]  [Editor] Deleting all videos
  [cleanup]  Deleting post proc
  [deleteAll]  [Editor] Deleting all videos
[Script] QtScript INFO - Closing QtScript
[Script] Tinypy INFO - Closing Python
[Script] SpiderMonkey INFO - Closing Spidermonkey
[destroy]  Destroying preview
  [ADM_ad_cleanup]  Purging audio decoder
  [ADM_vf_clearFilters]  clear filters
  [ADM_vf_cleanup]  Destroying video filter list
--End of cleanup--

Images stat:
___________
Max memory consumed (MB)     : 0
Current memory consumed (MB) : 0
Max image used               : 0
Cur image used               : 0
[onexit] 
Goodbye...


It seems the file might be broken or the file cannot be processed by the copy.
Out of curiosity I tried encoding the result with mpeg4. This works but is not an option on my arm machine. I need some smart copy functionality that if encoding is needed limits that to small areas of the video.
What should I do?

KlausDieter

today I felt lucky and put the avi file into a mkv container before processing it with avidemux.
Now there were no changes necessary for the timing.

However I still get the below error and no video output.
What can I do to work around this?

  [checkCutsAreOnIntra]  Segment 0 does not start on a known DTS ( 00:07:12,400 )
  [checkCutsAreOnIntra]  expected ( 00:07:13,520 )
********************************************************************************
* Question *
* The video is in copy mode but the cut points are not on keyframes.
The video will be saved but there will corruption at cut point(s).
Do you want to continue anyway ? *
********************************************************************************
Yes or No (Y/y or N/n) :
y
[ADM_videoStreamCopy]  Creating copy video stream, start time=0,00 s
  [getPKFramePTS]   No previous previous keyfr for frameTime 1 in ref 0 seg:0 nkTime 432400 refTime:433520 ms startTime=433520 r=1
  [ADM_videoStreamCopy]  Cannot find previous keyframe

*********** BACKTRACK **************
/usr/local/lib/libADM_core6.so(ADM_backTrack+0x5c) [0x7fe87909206c]:0:<ADM_backTrack>:-2
avidemux3_cli(_ZN17ADM_EditorSegment16intraTimeToFrameEjm+0x170) [0x43b9e0]:1:<ADM_EditorSegment::intraTimeToFrame(unsigned int, unsigned long)>:0
avidemux3_cli(_ZN12ADM_Composer24GoToIntraTime_noDecodingEmPj+0x84) [0x4379a4]:2:<ADM_Composer::GoToIntraTime_noDecoding(unsigned long, unsigned int*)>:0
avidemux3_cli(_ZN19ADM_videoStreamCopyC2Emm+0xf7) [0x426b47]:3:<ADM_videoStreamCopy::ADM_videoStreamCopy(unsigned long, unsigned long)>:0
avidemux3_cli(_ZN8admSaver10setupVideoEv+0x7e) [0x42472e]:4:<admSaver::setupVideo()>:0
avidemux3_cli(_ZN8admSaver4saveEv+0x93) [0x424b63]:5:<admSaver::save()>:0
avidemux3_cli(_Z6A_SavePKc+0x29) [0x424ec9]:6:<A_Save(char const*)>:0
avidemux3_cli(_Z10automationv+0x343) [0x450473]:7:<automation()>:0
avidemux3_cli(_Z9UI_RunAppv+0x12) [0x451442]:8:<UI_RunApp()>:0
avidemux3_cli(_Z13startAvidemuxiPPc+0x43d) [0x4253fd]:9:<startAvidemux(int, char**)>:0
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fe87636fea5]:10:<__libc_start_main>:-2
avidemux3_cli() [0x41de31]:11:<avidemux3_cli() [0x41de31]>:-2
*********** BACKTRACK **************
15:49:16 Call terminate!!!
Cleaning up
[deleteAll]  [Editor] Deleting all videos
[lavc] Destroyed
[~ADM_edAudioTrackFromVideo]  Destroying edAudio from video track 0 at 21bc850
  [deleteAll]  [Editor] Deleting all videos
  [cleanup]  Deleting post proc
  [deleteAll]  [Editor] Deleting all videos
[Script] QtScript INFO - Closing QtScript
[Script] Tinypy INFO - Closing Python
[Script] SpiderMonkey INFO - Closing Spidermonkey
[destroy]  Destroying preview
  [ADM_ad_cleanup]  Purging audio decoder
  [ADM_vf_clearFilters]  clear filters
  [ADM_vf_cleanup]  Destroying video filter list
--End of cleanup--

Images stat:
___________
Max memory consumed (MB)     : 0
Current memory consumed (MB) : 0
Max image used               : 0
Cur image used               : 0
[onexit] 

KlausDieter

with the following project.js the error is different:


adm.loadVideo("/home/erika/nobackup/Der_rosarote_Panther_13.08.13_22-05_sixx_95_TVOON_DE.mpg.avi.mkv");
adm.clearSegments();
adm.addSegment(0,433520000,1424560000);
adm.addSegment(0,2244680000,1198560000);
adm.addSegment(0,3762880000,2454760000);
adm.videoCodec("Copy", "CQ=4");
adm.audioCodec("copy");
adm.setContainer("MKV", "odmlType=1");

this time I cannot see an error at all, just a crash:
http://kdserv.dyndns.org/pastebin/avidemux-crash-smartcopy.txt


mean

do you compute the timestamps or extract the ones given by avidemux project ?
Computing the timestamps does not work as there is no simple rule such as time=frameno*timebase

KlausDieter

well that might be the issue then.
This is actually a file by onlinetvrecorder.com and I am trying to cut it using the data from a cutlist.
In there is a timestamp as well as a frame number.

All my previous tries used the timestamp from the cutlist that is calculated by the rule: time = frameno * timebase.
Since you say that rule does not apply I guess I will need a different approach. Assuming the frame number is the correct point to cut, how would I calculate the correct timestamp using avidemux?

KlausDieter

actually, this is probably not the problem.
Yes, the timing might be off but even when selecting the times in avidemux3_qt I get the given crash.

please findbelow the log and the js.

  [checkCutsAreOnIntra]  Segment 0 does not start on a known DTS ( 00:07:12,400 )
  [checkCutsAreOnIntra]  expected ( 00:07:13,520 )
********************************************************************************
* Question *
* The video is in copy mode but the cut points are not on keyframes.
The video will be saved but there will corruption at cut point(s).
Do you want to continue anyway ? *
********************************************************************************
Yes or No (Y/y or N/n) :
y
[ADM_videoStreamCopy]  Creating copy video stream, start time=0,00 s
  [getPKFramePTS]   No previous previous keyfr for frameTime 1 in ref 0 seg:0 nkTime 432400 refTime:433520 ms startTime=433520 r=1
  [ADM_videoStreamCopy]  Cannot find previous keyframe

*********** BACKTRACK **************
/usr/local/lib/libADM_core6.so(ADM_backTrack+0x5c) [0x7f56e48fa06c]:0:<ADM_backTrack>:-2
avidemux3_cli(_ZN17ADM_EditorSegment16intraTimeToFrameEjm+0x170) [0x43b9e0]:1:<ADM_EditorSegment::intraTimeToFrame(unsigned int, unsigned long)>:0
avidemux3_cli(_ZN12ADM_Composer24GoToIntraTime_noDecodingEmPj+0x84) [0x4379a4]:2:<ADM_Composer::GoToIntraTime_noDecoding(unsigned long, unsigned int*)>:0
avidemux3_cli(_ZN19ADM_videoStreamCopyC2Emm+0xf7) [0x426b47]:3:<ADM_videoStreamCopy::ADM_videoStreamCopy(unsigned long, unsigned long)>:0
avidemux3_cli(_ZN8admSaver10setupVideoEv+0x7e) [0x42472e]:4:<admSaver::setupVideo()>:0
avidemux3_cli(_ZN8admSaver4saveEv+0x93) [0x424b63]:5:<admSaver::save()>:0
avidemux3_cli(_Z6A_SavePKc+0x29) [0x424ec9]:6:<A_Save(char const*)>:0
avidemux3_cli(_Z10automationv+0x343) [0x450473]:7:<automation()>:0
avidemux3_cli(_Z9UI_RunAppv+0x12) [0x451442]:8:<UI_RunApp()>:0
avidemux3_cli(_Z13startAvidemuxiPPc+0x43d) [0x4253fd]:9:<startAvidemux(int, char**)>:0
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f56e1bd7ea5]:10:<__libc_start_main>:-2
avidemux3_cli() [0x41de31]:11:<avidemux3_cli() [0x41de31]>:-2
*********** BACKTRACK **************
18:48:03 Call terminate!!!
Cleaning up
[deleteAll]  [Editor] Deleting all videos
[lavc] Destroyed
[~ADM_edAudioTrackFromVideo]  Destroying edAudio from video track 0 at 19c4070
  [deleteAll]  [Editor] Deleting all videos
  [cleanup]  Deleting post proc
  [deleteAll]  [Editor] Deleting all videos
[Script] QtScript INFO - Closing QtScript
[Script] Tinypy INFO - Closing Python
[Script] SpiderMonkey INFO - Closing Spidermonkey
[destroy]  Destroying preview
  [ADM_ad_cleanup]  Purging audio decoder
  [ADM_vf_clearFilters]  clear filters
  [ADM_vf_cleanup]  Destroying video filter list
--End of cleanup--

Images stat:
___________
Max memory consumed (MB)     : 0
Current memory consumed (MB) : 0
Max image used               : 0
Cur image used               : 0
[onexit] 
Goodbye...

%                                                                                                                                           erika@siegfried%                                                                                                                -- INSERT --
erika@siegfried% cat test.js                                                                                                    -- INSERT --
//AD  <- Needed to identify //
//--automatically built--


adm.loadVideo("/home/erika/nobackup/Der_rosarote_Panther_13.08.13_22-05_sixx_95_TVOON_DE.mpg.avi.mkv");
adm.clearSegments();
adm.addSegment(0, 433520000, 1424600000);
adm.addSegment(0, 2244720000, 1198560000);
adm.addSegment(0, 3762920000, 2454720000);
adm.markerA = 0;
adm.markerB = 5077880000;
adm.videoCodec("Copy");
adm.audioCodec(0, "copy");
adm.setContainer("MKV", "forceDisplayWidth=False", "displayWidth=1280");


mean

My guess is that your editing does not contain any keyframe at start.
It is not handled very gracefully as of now