taglib-sharp

How do I use taglib-sharp?

随声附和 提交于 2019-12-21 11:03:35
问题 I'm having a bunch of troubles with this library (obviously because I'm a newbie). I'm using Microsoft Visual Studio 2015. First of all I have absolutely no idea on how to add this library to my project. I didn't find anything helpful on Google, either. And second, I've found two different libraries - taglib-sharp-master and taglib-sharp-2.1.0.0-windows . Which one should I use? 回答1: There are a few things you'll want to do in order to get taglib-sharp working in your project. Firstly, you

Taglib sharp not editing rating

為{幸葍}努か 提交于 2019-12-20 05:37:27
问题 I have encountered a very strange problem while using Taglib sharp. I am changes the rating of video file by using code shown below. TagLib.File file = TagLib.File.Create(FULLFILEPATH); TagLib.Tag Tag = file.GetTag(TagTypes.Id3v2); TagLib.Id3v2.PopularimeterFrame frame = TagLib.Id3v2.PopularimeterFrame.Get((TagLib.Id3v2.Tag)Tag, "WindowsUser", true); frame.Rating = 255; file.Save(); After saving file when i open the detail tab of video file from properties, rating seems not to be change. But

adding custom tag using tagLib sharp library

拥有回忆 提交于 2019-12-19 10:09:01
问题 Is it possible to add custom tags (say "SongKey: Em") to an mp3 file using TagLib# libary? 回答1: You can add custom tags to an MP3 by writing the data in custom (private) frames. But First: You must switch to ID3v2 if you are using ID3v1. Any version of ID3v2 will do, but the version compatible with most things is ID3v2.3 . The required using directives: using System.Text; using TagLib; using TagLib.Id3v2; Creating Private Frames: File f = File.Create("<YourMP3.mp3>"); // Remember to change

Reading/Writing metadata of audio/video files

杀马特。学长 韩版系。学妹 提交于 2019-12-18 13:23:06
问题 I need some help in reading/writing meta data inforamation of audio/vido file. I have searched alot but not find anything thing helpful. Taglib sharp is an open source library that provide help in reading/writing metadata. Using tag lib i'm able to edit some of values but not all like. TagLib.File videoFile = TagLib.File.Create("test.mp4"); videoFile.Tag.Title = "Test"; videoFile.Tag.Comment = "Nothing"; but i'm unable to edit following properties like Author url, producers etc. How i edit

taglib# returns wrong duration

☆樱花仙子☆ 提交于 2019-12-13 13:48:27
问题 I'm getting the duration of an MP3 file in this way: TagLib.File file = TagLib.File.Create(fileName); var duration = file.Properties.Duration; and it is consistently giving me a duration between 68 and 75% of the real duration. Windows File Manager, VLC and just playing the MP3 and measuring with a stopwatch agree on the other duration. Any ideas what's wrong here? 回答1: Turned out to be a bug: https://bugzilla.gnome.org/show_bug.cgi?id=605765 来源: https://stackoverflow.com/questions/1982716

Update a song metadata with taglib-sharp and Powershell

时光怂恿深爱的人放手 提交于 2019-12-13 02:12:48
问题 I am trying to update a song metadata with taglib-sharp and powershell . It works fine for most of the files but there are errors on some wma files (I can play these files though). # Load the tag-lib assembly [Reflection.Assembly]::LoadFrom( (Resolve-Path ("D:\zic\lib\taglib-sharp.dll"))) # Load up the song file and its metadata $path_file="‪D:\zic\misc\Artist_Title.wma" $song = [TagLib.File]::Create((resolve-path $path_file)) $file_name = [System.IO.Path]::GetFileNameWithoutExtension($path

Can't add image keywords if there were no keywords to begin with, Taglib-Sharp

强颜欢笑 提交于 2019-12-12 02:45:28
问题 I'm trying to add metadata keywords to image files using Taglib-Sharp. My problem is that the following code: image.ImageTag.Keywords = (string[])newTags.ToArray(typeof(string)); image.Save(); does nothing if there are no keywords in the file to begin with. If I open the file properties in Explorer and add tags manually first, it works just fine and adds the tags to the file. I've tried setting a breakpoint at the top of this method and I can see that image.ImageTag.Keywords has a length of

Insert values into an Access Database that contain brackets/braces

泪湿孤枕 提交于 2019-12-11 15:35:47
问题 Using taglib-sharp and OleDb, I'm attempting to index a folder of music files and store all the metadata from said files in an Access Database (I'll probably switch to SQL Compact or something later but the book I have uses Access). The below code should retrieve and store the metadata of the first 1000 files in a given folder and subfolders OleDbCommand cmd = con.CreateCommand(); DirSearch(@"C:\Users\Stephen\Music"); TagLib.File tagFil; for (int i = 0; i < 1000; i++) { tagFil = TagLib.File

Taglib sharp saving ONLY ID3v2

℡╲_俬逩灬. 提交于 2019-12-11 07:25:13
问题 I'm new using TagLib sharp. I'm trying to save ONLY an specific version of the tag inside the file. Everytime I save the tag both ID3v1 and ID3v2 get created. Is there a way to stop this from happening? Can I choose which one I want to save. The save function doesn't take any arguments, so any ideas? 回答1: These tags are added for convenience when the File object is created. The correct way to remove newly created tags is to perform the following command before calling Save : file.RemoveTags

Is there an equivalent field to Label/Publisher in taglib-sharp?

孤街浪徒 提交于 2019-12-10 20:12:48
问题 I'm trying to update the label/publisher field using Taglib-sharp, but I can't see it anywhere in its Object Hierarchy using Object Browser. I've searched through google and the documentation and it looks like it's a field that's not catered for. Before I look for alternatives (can any one suggest any?) that can edit those field, I thought I'd have one last crack and ask within the StackOverflow community who is familiar with TagLib-sharp that had a more informed opinion? Thanks in Advance,