
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
Autres articles (39)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (6379)
-
MP4 to HLS conversion error after resizing video using FFmpeg
26 juillet 2023, par ITeptIcklyTaWhen trying to create HLS stream from original video, FFmpeg creates HLS stream without errors.


~ $ ffmpeg -i test.mp4 -f hls -hls_time 3 -hls_segment_filename seg%02d.ts stream.m3u8



But when I resize video using this command, I get a timestamps warning :


~ $ ffmpeg -i test.mp4 -vf scale=426:240 test_240p.mp4
[mp4 @ 0xb400007429e52d00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 0xb400007429e52d00] Encoder did not produce proper pts, making some up.



And when creating HLS stream from resized video, I'm getting an error :


~ $ ffmpeg -i test_240p.mp4 -f hls -hls_time 3 -hls_segment_filename seg%02d.ts stream.m3u8 ffmpeg version N-111626-g0ba719f726 Copyright (c) 2000-2023 the FFmpeg developers
 built with clang version 16.0.6
 configuration: --arch=aarch64 --as=aarch64-linux-android-clang --cc=aarch64-linux-android-clang --cxx=aarch64-linux-android-clang++ --nm=llvm-nm --pkg-config=/data/data/com.termux/files/usr/bin/pkg-config --strip=llvm-strip --cross-prefix=aarch64-linux-android- --disable-indevs --disable-outdevs --enable-indev=lavfi --disable-static --disable-symver --enable-cross-compile --enable-gnutls --enable-gpl --enable-jni --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgme --enable-libmp3lame --enable-libopus --enable-librav1e --enable-libsoxr --enable-libsrt --enable-libssh --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mediacodec --enable-opencl --enable-shared --prefix=/data/data/com.termux/files/usr --target-os=android --extra-libs=-landroid-glob --disable-vulkan --enable-neon --disable-libfdk-aac libavutil 58. 14.100 / 58. 14.100 libavcodec 60. 22.100 / 60. 22.100
 libavformat 60. 10.100 / 60. 10.100 libavdevice 60. 2.101 / 60. 2.101
 libavfilter 9. 10.100 / 9. 10.100
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_240p.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.10.100
 Duration: 00:00:10.01, start: 0.000000, bitrate: 178 kb/s
 Stream #0:0[0x1](und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709/bt709/smpte170m, progressive), 426x240, 44 kb/s, SAR 640:639 DAR 16:9, 25 fps, 25 tbr, 12800 tbn (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 02/24/2023.
 vendor_id : [0][0][0][0]
 encoder : Lavc60.22.100 h264_mediacodec
 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 02/24/2023.
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_mediacodec))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[h264_mediacodec @ 0xb400007da1f2ac00] Use 1 as the default MediaFormat i-frame-interval, please set gop_size properly (>= fps)
[h264_mediacodec @ 0xb400007da1f2ac00] Mediacodec encoder doesn't support AV_CODEC_FLAG_GLOBAL_HEADER. Use extract_extradata bsf when necessary.
Output #0, hls, to 'stream.m3u8':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf60.10.100
 Stream #0:0(und): Video: h264, yuv420p(tv, bt709/bt709/smpte170m, progressive), 426x240 [SAR 640:639 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 90k tbn (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 02/24/2023.
 vendor_id : [0][0][0][0]
 encoder : Lavc60.22.100 h264_mediacodec
 Stream #0:1(und): Audio: aac (LC), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 02/24/2023.
 vendor_id : [0][0][0][0]
 encoder : Lavc60.22.100 aac
