Problems with the English expression encoder command line in non-English Regional Systems

Source: Internet
Author: User
Recently, a website uses Silverlight as the video function module and expression encoder as the coding and conversion software.

After a user uploads a video, another thread calls expression encoder to convert the video to the WMV format.

ProgramBefore the release, everything on the local server is normal, but when deployed to the customer's server, the video cannot be converted. After debugging for more than half a day, we finally found that expression encoder returned an error "cannot convert value for videosize" on the client server ".

Call expression encoder Command Behavior:
Encoder.exe/source "C: \ test. Avi"/target "D: \ test. wmv"/videosize 320,240/videosizemode letterbox/thumbnailmode bestframe/thumbnailcodec JPEG/thumbnailsize 320,240/log off

First, I removed most of the parameters and used the default settings: encoder.exe/source "C: \ test. Avi"/target "D: \ test. wmv ". Everything is normal and no error occurs.

Then I add the parameter one by one and add it to videosize with an error, so I am sure there is a problem with this parameter. But why is there no problem with the same parameter on the local server?

Check the help document of encoder... fruitless
Google... fruitless
Reflector QuerySource code... Also fruitless
[1 k characters are omitted here]

Finally, we suspect that it is a character set problem. The customer's server is norweigian. In the Norwegian text, the meaning of "," is different from that in English. So we encountered a problem when parsing the command line parameters.

Change "320,240" in the command line to string. Format ("320 {0} 240", thread. currentthread. currentculture. textinfo. listseparator). The problem is solved.
(Thumbnailsize 320,240 also needs the sameCode)

Summary:
The English expression encoder specifies the videosize parameter in the document to use "," split height and width, but uses localized delimiter characters in the program for parameter resolution. Because delimiter characters are not necessarily the same in different languages, this problem may occur when some regions and languages are set to non-English systems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.