Recherche avancée
Médias (91)
-
999,999
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Sur d’autres sites (346)
-
How to resolve Electron ffmpeg error opening input file ?
26 août 2023, par 3V1LXDI have an Electron app with
ffmpeg.exe
inside the project'sbin
folder. When i try to use ffmpeg to make a new video I get an error reading the input file.

FFmpeg error: [in#0 @ 000002667f2ab9c0] Error opening input: No such file or directory

Error opening input file C:/Users/xxxx/Videos/Powder/2023.08.19%2017.30.37_Apex_Legends/Powder_2023.08.19%2021.00.48.mp4



const ffmpeg = spawn(ffmpegPath, [
 '-i', videoFile,
 '-filter_complex', filterComplex,
 '-map', '[out]',
 '-c:v', 'libx264',
 '-crf', '18',
 '-preset', 'veryfast',
 '-y',
 path.join(outputDir, outputName)
]);

ffmpeg.stdout.on('data', (data) => {
 console.log(`FFmpeg output: ${data}`);
});

ffmpeg.stderr.on('data', (data) => {
 console.error(`FFmpeg error: ${data}`);
});

ffmpeg.on('close', (code) => {
 console.log(`FFmpeg process exited with code ${code}`);
 event.reply('ffmpeg-export-done'); // Notify the renderer process
});



How can i resolve this path issue ?


-
FileNotFoundError when extracting audio from recently saved video using FFMPEG"
3 août 2023, par Peter LongScenario : I'm using this tool to record tiktok live. I write another script to call the
main.py
tool because I want to add some additional options, for example, to extract the audio of the live video that is recorded

FFMPEG is used to extract the audio. First the video is saved (with FFMPEG) and after I want to extract the audio of that video (again with FFMPEG). The path where the video is recorded and saved is
C:\Users\Administrator\Desktop\tiktok


The problem is that I see the file and it is saved, but this error is generated as output :
FileNotFoundError: [WinError 2] The system cannot find the file specified


I can't figure out why it doesn't detect the last saved video file in general


I try with this


import os
import subprocess
import time
from moviepy.editor import VideoFileClip

def main():
 # Command to run main.py and record the video
 cmd = 'python main.py -user ryzebenny -output "C:\\Users\\Administrator\\Desktop\\tiktok" -ffmpeg -duration 30 --auto-convert'
 subprocess.run(cmd, shell=True)

 # Wait for the video file to appear in the folder
 wait_for_video("C:\\Users\\Administrator\\Desktop\\tiktok")

 # Extract audio from recorded video
 video_filename = find_latest_file("C:\\Users\\Administrator\\Desktop\\tiktok", ".mp4")
 if video_filename:
 video_path = os.path.join("C:\\Users\\Administrator\\Desktop\\tiktok", video_filename)
 audio_filename = video_filename.replace(".mp4", ".mp3")
 audio_path = os.path.join("C:\\Users\\Administrator\\Desktop\\tiktok", audio_filename)

 video_clip = VideoFileClip(video_path)
 audio_clip = video_clip.audio
 audio_clip.write_audiofile(audio_path)
 audio_clip.close()
 video_clip.close()
 print(f"Audio extraction completed: {audio_filename}")
 else:
 print("No video files found.")

def wait_for_video(directory):
 max_wait_time = 60 # Maximum time to wait in seconds
 start_time = time.time()
 while time.time() - start_time < max_wait_time:
 if find_latest_file(directory, ".mp4"):
 break
 time.sleep(1)

def find_latest_file(directory, extension):
 list_of_files = [f for f in os.listdir(directory) if f.endswith(extension) and os.path.isfile(os.path.join(directory, f))]
 if list_of_files:
 return max(list_of_files, key=os.path.getctime)
 return None

if __name__ == "__main__":
 main()



but i get this error


[*] 2023-08-03 15:57:09 - INFO - START RECORDING FOR 30 SECONDS
[*] 2023-08-03 15:57:09 - INFO - [PRESS 'q' TO STOP RECORDING]
[*] 2023-08-03 15:57:31 - INFO - FINISH: C:\Users\Administrator\Desktop\tiktok\TK_ryzebenny_2023.08.03_15-57-09_flv.mp4

Traceback (most recent call last):
 File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 45, in <module>
 main()
 File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 12, in main
 wait_for_video("C:\\Users\\Administrator\\Desktop\\tiktok")
 File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 34, in wait_for_video
 if find_latest_file(directory, ".mp4"):
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Users\Administrator\Desktop\tiktok\TikTok-Live-Recorder\run_main.py", line 41, in find_latest_file
 return max(list_of_files, key=os.path.getctime)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "<frozen genericpath="genericpath">", line 65, in getctime
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'TK_ryzebenny_2023.08.03_15-57-09.mp4'
</frozen></module>


Instead, I expect that once I save the video (in .mp4) the audio of that video will be extracted afterwards


-
Installing FFMPEG on my EC2 instance takes too long ; what am I doing wrong ? [closed]
24 août 2023, par Shaban KhawarI found a good article on how to download onto my EC2 instance : link
Here's the issue. It takes forever ! It takes around 15 minutes to install.


I'm running my EC2 instance on Amazon Linux 2023, so no apt-get for me.
Also my EC2 instance is created by my EB environment, so if auto-scaling occurs, my instance will be terminated and a new one will be created. I can set .ebextensions to run all the commands to install FFMPEG again but as mentioned above, it takes forever ! That means for 15-20 minutes, my server is down because of one dependancy. I feel like I'm going about this the wrong way, so any advice is appreciated.