Closed Abhi5033 closed 7 months ago
@Abhi5033
addMeta
is your original private function, isn't it?
go-mp4 has no such named function.
@Abhi5033
addMeta
is your original private function, isn't it? go-mp4 has no such named function.
Yes sir
addMeta := func(tag mp4.BoxType, val interface{}) error {
_, err = w.StartBox(&mp4.BoxInfo{Type: tag})
if err != nil {
return err
}
err = marshalData(val)
if err != nil {
return err
}
_, err = w.EndBox()
return err
}
Is it possible to add album cover to a song in go-mp4 by any other means?
@Abhi5033
Your code includes a private function call, again. (marshalData)
And I can not understand why your code uses io.ReadAll
and passes its result as interface{}
.
At first, please read https://dev.to/sunfishshogi/go-mp4-golang-library-and-cli-tool-for-mp4-52o1 to understand ISO Base Media File Format. go-mp4 supports only low level operations, so you should understand binary level data structure of MP4. Next, please see #165. I think your use-case is almost the same with the issue.
I'll close this issue, because it seems it does not represent go-mp4's problem. Please comment when you have any additional informations.
Trying to add album cover to a song but the embedded cover is not recognizing I tried below approach
Maybe I should give JPEG format also as a parameter? please help