
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (79)
-
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (11638)
-
Why is audio bitrate value of ffprobe output higher ?
9 mars 2023, par 19xlr95When I check audio bitrate of my video via OS file details, media players or
ffprobe -i my_video.mp4
, I get the bitrate is128 kbps
. And I want to get more detailed meta information of the video byffprobe -loglevel 0 -print_format json -show_format -show_streams my_video.mp4
. However audio bitrate value of the output is128615 bps
.

I thought it should be
128000
not128615
. Or128 x 1024 = 131072
. I wonder why it is not one of the values that I assumed. Also how can I safely say that this128615 bps
is128 kbps
?

Below is the detailed meta information for my video.


{
 "streams": [
 {
 "index": 0,
 "codec_name": "aac",
 "codec_long_name": "AAC (Advanced Audio Coding)",
 "profile": "LC",
 "codec_type": "audio",
 "codec_tag_string": "mp4a",
 "codec_tag": "0x6134706d",
 "sample_fmt": "fltp",
 "sample_rate": "48000",
 "channels": 2,
 "channel_layout": "stereo",
 "bits_per_sample": 0,
 "initial_padding": 0,
 "id": "0x1",
 "r_frame_rate": "0/0",
 "avg_frame_rate": "0/0",
 "time_base": "1/48000",
 "start_pts": 0,
 "start_time": "0.000000",
 "duration_ts": 965760,
 "duration": "20.120000",
 "bit_rate": "128615",
 "nb_frames": "946",
 "extradata_size": 2,
 "disposition": {
 "default": 1,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0,
 "captions": 0,
 "descriptions": 0,
 "metadata": 0,
 "dependent": 0,
 "still_image": 0
 },
 "tags": {
 "creation_time": "2023-02-20T09:00:58.000000Z",
 "language": "deu",
 "handler_name": "Core Media Audio",
 "vendor_id": "[0][0][0][0]"
 }
 },
 {
 "index": 1,
 "codec_name": "h264",
 "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
 "profile": "High",
 "codec_type": "video",
 "codec_tag_string": "avc1",
 "codec_tag": "0x31637661",
 "width": 1080,
 "height": 1920,
 "coded_width": 1080,
 "coded_height": 1920,
 "closed_captions": 0,
 "film_grain": 0,
 "has_b_frames": 0,
 "sample_aspect_ratio": "1:1",
 "display_aspect_ratio": "9:16",
 "pix_fmt": "yuv420p",
 "level": 42,
 "color_range": "tv",
 "color_space": "bt709",
 "color_transfer": "bt709",
 "color_primaries": "bt709",
 "chroma_location": "left",
 "field_order": "progressive",
 "refs": 1,
 "is_avc": "true",
 "nal_length_size": "4",
 "id": "0x2",
 "r_frame_rate": "50/1",
 "avg_frame_rate": "50/1",
 "time_base": "1/50000",
 "start_pts": 0,
 "start_time": "0.000000",
 "duration_ts": 1006000,
 "duration": "20.120000",
 "bit_rate": "20958903",
 "bits_per_raw_sample": "8",
 "nb_frames": "1006",
 "extradata_size": 35,
 "disposition": {
 "default": 1,
 "dub": 0,
 "original": 0,
 "comment": 0,
 "lyrics": 0,
 "karaoke": 0,
 "forced": 0,
 "hearing_impaired": 0,
 "visual_impaired": 0,
 "clean_effects": 0,
 "attached_pic": 0,
 "timed_thumbnails": 0,
 "captions": 0,
 "descriptions": 0,
 "metadata": 0,
 "dependent": 0,
 "still_image": 0
 },
 "tags": {
 "creation_time": "2023-02-20T09:00:58.000000Z",
 "language": "und",
 "handler_name": "Core Media Video",
 "vendor_id": "[0][0][0][0]"
 }
 }
 ],
 "format": {
 "filename": "my_video.mp4",
 "nb_streams": 2,
 "nb_programs": 0,
 "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
 "format_long_name": "QuickTime / MOV",
 "start_time": "0.000000",
 "duration": "20.120000",
 "size": "53309460",
 "bit_rate": "21196604",
 "probe_score": 100,
 "tags": {
 "major_brand": "mp42",
 "minor_version": "1",
 "compatible_brands": "isommp41mp42",
 "creation_time": "2023-02-20T09:00:58.000000Z"
 }
 }
}



I checked 1 kbps is 1000 bps and assumed 128 kbps of the audio bitrate should be 128000 bps. But it is 128615 bps when I run
ffprobe
.

-
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


-
Why is the ffmpeg process in discordpy terminating without playing anything ?
18 janvier 2024, par Bummbumm6I'm making a discord bot for playing music (ik very unoriginal) and everytime I try to play music, it gives this error :


2023-02-18 12:31:54 INFO discord.player ffmpeg process 4024 has not terminated. Waiting to terminate...
2023-02-18 12:31:54 INFO discord.player ffmpeg process 4024 should have terminated with a return code of -9.



It is in the voice chat and didn't play anything. Here's my code if you need it :


print("defining functions")
import discord, pytube, os, threading
from moviepy import editor
from discord.ext.commands import Bot
intents=discord.Intents.default()
intents.message_content = True
intents.voice_states = True
bot = Bot("b!",intents=intents)
check = False
token = "redacted"
@bot.command()
async def play(ctx, arg):
 await ctx.send("Downloading...")
 try:
 yt = pytube.YouTube(arg)
 print("STREAM: "+str(yt.streams.filter(only_audio=True,mime_type="audio/webm",type="audio",abr="160kbps")))
 def download(yt):
 print("DOWNLOADING STREAM TO AUDIO.WEBM")
 yt.streams.filter(only_audio=True,mime_type="audio/webm",type="audio",abr="160kbps").order_by("abr").first().download(filename="audio.webm")
 print("EXPORTING TO MP3")
 editor.AudioFileClip("audio.webm").write_audiofile("audio.webm"[:-5] + ".mp3")
 os.remove("audio.webm")
 print("DONE")
 thread = threading.Thread(target=download, args=(yt,))
 thread.start()
 thread.join()
 try:
 channel = ctx.author.voice.channel
 try:
 vc = await channel.connect()
 except Exception:
 ctx.send("already in vc, one sec")
 except Exception:
 pass
 vc.play(discord.FFmpegPCMAudio(source="audio.mp3", executable="./ffmpeg"))
 except Exception:
 pass
bot.run(token)




It worked on my computer in VS Code, but I wanted to test it on Replit and only there I got the error. I tried :


- 

- Reinstalling discord, pynacl, even pytube and moviepy.
- Using a local copy of ffmpeg on replit, see line 36.
- Adding the intents that were described in a different thread.








One thing that always happens is the exit code being -9 but the process number changing (ofc). I saw a GitHub Issue about this too which is not showing a fix so how do I fix that ?