From 7323e9f98682cf3d2344dd2c022f2efff34f85df Mon Sep 17 00:00:00 2001 From: Scott Dial Date: Mon, 14 Nov 2016 01:01:21 -0500 Subject: [PATCH] Use -bsf:v to avoid issues with unsupported audio Previously, using -bsf would sometimes give an error for an unsupported codec (e.g., ac3 for h264_mp4toannexb, since h264_mp4toannexb is intended only to repack H264 video from an mp4 file). Using of the ":v" suffix isolates the use of the bitstream filter to only the video stream as the code really intended. --- plugins/video/transcode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/video/transcode.py b/plugins/video/transcode.py index 0175196f..2e74210e 100644 --- a/plugins/video/transcode.py +++ b/plugins/video/transcode.py @@ -321,9 +321,9 @@ def select_videocodec(inFile, tsn, mime=''): if (mime == 'video/x-tivo-mpeg-ts'): org_codec = vInfo.get('vCodec', '') if org_codec == 'h264': - codec += ['-bsf', 'h264_mp4toannexb'] + codec += ['-bsf:v', 'h264_mp4toannexb'] elif org_codec == 'hevc': - codec += ['-bsf', 'hevc_mp4toannexb'] + codec += ['-bsf:v', 'hevc_mp4toannexb'] else: codec += ['mpeg2video', '-pix_fmt', 'yuv420p'] # default return codec