Fix message display.

This commit is contained in:
Frédéric Tronel
2023-12-02 21:17:16 +01:00
parent bb5333ffca
commit cb600b920d

View File

@@ -537,7 +537,6 @@ def extractAllStreams(inputFile, begin, end, streams, filesPrefix, nbFrames, wid
'-color_trc:v:%d' % videoID, colorTransfer, '-color_range:v:%d' % videoID, colorRange]) '-color_trc:v:%d' % videoID, colorTransfer, '-color_range:v:%d' % videoID, colorRange])
videoID=videoID+1 videoID=videoID+1
elif stream['codec_type'] == 'audio': elif stream['codec_type'] == 'audio':
logger.info("Extracting %d packets of audio stream: a:%d" % (audioID,nbPackets))
sampleRate = int(stream['sample_rate']) sampleRate = int(stream['sample_rate'])
nbChannels = int(stream['channels']) nbChannels = int(stream['channels'])
bitRate = int(stream['bit_rate']) bitRate = int(stream['bit_rate'])
@@ -553,6 +552,7 @@ def extractAllStreams(inputFile, begin, end, streams, filesPrefix, nbFrames, wid
if packetDuration == None: if packetDuration == None:
return None return None
logger.info("Extracting %d packets of audio stream: a:%d" % (nbPackets, audioID))
tmpname = '%s-%d.pcm' % (filesPrefix,audioID) tmpname = '%s-%d.pcm' % (filesPrefix,audioID)
soundBytes , memfd = extractSound(inputFile=inputFile, begin=begin, nbPackets=nbPackets, packetDuration=packetDuration, outputFileName=tmpname, sampleRate=sampleRate, nbChannels=nbChannels) soundBytes , memfd = extractSound(inputFile=inputFile, begin=begin, nbPackets=nbPackets, packetDuration=packetDuration, outputFileName=tmpname, sampleRate=sampleRate, nbChannels=nbChannels)