Reland "Fix a bug in barcode_decoder.py"
This is a reland of 5c2de6b3ce079cff52c411a2c02ce6553a38dc79 Original change's description: > Fix a bug in barcode_decoder.py > > When converting from a .y4m file, it's illegal to pass a video_size > option since the resolution is already contained in the .y4m file. > > Bug: webrtc:9642 > Change-Id: Iee7d2ba1332c45a1669af0fba43b0c3e7ce5846b > Reviewed-on: https://webrtc-review.googlesource.com/95949 > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > Commit-Queue: Magnus Jedvert <magjed@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#24431} Bug: webrtc:9642 Change-Id: Iea6aad249839f9b1dad830bdf194cef2cc7dcfa6 Reviewed-on: https://webrtc-review.googlesource.com/97441 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24542}
This commit is contained in:
parent
a421775a6d
commit
5292654d7b
@ -44,9 +44,13 @@ def ConvertYuvToPngFiles(yuv_file_name, yuv_frame_width, yuv_frame_height,
|
||||
output_files_pattern = os.path.join(output_directory, 'frame_%04d.png')
|
||||
if not ffmpeg_path:
|
||||
ffmpeg_path = 'ffmpeg.exe' if sys.platform == 'win32' else 'ffmpeg'
|
||||
if yuv_file_name.endswith('.yuv'):
|
||||
command = [ffmpeg_path, '-s', '%s' % size_string, '-i', '%s'
|
||||
% yuv_file_name, '-f', 'image2', '-vcodec', 'png',
|
||||
'%s' % output_files_pattern]
|
||||
else:
|
||||
command = [ffmpeg_path, '-i', '%s' % yuv_file_name, '-f', 'image2',
|
||||
'-vcodec', 'png', '%s' % output_files_pattern]
|
||||
try:
|
||||
print 'Converting YUV file to PNG images (may take a while)...'
|
||||
print ' '.join(command)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user