Skip to content

Commit

Permalink
Fix headers argument handling in ffmpeg recorder
Browse files Browse the repository at this point in the history
Corrected the way headers are joined in the popen_args to ensure proper formatting. Also added the import of header from tensorflow.tools.docs.doc_controls.

Signed-off-by: hldh214 <[email protected]>
  • Loading branch information
hldh214 committed Sep 11, 2024
1 parent c0490c4 commit 4d877ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recorder/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import tempfile

import tqdm
from tensorflow.tools.docs.doc_controls import header

import recorder

Expand Down Expand Up @@ -37,7 +38,7 @@ def record(input_url, output_file, max_duration, max_size, headers=None, args=No
]

if headers is not None:
popen_args.extend(['-headers', headers.join('\n')])
popen_args.extend(['-headers', '\n'.join(headers)])

popen_args.extend(['-i', input_url, '-c', 'copy'])

Expand Down

0 comments on commit 4d877ef

Please sign in to comment.