
Recherche avancée
Médias (21)
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (109)
-
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (13146)
-
FFMpeg Command work in command line, but not in python script
20 février 2015, par FooldjOkay, kind of a weird problem. But I’m not sure whether it’s python, ffmpeg, or some stupid thing I’m doing wrong.
I’m trying to take a video, and take 1 frame a second, and output that frame to an image. Right now, if i use the command line with ffmpeg :
ffmpeg -i test.avi -r 1 -f image2 image-%3d.jpeg -pix_fmt rgb24 -vcodec rawrvideo
It outputs about 10 images, the images look fine, awesome. Now I have this code (right now some code from some github, as I wanted stuff that i was relatively sure would work, and mine is allll convoluted)
import subprocess as sp
import numpy as np
import re
import cv2
import time
FFMPEG_BIN = r'ffmpeg.exe'
INPUT_VID = 'test.avi'
def getInfo():
command = [FFMPEG_BIN,'-i', INPUT_VID, '-']
pipe = sp.Popen(command, stdout=sp.PIPE, stderr=sp.PIPE)
pipe.stdout.readline()
pipe.terminate()
infos = pipe.stderr.read()
infos_list = infos.split('\r\n')
res = re.search(' \d+x\d+ ',infos)
res = [int(x) for x in res.group(0).split('x')]
return res
res = getInfo()
command = [ FFMPEG_BIN,
'-i', INPUT_VID,
'-f', 'image2pipe',
'-pix_fmt', 'rgb24',
'-vcodec', 'rawvideo', '-']
pipe = sp.Popen(command, stdout = sp.PIPE, bufsize=10**8)
n = 0
im2 = []
try:
mog = cv2.BackgroundSubtractorMOG2(120,2,True)
while True:
raw_image = pipe.stdout.read(res[0]*res[1]*3)
# transform the byte read into a numpy array
image = np.fromstring(raw_image, dtype='uint8')
image = image.reshape((res[1],res[0],3))
rgbImg = image.copy()
fname = ('_tmp%03d.png'%time.time())
cv2.imwrite(fname, rgbImg)
# throw away the data in the pipe's buffer.
#pipe.stdout.flush()
n += 1
print n
except:
print 'done',n
pipe.kill()
cv2.destroyAllWindows()When I run this, I get 10 images, but they all have a Blue Tint ! I cannot for the life of me figure out why. I’ve done tons of searches, I’ve tried quite a few different codecs (usually just messes things up worse). The media info for the video file is here :
General
Complete name : test.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 85.0 KiB
Duration : 133ms
Overall bit rate : 5 235 Kbps
Video
ID : 0
Format : JPEG
Codec ID : MJPG
Duration : 133ms
Bit rate : 1 240 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 8 bits
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.135
Stream size : 20.1 KiB (24%)Any suggestions ? It seems like it should be an RGB mixup...just not sure where at...
-
How to reconstruct h264 video from raw IpCam feed
10 avril 2014, par andrewI captured a raw feed from an IpCam which is normally viewed in an ActiveX control.
The feed seems to be riddled with some kind of proprietary h.264 meta data. I don't know much about the h.264 codec but from what I've read I don't think the data is standard. It looks like this :
67 45 00 00 8D E0 28 00 1D 00 00 00 45 00 00 00 gE...à(.....E...
00 00 01 0E 6D 11 01 00 66 6B 59 00 00 04 00 00 ....m...fkY.....The feed has a variable frame rate, maybe this data has something to do with that ?
When I tried running through FFMpeg it didn't want to know, It just said :
Invalid data found when processing input
I tried removing the strange looking data with php like this :
$vid= file_get_contents('1.264');
$cleanedUp=preg_replace("/\x67\x45([^\xFF]{30})/", '', $vid,-1,$count);
echo $count;
file_put_contents('2.264', $cleanedUp);I tried again with FFMpeg :
ffmpeg -i 2.264 1.avi
Looking a little better ; This time FFMpeg produces an avi file but it outputs a lot of errors in the process, Here is a few :
[h264 @ 0x9f4fc00] corrupted macroblock 5 5 (total_coeff=-1)
[h264 @ 0x9f4fc00] error while decoding MB 5 5
[h264 @ 0x9f4fc00] slice type too large (32) at 5 5
[h264 @ 0x9f4fc00] decode_slice_header error
[h264 @ 0x9f4fc00] Cannot use next picture in error concealment
[h264 @ 0x9f4fc00] concealing 1408 DC, 1408 AC, 1408 MV errors in P frame
[h264 @ 0x9f50a80] left block unavailable for requested intra mode at 0 11
[h264 @ 0x9f50a80] error while decoding MB 0 11
[h264 @ 0x9f50a80] Cannot use next picture in error concealment
[h264 @ 0x9f50a80] concealing 1149 DC, 1149 AC, 1149 MV errors in P frame
frame= 115 fps= 26 q=15.2 size= 606kB time=00:00:09.58 bitrate= 517.7kbits/[h264 @ 0x9f50a80] corrupted macroblock 29 21 (total_coeff=-1)
[h264 @ 0x9f50a80] error while decoding MB 29 21
[h264 @ 0x9f50a80] Cannot use next picture in error concealment
[h264 @ 0x9f50a80] concealing 680 DC, 680 AC, 680 MV errors in P frameThe video plays, but its garbled and the speed is about 4x the correct rate. I guess because the variable frame rate data is missing ?
I tried again with :
ffmpeg -r 12 -i 2.264 1.avi
Forcing the input frame rate to be 12 fps (approximately correct).
The video plays at the correct speed now but it still looks horrible.
Id really appreciate any help with this.
Here is a link to the raw capture.
Here is a link to the capture with the weird headers removed.
Here is a link to avi produced by FFMpeg.
-
FFmpeg giving a wierd "Permission denied" error (Digitalocean VPS Ubuntu 18.04)
10 mai 2021, par DJ DannyI've set up a VPS server on Digitalocean. Installed Ubuntu 18.04, LAMP, etc.
Finally, I installed ffmpeg. It is working fine from terminal but when I try to execute it through php it gives a weird "Permission denied" error :


Here is some information :

root@vl :/# whereis ffmpeg

ffmpeg : /usr/local/bin/ffmpeg

root@vl :/# whereis ffprobe

ffprobe : /usr/local/bin/ffprobe

root@vl :/# ffmpeg -version

ffmpeg version N-102461-g8649f5dca6 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1 18.04)
configuration : —prefix=/usr/local/ffmpeg_build —pkg-config-flags=—static —extra-cflags=-I/usr/local/ffmpeg_build/include —extra-ldflags=-L/usr/local/ffmpeg_build/lib —extra-libs='-lpthread -lm' —ld=g++ —bindir=/usr/local/bin —enable-gpl —enable-gnutls —enable-libaom —enable-libass —enable-libfdk-aac —enable-libfreetype —enable-libmp3lame —enable-libopus —enable-libsvtav1 —enable-libvorbis —enable-libvpx —enable-libx264 —enable-libx265 —enable-nonfree
libavutil 57. 0.100 / 57. 0.100
libavcodec 59. 1.100 / 59. 1.100
libavformat 59. 0.101 / 59. 0.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.101 / 8. 0.101
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100


