
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (24)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6372)
-
how to convert HLS to RTMP with DISCONTINUITY tag
21 août 2018, par bekks8We have software that produces concatenated HLS files. This concatenation is basically just playlist manipulation. We replace some parts of the manifest by other parts. To make the HLS valid we add a #EXT-X-DISCONTINUITY tag before and after the change :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:4.0000,
http://host/stream/1
#EXT-X-DISCONTINUITY
#EXTINF:4.0000,
http://host/stream/2
#EXTINF:4.0000,
http://host/stream/3
#EXTINF:4.0000,
http://host/stream/4
#EXTINF:4.0000,
http://host/stream/5
#EXTINF:4.0000,
http://host/stream/6
#EXTINF:0.2917,
http://host/stream/7
#EXT-X-DISCONTINUITY
#EXTINF:4.0000,
http://host/stream/8
#EXT-X-ENDLISTIn an HTML5 player above manifest will play just fine. Everything is in sync, audio and video play.
Now, when i try and convert above to an rtmp format and stream this to a rtmp endpoint it works, but it stalls after about 4 seconds, than it continues missing 4 seconds, and runs fine after that.
Basically, it plays part 1, skips 2, and continues with 3.
I’ve checked the logs for ffmpeg which repeat :
[flv @ 0x7fa696837c00] Non-monotonous DTS in output stream 0:1; previous: 3924, current: 0; changing to 3924. This may result in incorrect timestamps in the output file.
[flv @ 0x7fa696837c00] Non-monotonous DTS in output stream 0:1; previous: 3924, current: 23; changing to 3924. This may result in incorrect timestamps in the output file.
[flv @ 0x7fa696837c00] Non-monotonous DTS in output stream 0:1; previous: 3924, current: 46; changing to 3924. This may result in incorrect timestamps in the output file.After the DTS warnings ffmpeg reports that it dropped 95 frames :
frame= 102 fps= 22 q=28.0 size= 181kB time=00:00:04.34 bitrate= 341.7kbits/s dup=0 drop=95 speed=0.958x
This of course makes, sense, when i check with ffprobe i can see that the PTS isn’t aligned (which is expected) :
frame|pkt_pts_time=5.316667|pkt_dts_time=5.316667|pict_type=B
frame|pkt_pts_time=5.358333|pkt_dts_time=5.358333|pict_type=B
frame|pkt_pts_time=5.400000|pkt_dts_time=1.400000|pict_type=P
frame|pkt_pts_time=5.441667|pkt_dts_time=1.441667|pict_type=P
frame|pkt_pts_time=1.483333|pkt_dts_time=1.483333|pict_type=I
frame|pkt_pts_time=1.525000|pkt_dts_time=1.525000|pict_type=B
frame|pkt_pts_time=1.566667|pkt_dts_time=1.566667|pict_type=BThe 95frames, is exactly the number of frames with a PKT_PTS_TIME (and DTS) in the past.
the ffmpeg command i use to create the RTMP stream is :
ffmpeg -fflags +igndts -re -i http://host/manifest -c:v libx264 -force_key_frames "expr:gte(t,n_forced*2)" -c:a aac -ar 44100 -r 24 -f flv rtmp://domain/some/rtmp/endpoint
What i’m looking for is a way to convert the HLS to a valid RTMP, without it skipping the frames with a PTS in the past. I would like it to just regenerate the PTS :
Is there a way to tell ffmpeg to regenerate the PTS/DTS timestamps in it’s output file ? -
AccessViolationException occurred in AForge.Video.FFMPEG.dll
4 août 2018, par Prakash MI have a camera class, in this class I used a timer and in its tick event I am saving video using
AForge.Net
’s VideoFileWriter in C++/Cli (x86, .net framework : v4.6).
This is not supposed to happen, as this is managed code. But even if I wrap in try catch block, program crashes because ofAccessViolationException
. I have verified that Image is not null. Something to do withVideoFileWriter
. This happens anytime between app start to 30 minutes of running.An unhandled exception of type ’System.AccessViolationException’
occurred in AForge.Video.FFMPEG.dll
Additional information : Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.In Visual Studio’s output I see
Exception thrown at 0x0C4D689F (swscale-2.dll) in test.exe : 0xC0000005 : Access violation writing location 0x09F83D80.
Exception thrown : ’System.AccessViolationException’ in
AForge.Video.FFMPEG.dllcode :
private: System::Void Video_Recorder_Tick(System::Object^ sender, System::Timers::ElapsedEventArgs^ e)
{
Bitmap^ save = ConvertMatToBitmap(image); //function to convert opencv's Mat to .net's Bitmap
if(writer!= nullptr)
writer->WriteVideoFrame(save);
delete save;
}
VideoFileWriter ^writer = gcnew VideoFileWriter();
private: Void load_VideoWriter()
{
writer->Open("C:/video.avi", 640, 480, 10, VideoCodec::Default);
}Visual Studio showed few values for
writer
BitRate 400000
Codec Default
FrameRate 10
Height 480
IsOpen true
Width 640Let me know if anybody needs more info.
call stack didn’t help muchTo my surprise no one on internet is having this issue !
Code seems straight forward, what could possibly be the issue ? -
Modify video frames but keep their timestamp in python skvideo ffmpeg
3 août 2018, par bendafI have .ts videos with variable frame rate and I would like to modify the frames of the videos and keep the timestamps belonging to the frames. I am using python and experiencing with ffmpeg, but I am open to any solution.
The output of
$ffmpeg -i myvideo.ts -hide_banner
Input #0, mpegts, from 'myvideo.ts':
Duration: 00:02:37.84, start: 1.400000, bitrate: 13799 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 3840x1080, 25 fps, 25 tbr, 90k tbn, 50 tbcWhat I have tried so far is :
import skvideo.io
outpudict = {"-map": "0",
"-vcodec": "libx264",
"-pix_fmt": "yuv420p",
"-f": "mpegts"
}
videogen = skvideo.io.vreader(args.input_video)
writer = skvideo.io.FFmpegWriter(filename + file_extension, outputdict=outpudict)
for i, frame in enumerate(videogen):
# modify the frame
writer.writeFrame(frame)
writer.close()But so far I am not able to keep the pts and dts parameters of the frames only the format and encoding.
Note : I have tried to use skvideo.io.FFmpegReader or pass the outputdict parameter also to vreader but the script crashed because of this bug.
Note2 : I am checking the pts of the frames with
$ffprobe -hide_banner -show_entries packet=pts,dts myvideo.ts
Thank you for reading through my question, any idea would be appreciated !