Tyrrrz / YoutubeDownloader

Downloads videos and playlists from YouTube
MIT License
8.7k stars 1.19k forks source link

"Inject media tags" is disabled but title (bitrate of audio stream) is still injected into final file #424

Closed litetex closed 6 months ago

litetex commented 6 months ago

Version

v1.10.11

Platform

Windows

Steps to reproduce

  1. Set "Inject media tags" to disabled.
  2. Download any video as ogg file (i tested it with https://www.youtube.com/watch?v=MkNeIUgNPQ8 ).

The bitrate of the audio stream is set as title: g

ffmpeg version 6.1.1-essentials_build-www.gyan.dev
...
Input #0, ogg, from 'Adventures – A Himitsu (No Copyright Music).ogg':
  Duration: 00:03:44.44, start: 0.004333, bitrate: 107 kb/s
  Stream #0:0(eng): Audio: vorbis, 48000 Hz, stereo, fltp, 112 kb/s
    Metadata:
      title           : 150,24 Kbit/s
      encoder         : Lavc60.31.102 libvorbis

Details

The problem is likely related to https://github.com/Tyrrrz/YoutubeExplode/blob/ac779eabc18b5a300bce6eb459352bb1f3415b3e/YoutubeExplode.Converter/Converter.cs#L121 and other lines that set the title.

For me this code looks like something that was left over from debugging and I think that it should be removed.

The problem does not occur when downloading in as mp3:

ffmpeg version 6.1.1-essentials_build-www.gyan.dev
...
Input #0, mp3, from 'Adventures – A Himitsu (No Copyright Music).mp3':
  Metadata:
    encoder         : Lavf60.16.100
  Duration: 00:03:44.47, start: 0.023021, bitrate: 160 kb/s
  Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 160 kb/s
    Metadata:
      encoder         : Lavc60.31
However the title was still set before inside the code ![g](https://github.com/Tyrrrz/YoutubeDownloader/assets/40789489/9982bc13-4d70-4862-a726-0b5dc52b6b94) for further comparison here the ogg version: ![g](https://github.com/Tyrrrz/YoutubeDownloader/assets/40789489/f6a858f0-adc2-4053-acba-2d00a0101a65)

Checklist

Tyrrrz commented 6 months ago

Perhaps a bit confusing, but "inject media tags" refers to injecting YouTube video-related metadata (title, description, author, etc.), as well as artist tags (if downloading an audio file).

Metadata related to audio/video streams and caption tracks is always injected if the media container supports it.