
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (45)
-
Dépôt de média et thèmes par FTP
31 mai 2013, parL’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...) -
Les thèmes de MediaSpip
4 juin 20133 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
Thèmes MediaSPIP
3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...) -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (5180)
-
ffmpeg : non monotonically increasing dts
27 décembre 2023, par pan-sultanI compiled ffmpeg on my own to dig into the problem but the same problem is reproducible on deb packages installed from debian 12 repository. I use some code that converts mov to mp4 file. I do not know too much details because I am not the author and that code is huge. But I just need to research the root cause of the bug described below.


So, the code use next sequence of functions


av_packet_rescale_ts() // replace packet 
av_write_frame() // write frame



But at some period of time av_write_frame() fails with error Application provided invalid, non monotonically increasing dts to muxer in stream ... : 252003 >= 252003
return value is EINVAL


av_packet_rescale_ts() looks inside like this :


void av_packet_rescale_ts(AVPacket *pkt, AVRational src_tb, AVRational dst_tb)
{
 if (pkt->pts != AV_NOPTS_VALUE)
 pkt->pts = av_rescale_q(pkt->pts, src_tb, dst_tb);
 if (pkt->dts != AV_NOPTS_VALUE) {
 pkt->dts = av_rescale_q(pkt->dts, src_tb, dst_tb);
 }
...

int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
{
 return av_rescale_q_rnd(a, bq, cq, AV_ROUND_NEAR_INF);
}



so I have focused only on call of av_rescale_q_rnd() for dts, here is simple code reproducing the problem.


#include 
#include 
#include 


/* the code copied from FFMPEG to reproduce the problem without usage of FFMPEG */
/* copied from FFMPEG START */

typedef struct AVRational{
 int num; ///< Numerator
 int den; ///< Denominator
} AVRational;

#define FFMAX(a,b) ((a) > (b) ? (a) : (b))

enum AVRounding {
 AV_ROUND_ZERO = 0, ///< Round toward zero.
 AV_ROUND_INF = 1, ///< Round away from zero.
 AV_ROUND_DOWN = 2, ///< Round toward -infinity.
 AV_ROUND_UP = 3, ///< Round toward +infinity.
 AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero.
 AV_ROUND_PASS_MINMAX = 8192,
};


int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
{
 int64_t r = 0;

 if (c <= 0 || b < 0 || !((unsigned)(rnd&~AV_ROUND_PASS_MINMAX)<=5 && (rnd&~AV_ROUND_PASS_MINMAX)!=4))
 return INT64_MIN;

 if (rnd & AV_ROUND_PASS_MINMAX) {
 if (a == INT64_MIN || a == INT64_MAX)
 return a;
 rnd -= AV_ROUND_PASS_MINMAX;
 }

 if (a < 0)
 return -(uint64_t)av_rescale_rnd(-FFMAX(a, -INT64_MAX), b, c, rnd ^ ((rnd >> 1) & 1));

 if (rnd == AV_ROUND_NEAR_INF)
 r = c / 2;
 else if (rnd & 1)
 r = c - 1;

 if (b <= INT_MAX && c <= INT_MAX) {
 if (a <= INT_MAX)
 return (a * b + r) / c;
 else {
 int64_t ad = a / c;
 int64_t a2 = (a % c * b + r) / c;
 if (ad >= INT32_MAX && b && ad > (INT64_MAX - a2) / b)
 return INT64_MIN;
 return ad * b + a2;
 }
 } else {
 uint64_t a0 = a & 0xFFFFFFFF;
 uint64_t a1 = a >> 32;
 uint64_t b0 = b & 0xFFFFFFFF;
 uint64_t b1 = b >> 32;
 uint64_t t1 = a0 * b1 + a1 * b0;
 uint64_t t1a = t1 << 32;
 int i;

 a0 = a0 * b0 + t1a;
 a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a);
 a0 += r;
 a1 += a0 < r;

 for (i = 63; i >= 0; i--) {
 a1 += a1 + ((a0 >> i) & 1);
 t1 += t1;
 if (c <= a1) {
 a1 -= c;
 t1++;
 }
 }
 if (t1 > INT64_MAX)
 return INT64_MIN;
 return t1;
 }
}

