Re: [Mlt-devel] MLT Encoding Question
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <da...@de...> - 2009-08-06 17:11:27
|
On Wed, Aug 5, 2009 at 10:36 PM, Jonathan Thomas<jon...@gm...> wrote: > Dan, I was able to get everything working with the IS08859-1 encoding. > First, I changed the encoding of the XML file from UTF-8 to IS08859-1. That > didn't fix anything. It still just showed black for the video (and only > played the audio). I eventually figured out it was the composite that was > breaking. It was only showing my background track (which happens to be > black). When I remove the composite, the videos play fine. > > I finally reduced it down to this: > > Using UTF-8, this works fine for the geometry. However it breaks with > IS08859-1. > 0=50.0%,50.0%:50.0%x50.0%:100.0; -1=50.0%,50.0%:50.0%x50.0%:100.0; In French and German locales, the decimal point is a comma. So, the period is either ignored converting, for example 50.0 to 500, or causes an invalid conversion and perhaps a 0 result. So, your composite rectangle is either placed off screen or has no size. > This works with both UTF-8 and IS08859-1 (i.e. removed the decimals): > 0=50%,50%:50%x50%:100; -1=50%,50%:50%x50%:100; > > So, I'm not sure exactly why the decimals break the geometry in IS08859-1, > but I have fixed OpenShot to only include integers in the geometry. How are you generating the XML? Maybe there is a routine you need to call to make the number-to-string conversion locale-aware. > Thanks! > -Jonathan > > > On Wed, Aug 5, 2009 at 1:56 PM, Dan Dennedy <da...@de...> wrote: >> >> On Wed, Aug 5, 2009 at 9:21 AM, Jonathan Thomas<jon...@gm...> >> wrote: >> > Hi Dan! I have made an observation that loading a MLT XML file into a >> > producer using the ISO8859-1 encoding seems to do really strange >> > things. It >> > doesn't give any errors, and it seems to parse the XML correctly, but it >> > only plays the audio of my XML file. If I run my program under UTF8, >> > everything works fine. I've tested this with the exact same XML file, >> > and >> > only changing the locale / encoding of my program. >> > >> > For example: >> > >> > if my program is running under these settings, it all works correctly: >> > en_EN >> > UTF8 >> > >> > If my program runs under these settings, MLT only plays audio (when >> > loaded >> > from the XML): >> > fr_FR >> > ISO8859-1 >> > >> > If I just load an image or video into a producer, MLT works just fine. >> > It >> > plays both the video and audio. It's just when I load XML in a producer >> > (while using ISO8859-1) that it seems to freak out and only play the >> > audio. >> > >> > Is this a known bug? If not, I would be happy to provide more >> > information, >> > such as an example program which demonstrates this behavior. Just let >> > me >> > know. >> >> In order to use iso8859-1, you must indicate as so in the XML: >> <?xml version="1.0" encoding="ISO-8859-1"?> >> >> How are you generating the XML? >> What happens when you run xmllint against the file? >> http://xmlsoft.org/encoding.html >> >> Are there floating point values in numeric strings that might be >> interpreted incorrectly? in some locales, a comma is the decimal >> point, and there might be something strange going on there. >> >> -- >> +-DRD-+ > |