FFConvert - multimedia converter

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Calling for presets

#141 Post by shinobar »

Please post your favorite presets.

HOWTO:
  1. You can load some built-in preset as a base.
  2. Arrange the options on the main panel of the ffconvert.
  3. Click 'Save'. Add preferable name.
  4. The preset file is saved in /root/.config/ffconvert/preset.
  5. Compress you preset files and attach it on your reply of this topic.
See the document, /usr/share/doc/ffconvert/ffconvert-inside.txt.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#142 Post by don570 »

I upgraded the version of ffconvert then
switched my computer to German. I noticed that you spell
the verb browsen as brausen. I'm not sure but that seems
wrong.

Image

______________________________________

User avatar
esmourguit
Posts: 1410
Joined: Fri 17 Nov 2006, 14:45
Location: Entre l'ile aux oiseaux.et l'ile de sainte Lucie

french .mo file

#143 Post by esmourguit »

Bonjour a toutes et tous,

Here is the french.mo file.

Cordialement :wink:
Attachments
ffconvert1.2.png
(49.68 KiB) Downloaded 887 times
ffconvert-fr.tar.gz
(3.57 KiB) Downloaded 544 times
[url=http://moulinier.net/][color=blue][b]Toutou Linux[/b][/color][/url] - [url=http://toutoulinux.free.fr/pet.php][color=blue][b]Paquets français[/b][/color][/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Translations

#144 Post by L18L »

shinobar wrote:Thanks to all. Still calling for German and French, and etc.
Here is updated German translation :)
Attachments
MoManager-de_DE-ffconvert.tar.gz
(3.9 KiB) Downloaded 558 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: spelling mistake

#145 Post by L18L »

don570 wrote:...
_______________________________________________-

There's a spelling mistake on your front window.

Image


____________________________________________________
Here is my fix (ffconvert.mo for English)
Attachments
ffconvert_multimedia.png
mispelled fixed
(9.59 KiB) Downloaded 1219 times
en-ffconvert.mo.gz
move this file to
/usr/share/locale/en/LC_MESSAGES/ffconvert.mo
and
multimadia
will become
multimedia
(98 Bytes) Downloaded 561 times

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#146 Post by don570 »

Note to shinobar

I suggest the following change to make the interface
easier to understand. After line 321 insert...

Code: Select all


 <text height-request=\"10\"><label>\"\"</label></text>
   <text use-markup=\"true\"><label>\"<b>Select a preset, then click 'Load'</b> \"</label></text>
___________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

tutorial for ffconvert

#147 Post by don570 »

I've written a tutorial to help users and included some new presets
to help the user.

http://murga-linux.com/puppy/viewtopic.php?t=76023

__________________________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#148 Post by don570 »

Here's a suggestion to change the interface.

When opening an audio file with a right click menu option why not change
the window design to suit an audio file.
You don't need a video section if you are converting one
audio file. You have done this for your MP3 presets (See image)

Image


And when the user is launching ffconvert from the start menu
why not ask the user if he will be converting an audio or
a video file and change the window design according to the answer.

__________________________________________________________

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#149 Post by Karl Godt »

First i want to thank you for the code, shinobar !

Second : i encountered some problems with sed command :

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ D]*EV'|sed 's/^[[:blank:]]*//;s/^[A-Z]* //g;s/^[A-Z]* //g' |awk '{print $1}')
ACODECS=$(echo "$CODECS"|grep '^[ D]*EA'|sed 's/^[[:blank:]]*//;s/^[A-Z]* //g;s/^[A-Z]* //g' |awk '{print $1}')
is my "quick" and "probably still buggy in future" workaround for this .

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ D]*EV'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1)
ACODECS=$(echo "$CODECS"|grep '^[ D]*EA'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1)
is giving me too much garbage on my installation :

Code: Select all

