easyVDR Kopie des easyVDR-Forums zum Nachschlagen
alte aufnahmen -> nach utf-8 wandeln ( .info´s gehen nicht )

easyVDR - >VARforumsname - >alte aufnahmen -> nach utf-8 wandeln ( .info´s gehen nicht )

a_client  06.Jan.2011 19:43:02
hallo,

ich probiere gerade für einen freund seine alte platte in utf-8 zu wandeln.

in /usr/bin/easyvdr/experimental steht dazu ein script.

#!/bin/bash
set -x
########################################
#ISO->UTF-8 Umzug der Bestandsaufnahmen
########################################


echo "In diesem Script muss 2x das Video-Verzeichnis eingetragen werden"
sleep 5

# Titelverzeichnisse konvertieren
#if convmv nicht da dann holen
#aptitude install convmv
#fi
#convmv -f iso-8859-15 -t utf-8 -r  /video0/  --notest
convmv -f iso-8859-15 -t utf-8 -r  /video0/  --notest

#if utrac nicht da dann holen
#wget http://www.easy-vdr.de/~michel8/0.7.14-Patches/Experimentell/utrac-0.3.0.tar.gz
#Auspacken nach... /usr/bin
#make
#make install
#fi

# info.vdr konvertieren
#InfoVdrLst=`find -L "/video0/" -name info.vdr`
InfoVdrLst=`find -L "/video0/" -name info.vdr`
echo $InfoVdrLst

count_all_info=0
count_converted_info=0

for I in $InfoVdrLst; do
  ((count_all_info++))
  char_type=`utrac -p -L DE $I`
  echo $char_type
  if [ $char_type != "UTF-8" ] && [ $char_type != "" ]; then
    recode $char_type..utf8 $I
      ((count_converted_info++))
  fi
done
     
echo "Von $count_all_info info.vdr sind $count_converted_info nach UTF-8 konvertiert worden."

das schmeiss dann diese fehlermeldung aus:

+ '[' '!=' UTF-8 ']'
Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
+ echo 'Von 6 info.vdr sind 0 nach UTF-8 konvertiert worden.'
Von 6 info.vdr sind 0 nach UTF-8 konvertiert worden.

