
Recherche avancée
Autres articles (30)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...) -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (6016)
-
How to fix "moov atom not found" when extracting an image from partial video mp4 file ?
1er septembre 2020, par EpsiloncoolI think the problem is relatively common, but I can't find any good solution to my problem.
Well, I need to create a preview of the video while it uploads. It can be a very big video, so I decided to use only the first 10 Mb of video to make image extraction with ffmpeg.


The command-line looks like this


ffmpeg -ss 00:00:00 -i "src.mp4" -frames:v 1 -q:v 2 "preview.jpg"


It works fine for lots of video files, but for mp4 it always failed with the error message "Moov atom not found". I guess the mp4 format is not streamable and the cut file looks like a broken video for the FFmpeg.


But there should be a solution to this. Could you help me ?


-
Pydub wma to mp3 fixing "library configuration mismatch"
21 juillet 2020, par RichPython novice, looking to change that.


I am trying to convert a song from wma to mp3 while keeping the metadata on the song. Here is my code.


#musicproject.py
import os
import glob
from pydub import AudioSegment

music_dir ='/mnt/c/renameproject'
extension_list = ('*.wma')

os.chdir(music_dir)
for extension in extension_list:
 for song in glob.glob(extension):
 mp3_filename = os.path.splitext(os.path.basename(song))[0] + '.mp3'
 AudioSegment.from_file(song).export(mp3_filename, format='mp3')



The program finishes and the song is written as an mp3 in the same folder and plays just fine. Unfortunately all of the metadata has been stripped from the song. I get the following warning at the command line when I run the program. My theory on the problem is that there is a mismatch between pydub and ffmpeg as far as the metadata library goes so pydub is feeding in something that ffmpeg doesn't understand so it pukes. I have absolutely no idea what steps to take to fix it from here. Any breadcrumbs would be appreciated. Thanks.


File "./musicproject.py", line 12, in <module>
 AudioSegment.from_file(song).export(mp3_filename, format='mp3')
 File "/home/tom/.local/lib/python2.7/site-packages/pydub/audio_segment.py", line 725, in from_file
 p.returncode, p_err.decode(errors='ignore') ))
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
 configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 WARNING: library configuration mismatch
 avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
musicproject.py: Invalid data found when processing input
</module>


-
ffmpeg : Send mp4 to fake webcam, "Invalid argument"
9 avril 2020, par Joe BidTrying to create a new fake webcam device (/dev/video2) and play a video on it so I can use it as a virtual webcam.



Steps I took :



sudo apt-get install v4l2loopback-dkms
sudo modprobe v4l2loopback
sudo depmod -a

ffmpeg -i vid1.mp4 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video2




The error from the ffmpeg command :



ioctl(VIDIOC_G_FMT): Invalid argument
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0
Conversion failed!




No idea what to do.