
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (78)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)
Sur d’autres sites (9760)
-
ffmpeg android convert yuv420 to rgba can't get a correct video
13 octobre 2016, par ToolBarI want convert the video (yuv420) to
rgba
, but I got the following gray video
after conversion process :My code :
if (width < 1 || height < 1 || pYUV == NULL || pBGR24 == NULL)
return false;
//int srcNumBytes,dstNumBytes;
//uint8_t *pSrc,*pDst;
AVPicture pFrameYUV,pFrameBGR;
//pFrameYUV = avpicture_alloc();
//srcNumBytes = avpicture_get_size(PIX_FMT_YUV420P,width,height);
//pSrc = (uint8_t *)malloc(sizeof(uint8_t) * srcNumBytes);
avpicture_fill(&pFrameYUV,pYUV,AV_PIX_FMT_YUV420P,width,height);
//U,V change
uint8_t * ptmp=pFrameYUV.data[1];
pFrameYUV.data[1]=pFrameYUV.data[2];
pFrameYUV.data [2]=ptmp;
//pFrameBGR = avcodec_alloc_frame();
//dstNumBytes = avpicture_get_size(PIX_FMT_BGR24,width,height);
//pDst = (uint8_t *)malloc(sizeof(uint8_t) * dstNumBytes);
avpicture_fill(&pFrameBGR,pBGR24,AV_PIX_FMT_BGR24,width,height);
struct SwsContext* imgCtx = NULL;
imgCtx = sws_getContext(width,height,AV_PIX_FMT_YUV420P,width,height,AV_PIX_FMT_BGR24,SWS_BILINEAR,0,0,0);
if (imgCtx != NULL){
sws_scale(imgCtx,pFrameYUV.data,pFrameYUV.linesize,0,height,pFrameBGR.data,pFrameBGR.linesize);
if(imgCtx){
sws_freeContext(imgCtx);
imgCtx = NULL;
}
return true;
}
else{
sws_freeContext(imgCtx);
imgCtx = NULL;
return false;
}Can you help me. I have tried some other methods, but didn’t work.
-
Colors are not correct for FFMPEG videos
23 août 2016, par Mohammad Abu MusaI am writing a screen recorder, I managed to record the videos and export them as
webm
but I have a color and timing issue(which I am working on).For coloring the video frames I get are formatted with
FORMAT_I420
which I transfer them to YUV sources and encode them as the following codevoid EncoderInstance::OnGetFrame(int32_t result, pp::VideoFrame frame) {
if (result != PP_OK)
return;
//const uint8_t* data = static_cast<const>(frame.GetDataBuffer());
unsigned char* data = static_cast<unsigned>(frame.GetDataBuffer());
pp::Size size;
frame.GetSize(&size);
uint32_t buffersize = frame.GetDataBufferSize();
//frame.GetFormat() == PP_VIDEOFRAME_FORMAT_BGRA);
//Logger::Log("Format is :%d", frame.GetFormat());
//PP_VIDEOFRAME_FORMAT_I420
Logger::Log("stream received is: %02X", data);
if (is_recording_) {
vpx_codec_iter_t iter = NULL;
const vpx_codec_cx_pkt_t *pkt;
int iSizeY = out_width * out_height;
int iSizeUV = (out_width * out_height)/4;
unsigned char* pY = data;
unsigned char* pU = data + iSizeY; // there are width * height Y components
unsigned char* pV = data + iSizeUV; // skip the U components
Logger::Log("pY: %02X", pY);
Logger::Log("pU: %02X", pU);
Logger::Log("pV: %02X", pV);
// copy the pixels into our "raw input" container.
int bytes_filled = avpicture_fill(&pic_raw, NULL, AV_PIX_FMT_YUV420P, out_width, out_height);
pic_raw.data[0] = pY;
pic_raw.data[1] = pU;
pic_raw.data[2] = pU;
Logger::Log("bytes filled: %d", bytes_filled);
if(!bytes_filled) {
Logger::Log("Cannot fill the raw input buffer");
return;
}
// convert to i420 for vp8
int h = sws_scale(sws, pic_raw.data, pic_raw.linesize, 0, out_height, raw.planes, raw.stride);
if(h != out_height) {
Logger::Log("scale failed: %d", h);
return;
}
Logger::Log("Picture Raw data is: %d", pic_raw.data);
if(vpx_codec_encode(&codec, &raw, frame_cnt, 1, flags, VPX_DL_REALTIME))
die_codec(&codec, "Failed to encode frame");
while( (pkt = vpx_codec_get_cx_data(&codec, &iter)) ) {
switch(pkt->kind) {
case VPX_CODEC_CX_FRAME_PKT:
Logger::Log("Compressed buffer is %02X:",pkt->data.frame.buf);
Logger::Log("Compressed buffer size %02X:",pkt->data.frame.sz);
glb_app_thread.message_loop().PostWork(callback_factory_.NewCallback(&EncoderInstance::write_ivf_frame_header, pkt));
glb_app_thread.message_loop().PostWork(callback_factory_.NewCallback(&EncoderInstance::WriteFile, pkt));
break;
default:break;
}
}
frame_cnt++;
}
video_track_.RecycleFrame(frame);
if (need_config_) {
ConfigureTrack();
need_config_ = false;
} else {
video_track_.GetFrame(
callback_factory_.NewCallbackWithOutput(
&EncoderInstance::OnGetFrame));
}
}
</unsigned></const>Here is a screenshot of an image I got from the video generated
-
ffmpeg / mencoder converting a video with correct setting
22 août 2016, par Rick TI have an avi video file that plays on my Onn-W7 player Link to avi video file that works and backup link to avi file that works. I’m trying to convert some other video files over so that they will also play on it. I’ve tried handbrake, ffmpeg and mencoder but the video fails to work most likely do to the fact I have some settings wrong in the conversion process but I don’t know which ones any ideas how to fix this
Here’s the settings of the avi file that works below :
General
Complete name : /tmp/ONN.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 11.0 MiB
Duration : 3mn 1s
Overall bit rate : 508 Kbps
Writing application : MEncoder Sherpya-MinGW-20060312-4.1.0
Writing library : MPlayer
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Simple@L3
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 3mn 1s
Bit rate : 371 Kbps
Width : 160 pixels
Height : 128 pixels
Display aspect ratio : 5:3
Original display aspect ratio : 5:4
Frame rate : 15.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 1.207
Stream size : 8.00 MiB (73%)
Writing library : XviD 1.1.0 (UTC 2005-11-22)
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 2
Codec ID : 50
Duration : 3mn 1s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 2.77 MiB (25%)
Alignment : Split accross interleaves
Interleave, duration : 26 ms (0.39 video frame)
Interleave, preload duration : 522 msThe ffmpeg command I tried is :
ffmpeg -i "video_to_convert.mp4" -c:v libxvid -vf scale=160x128,setsar=1 -b:v 800k -r 15 -c:a libtwolame -ac 2 -ar 44100 -b:a 128k -y video_converted.avi