die aufnahmenahmen sind gewandelt die info s.o. nicht  :(

convmv und utrac sind drauf.

@ michel hast du dazu noch´n tipp?

grüße a_client




1 * easyvdr 0.8 gforce 9500, coreduo, skystar 2, skystar hd (noch nicht ganz umgezogen / fertig)
1 * easyvdr 0.6.10, 2*skystar 2 (sd) wartet auf den 0.8er
michel8  08.Jan.2011 21:21:49
Hallo a_client,

Im Script wird doch mit
echo $InfoVdrLst
die Liste der zu convertierenden Files ausgegeben - stimmte die Liste bei Dir, oder war sie leer?

Evtl. könntest Du die folgende If-Abfrage im Script
  if [ $char_type != "UTF-8" ] && [ $char_type != "" ]; then
    recode $char_type..utf8 $I
      ((count_converted_info++))
  fi

so ändern:

  if [ $char_type != "" ]; then
    if [ $char_type != "UTF-8" ]; then
      recode $char_type..utf8 $I
        ((count_converted_info++))
    fi
  fi

tut es dann richtig?

Gruß
Michel

Gruß
Michel
Produktiv-VDR:
msi K9N2G-Neo (nvidia 8200 onBoard) mit Athlon X2 4850e mit SamuraiZZ
2xNova-HDS2, DH102
a_client  08.Jan.2011 21:41:37
hallo michel,

du meinst so:  (eben probiert)

count_all_info=0
count_converted_info=0

for I in $InfoVdrLst; do
  ((count_all_info++))
  char_type=`utrac -p -L DE $I`
  echo $char_type
  if [ $char_type != "" ]; then
    if [ $char_type != "UTF-8" ]; then
      recode $char_type..utf8 $I
        ((count_converted_info++))
    fi
  fi
done
echo "Von $count_all_info info.vdr sind $count_converted_info nach UTF-8 konvertiert worden."



das gibt solch eine ausgabe:

+ echo 'In diesem Script muss 2x das Video-Verzeichnis eingetragen werden'
In diesem Script muss 2x das Video-Verzeichnis eingetragen werden
+ sleep 5
+ convmv -f iso-8859-15 -t utf-8 -r /video0/videotest/ --notest
Skipping, already UTF-8: /video0/videotest/%Der_König_von_St._Pauli_1
Ready!
++ find -L /video0/videotest/ -name info.vdr
+ InfoVdrLst='/video0/videotest/%Der_König_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr
/video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr'
+ echo $'/video0/videotest/%Der_K\303\266nig_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr' /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
/video0/videotest/%Der_König_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
+ count_all_info=0
+ count_converted_info=0
+ for I in '$InfoVdrLst'
+ (( count_all_info++ ))
++ utrac -p -L DE $'/video0/videotest/%Der_K\303\266nig_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr'
utrac: Unable to open file (error 101)
+ char_type=
+ echo

+ '[' '!=' '' ']'
Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
+ for I in '$InfoVdrLst'
+ (( count_all_info++ ))
++ utrac -p -L DE /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
utrac: Unable to open file (error 101)
+ char_type=
+ echo

+ '[' '!=' '' ']'
Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
+ echo 'Von 2 info.vdr sind 0 nach UTF-8 konvertiert worden.'
Von 2 info.vdr sind 0 nach UTF-8 konvertiert worden.
easyVDR:/usr/bin/easyvdr/experimentell#
easyVDR:/usr/bin/easyvdr/experimentell# clear
easyVDR:/usr/bin/easyvdr/experimentell# sh Konvert*.sh
+ echo 'In diesem Script muss 2x das Video-Verzeichnis eingetragen werden'
In diesem Script muss 2x das Video-Verzeichnis eingetragen werden
+ sleep 5
+ convmv -f iso-8859-15 -t utf-8 -r /video0/videotest/ --notest
Skipping, already UTF-8: /video0/videotest/%Der_König_von_St._Pauli_1
Ready!
++ find -L /video0/videotest/ -name info.vdr
+ InfoVdrLst='/video0/videotest/%Der_König_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr
/video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr'
+ echo $'/video0/videotest/%Der_K\303\266nig_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr' /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
/video0/videotest/%Der_König_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
+ count_all_info=0
+ count_converted_info=0
+ for I in '$InfoVdrLst'
+ (( count_all_info++ ))
++ utrac -p -L DE $'/video0/videotest/%Der_K\303\266nig_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr'
utrac: Unable to open file (error 101)
+ char_type=
+ echo

+ '[' '!=' '' ']'
Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
+ for I in '$InfoVdrLst'
+ (( count_all_info++ ))
++ utrac -p -L DE /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
utrac: Unable to open file (error 101)
+ char_type=
+ echo

+ '[' '!=' '' ']'
Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
+ echo 'Von 2 info.vdr sind 0 nach UTF-8 konvertiert worden.'
Von 2 info.vdr sind 0 nach UTF-8 konvertiert worden.
easyVDR:/usr/bin/easyvdr/experimentell#


ich glaub du kannst hellsehen die liste ist wirklich leer (  echo $InfoVdrLst )

aber er schreibt doch:

Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
+ echo 'Von 2 info.vdr sind 0 nach UTF-8 konvertiert worden.'
Von 2 info.vdr sind 0 nach UTF-8 konvertiert worden.

also hat er doch info´s gefunden oder nicht?

ich werde nun mal eine alte aufnahme von einem 0.6er übers internet vom bekannten holen , damit ich nochmal eine "nicht versuchte datei habe"

grüße a_client






1 * easyvdr 0.8 gforce 9500, coreduo, skystar 2, skystar hd (noch nicht ganz umgezogen / fertig)
1 * easyvdr 0.6.10, 2*skystar 2 (sd) wartet auf den 0.8er
michel8  08.Jan.2011 22:31:07
Die Liste ist doch nicht leer:

Im Script steht
InfoVdrLst=`find -L "/video0/" -name info.vdr`
echo $InfoVdrLst
Der Output ist:
+ InfoVdrLst='/video0/videotest/%Der_König_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr
/video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr'
+ echo $'/video0/videotest/%Der_K\303\266nig_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr' /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr
/video0/videotest/%Der_König_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr /video0/videotest/%Winnetou_I/2009-05-30.12.06.50.99.rec/info.vdr

Es ist vielmehr die Frage, warum utrac das file nicht öffnen kann:

++ utrac -p -L DE $'/video0/videotest/%Der_K\303\266nig_von_St._Pauli_1/2010-05-15.01.26.60.99.rec/info.vdr'
utrac: Unable to open file (error 101)
+ char_type=
Laut Script:
  char_type=`utrac -p -L DE $I`
  echo $char_type

Entweder ist da etwas mit dem info-File nicht OK, es passen die Rechte nicht oder sonst etwas in der Art.

Die Fehlermeldung
+ '[' '!=' '' ']'
Konvertiere_Bestandsaufnahmen.sh: line 37: [: !=: unary operator expected
ist damit auch klar, Für den Fall einer leeren Variable fehlen da noch ein paar Anführungszeichen:
if [ "$char_type" != "" ]; then
Wobei das nicht das eigentliche Problem sein sollte

Gruß
Michel


Produktiv-VDR:
msi K9N2G-Neo (nvidia 8200 onBoard) mit Athlon X2 4850e mit SamuraiZZ
2xNova-HDS2, DH102
a_client  08.Jan.2011 22:50:02
hallo nochmal,

na da hab ich ja wiedermal voll die ar***karte hier.

danke, das mit den rechten habe ich auch probiert. sowohl utrac als auch media verzeichnis 0755 sogar mal 0777 -r,  auch nix. 

hast du einen 0.8er ? kannste mir mal dein utrac dranhängen?

auch wenn ich von hand utrac info.vdr im richtigen verzeichnis mache - schreibt der fehler 101!

grüße a_client
1 * easyvdr 0.8 gforce 9500, coreduo, skystar 2, skystar hd (noch nicht ganz umgezogen / fertig)
1 * easyvdr 0.6.10, 2*skystar 2 (sd) wartet auf den 0.8er
BobE  30.Jun.2011 10:34:28
Hallo,

es fehlt die Datei charsets.dat (-> error 101)

Ich habe die Sorce von sourceforge geholt, neu übersetzt und installiert. Damit wird auch charsets.dat nach /usr/local/share/utrac kopiert und utrac ist glücklich.

BobE

michel8  30.Jun.2011 18:51:01
Hallo BobE,

könntest Du bitte etwas genauer beschreiben, was wie wo zu tun ist?
Dann könnten auch Dummies wie ich das nachvollziehen..

Also
- was mit wget von wo holen und wohin schreiben
- wie compilen
- und was dann alles noch wohin schieben

Danke im Voraus
Michel
Produktiv-VDR:
msi K9N2G-Neo (nvidia 8200 onBoard) mit Athlon X2 4850e mit SamuraiZZ
2xNova-HDS2, DH102
BobE  01.Jul.2011 09:42:34
Ok, dann also Schritt für Schrit:

Als root unter easyvdr 0.8:

1. Source von utrac holen:
    cd
    wget http://utrac.sourceforge.net/download/utrac-0.3.0.tar.gz

2. Entpacken (wohin ist eigentlich egal, zur besseren Übersicht vielleicht nach
    /usr/local/src
    tar xvzf utrac-0.3.0.tar.gz -C /usr/local/src/

3. In das directory wechseln
    cd /usr/local/src/utrac-0.3.0

4. Kompilieren und Installieren
    make
    make install

Das sollte es gewesen sein.

Grüße
BobE
michel8  01.Jul.2011 20:35:08
Danke BobE (K++)

habe die Lösung von Dir auch gleich hier bei den Bugs und Workarounds verlinkt http://www.easyvdr-forum.de/forum/index.php?topic=11742.msg96426#msg96426

Gruß
Michel
Produktiv-VDR:
msi K9N2G-Neo (nvidia 8200 onBoard) mit Athlon X2 4850e mit SamuraiZZ
2xNova-HDS2, DH102