int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
 enum AVRounding rnd)
{
 int64_t b = bq.num * (int64_t)cq.den;
 int64_t c = cq.num * (int64_t)bq.den;
 return av_rescale_rnd(a, b, c, rnd);
}

/* copied from FFMPEG END */

int main() {
 AVRational stb;
 stb.den = 1000000;
 stb.num = 1;
 AVRational dtb;
 dtb.den = 90000;
 dtb.num = 1;


 int64_t a1 = 229312;
 int64_t a2 = 230336;
 printf("%li\n", av_rescale_q_rnd(a1, stb, dtb, AV_ROUND_NEAR_INF));
 printf("%li\n", av_rescale_q_rnd(a2, stb, dtb, AV_ROUND_NEAR_INF));
}



as you can see a1 and a2 different but return result is the same which leeds to non monotonical sequance.
Which is the correct way to provide monotonic sequence here to avoid EINVAL ?
All numbers are real.


-
FFMPEG (libav) I get pts = 0 on every video frame while i decode video file with B-frames
23 juin 2023, par YuriyI'm developing simple video player.
When i test my application on sample video with B-frames i get message :
[mpeg4 @ 0x556b56585d40] Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it.
Wheh i test my application on sample video without B-frames i have no any problem.


I can't synchronize playback with PTS = 0 or random on every B-frame
LOG is below :




Format avi, duration 9223372036854775808 us
Sample format:AV_SAMPLE_FMT_FLTP
Video Codec:MPEG-4 part 2 ID:12 bit_rate:15034224
Audio Codec:MP3 (MPEG audio layer 3) ID:86017 bit_rate:320000
input bitrate : 48000
input audio nchanels : 2
input samples in frame per 1ch 1152
alsa : audio device with PCM name : 'default' is used
alsa : PCM state : PREPARED
alsa : set nchannels : 2
alsa : set stereo sound
alsa : set bitrate : 48000
alsa : set nframes per buffer : 64
alsa : set period time for buffer(in useconds) : 1333
breakpointstart of frame decoding loop
read_frame : got audio frame format AV_SAMPLE_FMT_FLTP size 4608
m_syncmaster:eUndef3 eVideoMaster
Last audio frame format AV_SAMPLE_FMT_NONE size 0
read_frame : got audio frame format AV_SAMPLE_FMT_FLTP size 4608
m_syncmaster eAudioMaster
Last audio frame format AV_SAMPLE_FMT_NONE size 0
read_frame : got audio frame format AV_SAMPLE_FMT_FLTP size 4608
m_syncmaster eAudioMaster
Last audio frame format AV_SAMPLE_FMT_NONE size 0
read_frame : got audio frame format AV_SAMPLE_FMT_FLTP size 4608
m_syncmaster eAudioMaster
Last audio frame format AV_SAMPLE_FMT_NONE size 0
read_frame : got audio frame format AV_SAMPLE_FMT_FLTP size 4608
......
m_syncmaster eAudioMaster
Last audio frame format AV_SAMPLE_FMT_NONE size 0
[mpeg4 @ 0x556b56585d40] Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it.
read_frame : got video frame format 0 size 1448637632
convert video Frame I (1) pts 0 dts 1 key_frame 1 delay 0.000000 data size 6220800
read_frame : Last video frame format -1 size 1448637632
read_frame : got audio frame format AV_SAMPLE_FMT_FLTP size 4608
m_syncmaster eAudioMaster
Last audio frame format AV_SAMPLE_FMT_NONE size 0
read_frame : got video frame format 0 size 1448637632
convert video Frame B (2) pts 0 dts 2 key_frame 0 delay 0.000000 data size 6220800
read_frame : Last video frame format -1 size 1448637632




How can i fix Iit ?
FFMPEG(libav) version 5.1


