Comments (8)
It's not Chinese language,it‘s gibberish.
from vlc.dotnet.
Thanks for the clarification :)
Then, how to get the correct Title, not gibberish?
from vlc.dotnet.
I think it's just the Character coding problem,why not try read the file name in your own code,try utf-8,unicode etc?
from vlc.dotnet.
Thanks again,
Is ok with files, but I need to play YouTube media or RTSP - online video. There this property, title, is very useful.
from vlc.dotnet.
Someone should go over the source code, to make sure all native text is converted to ANSI. That's the problem...
from vlc.dotnet.
Change line 16 in VlcManager.GetMediaMeta.cs (Core.Interops project) to this: return Marshal.PtrToStringAnsi(ptr);
from vlc.dotnet.
Thanks! Solve the problem. :)
from vlc.dotnet.
You never check with different languages :(
YouTube returns strings in UTF-8 therefore marshal must be done with utf-8 encoding.
There is no PtrToStringUTF8 so
//return Marshal.PtrToStringAnsi( ptr );
int len = 0;
while ( Marshal.ReadByte( ptr , len ) != 0 ) ++len;
byte[] buffer = new byte[len];
Marshal.Copy( ptr , buffer , 0 , buffer.Length );
return System.Text.Encoding.UTF8.GetString( buffer );
btw,
var media = myControl.MediaPlayer.GetCurrentMedia();
var utf8 = System.Text.Encoding.UTF8.GetString(System.Text.Encoding.Default.GetBytes(media.Title));
could not get correct string. Issue #178 has been solved?(>_<)
from vlc.dotnet.
Related Issues (20)
- scaletempo_pitch filter not working HOT 1
- how to split or cut a video? HOT 1
- "Direct Show Device Fails to Open" If it Contains a Failed Device in a List of Capture Devices HOT 14
- How to use LibVLCSharp make a Video Provider like VlcVideoSourceProvider.cs !! HOT 1
- How to install the Vlc.DotNet.Wpf.to a WPF .Net Framework using VB HOT 1
- two player play at the same time HOT 6
- VlcControl.Dispose never ends after trying to open Blu-ray disk without licensing or after ejecting the disc HOT 1
- (re-edit)Can vlc.dotnet play RTP over TCP(RFC 4751) H.264 video stream? HOT 6
- Can't set VlcLibDirectory HOT 10
- I want to develop UI in raspberry pi. Is there any way? HOT 13
- TakeSnapShot with stream parameter? HOT 1
- How to support Chinese directories? HOT 2
- My program was frozen during the setmedia operation HOT 2
- Playing some videos on any platform will get stuck HOT 6
- How can I to get frame data? HOT 1
- Is it possible to start player for fixed time. Assume I want to satrt my player for 5 minutes. HOT 2
- Visualization custom modification HOT 2
- how to change the audioDevice ?i can't let the code effective
- Hiding the console log window is not work HOT 1
- How do i simply play a video and get past the barrage of error messages. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vlc.dotnet.