
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (71)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 (9310)
-
libavcodec/sanm : clear codec47 diff buffers with specific color
8 novembre 2024, par Manuel Lausslibavcodec/sanm : clear codec47 diff buffers with specific color
The codec47 header provides colors to use to clear the
2 difference buffers. This fixes artifacts (black hair, faces) in
Curse of Monkey Island "CURSERNG.SAN" video.Signed-off-by : Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by : Anton Khirnov <anton@khirnov.net> -
OSError : [Errno 9] Bad file descriptor when downloading using pytube and playing with discord.py
15 septembre 2022, par Trevor MathisenWhen using pytube to download a YouTube video and discord.py to play it, I am getting a OSError : [Errno 9] Bad file descriptor error. I've had this working at one point and can't seem to figure out what I changed which broke it.


Full traceback :


2022-09-15 20:20:44 INFO discord.voice_client The voice handshake is being terminated for Channel ID 902294184994693224 (Guild ID 902294184994693220)
2022-09-15T20:20:44.010142763Z 2022-09-15 20:20:44 INFO discord.voice_client Disconnecting from voice normally, close code 1000.
2022-09-15T20:20:44.058592513Z 2022-09-15 20:20:44 ERROR discord.player Exception in voice thread Thread-5
2022-09-15T20:20:44.058623864Z Traceback (most recent call last):
2022-09-15T20:20:44.058629130Z File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 698, in run
2022-09-15T20:20:44.058632003Z self._do_run()
2022-09-15T20:20:44.058634500Z File "/usr/local/lib/python3.10/dist-packages/discord/player.py", line 691, in _do_run
2022-09-15T20:20:44.058637013Z play_audio(data, encode=not self.source.is_opus())
2022-09-15T20:20:44.058639334Z File "/usr/local/lib/python3.10/dist-packages/discord/voice_client.py", line 683, in send_audio_packet
2022-09-15T20:20:44.058648759Z self.socket.sendto(packet, (self.endpoint_ip, self.voice_port))
2022-09-15T20:20:44.058653057Z OSError: [Errno 9] Bad file descriptor
2022-09-15T20:20:44.058673762Z 2022-09-15 20:20:44 INFO discord.player ffmpeg process 12 has not terminated. Waiting to terminate...
2022-09-15T20:20:44.062083854Z 2022-09-15 20:20:44 INFO discord.player ffmpeg process 12 should have terminated with a return code of -9.



Dockerfile :


ENV MEDIA_DIR='/media/'
RUN mkdir -p /media



Download function (check_path returns True, showing the file is there) :


def download_videos(stream, filename):
 print(f'downloading {filename}')
 filepath = stream.download(output_path=config_db.environ_path, filename=f'{filename}.mp4')
 print(f'completed download of {filepath}')
 check_path = Path(filepath)
 if check_path.is_file():
 print(check_path)
 return filepath



Play function :


async def play(voice_channel, message, control = None):
 vc = get_vc()
 if not vc:
 vc = await voice_channel.connect()
 next_yt = YouTube(next_song)
 next_file = sub(r'\W+', '', next_yt.title.replace(' ', '_').replace('__', '_')).lower()
 next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension='mp4')[0], next_file)

 await message.channel.send(f'Done getting ready, I\'ll be there in a moment.')

while next_song:
 while vc.is_playing():
 await asynciosleep(0.5)
 continue

 try:
 vc.play(FFmpegPCMAudio(next_song_path))
 print(f'Playing {next_song_path} with latency of {vc.average_latency}')
 vc.source = PCMVolumeTransformer(vc.source, volume=0.15)
 except Exception as e:
 print(e)
 await vc.disconnect()
 next_song = None
 return
 next_song = sounds_db.get_next_song()
 next_yt = YouTube(next_song) if next_song else None
 next_file = sub(r'\W+', '', next_yt.title.replace(' ', '_').replace('__', '_')).lower() if next_song else None
 next_song_path = download_videos(next_yt.streams.filter(only_audio=True, file_extension='mp4')[0], next_file) if next_song else None



I've mounted the /media/ dir during docker -v and can see the file is getting downloaded and when I copy the file to my local machine I can play it in an audio player.


The program can access the SQLite database right next to the files in question just fine.


I've deployed the container locally and to two different VPS's with the same file structure with the same behavior. I'm ripping my hair out.


-
FFMPEG issue with concat video made from single image
12 mai 2023, par JacobI am pulling my hair out right now. I am developing a video editing program. When I export two videos, concat works great. However, when I create a video from a single image (title screen) and try to concat that video with a regular video, only the title screen is exported. And no errors.


Below is the code for creating the title screen :


parameters = "-loop 1 -i " + '"' + video.VideoThumbPath + '"' + " -c:v libx264 -t " + video.TitleDuration.ToString() + " -pix_fmt yuv420p " + vidPath + @"\v" + outputFile.ToString() + ".MP4";



Below is the code for exporting a regular non title screen video :


parameters = "-y -i " + '"' + frames[0].VideoPath + '"' + " -filter_complex " + '"' + @"[0:v]trim=" + frames[0].TimeCode.TotalSeconds + @":" + frames[1].TimeCode.TotalSeconds +
 @", setpts=PTS-STARTPTS[trimedv0];[trimedv0]yadif," + orientation + @"setsar=1/1, eq=contrast=1:brightness=" + video.Brightness + '"' + " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " +
 @"-pix_fmt yuv420p -f mpegts " + vidPath + @"\v" + outputFile.ToString() + ".MP4";



Below is the code to concat both videos :


