LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
9.98k stars 1.4k forks source link

Silence ID3v2 Warn Logs during audio file update #4403

Closed yarodevuci closed 4 months ago

yarodevuci commented 4 months ago

Code that causes the issue

 async with bot.action(chat_id, 'song') as action:
                await bot.send_file(
                    event.chat_id,
                    file=downloaded_file_name

Expected behavior

No output Logs

Actual behavior

 [warn] Skip ID3v2 tag TXXX: description: [{"make":"","videoIndex":1,"userSystem":"14","appRecord":"0","MD5":"68bf0ccb093750e4c793fb24ad0c2734","videoDevice":"","system":"14","userDevice":"SM-S901B","deviceResolution":[],"importPath":"content:\/\/media\/external\/video\/media\/1000063501","videoResolution":{"width":1080,"height":1920},"videoDuration":60333,"isRecord":0,"isCropped":1}]
 [warn] Skip ID3v2 tag TXXX: minor_version: 512
 [warn] Skip ID3v2 tag TXXX: compatible_brands: isomiso2hvc1mp41
: [warn] Skip ID3v2 tag TXXX: Hw: 1
[warn] Skip ID3v2 tag TXXX: LvMetaInfo: {"data":{"ad_type":"","adsTemplateId":"","appVersion":"12.1.1","businessComponentId":"","businessTemplateId":"","capabilityName":"filter_174482225","ccTtVid":"72324345","commercial_params":{"commercial_audio_music_cnt":0,"commercial_sticker_cnt":0,"commercial_text_font_cnt":0,"commercial_text_template_cnt":0,"commercial_tone_cnt":0},"draftInfo":{"adjust":0,"aiInPaintingCnt":0,"aiMatting":0,"aiOutPaintingCnt":0,"aiStickerCnt":0,"aiTranslateCnt":0,"audioToText":0,"chroma":0,"colorCorrectCnt":0,"coverTemplateId":"","curveSpeed":0,"digitalHumanCnt":0,"faceEffectId":"","filterId":"174482225","gameplayAlgorithm":"","graphs":0,"keyframe":0,"mask":0,"mixMode":0,"motion_blur_cnt":0,"movie3dTextTemplateId":"","normalSpeed":1,"objectLocked":0,"pip":0,"reduceNoiseCnt":0,"removeFlickersCnt":0,"reverse":0,"slowMotion":0,"smartColorCnt":0,"smartMotion":0,"smartReframeCnt":0,"soundId":"","stickerId":"","textAnimationId":"","textEffectId":"","textShapeId":"","textTemplateId":"","textToAudio":0,"transitionId":"","videoAnimationId":"","videoEffectId":"","videoMaterialId":"","videoTracking":0,"vocalSeparation":0},"editSource":"","editType":"edit","enterFrom":"draft","exportType":"export","extendTemplateId":"","extendTemplateType":0,"filterId":"","greenscreenLayoutType":"","infoStickerId":"","is_from_knowledge_share":0,"is_keyframe":0,"is_mid_template":0,"is_use_ai_translation":0,"is_use_relight":0,"is_use_smart_motion":0,"is_use_vision_to_video":0,"is_use_voice_clone":0,"is_use_voice_optimization":false,"is_velocity_edited":0,"launchMode":"launch","lock_cnt_list":"","movie3dTextTemplateId":"","musicId":"","music_volume":0,"original_volume":1000,"os":"android","product":"vicut","region":"DE","resourceTypeApplied":"","slowMotion":"none","stickerId":"","templateId":"","textSpecialEffect":"","theme_params":"[]","transferMethod":"","transitions":"","useSpecialEffectKeyFrame":0,"used_ugc_timbre_info":"{\"text_to_speech\":[],\"voice_conversion\":[]}","videoAnimation":"","videoEffectId":"","videoId":"ca013e7b-9fa5-42f4-8f82-ce97f4c89456"},"source_type":"vicut"}
 aigc_info: {"aigc_label_type":0,"source_info":""}
: bitrate: 7000000
: com.apple.quicktime.information: {"data":{"prop_list":[],"product":"aweme"}}
 major_brand: isom
 te_is_fast_import: 1
 te_is_reencode: 1
 [warn] Skip ID3v2 tag TSSE: Lavf58.28.101

Traceback

No response

Telethon version

1.36.0

Python version

3.10

Operating system (including distribution name and version)

Ubuntu, Windows

Other details

I am looking to see if this is a bug or ways to silence this warning during audio uploads?

Checklist

Lonami commented 4 months ago

This is not coming from Telethon. If you don't want the library to infer media metadata with external libraries, provide the media attributes yourself.

yarodevuci commented 4 months ago

@Lonami so you are saying this WARN logs are coming because not attributes are passed?

Lonami commented 4 months ago

I don't know for sure. I haven't checked. But the library will use hachoir to autodetect media attributes when these are not provided.

yarodevuci commented 4 months ago

Thanks for the answer! I will double check my assumption.