bash-3.2# CODECS=$(ffmpeg -codecs 2>/dev/null)
bash-3.2# echo "$CODECS"|grep '^[ D]*EV'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1
asv1
asv2
age
3/DNxHD
(Digital
1
ariant
ashsv
ash
(Graphics
261
263
263p
/
-LS
a
264
-4

(Motion
1video
2video
4
4
4v1
4v2
am
(Portable
aintbrush
(Portable
(Portable
age
(Portable
ation
awvideo

10
20
age

1
arga
age
210
1
2
(LossLess

bash-3.2# 
Another problem occurred with dots in the filename like

" Rolling Stones feat. Eric Clapton - Little Red Rooster (L.A. 1989)..mp4 "

Code: Select all

ROOT1="${BASE1%\.*}"
instead of

Code: Select all

ROOT1=$(echo "$BASE1"| cut -d'.' -f1)
does it for me

Alternatively for ash it would be something like

Code: Select all

EXT9=$(echo "$BASE1" |rev|cut -d'.' -f1|rev)
ROOT1=$(echo "$BASE1" | sed "s#\.$EXT9$##")
***
ive also added a

Code: Select all

exec $0 "$SRCFILE"
at the last line and will experiment with a tmp settings file to speedup the
make_combo() {
function

Nevertheless ffconvert is working good, will have to check the many settings though, because my mp3 player says the converted mp4 to mp3 files are mp1 or mp2 and refuses to play ... :lol:

gojko
Posts: 13
Joined: Thu 25 Nov 2010, 08:48
Location: Hungary

#150 Post by gojko »

Hungarian localisation: mo, po and the local document
Attachments
ffconvert-1.2-hu_update.tar.gz
Hungarian locale for FFConvert 1.2 (.mo, .po and .html)
(6.82 KiB) Downloaded 528 times

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Checking codecs

#151 Post by shinobar »

Karl Godt wrote:

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ D]*EV'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1)
ACODECS=$(echo "$CODECS"|grep '^[ D]*EA'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1)
is giving me too much garbage on my installation :
Sorry, what version of ffmpeg or Puppy?
How does the next?:

Code: Select all

ffmpeg -codecs 2>/dev/null | grep '^[ ]*[ D]EV[ S]' | sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

FFConvert 1.2.1

#152 Post by shinobar »

Minor fix:
# v1.2.1 - 14 Apr 2012: fix dots'.' in file names, libvorvis (preset), fix typo (tnx to don 570), speed up make_combo, codec list(tnx toKarl Godt)
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

anewuser
Posts: 93
Joined: Sun 05 Feb 2012, 20:00

Re: FFConvert 1.2.1

#153 Post by anewuser »

shinobar wrote:Minor fix:
# v1.2.1 - 14 Apr 2012: fix dots'.' in file names, libvorvis (preset), fix typo (tnx to don 570), speed up make_combo, codec list(tnx toKarl Godt)
ty! was having issues with many crazy filenames.

robwoj44
Posts: 399
Joined: Fri 08 Aug 2008, 18:15
Location: Warsaw

Racy 5.3 FFConvert problem+polish locale

#154 Post by robwoj44 »

Hello shinobar
I send polish locale for FFConvert.
I confirm the problem found by Karl Godt. I have the same problem with codecs names when I added the translation file (polish, french, etc). The problem concerns detecting ffmpeg formats too.
I changed the lines:
# FORMATS=$(echo "$FALL"| head -n $(($N1 - 1))| grep '^[ D]*E'|sed -e 's/^[ A-Z]*[ ]//' |cut -d ' ' -f1)
# FORMATS=$(echo "$FALL"| grep '^[ D]*E'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1)
#VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'|sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
#ACODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EA[ ]'|sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
to
FORMATS=$(echo "$FALL"| head -n $(($N1 - 1))| grep '^[ D]*E'|sed 's/^[[:blank:]]*//;s/^[A-Z]* //g;s/^[A-Z]* //g' |awk '{print $1}')
FORMATS=$(echo "$FALL"| grep '^[ D]*E'|sed 's/^[[:blank:]]*//;s/^[A-Z]* //g;s/^[A-Z]* //g' |awk '{print $1}')
VCODECS=$(echo "$CODECS"|grep '^[ D]*EV'|sed 's/^[[:blank:]]*//;s/^[A-Z]* //g;s/^[A-Z]* //g' |awk '{print $1}')
ACODECS=$(echo "$CODECS"|grep '^[ D]*EA'|sed 's/^[[:blank:]]*//;s/^[A-Z]* //g;s/^[A-Z]* //g' |awk '{print $1}')
and it works in racy 5.3 with any locale.
Attachments
ffconvert.tar
polish locale
(10 KiB) Downloaded 591 times

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

Re: FFConvert 1.2.1

#155 Post by Karl Godt »

shinobar wrote:Minor fix:
# v1.2.1 - 14 Apr 2012: fix dots'.' in file names, libvorvis (preset), fix typo (tnx to don 570), speed up make_combo, codec list(tnx toKarl Godt)
I hope everythig is still good ... aparently it seems that enabling bash case-insensitive while compilation or in inputrc||bashrc seems to cause this for (some) regular full sed binaries . Busybox is also under heavy development but using busybox sed with the original codeline worked for me (busybox 1.18.3) . :oops:

Code: Select all

bash-3.2# ffmpeg -formats |sed -n '/Codecs:/,/Supported file protocols:/p'
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --arch=i486 --enable-libmp3lame --enable-liba52 --enable-libfaac --enable-libfaad --enable-pthreads --enable-small --enable-libogg --enable-libvorbis --enable-gpl --enable-shared --enable-pp --disable-debug --prefix=/usr
  libavutil version: 49.5.0
  libavcodec version: 51.44.0
  libavformat version: 51.14.0
  built on Jul 12 2009 11:29:41, gcc: 4.2.2
Codecs:
 D V    4xm
 D V D  8bps
 D V    VMware video
 D V D  aasc
  EA    ac3
 DEA    adpcm_4xm
 DEA    adpcm_adx
 DEA    adpcm_ct
 DEA    adpcm_ea
 D A    adpcm_ima_amv
 DEA    adpcm_ima_dk3
 DEA    adpcm_ima_dk4
 DEA    adpcm_ima_qt
 DEA    adpcm_ima_smjpeg
 DEA    adpcm_ima_wav
 DEA    adpcm_ima_ws
 DEA    adpcm_ms
 DEA    adpcm_sbpro_2
 DEA    adpcm_sbpro_3
 DEA    adpcm_sbpro_4
 DEA    adpcm_swf
 D A    adpcm_thp
 DEA    adpcm_xa
 DEA    adpcm_yamaha
 D A    alac
 D V D  amv
 D A    ape
 DEV D  asv1
 DEV D  asv2
 D A    atrac 3
 D V D  avs
 D V    bethsoftvid
 DEV    bmp
 D V D  c93
 D V D  camstudio
 D V D  camtasia
 D V D  cavs
 D V D  cinepak
 D V D  cljr
 D A    cook
 D V D  cyuv
 D A    dca
 D V D  dnxhd
 D A    dsicinaudio
 D V D  dsicinvideo
 DES    dvbsub
 DES    dvdsub
 DEV D  dvvideo
 D V    dxa
 DEV D  ffv1
 DEVSD  ffvhuff
 DEA    flac
 DEV D  flashsv
 D V D  flic
 DEVSD  flv
 D V D  fraps
 DEA    g726
 DEV    gif
 DEV D  h261
 DEVSDT h263
 D VSD  h263i
  EV    h263p
 D V DT h264
 DEVSD  huffyuv
 D V D  idcinvideo
 D A    imc
 D V D  indeo2
 D V    indeo3
 D A    interplay_dpcm
 D V D  interplayvideo
 DEV D  jpegls
 D V    kmvc
 D A    liba52
  EA    libfaac
 D A    libfaad
  EA    libmp3lame
  EV    ljpeg
 D V D  loco
 D A    mace3
 D A    mace6
 D V D  mdec
 DEV D  mjpeg
 D V D  mjpegb
 D V D  mmvideo
 DEA    mp2
 D A    mp3
 D A    mp3adu
 D A    mp3on4
 D A    mpc sv7
 DEVSDT mpeg1video
 DEVSDT mpeg2video
 DEVSDT mpeg4
 D A    mpeg4aac
 D VSDT mpegvideo
 DEVSD  msmpeg4
 DEVSD  msmpeg4v1
 DEVSD  msmpeg4v2
 D V D  msrle
 D V D  msvideo1
 D V D  mszh
 D V D  nuv
 DEV    pam
 DEV    pbm
 DEA    pcm_alaw
 DEA    pcm_mulaw
 DEA    pcm_s16be
 DEA    pcm_s16le
 DEA    pcm_s24be
 DEA    pcm_s24daud
 DEA    pcm_s24le
 DEA    pcm_s32be
 DEA    pcm_s32le
 DEA    pcm_s8
 DEA    pcm_u16be
 DEA    pcm_u16le
 DEA    pcm_u24be
 DEA    pcm_u24le
 DEA    pcm_u32be
 DEA    pcm_u32le
 DEA    pcm_u8
 DEA    pcm_zork
 DEV    pgm
 DEV    pgmyuv
 DEV    png
 DEV    ppm
 D V    ptx
 D A    qdm2
 D V D  qdraw
 D V D  qpeg
 DEV D  qtrle
 DEV    rawvideo
 D A    real_144
 D A    real_288
 DEA    roq_dpcm
 DEV D  roqvideo
 D V D  rpza
 DEV D  rv10
 DEV D  rv20
 DEV    sgi
 D A    shorten
 D A    smackaud
 D V    smackvid
 D V D  smc
 DEV    snow
 D A    sol_dpcm
 DEA    sonic
  EA    sonicls
 D V D  sp5x
 DEV D  svq1
 D VSD  svq3
 DEV    targa
 D V    theora
 D V D  thp
 D V D  tiertexseqvideo
 DEV    tiff
 D V D  truemotion1
 D V D  truemotion2
 D A    truespeech
 D A    tta
 D V    txd
 D V D  ultimotion
 D V    vc1
 D V D  vcr1
 D A    vmdaudio
 D V D  vmdvideo
 DEA    vorbis
 D V    vp3
 D V D  vp5
 D V D  vp6
 D V D  vp6a
 D V D  vp6f
 D V D  vqavideo
 D A    wavpack
 DEA    wmav1
 DEA    wmav2
 DEVSD  wmv1
 DEVSD  wmv2
 D V    wmv3
 D V D  wnv1
 D A    ws_snd1
 D A    xan_dpcm
 D V D  xan_wc3
 D V D  xl
 D S    xsub
 DEV D  zlib
 DEV    zmbv

Supported file protocols:
bash-3.2# 
because ffmpeg -codecs does not work atm for
bash-3.2# ffmpeg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --arch=i486 --enable-libmp3lame --enable-liba52 --enable-libfaac --enable-libfaad --enable-pthreads --enable-small --enable-libogg --enable-libvorbis --enable-gpl --enable-shared --enable-pp --disable-debug --prefix=/usr
libavutil version: 49.5.0
libavcodec version: 51.44.0
libavformat version: 51.14.0
built on Jul 12 2009 11:29:41, gcc: 4.2.2
usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...
Hyper fast Audio and Video encoder

I am hacking version0.9 for it had been in a ffmpeg pet .
Will try newest soon. Sed and grep a such a pain ! 8)
Attachments
ffconvert-0.9-hack.png
(164.44 KiB) Downloaded 814 times

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#156 Post by Karl Godt »

Have to add this is on Puppy 4.3,4.3.1,5.1.1 .

First impression of ffconvert-1.2.1 : Starts Up really fast ! Like it ! :D

My code had been to reuse the lists in a /tmp/ffconvert directory at next start, but your code must be really better !

Hmmm... maybe related to locale too .. don't know for sure ... de_DE had a bug in the locale files in Puppy 4.3(.1) and had only problems with de_DE@euro , now switched since some weeks to de_DE.utf-8 on one installation ... but sed itself still does not work. Had added busybox to

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'|busybox sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
ACODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EA[ ]'|busybox sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
see difference :

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

detecting codecs

#157 Post by shinobar »

Karl Godt wrote:Hmmm... maybe related to locale too ..
How about adding 'LANG=C'.

Code: Select all

VCODECS=$(LANG=C echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#158 Post by Karl Godt »

OK, did a lot with locale today without a stabile solution ...

Finally downloaded sed source, compiled quick, make html and this is what i read :
Here are a few commonly reported bugs that are not bugs.

[a-z] is case insensitive
You are encountering problems with locales. POSIX mandates that [a-z] uses the current locale's collation order – in C parlance, that means using strcoll(3) instead of strcmp(3). Some locales have a case-insensitive collation order, others don't.

Another problem is that [a-z] tries to use collation symbols. This only happens if you are on the GNU system, using GNU libc's regular expression matcher instead of compiling the one supplied with GNU sed. In a Danish locale, for example, the regular expression ^[a-z]$ matches the string ‘aa’, because this is a single collating symbol that comes after ‘a’ and before ‘b’; ‘ll’ behaves similarly in Spanish locales, or ‘ij’ in Dutch locales.

To work around these problems, which may cause bugs in shell scripts, set the LC_COLLATE and LC_CTYPE environment variables to ‘C’.
Before i had done a

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| LC_ALL=C sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
which worked .

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| LANG=C sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
does NOT work .

I will try LC_CTYPE and LC_COLLATE later ..

diner time ..

(grep seems not to be affected by any LC_LANG setting)
(running a full statical busybox-1.14.4 because of acpid applet today with nearly everything enabled : bb-sed works also in former bb-versions regardless of the env)
Attachments
sed.html.tar.bz2
(28.49 KiB) Downloaded 579 times

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#159 Post by Karl Godt »

Puppy 4.3(.x) has got these entries in /etc/profile :
#this line gets edited by chooselocale script...
#LANG=en_US.utf8 w004 going back to non-utf8...
LANG=en_US
export LANG

#v426 recommended by MU, avoid crashing for non-English locales on some apps...
export LC_COLLATE=en_US
in the dl pup-43x.sfs archive .

My current entries look(ed) like that :
#this line gets edited by chooselocale script...
#LANG=de_DE@euro.utf8 w004 going back to non-utf8...
LANG=de_DE@euro
export LANG
#LCs=`locale`
LCs=`locale |tr -d '"'`
for loc in $LCs;do export $loc;done
#v426 recommended by MU, avoid crashing for non-English locales on some apps...
export LC_COLLATE=en_US
Now I prepare the console the same way :
bash-3.00# LANG=de_DE@euro
bash-3.00# export LANG
bash-3.00# LCs=`locale |tr -d '"'`
bash-3.00# for loc in $LCs;do export $loc;done
bash-3.00# export LC_COLLATE=en_US
Now i check :
bash-3.00#

Code: Select all

locale
LANG=de_DE@euro
LC_CTYPE=de_DE@euro
LC_NUMERIC=de_DE@euro
LC_TIME=de_DE@euro
LC_COLLATE=en_US
LC_MONETARY=de_DE@euro
LC_MESSAGES=de_DE@euro
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=
bash-3.00#
NOTE: LC_ALL is unset ...

When i start ffconvert in the console with an added locale command I get :
bash-3.00# /mnt/sda3/root/Downloads/pup.d/PEOPLE/shinobar/ffconvert-1.2.1/usr/bin/ffconvert-1.2.1
LANG=de_DE@euro
LC_CTYPE=de_DE@euro
LC_NUMERIC=de_DE@euro
LC_TIME=de_DE@euro
LC_COLLATE=de_DE@euro
LC_MONETARY=de_DE@euro
LC_MESSAGES=de_DE@euro
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=
RESULT:
1) simple sed [a-z] does not work ,
it works with "LC_COLLATE=C" pre_env AND "LC_ALL=C"

2) Few garbled Characters in the fronend/Gui i call "de_DE@euro-woLC_ALL"
3) and a lot of warnings when i move the mouse over the gui like :
(gtkdialog3:25237): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

(gtkdialog3:25237): Gtk-WARNING **: Failed to set text from markup due to error parsing markup: Error on line 1 char 16: Invalid UTF-8 encoded text - not valid 'Gib zus??tzliche Optionen f? 1/4 r das Videofromat an'
NOTE : The directories in /usr/lib/locale are there with their names and with their contents .

Now tried de_DE.utf8:
bash-3.00# LANG=de_DE.utf8
bash-3.00# LCs=`locale |tr -d '"'`
bash-3.00# for loc in $LCs;do export $loc;done
bash-3.00# locale
LANG=de_DE.utf8
LC_CTYPE=de_DE@euro
LC_NUMERIC=de_DE@euro
LC_TIME=de_DE@euro
LC_COLLATE=en_US
LC_MONETARY=de_DE@euro
LC_MESSAGES=de_DE@euro
LC_PAPER=de_DE@euro
LC_NAME=de_DE@euro
LC_ADDRESS=de_DE@euro
LC_TELEPHONE=de_DE@euro
LC_MEASUREMENT=de_DE@euro
LC_IDENTIFICATION=de_DE@euro
LC_ALL=
NOTE : Everything still the same buggy ...

New round with modified export :
bash-3.00# LANG=de_DE.utf8
bash-3.00#

Code: Select all

LCs=`locale |tr -d '"'|cut -f1 -d=`
bash-3.00#

Code: Select all

for loc in $LCs;do export $loc=$LANG;done
bash-3.00# locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8
NOTE : LC_ALL is set , all values are "de_DE.utf8"
NOTE : locale command seems to quote the strings now for there is a dot in the string .

RESULT :
1) There are two kinds of garbled chars for the GUI : I name these "utf8-full" .
2) The pango warnings have gone .

3) sed is still not working correctly without any LC- pre_env ,
so
tested LC_COLLATE=C which did NOT work

tested LC_ALL=C which did work .

I tested also setting "LC_CTYPE=C" which i could not get to work (until now) and every other LC_VAR :
LC_NUMERIC
LC_TIME
LC_MONETARY
LC_MESSAGES
LC_PAPER
LC_NAME
LC_ADDRESS
LC_TELEPHONE
LC_MEASUREMENT
LC_IDENTIFICATION

set =C and they did not do any affect on sed .

SO

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| LC_COLLATE=C sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
works in non-utf-8 environment

Code: Select all

VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'| LC_ALL=C sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
works in utf-8 and non-utf-8 envirnoment (so far).

*
SINCE the locale and encoding seems to be part of glibc it might differ from Puppy to Puppy versions .
The above tests had been made on Puppy-4.3 glibc-2.6.1 .

*
The html page mentiones the danish "°a|°A" which can be written also "aa|AA" for example :
Aalborg Kommune eller Ålborg Kommune

Germany has got "ae|AE" for "ä|Ä" , "oe|OE" for "ö|Ö" , "ue|UE" for "ü|Ü" and "ss" for (old)"ß" .

Since Spanish is mentioned i can also imagine some french special chars like "ç" for "c" or "è" for "e" .

There are actually lots of European languages with a slightly different "ABC" than the English .

*
Installing some /usr/share/locale/*/LC_MESSAGES/glibc.mo i compiled with --prefix=/opt/glibc-2.6.1 by simply copying them there solved the 3 warnings i got by locale command :
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Took me several weeks to figure that out that this meant the glibc.mo and not a /usr/lib/locale/default link to a directory ...

*
I hope i have not fogotten anything .

User avatar
shinobar
Posts: 2672
Joined: Thu 28 May 2009, 09:26
Location: Japan
Contact:

Re: detecting codecs

#160 Post by shinobar »

Seems work well just setting 'LC_ALL=C':
# check ffmpeg ability
LC_ALL_ORG=$LC_ALL
export LC_ALL=C

VFOPT=$(ffmpeg -h 2>/dev/null | grep -w 'vf')
FALL=$(ffmpeg -formats 2>/dev/null)
N1=$(echo "$FALL"|cat -n| grep 'Codecs:'|cut -f1| tr -dc '[0-9]')
N2=$(echo "$FALL"|cat -n| grep 'Supported file protocols:'|cut -f1| tr -dc [0-9])
if [ "$N1" ]; then
FORMATS=$(echo "$FALL"| head -n $(($N1 - 1))| grep '^[ D]*E'|sed -e 's/^[ A-Z]*[ ]//' |cut -d ' ' -f1)
if [ "$N2" ]; then
CODECS=$(echo "$FALL"| head -n $(($N2 - 1))|tail -n $(($N2 - $N1)))
fi
else
FORMATS=$(echo "$FALL"| grep '^[ D]*E'|sed -e 's/^[ A-Z]*[ ]*//' |cut -d ' ' -f1)
CODECS=$(ffmpeg -codecs 2>/dev/null)
fi
VCODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EV[ S]'|sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
ACODECS=$(echo "$CODECS"|grep '^[ ]*[ D]EA[ ]'|sed -e 's/^[ A-Z]*//' |cut -d ' ' -f1)
#echo "$FORMATS" >&2
#echo "$CODECS" >&2
H264=$(echo "$VCODECS" | grep 'libx264')
AAC=$(echo "$ACODECS" | grep 'libfaac')
MP3=$(echo "$ACODECS" | grep 'libmp3lame')
LC_ALL=$LC_ALL_ORG
Tested under de_DE@euro.
Downloads for Puppy Linux [url]http://shino.pos.to/linux/downloads.html[/url]

Post Reply