Avdump2 on Linux: Difference between revisions

Removed obsolete workaround
(Deleting files works now)
(Removed obsolete workaround)
Line 39: Line 39:
Avdump2 doesn’t reset the console properly when you abort it or when it runs into a Mono-specific error. You can restore the cursor with <tt>setterm -cursor on</tt> and a simple <tt>echo</tt> if you write a wrapper for that. See examples below.
Avdump2 doesn’t reset the console properly when you abort it or when it runs into a Mono-specific error. You can restore the cursor with <tt>setterm -cursor on</tt> and a simple <tt>echo</tt> if you write a wrapper for that. See examples below.


'''I can’t dump files that have spaces in their name, even if I put them in quotation marks.'''
== Wrapper Script ==
 
To make using Avdump2 more comfortable, you can use or modify this wrapper script to handle the workarounds. Save it as <tt>/usr/local/bin/avdump2cl</tt>, for example. This example assumes that you extracted Avdump2 to <tt>/usr/local/lib/avdump2</tt>.
This has been observed with Mono 2.4 but not with Mono 2.8. If it applies to you, you can add additional quotation marks to the parameters because Avdump2 can do its own quotation handling: <tt>Avdump2CL.exe -0 "\"file with spaces.mkv\""</tt> As you can’t use standard shell expansions like <tt>*.mkv</tt> with that, you’d better use the appropriate wrapper script from below.
 
== Wrapper Scripts ==
To make using Avdump2 more comfortable, you can use or modify one of these wrapper scripts to handle all the workarounds. Save it as <tt>/usr/local/bin/avdump2cl</tt>, for example. These examples assume that you extracted Avdump2 to <tt>/usr/local/lib/avdump2</tt>.


A simple wrapper to set the <tt>LD_LIBRARY_PATH</tt> and to fix the cursor after using ^C:
A simple wrapper to set the <tt>LD_LIBRARY_PATH</tt> and to fix the cursor after using ^C:
Line 56: Line 52:


if ! mono /usr/local/lib/avdump2/AVDump2CL.exe "$@" ; then
if ! mono /usr/local/lib/avdump2/AVDump2CL.exe "$@" ; then
  echo
  setterm -cursor on
fi
</pre>
A more elaborate wrapper to add quotation marks to filenames with spaces in them if your Mono version doesn’t handle them properly:
<pre>
#!/bin/bash
export LD_LIBRARY_PATH=/usr/local/lib/avdump2
declare -i i=0
declare -a params
while [ $# -gt 0 ]; do
  if [ -z "${1##* *}" ]; then
    params[$i]="\"${1}\""
  else
    params[$i]="${1}"
  fi
  shift
  i=$i+1
done
if ! mono /usr/local/lib/avdump2/AVDump2CL.exe "${params[@]}" ; then
   echo
   echo
   setterm -cursor on
   setterm -cursor on
Line 93: Line 64:
The output routine used to draw the Avdump2 progress bars is not very compatible with the <tt>curses</tt>-based output used by Mono. Enlarging the terminal window usually results in writing over previous lines and shrinking the terminal window usually results in crashes because Avdump2 tries to write to areas that don’t exist anymore.
The output routine used to draw the Avdump2 progress bars is not very compatible with the <tt>curses</tt>-based output used by Mono. Enlarging the terminal window usually results in writing over previous lines and shrinking the terminal window usually results in crashes because Avdump2 tries to write to areas that don’t exist anymore.


Solutions: Don’t resize the terminal window while Avdump2 is running or use the <tt>-w</tt> option to disable the progress bars.
Solutions: Don’t resize the terminal window while Avdump2 is running or use the <tt>-q</tt> option to disable the progress bars.


== Other Known Problems ==
== Other Known Problems ==
22

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.