timheuer / taglib-sharp-portable

.NET Portable Class Library implementation of TagLib# (forked from TagLib# main project)
Other
58 stars 33 forks source link

Cannot read MP4 file tag #34

Open InteXX opened 5 years ago

InteXX commented 5 years ago

I'm running this code, inspired by the sample:

Imports System.IO
Imports TagLib

<TestClass>
Public Class TagLibTests
  <TestMethod>
  Public Sub SetMp4TagTest()
    Dim oFile As TagLib.File
    Dim sPath As String
    Dim oTag As Tag

    sPath = "V:\Video.mp4"

    Using oStream As New FileStream(sPath, FileMode.Open)
      oFile = TagLib.File.Create(New StreamFileAbstraction(sPath, oStream, oStream))
      oTag = oFile.GetTag(TagTypes.Id3v2)

      Debug.WriteLine(oTag.Title)
    End Using
  End Sub
End Class

When this runs, oTag is always Nothing. I've tried TagTypes.Id3v1 and TagTypes.MovieId, to no avail.

Am I missing something?