My php file :


echo shell_exec("ffmpeg -i mj.gif -profile:v baseline -pix_fmt yuv420p -vf scale=600 :-2 output.mp4 2>&1")

 ?>

The ERROR ! :

ffmpeg version N-102461-g8649f5dca6 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 7 (Ubuntu 7.5.0-3ubuntu1 18.04) configuration : —prefix=/usr/local/ffmpeg_build —pkg-config-flags=—static —extra-cflags=-I/usr/local/ffmpeg_build/include —extra-ldflags=-L/usr/local/ffmpeg_build/lib —extra-libs='-lpthread -lm' —ld=g++ —bindir=/usr/local/bin —enable-gpl —enable-gnutls —enable-libaom —enable-libass —enable-libfdk-aac —enable-libfreetype —enable-libmp3lame —enable-libopus —enable-libsvtav1 —enable-libvorbis —enable-libvpx —enable-libx264 —enable-libx265 —enable-nonfree libavutil 57. 0.100 / 57. 0.100 libavcodec 59. 1.100 / 59. 1.100 libavformat 59. 0.101 / 59. 0.101 libavdevice 59. 0.100 / 59. 0.100 libavfilter 8. 0.101 / 8. 0.101 libswscale 6. 0.100 / 6. 0.100 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100 Input #0, gif, from 'mj.gif' : Duration : 00:00:01.60, start : 0.000000, bitrate : 22863 kb/s Stream #0:0 : Video : gif, bgra, 1400x1050, 10 fps, 10 tbr, 100 tbn output.mp4 : Permission denied

From the past 24 hours I've tried installing ffmpeg in different ways (compiling & apt install), I've also tried changing the permission but still I'm stuck with this error.

Any help would be highly appreciated !

Thanks