Itay Elgazar
Itay Elgazar
RRunPod
Created by Itay Elgazar on 6/16/2024 in #⚡|serverless
Slow I/O
It looks like that:
def video_to_audio_url(video_url, output):
# Use ffmpeg to extract audio from the video
if os.path.exists(output):
os.remove(output)
process = (
ffmpeg
.input(video_url)
.output(output, format='mp3', acodec='libmp3lame')
.overwrite_output()
.run_async(pipe_stdin=True, pipe_stdout=True, pipe_stderr=True)
)

stdout, stderr = process.communicate()

if os.path.exists(output):
print("Audio extracted successfully")
return True
else:
print(f"Failed to extract audio: {stderr.decode('utf-8')}")
return False
def video_to_audio_url(video_url, output):
# Use ffmpeg to extract audio from the video
if os.path.exists(output):
os.remove(output)
process = (
ffmpeg
.input(video_url)
.output(output, format='mp3', acodec='libmp3lame')
.overwrite_output()
.run_async(pipe_stdin=True, pipe_stdout=True, pipe_stderr=True)
)

stdout, stderr = process.communicate()

if os.path.exists(output):
print("Audio extracted successfully")
return True
else:
print(f"Failed to extract audio: {stderr.decode('utf-8')}")
return False
6 replies
RRunPod
Created by Itay Elgazar on 6/16/2024 in #⚡|serverless
Slow I/O
What do you mean? I didn't configure any network volume - I simply use an URL (of an acceleerated S3 bucket) to extract the audio from that video
6 replies
RRunPod
Created by Itay Elgazar on 6/1/2024 in #⚡|serverless
JS endpoint?
Yeah. I’m trying to run ffmpeg, I have a code in JS already, I guess I’ll move it to python 😅
18 replies
RRunPod
Created by Itay Elgazar on 6/1/2024 in #⚡|serverless
JS endpoint?
@Papa Madiator But i cannot find the function "serverless.start" in JS 😮
18 replies
RRunPod
Created by Itay Elgazar on 6/1/2024 in #⚡|serverless
JS endpoint?
I need the GPU 🙂 That's really weird that there's no JS support, if we can deploy a docker image, why does it matter which language we deploy 😮
18 replies