parameters = "-probesize 100M -analyzeduration 100M -i concat:" + '"' + concatString + '"' + @" -c:v copy " + '"' + ExportOptions.CompleteDestinationPath + '"';



Like I said, using this code for two MP4 video that were not made from a single image, it works great. If I create a MP4 from a single image with a duration of 5 seconds and concat it with a normal MP4, only the title screen is exported.


Below is the output from FFMPEG. It shows the concat string with 2 videos but only concats the first one.


09:59:32:366 ffmpeg version N-110043-gadb5f7b41f-20230318 Copyright (c) 2000-2023 the FFmpeg developers



09:59:32:366 built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1)
09:59:32:366 configuration : —prefix=/ffbuild/prefix —pkg-config-flags=—static —pkg-config=pkg-config —cross-prefix=x86_64-w64-mingw32- —arch=x86_64 —target-os=mingw32 —enable-gpl —enable-version3 —disable-debug —disable-w32threads —enable-pthreads —enable-iconv —enable-libxml2 —enable-zlib —enable-libfreetype —enable-libfribidi —enable-gmp —enable-lzma —enable-fontconfig —enable-libvorbis —enable-opencl —disable-libpulse —enable-libvmaf —disable-libxcb —disable-xlib —enable-amf —enable-libaom —enable-libaribb24 —enable-avisynth —enable-chromaprint —enable-libdav1d —enable-libdavs2 —disable-libfdk-aac —enable-ffnvcodec —enable-cuda-llvm —enable-frei0r —enable-libgme —enable-libkvazaar —enable-libass —enable-libbluray —enable-libjxl —enable-libmp3lame —enable-libopus —enable-librist —enable-libssh —enable-libtheora —enable-libvpx —enable-libwebp —enable-lv2 —disable-libmfx —enable-libvpl —enable-openal —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenh264 —enable-libopenjpeg —enable-libopenmpt —enable-librav1e —enable-librubberband —enable-schannel —enable-sdl2 —enable-libsoxr —enable-libsrt —enable-libsvtav1 —enable-libtwolame —enable-libuavs3d —disable-libdrm —disable-vaapi —enable-libvidstab —enable-vulkan —enable-libshaderc —enable-libplacebo —enable-libx264 —enable-libx265 —enable-libxavs2 —enable-libxvid —enable-libzimg —enable-libzvbi —extra-cflags=-DLIBTWOLAME_STATIC —extra-cxxflags= —extra-ldflags=-pthread —extra-ldexeflags= —extra-libs=-lgomp —extra-version=20230318
09:59:32:366 libavutil 58. 4.100 / 58. 4.100
09:59:32:366 libavcodec 60. 6.101 / 60. 6.101
09:59:32:366 libavformat 60. 4.100 / 60. 4.100
09:59:32:366 libavdevice 60. 2.100 / 60. 2.100
09:59:32:366 libavfilter 9. 4.100 / 9. 4.100
09:59:32:366 libswscale 7. 2.100 / 7. 2.100
09:59:32:366 libswresample 4. 11.100 / 4. 11.100
09:59:32:366 libpostproc 57. 2.100 / 57. 2.100
09:59:32:366 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'concat:C :\Users\JDINES\AppData\Roaming\FCS\VidBin\v1000.MP4|C :\Users\JDINES\AppData\Roaming\FCS\VidBin\v1001.MP4' :
09:59:32:366 Metadata :
09:59:32:366 major_brand : isom
09:59:32:366 minor_version : 512
09:59:32:366 compatible_brands : isomiso2avc1mp41
09:59:32:366 encoder : Lavf60.4.100
09:59:32:366 Duration : 00:00:05.00, start : 0.000000, bitrate : 64102 kb/s
09:59:32:366 Stream #0:00x1 : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 18 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
09:59:32:366 Metadata :
09:59:32:366 handler_name : VideoHandler
09:59:32:366 vendor_id : [0][0][0][0]
09:59:32:366 encoder : Lavc60.6.101 libx264
09:59:32:366 Output #0, mp4, to 'C :\Users\JDINES\Desktop\EXPORT TEST\qwe.MP4' :
09:59:32:366 Metadata :
09:59:32:366 major_brand : isom
09:59:32:366 minor_version : 512
09:59:32:366 compatible_brands : isomiso2avc1mp41
09:59:32:366 encoder : Lavf60.4.100
09:59:32:366 Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p(tv, unknown/bt709/iec61966-2-1, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 18 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
09:59:32:366 Metadata :
09:59:32:366 handler_name : VideoHandler
09:59:32:366 vendor_id : [0][0][0][0]
09:59:32:366 encoder : Lavc60.6.101 libx264
09:59:32:366 Stream mapping :
09:59:32:366 Stream #0:0 -> #0:0 (copy)
09:59:32:366 Press [q] to stop, [?] for help
09:59:32:366 frame= 0 fps=0.0 q=-1.0 size= 0kB time=-00:00:00.06 bitrate= -0.0kbits/s speed=N/A

frame= 150 fps=0.0 q=-1.0 Lsize= 14kB time=00:00:04.90 bitrate= 23.4kbits/s speed=2e+03x

09:59:32:366 video:11kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead : 23.005581%

Any help would be much appreciated !


I figured this out finally !!!


The below code fixed it :


parameters = "-loop 1 -i " + '"' + video.VideoThumbPath + '"' + " -sn -an -c:v libx264 -preset ultrafast -profile:v baseline -level 3.0 " +
 @"-t 5 -pix_fmt yuv420p -f mpegts " + vidPath + @"\v" + outputFile.ToString() + ".MP4";