'Error code: 400. Description: Bad Request: wrong file identifier/HTTP URL specified"
After drop video in bot chat I'm getting this problem: Error code: 400. Description: Bad Request: wrong file identifier/HTTP URL specified"
import ffmpeg
import telebot
bot = telebot.TeleBot("Token", parse_mode=None)
@bot.message_handler(content_types=['document', 'photo', 'audio', 'video', 'voice'])
def addfile(message):
file_name = 'videoname.mp4'
file_info = bot.get_file(message.video.file_id)
downloaded_file = bot.download_file(file_info.file_path)
with open(file_name, 'wb') as new_file:
new_file.write(downloaded_file)
(ffmpeg.input('videoname.mp4')
.filter('hflip')
.filter('contrast', contrast=0.9)
.filter('gamma_b', gamma_b=1.3)
.filter('saturation', saturation=1)
.output('out.mp4'))
bot.send_document(MyID, 'out.mp4' ) #MyID - My Telegram ID
bot.infinity_polling()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|