Damn Small Linux (DSL) Forums
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2014, 03:50:18 AM

Login with username, password and session length
News
The new DSL forums are now open.
Stats
297728 Posts in 294151 Topics by 232 Members
Latest Member: MLAC
Search:     Advanced search
* Home Help Search Login Register
Get The Official Damn Small Linux Book. Great VPS hosting provided by Tektonic

  Show Posts
Pages: [1]
1  MyDSL Extensions / Extension Development / Re: synchronal stopwatch on: April 25, 2014, 11:19:45 AM
When I have a video file compound of several other files, in which I had to change volume, I must synchronize every sound file separately, so I have to know the right place to begin each take.
What do you think I can do with ffmpeg?
2  MyDSL Extensions / Extension Development / Re: synchronal stopwatch on: April 22, 2014, 06:56:23 AM
I need time displayed in, at least hundredth of seconds to adjust sound-delay in Audacity.
3  MyDSL Extensions / Extension Development / Re: synchronal stopwatch on: April 21, 2014, 08:42:49 AM
Quote
TIMEFORMAT=%E;
total=0;nl=$'\n';key=go; while [[ $key != 's' ]]; do result=$( (time read -sn1; echo "$REPLY") 2>&1 );result=${result/$nl/ };key=${result#* };lap=${result% *}; thou=${lap#0};thou=${thou/.};let total+=$thou;echo "Lap $lap"; done; echo "Total ${total:0:${#total} - 3}.${total: -3:3}"
unset TIMEFORMAT

This one looks interesting to me. I had managed to have those lap-times addition-ed instead of separated. But when it begins to count more than 1 minute it keeps on counting only seconds. For that the next one could be better, but that one can't be started together with mplayer. I thought I'll mix the 2 watches together, but it seems to be in different languages. I'm a new-by in scripting. I also noticed that when I start mplayer, in "the terminal" it gives the elapsed seconds (like the first stopwatch) , so if I could put that in an order of "minutes, seconds, milliseconds",...      But where? I have been searching, and nothing appeared.

Quote
#!/bin/sh

# A command line Stopwatch

# License: LGPLv2
# Author:
#    http://www.pixelbeat.org/
# Notes:
#    This script starts a few processes per lap, in addition to
#    the shell loop processing, so the assumption is made that
#    this takes an insignificant amount of time compared to
#    the response time of humans (~.1s) (or the keyboard
#    interrupt rate (~.05s)).
#    '?' for splits must be entered twice if characters
#    (erroneously) entered before it (on the same line).
#    '?' since not generating a signal may be slightly delayed
#    on heavily loaded systems.
#    Lap timings on ubuntu may be slightly delayed due to:
#    https://bugs.launchpad.net/bugs/62511
# Changes:
#    V1.0, 23 Aug 2005, Initial release
#    V1.1, 26 Jul 2007, Allow both splits and laps from single invocation.
#                       Only start timer after a key is pressed.
#                       Indicate lap number
#                       Cache programs at startup so there is less error
#                       due to startup delays.
#    V1.2, 01 Aug 2007, Work around `date` commands that don't have nanoseconds.
#                       Use stty to change interrupt keys to space for laps etc.
#                       Ignore other input as it causes problems.
#    V1.3, 01 Aug 2007, Testing release.
#    V1.4, 02 Aug 2007, Various tweaks to get working under ubuntu and Mac OS X.
#    V1.5, 27 Jun 2008, set LANG=C as got vague bug report about it.

export LANG=C

ulimit -c 0   #no cores from SIGQUIT
trap '' TSTP  #ignore Ctrl-Z just in case
save_tty=`stty -g` && trap "stty $save_tty" EXIT #restore tty on exit
stty quit ' ' #space for laps rather than Ctrl-\
stty eof  '?' #? for splits rather than Ctrl-D
stty -echo    #don't echo input

cache_progs() {
    stty > /dev/null
    date > /dev/null
    grep . < /dev/null
    (echo "import time" | python) 2> /dev/null
    bc < /dev/null
    sed '' < /dev/null
    printf '1' > /dev/null
    /usr/bin/time false 2> /dev/null
    cat < /dev/null
}
cache_progs #to minimise startup delay

date +%s.%N | grep -qF 'N' && use_python=1 #if `date` doesn't have nanoseconds
now() {
    if [ "$use_python" ]; then
        echo "import time; print time.time()" 2>/dev/null | python
    else
        printf "%.2f" `date +%s.%N`
    fi
}

fmt_seconds() {
    seconds=$1
    mins=`echo $seconds/60 | bc`
    if [ "$mins" != "0" ]; then
        seconds=`echo "$seconds - ($mins*60)" | bc`
        echo "$mins:$seconds"
    else
        echo "$seconds"
    fi
}

total() {
    end=`now`
    total=`echo "$end - $start" | bc`
    fmt_seconds $total
}

stop() {
    [ "$lapped" ] && lap "$laptime" "display"
    total
    exit
}

lap() {
    laptime=`echo "$1" | sed -n 's/.*real[^0-9.]*\(.*\)/\1/p'`
    [ ! "$laptime" -o "$laptime" = "0.00" ] && return #signals too frequent
    laptotal=`echo $laptime+0$laptotal | bc`
    if [ "$2" = "display" ]; then
        lapcount=`echo 0$lapcount+1 | bc`
        laptime=`fmt_seconds $laptotal`
        echo $laptime "($lapcount)"
        lapped="true"
        laptotal="0"
    fi
}

echo -n "Space for lap | ? for split | Ctrl-C to stop | Space to start...">&2

while true; do
    trap true INT QUIT #set signal handlers
    laptime=`/usr/bin/time -p 2>&1 cat >/dev/null`
    ret=$?
    trap '' INT QUIT #ignore signals within this script
    if [ $ret -eq 1 -o $ret -eq 2 -o $ret -eq 130 ]; then #SIGINT = stop
        [ ! "$start" ] && { echo >&2; exit; }
        stop
    elif [ $ret -eq 3 -o $ret -eq 131 ]; then #SIGQUIT = lap
        if [ ! "$start" ]; then
            start=`now` || exit 1
            echo >&2
            continue
        fi
        lap "$laptime" "display"
    else #eof = split
        [ ! "$start" ] && continue
        total
        lap "$laptime" #update laptotal
    fi
done
4  MyDSL Extensions / Extension Development / Re: synchronal stopwatch on: April 18, 2014, 08:12:52 AM
Thanks for the information but,

every stopwatch has a start-button.
I want that button to be activated at appearance from the command line if possible. So that I can do "mplayer myfile.avi | stopwatch (-?)".
It's as if I want to launch Audacity with "audacity myfile.mp3 -start", and it already runs when it appears, which it doesn't by default.

Thanks
5  MyDSL Extensions / Extension Development / synchronal stopwatch on: April 17, 2014, 01:45:50 PM
Hello

 When I'm doing video stuff, I have found out that a combination of Mplayer with a stopwatch works fine to make sound and image going synchronal later on in Avidemux and Audacity. As a result of my low cpu (=666MHz), Avidemux isn't synchronal.
I managed to install a stopwatch from Debian Etch. The only problem now is that I can't launch it (started) together with Mplayer . I always have to start the stopwatch manually after appearance, which is tricky.
So I was wandering if someone knows about a stopwatch install-able in DSL, that can be launched "started" at appearance?
I Thought that maybe there is a possibility with Xmacro. (Recording mouse and keyboard events). But when I run Xmacrorec my mouse dont work anymore. To make a script for Xmacroplay, I haven't enough knowledge yet.

Thanks
6  MyDSL Extensions / System / ubuntuone on: February 14, 2014, 01:27:13 PM
Hello

Can someone tell me if it is possible to access Ubuntuone with FTP (file transfer protocol) in DSL?
I have tried to do it after installing Python2.4, but it still gives the next error:...

"sys:1: DeprecationWarning: Non-ASCII character '\x9f' in file u1ftp-0.1.zip on line 2, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
File "u1ftp-0.1.zip", line 1
PK_PTEhA£EÂ
^
SyntaxError: invalid syntax"


I can't enter it the normal way via the web.

Thanks
7  MyDSL Extensions / Net / Re: alt-gr-keys in firefox 2.0 on: November 05, 2013, 04:44:39 AM
I have added "dsl lang=be" to the menu.lst and ... it works !

Thanks
8  MyDSL Extensions / Net / alt-gr-keys in firefox 2.0 on: November 04, 2013, 05:10:36 PM
 Hello

I'm using a hard drive install, latest stable version of dsl. I have a be-latin1 keyboard setting, and when I am on the internet with a Firefox-like browser, my @ key (and all other alt gr+keys) wont work. If I just have run xsetup.sh it "does", but after reboot no more. Dillo is the only browser which print it, but I tried to login my yahoo mail with Dillo (I need @ to login), than there is a problem with cookies (that version of Dillo is to old I think, because in the cookiesrc, cookies are enabled with "#default exept". Can anyone tell me what I can do to have another shortcut for @. I allready tried to put echo @ in the jwmkeysrc but it failed (it than writes it into the text part of the system, that you can see with "ctrl+alt+f1").
 
       Thanks
9  Damn Small Linux / Other Help Topics / Re: configuring packages on: April 22, 2013, 01:32:27 PM
Thanks
10  Damn Small Linux / Other Help Topics / Re: configuring packages on: April 21, 2013, 06:59:49 AM
Thanks,

that explains a lot.
"Sourcecode package" does that mean, from "Sourceforge", or is that from Debian in our (DSL) case?
What I allso wanted to know is: When I want to start an installed package and the output is: errot while loading shared libraries (eg) 'gimpprint.so.1' no such file or directory, and I can't find gimpprint.so.1, why should this than work with gimpprint.dev?

Thanks again
11  Damn Small Linux / Other Help Topics / configuring packages on: April 19, 2013, 09:04:54 AM
Hello

To install packages of sourceforge (for instance), I need to configure them first. Meanwhile I know it is possible to do "make" and "make install" with gcc, but how will I be able to do "./configure"? Is there a package in Debian I can install for it? Or what?
I have to mention that I have a full hd installation.

Thanks
12  MyDSL Extensions / Apps / gimp 1.2 on: March 01, 2013, 06:02:20 AM
Hello
I'm running dsl on a Pentium 3, 666mhz processer with 356mb on RAM.
I want to copy a layer on a series of jpg-images (that I saved from a video in avidemux) , but everytime I open a bash and  type: gimp  -b[]file> , it says "batch command experienced  an execution error".
I'm having Gimp 1.2 from out of the "mydsl" directory, and normaly this should work with video->frames modify->duplicate layer, i think. But it will not.
Maybe someone can help me out here.



Hello again
Is there anyone who can run batch mode from gimp in dsl anyway?
It can't be so difficult, I think it must be a (java)-script like a project in Avidemux.

In the meanwhile I have installed Python from Synaptic, together  with a script from the net (recipe 496897-1.py) , but they do'nt seem to match totally.
Maybe someone can hand me a plug-in, module, or script with instructions to make it binary and install it to usr, lib, gimp, ...

Thanks.


I found the solution myself already.
In the menu "video=>move paths" I can do exactly what I wanted.
Pages: [1]
Powered by SMF 1.1.19 | SMF © 2013, Simple Machines
Mercury design by Bloc