Может кто-нибудь посоветовать.
Код:
импорт ffmpeg
подпроцесс импорта
def find_corrupt_frames(mxf_file_path):
corrupt_frames = []
Код: Выделить всё
# Run ffmpeg command to check for errors and get frame information
command = [
'ffmpeg',
'-v', 'error', # Show only error messages
'-i', mxf_file_path, # Input file
'-f', 'null', # Output format (null for no actual output)
'-' # Use dash to indicate no output file
]
try:
# Execute the ffmpeg command
process = subprocess.run(command, capture_output=True, text=True)
# Parse the error messages to find corrupt frames
if process.stderr:
for line in process.stderr.split('\n'):
if 'error' in line.lower():
print(f"Error found: {line}")
# Extract frame information from the error message
if 'fr ame=' in line:
frame_info = line.split('frame=')[1].split()[0]
corrupt_frames.append(int(frame_info))
except Exception as e:
print(f"Failed to process MXF file: {e}")
return corrupt_frames
mxf_file_path = '\\AAAAA\Users13$\ijayaram\Down\XXXXXXX'
corrupt_frames = find_corrupt_frames(mxf_file_path)
если поврежденные_фреймы:
print(f"Поврежденные кадры найдены по индексам: {corrupt_frames}")
else:
print(" Поврежденных кадров не обнаружено."
Код: Выделить всё
output :
5b40] Error submitting packet to decoder: Invalid data found when processing input
Обнаружена ошибка : [aist#0:0/mp2 @ 00000193c260f880] [dec:mp2 @ 00000193c25e5b40] Ошибка отправки пакета в декодер: при обработке ввода обнаружены неверные данные
Обнаружена ошибка: [aist#0:0/mp2 @ 00000193c260f880] [dec:mp2 @ 00000193c25e5b40] Ошибка отправки пакета в декодер: при обработке ввода обнаружены неверные данные
Обнаружена ошибка: [aist#0:0/mp2 @ 00000193c260f880] [dec:mp2 @ 00000193c25e5b40] Ошибка отправки пакета в декодер: при обработке обнаружены неверные данные ввод
Ошибка найдено: [aist#0:0/mp2 @ 00000193c260f880] [dec:mp2 @ 00000193c25e5b40] Ошибка отправки пакета в декодер: при обработке ввода обнаружены неверные данные
Подробнее здесь: https://stackoverflow.com/questions/793 ... -input-ffm
Мобильная версия