
Recherche avancée
Autres articles (64)
-
Participer à sa traduction
10 avril 2011Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
Actuellement MediaSPIP n’est disponible qu’en français et (...) -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
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 (...)
Sur d’autres sites (9840)
-
Losing frames when clipping videos with ffmpeg
9 décembre 2018, par Mark CI seem to be losing frames when I clip videos up with ffmpeg.
Here are the steps I take :
[Get the Frame number to cut on] -> [turn the frame number into hh:mm:ss.ms format] -> [Run ffmpeg process]
Here is the code :
import subprocess
def frames_to_timecode(frame,frameRate):
'''
Convert frame into a timecode HH:MM:SS.MS
frame = The frame to convert into a time code
frameRate = the frame rate of the video
'''
#convert frames into seconds
seconds = frame / frameRate
#generate the time code
timeCode = '{h:02d}:{m:02d}:{s:02f}'.format(
h=int(seconds/3600),
m=int(seconds/60%60),
s=seconds%60)
return timeCode
frameRate = 24.0
inputVideo = r"C:\Users\aquamen\Videos\vlc-record-2018-10-23-17h11m11s-SEQ-0200_animatic_v4_20180827_short.mp4"
outputVideo = r"C:\Users\aquamen\Videos\ffmpeg_test_clip001.mp4"
ffmpeg = r"C:\ffmpeg\ffmpeg-20181028-e95987f-win64-static\bin\ffmpeg.exe"
endFrame = frames_to_timecode(29,frameRate)
startFrame = frames_to_timecode(10,frameRate)
subprocess.call([ffmpeg,'-i',inputVideo,'-ss',startFrame,'-to',endFrame,outputVideo])Here is a image of the original video and the clipped video with the time codes showing a frame was lost in process. The time code should show 00:01:18:10 instead its 00:01:18:11.
-
Cannot use pydub.AudioSegment on audio files downloaded by youtube-dl library
26 octobre 2018, par Han MAfter I download a audio clip from a youtube link by the youtube-dl library, I cannot use pydub.AudioSegment to slice the audio file. The following is the information about my code.
import youtube_dl
options = {
'format': 'bestaudio/best',
'extractaudio': True, # only keep the audio
'audio-format': "wav", # convert to wav
'outtmpl': whole_path, # name the file the ID of the video
'noplaylist': True, # only download single song, not playlist
'audioquality': 1
}
with youtube_dl.YoutubeDL(options) as ydl:
print('url is:', web_url)
ydl.download([web_url])
from pydub import AudioSegment
audio_data = AudioSegment.from_wav(path_to_downloaded_file)Then, I got an error as follows first on Mac and second on Linux :
b'avconv version 12.3, Copyright (c) 2000-2018 the Libav developers\n built on Jul 26 2018 18:08:50 with Apple LLVM version 9.1.0 (clang-902.0.39.2)\n/Users/***/random17560390.wav: Invalid data found when processing input\n'
b'ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers\n built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609\n configuration: --prefix=/usr --e
xtra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-
shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-li
bbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmod
plug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-li
bspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --e
nable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv\n libavutil 54. 31.100 / 54.
31.100\n libavcodec 56. 60.100 / 56. 60.100\n libavformat 56. 40.101 / 56. 40.101\n libavdevice 56. 4.100 / 56. 4.100\n libavfilter 5. 40.101 / 5. 40.101\n libavresa
mple 2. 1. 0 / 2. 1. 0\n libswscale 3. 1.101 / 3. 1.101\n libswresample 1. 2.101 / 1. 2.101\n libpostproc 53. 3.100 / 53. 3.100\n[wav @ 0x20854c0] invalid start
code [0][0][0][28] in RIFF header\n/home/users/test_download/random10485395.wav: Invalid data found when processing input\n'I think the problem might be about the encoding on the downloaded files by youtube-dl. I can use pydub.AudioSegment on other normal .wav files. After checking the details of the downloaded file by youtube-dl, I found the following feature :
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
It is different from other normal .wav files, which have the following :
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
-
ffmpeg for android, out of memory on decoding rotate mp4 file with openh264
29 octobre 2018, par da queVersion
- ffmpeg : 4.0.2
- openh264 : 1.8.0
Problem
I try to trim a
.mp4
file whichmetadata
info contains rotate info, but I failed with the error information.The file stream info :
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2018-10-09T09:40:53.000000Z
location : +39.8983+116.4145/
location-eng : +39.8983+116.4145/
com.android.version: 6.0
Duration: 00:00:10.56, start: 0.000000, bitrate: 8671 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 8563 kb/s, SAR 1:1 DAR 16:9, 30.01 fps, 30 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 180
creation_time : 2018-10-09T09:40:53.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -180.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2018-10-09T09:40:53.000000Z
handler_name : SoundHandleffmpeg cmd
ffmpeg -y -i 1.mp4 -threads 4 -b:v 2000k -vcodec libopenh264 -acodec copy -ss 0 -t 3 -f mp4 -movflags faststart -strict -2 ./output.mp4
result
Error reinitializing filters!
Failed to inject frame into filter network: Out of memory
Error while processing the decoded data for stream #0:0Then I found this answer : ffmpeg-for-android-out-of-memory, after i added
-noautorotate
command to my cmd, the video is trimmed successful.If I use
-vcodec copy
instead of-vcodec libopenh264
, the result also is ok, I wonder if there is a bug whenlibopenh264
decode with ffmpeg’s autorotate function.I wipe the video’s rotate info from metadata with
-metadata:s:v:0
command, the newly video can be trimmed successful with the origin cmd :(