
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (78)
-
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 ;
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (8888)
-
avcodec : add external enc libvvenc for H266/VVC
5 juin 2024, par Thomas Siedelavcodec : add external enc libvvenc for H266/VVC
Add external encoder VVenC for H266/VVC encoding.
Register new encoder libvvenc.
Add libvvenc to wrap the vvenc interface.
libvvenc implements encoder option : preset,qp,qpa,period,
passlogfile,stats,vvenc-params,level,tier.
Enable encoder by adding —enable-libvvenc in configure step.Co-authored-by : Christian Bartnik chris10317h5@gmail.com
Signed-off-by : Thomas Siedel <thomas.ff@spin-digital.com> -
ffmpeg audio output in iOS
19 septembre 2015, par user3249421Good day,
I have own project which using iFrameExtraktor (https://github.com/lajos/iFrameExtractor). I modified initWithVideo method to :
-(id)initWithVideo:(NSString *)moviePath imgView: (UIImageView *)imgView {
if (!(self=[super init])) return nil;
AVCodec *pCodec;
AVCodec *aCodec;
// Register all formats and codecs
avcodec_register_all();
av_register_all();
imageView = imgView;
// Open video file
if(avformat_open_input(&pFormatCtx, [moviePath cStringUsingEncoding:NSASCIIStringEncoding], NULL, NULL) != 0) {
av_log(NULL, AV_LOG_ERROR, "Couldn't open file\n");
goto initError;
}
// Retrieve stream information
if(avformat_find_stream_info(pFormatCtx,NULL) < 0) {
av_log(NULL, AV_LOG_ERROR, "Couldn't find stream information\n");
goto initError;
}
// Find the first video stream
if ((videoStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, &pCodec, 0)) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
goto initError;
}
if((audioStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_AUDIO, -1, -1, &aCodec, 0)) < 0 ){
av_log(NULL, AV_LOG_ERROR, "Cannot find a audio stream in the input file\n");
goto initError;
}
// Get a pointer to the codec context for the video stream
pCodecCtx = pFormatCtx->streams[videoStream]->codec;
aCodecCtx = pFormatCtx->streams[audioStream]->codec;
// Find the decoder for the video stream
pCodec = avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec == NULL) {
av_log(NULL, AV_LOG_ERROR, "Unsupported video codec!\n");
goto initError;
}
aCodec = avcodec_find_decoder(aCodecCtx->codec_id);
if(aCodec == NULL) {
av_log(NULL, AV_LOG_ERROR, "Unsupported audio codec!\n");
goto initError;
}
// Open codec
if(avcodec_open2(pCodecCtx, pCodec, NULL) < 0) {
av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
goto initError;
}
if(avcodec_open2(aCodecCtx, aCodec, NULL) < 0){
av_log(NULL, AV_LOG_ERROR, "Cannot open audio decoder\n");
goto initError;
}
// Allocate video frame
pFrame = av_frame_alloc();
outputWidth = pCodecCtx->width;
self.outputHeight = pCodecCtx->height;
lastFrameTime = -1;
[self seekTime:0.0];
return self;
initError:
//[self release];
return nil;
}Video rendering works fine, but I don’t know how play audio to device output.
Thanks for any tips.
-
Issues Streaming FLV Video from RTSP using FFmpeg and Python to flv.js
14 juin 2024, par yternalI am currently working on a project where I need to stream video from an RTSP source, convert it to FLV format using FFmpeg, and then send the FLV stream to clients upon request. The code I have written to achieve this is as follows :


import subprocess
from flask import Flask, Response, stream_with_context

app = Flask(__name__)

flv_header = b''

def update_stream(ffmpeg_path="ffmpeg", rtsp_url='rtsp://192.168.1.168/0', rtsp_id="rtsp01"):
 global flv_header

 command = [
 ffmpeg_path,
 '-i', rtsp_url,
 '-c:v', 'libx264',
 '-c:a', 'aac',
 '-b:v', '1M',
 '-g', '30',
 '-preset', 'ultrafast',
 '-bsf:v', 'dump_extra',
 '-f', 'flv',
 '-'
 ]
 process = subprocess.Popen(
 command,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE
 )
 flv_header = process.stdout.read(1024)
 while True:
 data = process.stdout.read(1024)
 if not data:
 break
 producer.notify(rtsp_id, data)

@app.route('/flv//')
def flv_stream(user_id, rtsp_id):
 try:
 consumer_queue = producer.register(user_id, rtsp_id)

 @stream_with_context
 def generate():
 yield flv_header
 while True:
 yield consumer_queue.get()

 response = Response(generate(), mimetype='video/x-flv')
 response.headers.add('Access-Control-Allow-Origin', '*') # Allow all origins
 response.headers.add('Access-Control-Allow-Methods', '*') # Allow all HTTP methods
 response.headers.add('Access-Control-Allow-Headers', 'Content-Type') # Allow specific headers
 return response
 except Exception as e:
 print(f'{e}')



In order to handle initial playback issues in FFplay and VLC, I save the first 1024 bytes of the FLV stream and send this header before streaming the actual data. This workaround allows playback in FFplay and VLC, but it does not work with flv.js.


When attempting to play the stream using flv.js, the stream keeps loading indefinitely, and the console outputs warnings like :


flv.min.js:9 [FLVDemuxer] > Invalid PrevTagSize 3491417133
[FLVDemuxer] > Unsupported tag type 204, skipped



I have tried several modifications to the FFmpeg command, including adding parameters such as
-bsf:v dump_extra
, but none of these changes have resolved the issue. My expectation is that the FLV stream would play smoothly in flv.js just as it does in FFplay and VLC.