Skip to content

Commit

Permalink
debug formats
Browse files Browse the repository at this point in the history
  • Loading branch information
shoce committed May 30, 2024
1 parent c83be7f commit 8b4faef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tgzebot.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ var (
TgUpdateLog []int64
TgZeChatId int64

TgMaxFileSizeBytes int64 = 50 * 1000 * 1000
TgMaxFileSizeBytes int64 = 50 << 20
TgAudioBitrateKbps int64 = 50

FfmpegPath string = "./ffmpeg"
Expand Down Expand Up @@ -1192,7 +1192,7 @@ func postVideo(v YtVideo, vinfo *ytdl.Video, m TgMessage) error {
fsize = int64(f.Bitrate / 8 * int(vinfo.Duration.Seconds()))
}
if strings.HasPrefix(f.MimeType, "video/mp4") && f.QualityLabel != "" && f.AudioQuality != "" {
log("format: ContentLength:%dMB Language:%+v", f.ContentLength>>20, f.LanguageDisplayName())
log("format: ContentLength:%dKB Language:%#v", f.ContentLength>>10, f.LanguageDisplayName())
if videoSmallestFormat.ItagNo == 0 || f.Bitrate < videoSmallestFormat.Bitrate {
videoSmallestFormat = f
}
Expand Down Expand Up @@ -1369,7 +1369,7 @@ func postAudio(v YtVideo, vinfo *ytdl.Video, m TgMessage) error {
fsize = int64(f.Bitrate / 8 * int(vinfo.Duration.Seconds()))
}
if strings.HasPrefix(f.MimeType, "audio/mp4") {
log("format: ContentLength:%dMB Language:%+v", f.ContentLength>>20, f.LanguageDisplayName())
log("format: ContentLength:%dKB Language:%#v", f.ContentLength>>10, f.LanguageDisplayName())
if audioSmallestFormat.ItagNo == 0 || f.Bitrate < audioSmallestFormat.Bitrate {
audioSmallestFormat = f
}
Expand Down

0 comments on commit 8b4faef

Please sign in to comment.