I try to google this problem and have found a hint : mpeg4_unpack_bframe, but I don't understand how to implement it.


-
Perf Script Erroneous Dwarf Stacktrace Output
12 juin 2020, par TheAhmadI used the following command to sample backtraces for an
ffmpeg
benchmark :


sudo perf record -d --call-graph dwarf,65528 -c 1000000 -e mem_load_uops_retired.l3_miss:u ffmpeg -i /media/ahmad/DATA/Videos/video.mp4 -threads 1 -vf spp out.mp4




As can be seen,
PEBS
is not used, the stack size is set to the maximum and the sampling period is quite large. I also limited the thread count, but this is the first part ofperf script --no-demangle
output :


ffmpeg 11750 6670.061261: 1000000 mem_load_uops_retired.l3_miss:u: 0 5080021 N/A|SNP N/A|TLB N/A|LCK N/A
 7fffeab68844 x264_pixel_avg_w16_avx2+0x4 (/usr/lib/x86_64-linux-gnu/libx264.so.152)

ffmpeg 11750 6670.274835: 1000000 mem_load_uops_retired.l3_miss:u: 0 5080021 N/A|SNP N/A|TLB N/A|LCK N/A
 7fffeab68844 x264_pixel_avg_w16_avx2+0x4 (/usr/lib/x86_64-linux-gnu/libx264.so.152)

ffmpeg 11750 6670.496159: 1000000 mem_load_uops_retired.l3_miss:u: 0 5080021 N/A|SNP N/A|TLB N/A|LCK N/A
 7fffeab8ef89 x264_pixel_sad_x4_16x16_avx2+0x49 (/usr/lib/x86_64-linux-gnu/libx264.so.152)

ffmpeg 11750 6670.852598: 1000000 mem_load_uops_retired.l3_miss:u: 0 5080021 N/A|SNP N/A|TLB N/A|LCK N/A
 7fffeaac97b3 pixel_memset+0x293 (inlined)
 7fffeaac97b3 plane_expand_border+0x293 (inlined)
 7fffeaac97b3 x264_frame_expand_border_filtered+0x293 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab463bc x264_fdec_filter_row+0x69c (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab49523 x264_slice_write+0x1873 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab85285 x264_stack_align+0x15 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab45bdb x264_slices_write+0xfb (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 5555561e3d87 [unknown] ([heap])

ffmpeg 11750 6671.110007: 1000000 mem_load_uops_retired.l3_miss:u: 0 5080021 N/A|SNP N/A|TLB N/A|LCK N/A
 7fffeab6cdde x264_frame_init_lowres_core_avx2+0x8e (/usr/lib/x86_64-linux-gnu/libx264.so.152)

ffmpeg 11750 6671.463562: 1000000 mem_load_uops_retired.l3_miss:u: 0 5080021 N/A|SNP N/A|TLB N/A|LCK N/A
 7fffeaabf806 x264_macroblock_load_pic_pointers+0x886 (inlined)
 7fffeaabf806 x264_macroblock_cache_load+0x886 (inlined)
 7fffeaabf806 x264_macroblock_cache_load_progressive+0x886 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab49204 x264_slice_write+0x1554 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab85285 x264_stack_align+0x15 (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 7fffeab45bdb x264_slices_write+0xfb (/usr/lib/x86_64-linux-gnu/libx264.so.152)
 1c [unknown] ([unknown])




None of the backtraces are correct. Because none of them begin with
_start
or__GI___clone
. I also usedLBR
, instead. But it has more size constraints and, therefore, not suitable. Any suggestions on how to get around the problem ?




UPDATE :



The problem happens for all events that I checked. When I used
mem_load_uops_retired.l3_miss
orLLC-load-misses
the problem was visible from the beginning. I also checked the output with thecycles
event and everything worked fine, at the beginning. But after that, the same problem was seen.


Also, note that, the problem disappears when I sample only kernel
mem_load_uops_retired.l3_miss
events.