
Recherche avancée
Autres articles (90)
-
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 ;
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (14979)
-
Save the stream to mp4 files
5 mai 2012, par Ruslan SharipovHow can I keep the flow (protocol rtsp, codec h264) in file (container mp4) ? That is, on input an endless stream (with CCTV camera), and the output files in mp4 format size of 5-10 minutes of recording time.
OS : debian, ubuntu
Software : vlc, ffmpeg (avconv)Currently this scheme is used :
cvlc rtsp://admin:admin@10.1.1.1:554/ch1-s1 --sout=file/ts:stream.ts
ffmpeg -i stream.ts -vcodec copy -f mp4 stream.mp4But it can not record video continuously (between restarts vlc is a loss of about 10 seconds of live video)
-
ffmpeg converting PCM data file to wav file getting distorted(noisy) data
3 janvier 2015, par MahendraI have raw pcm data in following form :
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0100
0000 0000 0000 0000 0000 0000 0000 0000
0000 0100 0100 0000 0000 efbf bdef bfbd
0000 efbf bdef bfbd efbf bdef bfbd efbf
bdef bfbd efbf bdef bfbd efbf bdef bfbd
efbf bdef bfbd efbf bdef bfbd 0000 efbf
bdef bfbd 0000 efbf bdef bfbd efbf bdef
bfbd 2900 efbf bdef bfbd 0000 efbf bdef
bfbd efbf bdef bfbd efbf bdef bfbd 0000and I want to make this data in wav file when I am converting by ffmpeg getting noisy data by this command :
sox -V -t raw -b 16 -e signed -r 16000 -c 1 14_32_7_187.pcm new.wav
and :
ffmpeg -f s16le -ar 16000 -ac 1 -i 14_32_7_187.pcm -ar 16000 -ac 1 oout.wav
using both getting noisy data.
-
Read, process and save video and audio with FFMPEG
3 mai 2017, par sysseonI want to open a video resource with ffmpeg on Python, get the read frames from the pipe, modify them (e.g. put the timestamp with OpenCV) and write the result to an output video file. I also want to save the audio source with no changes.
My code (with no audio and two processes) :
import subprocess as sp
import numpy as np
# import time
# import cv2
FFMPEG_BIN = "C:/ffmpeg/bin/ffmpeg.exe"
INPUT_VID = 'input.avi'
res = [320, 240]
command_in = [FFMPEG_BIN,
'-y', # (optional) overwrite output file if it exists
'-i', INPUT_VID,
'-f', 'image2pipe', # image2pipe or rawvideo?
'-pix_fmt', 'bgr24',
'-vcodec', 'rawvideo',
'-']
command_out = [FFMPEG_BIN,
'-y', # (optional) overwrite output file if it exists
'-f', 'rawvideo',
'-vcodec', 'rawvideo',
'-s', '320x240',
'-pix_fmt', 'bgr24',
'-r', '25',
'-i', '-',
# '-i', INPUT_VID, # Audio
'-vcodec', 'mpeg4',
'output.mp4']
pipe_in = sp.Popen(command_in, stdout=sp.PIPE, stderr=sp.PIPE)
pipe_out = sp.Popen(command_out, stdin=sp.PIPE, stderr=sp.PIPE)
while True:
# Read 320*240*3 bytes (= 1 frame)
raw_image = pipe_in.stdout.read(res[0] * res[1] * 3)
# Transform the byte read into a numpy array
image = np.fromstring(raw_image, dtype=np.uint8)
image = image.reshape((res[1], res[0], 3))
# Draw some text in the image
# draw_text(image)
# Show the image with OpenCV (not working, gray image, why?)
# cv2.imshow("VIDEO", image)
# Write image to output process
pipe_out.stdin.write(image.tostring())
print 'done'
pipe_in.kill()
pipe_out.kill()- Could it be done with just a process ? (Read the input from a file,
put it in the input pipe, get the image, process it, and put it in
the output pipe to be saved into a video file) - How can I save the audio ? In this example, I could use ’-i
INPUT_VID’ in the second process to get the audio channel, but my
source will be a RTSP, and I don’t want to create a connection for
each process. Could I put video+audio in the pipe and rescue and
separate it with numpy ? How ? - I use a loop to process the frames and wait until I get an error.
How can I check if all frames are already read ? - Not important, but if I try to show the images with OpenCV
(cv2.imshow(...)), I only see a gray screen. Why ?
- Could it be done with just a process ? (Read the input from a file,