
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (66)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)
Sur d’autres sites (7518)
-
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


-
lavc/qsvenc_hevc : restore the default gop size
11 août 2023, par Haihao Xianglavc/qsvenc_hevc : restore the default gop size
commit a3c0a3e changed the default settings and expected the runtime can
choose a best value. However the runtime doesn't set a valid gop size
for hevc encoder, hence the output steam is non-seekable, which is
inconvenient to user [1][2][1] https://github.com/intel/media-driver/issues/1576
[2] https://ffmpeg.org/pipermail/ffmpeg-user/2023-August/056716.htmlSigned-off-by : Haihao Xiang <haihao.xiang@intel.com>
-
Pydub : How to ave audio after convert it to aac ?
4 août 2023, par suvodipMondalI am using django admin form to recieve a audio input, and I am trying to convert it into
aac
format withpydub
.
I have installedffmpeg
in my system and also addedpydub
andffmpeg-python
as dependencies.

Here is the django ModelAdmin :


class AudioAdmin(admin.ModelAdmin):
 fields = ('file', 'bit_rate', 'format')
 list_display = ('id', 'file', 'bit_rate', 'format', 'content_type')

 def save_model(self, request, obj, form, change):
 audio_file = form.cleaned_data['file']
 _, file_extension = os.path.splitext(audio_file.name)
 curr_audio = AudioSegment.from_file(file=audio_file, format=file_extension.replace('.', ''))
 new_audio = curr_audio.export(out_f=audio_file.name, format="aac")
 obj.file = new_audio
 obj.save()




I am still getting this error while converting an mp3 file in
aac
format.

raise CouldntEncodeError(
pydub.exceptions.CouldntEncodeError: Encoding failed. ffmpeg/avlib returned error code: 1
Command:['ffmpeg', '-y', '-f', 'wav', '-i', '/var/folders/8g/230x9vx55p7c0bdwx0cmzx9r0000gq/T/tmpxaetjjk0', '-f', 'aac', '/var/folders/8g/230x9vx55p7c0bdwx0cmzx9r0000gq/T/tmpa3ae8nn1']
Output from ffmpeg/avlib:
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.202)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
 libavutil 58. 2.100 / 58. 2.100
 libavcodec 60. 3.100 / 60. 3.100
 libavformat 60. 3.100 / 60. 3.100
 libavdevice 60. 1.100 / 60. 1.100
 libavfilter 9. 3.100 / 9. 3.100
 libswscale 7. 1.100 / 7. 1.100
 libswresample 4. 10.100 / 4. 10.100
 libpostproc 57. 1.100 / 57. 1.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from '/var/folders/8g/230x9vx55p7c0bdwx0cmzx9r0000gq/T/tmpxaetjjk0':
 Duration: 00:03:14.72, bitrate: 1411 kb/s
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
[NULL @ 0x7fe40da072c0] Requested output format 'aac' is not a suitable output format
/var/folders/8g/230x9vx55p7c0bdwx0cmzx9r0000gq/T/tmpa3ae8nn1: Invalid argument