frame= 0 fps=0.0 q=0.0 size=N/A time=00:00:00.25 bitr[hls @ 0xb400007da1f27d00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[hls @ 0xb400007da1f27d00] Encoder did not produce proper pts, making some up.
[mpegts @ 0xb400007da1f29100] H.264 bitstream error, startcode missing, size 0
[hls @ 0xb400007da1f27d00] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 3600 >= 3600
[vost#0:0/h264_mediacodec @ 0xb400007da200a000] Error submitting a packet to the muxer: Invalid argument
[out#0/hls @ 0xb400007da1eaa6c0] Error muxing a packet
[hls @ 0xb400007da1f27d00] Opening 'seg00.ts' for writing
[hls @ 0xb400007da1f27d00] Opening 'stream.m3u8.tmp' for writing
[out#0/hls @ 0xb400007da1eaa6c0] video:2kB audio:5kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
frame= 3 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.41 bitrate=N/A speed=3.39x
[aac @ 0xb400007da2051400] Qavg: 32468.840
Conversion failed!
~ $



I tried to build FFmpeg from GitHub and install FFmpeg from repositories, and I'm still getting this error.


-
Everytime I run my code ffmpeg responds with this instead of doing its function. How do I fix ?
25 juillet 2023, par Oreo FOutput from ffmpeg/avlib:

ffmpeg version 2023-07-19-git-efa6cec759-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
 built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
 configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
 libavutil 58. 14.100 / 58. 14.100
 libavcodec 60. 22.100 / 60. 22.100
 libavformat 60. 10.100 / 60. 10.100
 libavdevice 60. 2.101 / 60. 2.101
 libavfilter 9. 8.102 / 9. 8.102
 libswscale 7. 3.100 / 7. 3.100
 libswresample 4. 11.100 / 4. 11.100
 libpostproc 57. 2.100 / 57. 2.100



Everytime I run the code it does this.


code :


import praw
import requests
import cv2
import os
from pydub import AudioSegment

def download_video(url, filename):
 response = requests.get(url)
 with open(filename, 'wb') as f:
 f.write(response.content)

def combine_videos(video_urls, output_filename):
 video_clips = []
 audio_clips = []
 for i, url in enumerate(video_urls):
 temp_filename = f'temp_video_{i}.mp4'
 download_video(url, temp_filename)
 video_clip = cv2.VideoCapture(temp_filename)
 audio_clip = AudioSegment.from_file(temp_filename, format="mp4")
 video_clips.append(video_clip)
 audio_clips.append(audio_clip)
 
 if not video_clips:
 print("No video clips to combine.")
 return

 frame_width = int(video_clips[0].get(cv2.CAP_PROP_FRAME_WIDTH))
 frame_height = int(video_clips[0].get(cv2.CAP_PROP_FRAME_HEIGHT))
 fps = int(video_clips[0].get(cv2.CAP_PROP_FPS))

 fourcc = cv2.VideoWriter_fourcc(*'mp4v')
 output_clip = cv2.VideoWriter(output_filename, fourcc, fps, (frame_width, frame_height))

 for i, video_clip in enumerate(video_clips):
 while True:
 ret, frame = video_clip.read()
 if not ret:
 break
 output_clip.write(frame)
 
 for video_clip in video_clips:
 video_clip.release()
 
 output_clip.release()

 # Combining audio using pydub
 combined_audio = sum(audio_clips)
 combined_audio.export("combined_audio.mp3", format="mp3")

 # Merging audio with video using ffmpeg
 os.system(f'ffmpeg -i {output_filename} -i combined_audio.mp3 -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 final_output.mp4')

 # Cleaning up temporary files
 os.remove("combined_audio.mp3")

def main():
 reddit = praw.Reddit(
 client_id='XXX',
 client_secret='XXX',
 user_agent='Reddit Video Downloader'
 )
 
 subreddit_name = input("Enter the name of the subreddit: ")
 limit = int(input("Enter the number of videos to download: "))
 
 subreddit = reddit.subreddit(subreddit_name)
 submissions = subreddit.hot(limit=limit)
 
 video_urls = [submission.url for submission in submissions if submission.media and 'reddit_video' in submission.media]
 
 if video_urls:
 output_filename = input("Enter the output filename (e.g., output.mp4): ")
 combine_videos(video_urls, output_filename)
 print("Videos combined successfully!")
 else:
 print("No Reddit videos found in the subreddit.")

if __name__ == "__main__":
 main()



Anyone got any idea why this happens ?


I'm making a script that scrapes videos from a specific subreddit.


Also if it helps the temp video file is corrupted when it gets made.


I've put this into chatGPT as well and brought an expert friend and he hasn't been able to help me.


-
FFMPEG Fontconfig error : Cannot load default config file : No such file : (null) Abort trap
28 juillet 2023, par FastNumbers/usr/local/bin/ffmpeg -loop 1 -t 11.14 -i 3339861349.jpg -filter_complex "drawtext=text=aaaaa" -r 25 -vcodec libx264 -preset veryfast -threads 8 -x264opts no-scenecut -b 850k -bt 850k -ac 2 -ab 32k -async 1 -y -f mp4 test.mp4
Give me result
Fontconfig error : Cannot load default config file : No such file : (null)
Abort trap


With path to font file :
/usr/local/bin/ffmpeg -loop 1 -t 11.14 -i 3339861349.jpg -filter_complex "drawtext=text=aaaaa:fontfile=/usr/local/share/fonts/Roboto-Regular.ttf" -r 25 -vcodec libx264 -preset veryfast -threads 8 -x264opts no-scenecut -b 850k -bt 850k -ac 2 -ab 32k -async 1 -y -f mp4 test.mp4
Give me result
Abort trap


Rebild ffmpeg with —enable-libfontconfig


ffmpeg version 6.0-6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
configuration : —enable-gpl —enable-gmp —enable-gnutls —enable-libdav1d —enable-libsvtav1 —enable-librav1e —enable-libvmaf —enable-libx264 —enable-chromaprint —enable-libx265 —enable-libvpx —enable-libxvid —enable-libvidstab —enable-libaom —enable-libzimg —enable-libmodplug —enable-libsoxr —enable-libmysofa —enable-lv2 —enable-libopencore_amrnb —enable-libopencore_amrwb —enable-libmp3lame —enable-libopus —enable-libvorbis —enable-libtwolame —enable-libspeex —enable-lv2 —enable-libtheora —enable-librubberband —enable-libgme —enable-libwebp —enable-libzmq —enable-libfribidi —enable-libfontconfig —enable-libfreetype —enable-libass —enable-runtime-cpudetect —cc=cc —cxx=cpp —disable-ffplay —disable-debug —disable-doc —disable-shared —enable-pthreads —enable-static —enable-small —enable-version3 —extra-cflags='-static -I/usr/home/azureagent/vsts/_work/1/s/FFmpeg/workspace/include -I/usr/home/azureagent/vsts/_work/1/s/FFmpeg/workspace/include/lilv-0 -I/usr/home/azureagent/vsts/_work/1/s/FFmpeg/workspace/include/lilv-0' —extra-cxxflags='-static -static-libstdc++' —extra-ldexeflags= —extra-ldflags=-L/usr/home/azureagent/vsts/_work/1/s/FFmpeg/workspace/lib —extra-libs='-static -lc++ -ldl -lpthread -lm -lmd -lz -lfftw3' —pkgconfigdir=/usr/home/azureagent/vsts/_work/1/s/FFmpeg/workspace/lib/pkgconfig —pkg-config-flags=—static —prefix=/usr/home/azureagent/vsts/_work/1/s/FFmpeg/workspace/done/ —extra-version=6.0