
Recherche avancée
Médias (91)
-
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
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (100)
-
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 (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (8526)
-
What's the reason of failed to read from input stream while playing in ffmpeg
5 février 2016, par Long BaiI’m using ffmpeg library in qt compiled with mingw.
I’m going to read from rtmp stream, process video frame and write to another rtmp stream.
I refered ffmpeg examples and developed it.
It works well with local video stream.
But on the internet stream, it is failed to read from input stream after a few seconds playing.
What’s the reason of this problem ?
Thanks for your answer.Here is my code.
as you can see the following, on the line "ret=av_read_frame(m_pInContext,&inPacket)" return negative value.while (!m_bAborted)
// read stream.
int64_t tstart = av_gettime_relative() ;
ret = av_read_frame(m_pInContext, &inPacket) ;
if (ret < 0)
SetError("Failed to read input stream.") ;
break ;
//continue ;
if (inPacket.stream_index == m_nVideoStreamIdx)
{
do
{
// decode frame.
int decodedLen = DecodePacket(m_pInFrame, &inPacket, &got_frame, 1);
if (decodedLen < 0)
break;
if (got_frame)
{
// convert frame from yuv420 to rgb24.
if (sws_ctx1)
{
sws_scale(sws_ctx1, m_pInFrame->data, m_pInFrame->linesize, 0, m_nHeight, pRawData, arrRawDataLineSize);
}
// image processing to remove the code and ads on video.
if (m_pListener)
m_pListener->OnFrame(pRawData[0], m_nWidth, m_nHeight, arrRawDataLineSize[0], AV_PIX_FMT_RGB24, 24);
// convert from rgb24 to yuv420 to write to the output stream.
if (sws_ctx2)
{
sws_scale(sws_ctx2, pRawData, arrRawDataLineSize, 0, m_nHeight, m_dst_picture.data, m_dst_picture.linesize);
}
// increase frame number.
frameCount ++;
// write to the output stream.
ret = WriteVideoFrame(m_pOutContext, m_pOutVideoStream, &frameCount);
if (ret < 0) {
if (sws_ctx2)
sws_freeContext(sws_ctx2);
sws_ctx2 = NULL;
CloseOutputStream();
SetError("Failed to write video stream.");
}
// estimate frame time and sleep.
//clock_t tend = clock();
int64_t tend = av_gettime_relative();
frameDuration = tend-tstart;//(long)(1000 * (tend - tstart) / CLOCKS_PER_SEC);
if (1000*frameTime - frameDuration > 0)
av_usleep(1000*frameTime - frameDuration);
//QThread::msleep(frameTime - frameDuration);
tstart = tend;
}
// if there is another frame in the packet, then loop.
inPacket.size -= decodedLen;
inPacket.data += decodedLen;
}while(inPacket.size > 0);
}
else if (m_pOutContext)
{
}
av_packet_unref(&inPacket);
} -
Detect rotation angle and rotate final video using ffmpeg version 2.8
3 février 2016, par Hemant KumarI used to work on ffmpeg 2.2 until now and was detecting rotation angle of video uploaded from android / iPhone mobiles and rotate the resulting video so that it run perfectly on a correct angle.
But since I have updated the ffmpeg to version 2.8 I am getting this rotation problem. My queries are not rotating the videos as they were earlier.
Here’r the commands I was using :
To check rotation angle :
ffprobe -of json -show_streams {$input} | grep rotate
below is my final command to convert a video to mp4
"ffmpeg -i {$input} -strict -2 -vcodec libx264 -preset slow -vb 500k -maxrate 500k -bufsize 1000k -vf 'scale=-1:480 ".fix_video_orientation($input)."' -threads 0 -ab 64k -s {$resolution} -movflags faststart -metadata:s:v:0 rotate=0 {$output}";
"fix_video_orientation" function is given below. It detect the angle of rotation of the initial video and output optimal option for rotating the final video.
function fix_video_orientation($input){
$return= ", transpose=1 ";
$dd= exec("ffprobe -of json -show_streams {$input} | grep rotate");
if(!empty($dd)){
$dd=explode(":",$dd);
$rotate=str_replace(",","",str_replace('"',"",$dd[1]));
if($rotate=="90")return $return;
else if ($rotate=="180") return ", transpose=2,transpose=2 ";
else if($rotate == "270") return ", transpose=2 ";
}Currently above script is supporting "flv","avi","mp4","mkv","mpg","wmv","asf","webm","mov","3gp","3gpp" extensions, also the script is supporting the resulting .mp4 file to play on all browsers and devices.
Now the ffprobe command is not returning rotation angle and so a portrait video if uploaded from iphone is showing as landscape on the website.
Output console of ffprobe command :
ffprobe version N-77455-g4707497 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libdcadec --enable-libfreetype --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvo-aacenc --enable-libvidstab
libavutil 55. 11.100 / 55. 11.100
libavcodec 57. 20.100 / 57. 20.100
libavformat 57. 20.100 / 57. 20.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 21.101 / 6. 21.101
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/standard/PORTRAIT.m4v':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2016-02-03 05:25:18
com.apple.quicktime.make: Apple
com.apple.quicktime.model: iPhone 4S
com.apple.quicktime.software: 9.2.1
com.apple.quicktime.creationdate: 2016-02-03T10:52:11+0530
Duration: 00:00:03.34, start: 0.000000, bitrate: 7910 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
Metadata:
creation_time : 2016-02-03 05:25:18
handler_name : Core Media Data Handler
Stream #0:1(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 720x1280 [SAR 1:1 DAR 9:16], 7832 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 50 tbc (default)
Metadata:
creation_time : 2016-02-03 05:25:18
handler_name : Core Media Data Handler
encoder : H.264
Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2016-02-03 05:25:18
handler_name : Core Media Data Handler
Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
Metadata:
creation_time : 2016-02-03 05:25:18
handler_name : Core Media Data Handler
Unsupported codec with id 0 for input stream 2
Unsupported codec with id 0 for input stream 3If latest version of ffmpeg (2.8) is used to auto rotate the video, can you please suggest me what option I need to add or remove from my final command.
-
microbench : Add fallback to gettimeofday()
3 février 2016, par Dave Yeomicrobench : Add fallback to gettimeofday()
Some operating systems such as OS/2 don’t have any of the CLOCK* API
functions so add gettimeofday() as a fallback.Signed-off-by : Dave Yeo <dave.r.yeo@gmail.com>
Signed-off-by : Erik de Castro Lopo <erikd@mega-nerd.com>