gatecrasher777 / ytcog-dl

Command line interface (CLI) for the ytcog innertube library
MIT License
3 stars 1 forks source link

Metadata #6

Open sclsj opened 3 years ago

sclsj commented 3 years ago

Is it possible to add more metadata fields?

Is it possible to rename certain metadata fields for easier metadata management? E.g.

For reference, here is the comparison between ytcog-dl and youtube-dl metadata:

youtube-dl

root@Joys-MacBook-Pro ~# youtube-dl -c --add-meta --xattrs P6C3szts5C4
[youtube] P6C3szts5C4: Downloading webpage
[download] Kuchizuke Diamond - Yamada-kun and the Seven Witches OP [Piano]-P6C3szts5C4.webm has already been downloaded and merged
[ffmpeg] Adding metadata to 'Kuchizuke Diamond - Yamada-kun and the Seven Witches OP [Piano]-P6C3szts5C4.webm'
[metadata] Writing metadata to file's xattrs
root@Joys-MacBook-Pro ~# ffprobe /private/var/root/Kuchizuke\ Diamond\ -\ Yamada-kun\ and\ the\ Seven\ Witches\ OP\ \[Piano\]-P6C3szts5C4.webm
Input #0, matroska,webm, from '/private/var/root/Kuchizuke Diamond - Yamada-kun and the Seven Witches OP [Piano]-P6C3szts5C4.webm':
  Metadata:
    title           : Kuchizuke Diamond - Yamada-kun and the Seven Witches OP [Piano]
    PURL            : https://www.youtube.com/watch?v=P6C3szts5C4
    ARTIST          : Animenz Piano Sheets
    DATE            : 20150619
    KEYWORDS        : くちづけDiamond,Kuchizuke Diamond,山田くんと七人の魔女,Yamada-kun and the Seven Witches,Weaver,ピアノ,Piano,OP,Opening,オープニング
    AUTHOR          : Animenz Piano Sheets
    DESCRIPTION     : Hey everyone, sorry for the lack of updates recently!
                    : I was having some piano exams, and therefore I was busier than usual.
                    :
                    : Anyway, with almost 3 weeks delay, I have finally uploaded my piano cover of Kuchizuke Diamond, the OP song of yamada-kun and the seven witches. (It's also one of of my favorite Opening songs of the spring anime season 2015)
                    :
                    : Also, I have decided to arrange this song in my "old" style:
                    : Almost 100% faithful to the original song and without any "original material" - basically, not too many experiments.
                    : This transcription is also a good exercise for the left hand, because you have to train your accuracy with the left hand in order to play the fast left hand jumps. I even think this is one of my few transcriptions, where the left hand is more difficult to
                    : The most difficult part is actually the "left hand melody" beginning at 0:36, since the right hand is playing an entirely different rhythm than the left hand.
                    : Initially, I included an "original ending" for the ending segment of the sheet, but after a few edits, I decided to end it similar to the original song - the music suddenly stops.
                    :
                    : Okay, that would be everything I want to say about this piece.
                    : My next (and final) upload for this anime season is going to be the ED song of Oregairu S2 -  "everyday world" (ballad version).
                    : It's going to be one of my easier pieces. (fo' real this time! I promise ;_;)
                    :
                    : See you next week!
                    :
                    : Animenz
                    :
                    :
                    :
                    : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    :
                    : My facebook page:
                    : http://www.facebook.com/Animenz
                    :
                    : Follow me on Twitter!
                    : https://twitter.com/Animenzzz
                    :
                    : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    :
                    : Piano arrangement by Animenz
                    :
                    : Original Song:   Kuchizuke Diamond
                    : Anime:   Yamada-kun and the Seven Witches
                    : Published by:   A-sketch
                    : Composed by:   Yuji Sugimoto
                    : Performed by:   Weaver
                    :
                    : #KuchizukeDiamond #Weaver #Yamada-kunandtheSevenWitches
    COMMENT         : Hey everyone, sorry for the lack of updates recently!
                    : I was having some piano exams, and therefore I was busier than usual.
                    :
                    : Anyway, with almost 3 weeks delay, I have finally uploaded my piano cover of Kuchizuke Diamond, the OP song of yamada-kun and the seven witches. (It's also one of of my favorite Opening songs of the spring anime season 2015)
                    :
                    : Also, I have decided to arrange this song in my "old" style:
                    : Almost 100% faithful to the original song and without any "original material" - basically, not too many experiments.
                    : This transcription is also a good exercise for the left hand, because you have to train your accuracy with the left hand in order to play the fast left hand jumps. I even think this is one of my few transcriptions, where the left hand is more difficult to
                    : The most difficult part is actually the "left hand melody" beginning at 0:36, since the right hand is playing an entirely different rhythm than the left hand.
                    : Initially, I included an "original ending" for the ending segment of the sheet, but after a few edits, I decided to end it similar to the original song - the music suddenly stops.
                    :
                    : Okay, that would be everything I want to say about this piece.
                    : My next (and final) upload for this anime season is going to be the ED song of Oregairu S2 -  "everyday world" (ballad version).
                    : It's going to be one of my easier pieces. (fo' real this time! I promise ;_;)
                    :
                    : See you next week!
                    :
                    : Animenz
                    :
                    :
                    :
                    : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    :
                    : My facebook page:
                    : http://www.facebook.com/Animenz
                    :
                    : Follow me on Twitter!
                    : https://twitter.com/Animenzzz
                    :
                    : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    :
                    : Piano arrangement by Animenz
                    :
                    : Original Song:   Kuchizuke Diamond
                    : Anime:   Yamada-kun and the Seven Witches
                    : Published by:   A-sketch
                    : Composed by:   Yuji Sugimoto
                    : Performed by:   Weaver
                    :
                    : #KuchizukeDiamond #Weaver #Yamada-kunandtheSevenWitches
    ENCODER         : Lavf59.8.100
  Duration: 00:03:47.66, start: -0.007000, bitrate: 1436 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1280x720, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn (default)
    Metadata:
      DURATION        : 00:03:47.647000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:03:47.661000000

