
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 (106)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...)
Sur d’autres sites (9865)
-
FFmpeg trying to concat two like videos but the timing is off
9 avril 2022, par video487y43I am trying to concat two videos together using FFMPEG, but the output of the second video plays slow with no audio, but not only that, the time elapsed counter in the windows player counts slower as well. When I play it in VLC the timing is right but the audio is still missing.


For a better explanation of this effect please watch this video. Notice how slow the counter is




https://youtube.com/shorts/k6QD_oqTRyE?feature=share




I know the videos have to be the same type and they are both 30 fps, mp4, same size, same tbn. Here is the ffprobe results. My goal is to make compilation videos using ffmpeg since it can combine videos very fast without re-rendering them. I get the videos from tiktok. Please let me know if I can clarify this anymore. Thanks


Video 1


>Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt470bg/smpte170m, progressive), 1024x576 [SAR 1:1 DAR 16:9], 622 kb/s, 30 fps, 30 tbr, 15360 tbn (default)



Video 2


>Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1024x576 [SAR 1:1 DAR 16:9], 760 kb/s, 30 fps, 30 tbr, 15360 tbn (default)



Output video


>Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1024x576 [SAR 1:1 DAR 16:9], 655 kb/s, 29.92 fps, 30 tbr, 15360 tbn (default)



And here is the code during the concat process sorry for the weird format


libavutil 57. 24.101 / 57. 24.101
libavcodec 59. 25.100 / 59. 25.100
libavformat 59. 20.101 / 59. 20.101
libavdevice 59. 6.100 / 59. 6.100
libavfilter 8. 29.100 / 8. 29.100
libswscale 6. 6.100 / 6. 6.100
libswresample 4. 6.100 / 4. 6.100
libpostproc 56. 5.100 / 56. 5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e74b5668c0] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from 'mylist.txt':
 Duration: N/A, start: 0.000000, bitrate: 792 kb/s
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1024x576 [SAR 1:1 DAR 16:9], 760 kb/s, 30 fps, 30 tbr, 15360 tbn
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 32 kb/s
Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Output #0, mp4, to 'output.mp4':
 Metadata:
 encoder : Lavf59.20.101
 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1024x576 [SAR 1:1 DAR 16:9], q=2-31, 760 kb/s, 30 fps, 30 tbr, 15360 tbn
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Audio: aac (HE-AACv2) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 32 kb/s
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]



Stream mapping:
 Stream #0:0 -> #0:0 (copy)
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e74b579400] Auto-inserting h264_mp4toannexb bitstream filter

frame= 1737 fps=0.0 q=-1.0 Lsize= 5442kB time=00:00:58.14 bitrate= 766.8kbits/s speed=1.01e+03x
video:4647kB audio:736kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.084181%



-
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.