0

I am using aws Mediaconvert Service to convert .mp4 files to streaming for one video I am getting following error from mediainfo lambda function which was created automatically by aws:

[ERROR] ValueError: could not convert string to float: '128000 / 128000'
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 157, in lambda_handler
    raise err
  File "/var/task/lambda_function.py", line 132, in lambda_handler
    metadata.setdefault('audio', []).append(parse_audio_attributes(track))
  File "/var/task/lambda_function.py", line 79, in parse_audio_attributes
    attributes = parse_common_attributes(track)
  File "/var/task/lambda_function.py", line 48, in parse_common_attributes
    attributes['bitrate'] = parse_number(track.get('BitRate'))
  File "/var/task/lambda_function.py", line 27, in parse_number
    return float(num)

I see also in MediaInfo output following information about the .mp4 file which should be converted:

 "BitRate_Mode": "VBR",
 "BitRate": "128000 / 128000", ...

How can I fix it? I mean the lambda function was created automatically and stored on s3 (I dont have access to the code or?) and the .mp4-file is a valid file for other .mp4 files it works fine.

Could you please help me by that?

Apophis
  • 273
  • 1
  • 9

1 Answers1

0

It appears that error is in the Lambda function. You can access and edit your lambda function code from the AWS Console or AWS CLI.

In general, the Bitrate parameter should be a single integer. When using Variable Bitrate(VBR) or QVBR, additional parameters are required.

You can see all of the available parameters in the MediaConvert API Guide at : https://docs.aws.amazon.com/mediaconvert/latest/apireference/mediaconvert-api.pdf

aws-robclem
  • 324
  • 2
  • 5