ytcog-dl

root@Joys-MacBook-Pro ~# ytcog-dl -d P6C3szts5C4 -v highest -x "http://127.0.0.1:1087" --metadata description,author,title,date,description,keywords
root@Joys-MacBook-Pro ~# ffprobe /private/var/root/Animenz\ Piano\ Sheets_2018-10-21\ 202417_Kuchizuke\ Diamond\ -\ Yamada-kun\ and\ the\ Seven\ Witches\ OP\ \[Piano\]_P6C3szts5C4_720p_vp9_opus.webm
Input #0, matroska,webm, from '/private/var/root/Animenz Piano Sheets_2018-10-21 202417_Kuchizuke Diamond - Yamada-kun and the Seven Witches OP [Piano]_P6C3szts5C4_720p_vp9_opus.webm':
  Metadata:
    title           : Kuchizuke Diamond - Yamada-kun and the Seven Witches OP [Piano]
    DESCRIPTION     : Hey everyone, sorry for the lack of updates recently!
                    : I was having some piano exams, and therefore I was busier than usual.
                    :
                    : Anyway, with almost 3 weeks delay, I have finally uploaded my piano cover of Kuchizuke Diamond, the OP song of yamada-kun and the seven witches. (It's also one of of my favorite Opening songs of the spring anime season 2015)
                    :
                    : Also, I have decided to arrange this song in my "old" style:
                    : Almost 100% faithful to the original song and without any "original material" - basically, not too many experiments.
                    : This transcription is also a good exercise for the left hand, because you have to train your accuracy with the left hand in order to play the fast left hand jumps. I even think this is one of my few transcriptions, where the left hand is more difficult to
                    : The most difficult part is actually the "left hand melody" beginning at 0:36, since the right hand is playing an entirely different rhythm than the left hand.
                    : Initially, I included an "original ending" for the ending segment of the sheet, but after a few edits, I decided to end it similar to the original song - the music suddenly stops.
                    :
                    : Okay, that would be everything I want to say about this piece.
                    : My next (and final) upload for this anime season is going to be the ED song of Oregairu S2 -  "everyday world" (ballad version).
                    : It's going to be one of my easier pieces. (fo' real this time! I promise ;_;)
                    :
                    : See you next week!
                    :
                    : Animenz
                    :
                    :
                    :
                    : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    :
                    : My facebook page:
                    : http://www.facebook.com/Animenz
                    :
                    : Follow me on Twitter!
                    : https://twitter.com/Animenzzz
                    :
                    : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                    :
                    : Piano arrangement by Animenz
                    :
                    : Original Song:   Kuchizuke Diamond
                    : Anime:   Yamada-kun and the Seven Witches
                    : Published by:   A-sketch
                    : Composed by:   Yuji Sugimoto
                    : Performed by:   Weaver
                    :
                    : #KuchizukeDiamond #Weaver #Yamada-kunandtheSevenWitches
    KEYWORDS        : くちづけDiamond,Kuchizuke Diamond,山田くんと七人の魔女,Yamada-kun and the Seven Witches,Weaver,ピアノ,Piano,OP,Opening,オープニング
    DATE            : none
    AUTHOR          : Animenz Piano Sheets
    ENCODER         : Lavf58.76.100
  Duration: 00:03:47.66, start: -0.007000, bitrate: 1436 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 1280x720, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn (default)
    Metadata:
      DURATION        : 00:03:47.640000000
  Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
    Metadata:
      DURATION        : 00:03:47.661000000
gatecrasher777 commented 3 years ago

You can use --metadata comment "my commentary goes in here" You can use --metadata "purl" "htps://www.youtube.com/watch?v=${id}" You can use --metadata "rating" "${rating} out of 5" You can use --metadata "category" "${category}" You can use --metadata "views" "${views} views"

You can pretty much add anything you like. You can extract video related data using the ${template} method using anything that is on the video properties list

I haven't tested all of these and ffmpeg plus the codec standards might reject some of the things you try.