
Recherche avancée
Autres articles (47)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users.
Sur d’autres sites (7424)
-
ffmpeg-mp4box-mpeg dash plays only few segments
30 octobre 2015, par IdrisNeed help in debugging the segment dash files
The input was an MP4 with these details. This was recorded from a video camera, the output from the camera was mkv and we converted into MP4 after editing the audio via adobe
- Size : 7.51 GB Frame rate : 25 frames/ second
- Data rate : 25326kbps
- Total bitrate : 25525kbps
Converted this to another mp4 with this command
ffmpeg -i "input.mp4" -s 1280x720 -c:v libx264 -b:v 750k -bf 2 -g 75 -sc_threshold 0 -an video_1280x720_750k.mp4
ffmpeg -i "input.mp4" -c:a aac -strict experimental -b:a 96k -ar 32000 -vn audio_96k.mp4The output video has
- fps : 25
- Data rate : 761kbps
- bitrate : 761kbps
Then, created the segmented dash through MP4Box
MP4Box -dash 10000 -frag 10000 -rap -segment-name video_0_1280000\segment_ video_1280x720_750k.mp4
MP4Box -dash 3000 -frag 10000 -rap -segment-name audio_0_96000\segment_ audio_96k.mp4The MPD generated was validated online and its perfect
UPDATE ! Included the MPD file
<?xml version="1.0"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H2M0.000S" maxsegmentduration="PT0H0M10.000S" profiles="urn:mpeg:dash:profile:full:2011">
<programinformation moreinformationurl="http://gpac.sourceforge.net">
</programinformation>
<period duration="PT0H2M0.000S">
<adaptationset segmentalignment="true" lang="eng">
<representation mimetype="audio/mp4" codecs="mp4a.40.2" audiosamplingrate="32000" startwithsap="1" bandwidth="98434">
<audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
<segmentlist timescale="32000" duration="319999">
<initialization sourceurl="audio_0_96000/segment_init.mp4"></initialization>
<segmenturl media="audio_0_96000/segment_1.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_2.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_3.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_4.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_5.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_6.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_7.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_8.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_9.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_10.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_11.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_12.m4s"></segmenturl>
<segmenturl media="audio_0_96000/segment_13.m4s"></segmenturl>
</segmentlist>
</representation>
</adaptationset>
<adaptationset segmentalignment="true" maxwidth="1280" maxheight="720" maxframerate="25" par="16:9" lang="eng">
<representation mimetype="video/mp4" codecs="avc3.64001f" width="1280" height="720" framerate="25" sar="1:1" startwithsap="1" bandwidth="764668">
<segmentlist timescale="12800" duration="125866">
<initialization sourceurl="video_0_1280000/segment_init.mp4"></initialization>
<segmenturl media="video_0_1280000/segment_1.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_2.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_3.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_4.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_5.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_6.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_7.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_8.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_9.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_10.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_11.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_12.m4s"></segmenturl>
<segmenturl media="video_0_1280000/segment_13.m4s"></segmenturl>
</segmentlist>
</representation>
</adaptationset>
</period>
</mpd>Played the video through dashjs.. I believe it just plays the initial segment and errors out as MEDIA_ERR_DECODE..MEDIA_ERR_SRC_NOT_SUPPORTED.. or some message which says start not found..
Through chrome debugging I see that atleast 4 segments are correctly loading.. I am not sure whats going on..
Any help in debugging the issue is really appreciated. I really can’t understand if this is a problem with the file or ffmpeg or mp4box or chrome.
Output from chrome debugging tool
[dash.js 1.5.1] new MediaPlayer instance has been created
dash.all.js:11 Playback initiated!
dash.all.js:11 Parsing complete: ( xml2json: 5ms, objectiron: 10ms, total: 0.015s)
dash.all.js:11 Manifest has been refreshed at Mon Oct 26 2015 10:19:22 GMT-0400 (Eastern Daylight Time)[1445869162092]
dash.all.js:11 SegmentTimeline detected using calculated Live Edge Time
dash.all.js:11 MediaSource is open!
dash.all.js:11 [object Event]
dash.all.js:11 Duration successfully set to: 120
dash.all.js:11 Added 0 inline events
dash.all.js:11 video codec: video/mp4;codecs="avc3.64001f"
dash.all.js:11 [video] stop
dash.all.js:11 audio codec: audio/mp4;codecs="mp4a.40.2"
dash.all.js:11 [audio] stop
dash.all.js:11 No text data.
dash.all.js:11 No fragmentedText data.
dash.all.js:11 No muxed data.
dash.all.js:11 [video] start
dash.all.js:11 [video] Getting the request for time: 0
dash.all.js:11 [video] Index for time 0 is 0
dash.all.js:11 [video] SegmentList: 0 / 120
dash.all.js:11 [audio] start
dash.all.js:11 [audio] Getting the request for time: 0
dash.all.js:11 [audio] Index for time 0 is 0
dash.all.js:11 [audio] SegmentList: 0 / 120
dash.all.js:11 [video] Getting the request for time: 9.83328125
dash.all.js:11 [video] Index for time 9.83328125 is 0
dash.all.js:11 [video] SegmentList: 0 / 120
dash.all.js:11 [video] SegmentList: 9.83328125 / 120
dash.all.js:11 [audio] Getting the request for time: 9.99996875
dash.all.js:11 [audio] Index for time 9.99996875 is 0
dash.all.js:11 [audio] SegmentList: 0 / 120
dash.all.js:11 [audio] SegmentList: 9.99996875 / 120
dash.all.js:11 loaded audio:Media Segment:0 (200, 20ms, 6ms)
dash.all.js:11 loaded video:Media Segment:0 (200, 153ms, 43ms)
dash.all.js:11 loaded video:Initialization Segment:NaN (200, 0ms, 32ms)
dash.all.js:11 [video] Initialization finished loading
dash.all.js:11 loaded audio:Initialization Segment:NaN (200, 0ms, 34ms)
dash.all.js:11 [audio] Initialization finished loading
dash.all.js:11 [video] Getting the request for time: 19.6665625
dash.all.js:11 [video] Index for time 19.6665625 is 1
dash.all.js:11 [video] SegmentList: 9.83328125 / 120
dash.all.js:11 [video] SegmentList: 19.6665625 / 120
dash.all.js:11 [audio] Getting the request for time: 19.9999375
dash.all.js:11 [audio] Index for time 19.9999375 is 1
dash.all.js:11 [audio] SegmentList: 9.99996875 / 120
dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
dash.all.js:11 [video] Stalling Buffer
dash.all.js:11 [video] Waiting for more buffer before starting playback.
dash.all.js:11 [video] Getting the request for time: 0
dash.all.js:11 [video] Index for time 0 is 0
dash.all.js:11 [audio] Stalling Buffer
dash.all.js:11 [audio] Waiting for more buffer before starting playback.
dash.all.js:11 [audio] Getting the request for time: 0
dash.all.js:11 [audio] Index for time 0 is 0
dash.all.js:11 <video> loadedmetadata
dash.all.js:11 Starting playback at offset: 0
dash.all.js:11 [video] Getting the request for time: 29.499843750000004
dash.all.js:11 [video] Index for time 29.499843750000004 is 2
dash.all.js:11 [video] SegmentList: 19.6665625 / 120
dash.all.js:11 [video] SegmentList: 29.499843750000004 / 120
dash.all.js:11 [video] Got enough buffer to start.
dash.all.js:11 [video] seek: 0
dash.all.js:11 [audio] Getting the request for time: 29.999906250000002
dash.all.js:11 [audio] Index for time 29.999906250000002 is 2
dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
dash.all.js:11 [audio] SegmentList: 29.999906250000002 / 120
dash.all.js:11 [audio] Got enough buffer to start.
dash.all.js:11 [audio] seek: 0
dash.all.js:11 loaded audio:Media Segment:9.99996875 (200, 67ms, 24ms)
dash.all.js:11 loaded video:Media Segment:9.83328125 (200, 71ms, 31ms)
dash.all.js:11 [audio] Buffered Range: 0.032 - 9.984
dash.all.js:11 [audio] Getting the request for time: 0
dash.all.js:11 [audio] Index for time 0 is 0
dash.all.js:11 Start Event Controller
dash.all.js:11 [audio] Buffered Range: 0.032 - 19.999968
dash.all.js:11 [audio] Getting the request for time: 0
dash.all.js:11 [audio] Index for time 0 is 0
dash.all.js:11 <video> play
dash.all.js:11 [video] start
dash.all.js:11 [video] Getting the request for time: 0
dash.all.js:11 [video] Index for time 0 is 0
dash.all.js:11 [video] SegmentList: 0 / 120
dash.all.js:11 [video] SegmentList: 9.83328125 / 120
dash.all.js:11 [video] SegmentList: 19.6665625 / 120
dash.all.js:11 [audio] start
dash.all.js:11 <video> playing
dash.all.js:11 [video] Buffered Range: 0 - 9
dash.all.js:11 [video] Getting the request for time: 0
dash.all.js:11 [video] Index for time 0 is 0
dash.all.js:11 Do seek: 0.032
dash.all.js:11 <video> seek
dash.all.js:11 [video] Getting the request for time: 29.499843750000004
dash.all.js:11 [video] Index for time 29.499843750000004 is 2
dash.all.js:11 [video] SegmentList: 19.6665625 / 120
dash.all.js:11 [video] SegmentList: 29.499843750000004 / 120
dash.all.js:11 [video] seek: 0.032
dash.all.js:11 [audio] seek: 0.032
dash.all.js:11 [video] Getting the request for time: 9
dash.all.js:11 [video] Index for time 9 is 0
dash.all.js:11 [video] SegmentList: 0 / 120
dash.all.js:11 [video] SegmentList: 9.83328125 / 120
dash.all.js:11 [video] SegmentList: 19.6665625 / 120
dash.all.js:11 [video] SegmentList: 29.499843750000004 / 120
dash.all.js:11 [video] Buffered Range: 0 - 18
dash.all.js:11 [video] Getting the request for time: 0
dash.all.js:11 [video] Index for time 0 is 0
dash.all.js:11 loaded video:Media Segment:19.6665625 (200, 42ms, 33ms)
dash.all.js:11 <video> seeked
dash.all.js:11 Start Event Controller
dash.all.js:11 <video> playing
dash.all.js:11 [video] Buffered Range: 0 - 28
dash.all.js:11 [video] Getting the request for time: 0
dash.all.js:11 [video] Index for time 0 is 0
dash.all.js:11 [audio] Getting the request for time: 19.999968
dash.all.js:11 [audio] Index for time 19.999968 is 1
dash.all.js:11 [audio] SegmentList: 9.99996875 / 120
dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
dash.all.js:11 [audio] Getting the request for time: 29.999906250000002
dash.all.js:11 [audio] Index for time 29.999906250000002 is 2
dash.all.js:11 [audio] SegmentList: 19.9999375 / 120
dash.all.js:11 [audio] SegmentList: 29.999906250000002 / 120
dash.all.js:11 loaded audio:Media Segment:19.9999375 (200, 102ms, 2ms)
dash.all.js:11 [audio] Buffered Range: 0.032 - 29.983968
dash.all.js:11 [audio] Getting the request for time: 0
dash.all.js:11 [audio] Index for time 0 is 0
dash.all.js:11 loaded audio:Media Segment:29.999906250000002 (200, 26ms, 2ms)
dash.all.js:11 [audio] Buffered Range: 0.032 - 39.999968
dash.all.js:11 [audio] Getting the request for time: 0
dash.all.js:11 [audio] Index for time 0 is 0
dash.all.js:11 loaded video:Media Segment:29.499843750000004 (200, 47ms, 7ms)
dash.all.js:11 Video Element Error: MEDIA_ERR_DECODE
dash.all.js:11 [video] stop
dash.all.js:11 [audio] stop
dash.all.js:11 Video Element Error: MEDIA_ERR_SRC_NOT_SUPPORTED
dash.all.js:11 <video> play
</video></video></video></video></video></video></video> -
Shell out to FFMPEG from Windows Service sometimes hangs
17 avril 2013, par Jake StevensonWe have a windows service which runs on multiple machines, waiting for MSMQ messages telling it to convert various files for us. Sometimes the files are video files and we shell out an ffmpeg process to do the conversion and wait for the process to complete or error before moving on. And on some occasions, that ffmpeg process appears to "hang" and we have to RDP to the machine as an admin and manually kill it off using task manager before it can continue to accept new messages. This hung ffmpeg process will stay that way indefinitely, I've waited several days on some occasions. The services all run under a special account.
The conversion process involves multiple steps— First copying the file locally, then running ffmpeg to convert, then running mp4box for "hinting", then another ffmpeg for a thumbnail. When it hangs, it is always on the first ffmpeg portion. Killing the ffmpeg process causes that code to receive an error and allows it to handle things normally from there.
Here is the code for that first FFMPEG process. As you can see, we've tried several things to detect a hung process :
public class FFMPEGEncoder : IEncoder
{
[DllImport("kernel32.dll", SetLastError = true)]
static extern int SetErrorMode(int wMode);
private ILogger _logger = NullLogger.Instance;
public ILogger Logger
{
get { return _logger; }
set { _logger = value; }
}
private static readonly string ffmpeg = System.IO.Path.Combine(ConfigurationManager.AppSettings["FFMPEG_Dir"], "ffmpeg.exe");
private const string ffmpegArgs =
"-r 30000/1001 -b 200k -bt 240k -vcodec libx264 -coder 0 -bf 0 -flags2 -wpred-dct8x8 -level 13 -maxrate 768k -acodec libfaac -ac 2 -ar 48000 -ab 192k -s 480x320 -async 1";
public EncoderResult EncodeTheFile(string originalFile)
{
var newFileName =
VideoFileNameHelper.GetVideoFileName(originalFile);
Logger.Debug("Encoding {0} to {1} with ffmpeg", originalFile, newFileName);
RunEncoding(originalFile, newFileName);
return new EncoderResult { Filename = newFileName };
}
private void RunEncoding(string originalFile, string newFileName)
{
var process = new System.Diagnostics.Process
{
StartInfo =
{
CreateNoWindow = true,
WorkingDirectory = ConfigurationManager.AppSettings["FFMPEG_Dir"],
UseShellExecute = false,
FileName = ffmpeg,
Arguments = "-i \"" + originalFile + "\" " + ffmpegArgs + " \"" + newFileName + "\"",
RedirectStandardOutput = false,
RedirectStandardError = true
}
};
Logger.Debug("Launching ffmpeg with the following arguments:");
Logger.Debug(process.StartInfo.Arguments);
int oldMode = SetErrorMode(3);
var startTime = DateTime.Now;
process.Start();
var output = process.StandardError.ReadToEnd();
Logger.Debug("ffmpeg output:");
Logger.Debug(output);
while(!process.WaitForExit(3000))
{
if (!process.Responding)
{
process.Kill();
SetErrorMode(oldMode);
throw new Exception("Process hung");
}
if (DateTime.Now.Subtract(startTime) > new TimeSpan(0, 0, 30, 0))
{
process.Kill();
SetErrorMode(oldMode);
throw new Exception("Process hung");
}
}
SetErrorMode(oldMode);
var exitCode = process.ExitCode;
if (exitCode != 0)
{
//We got an error from ffmpeg
process.Close();
if (System.IO.File.Exists(newFileName))
{
System.IO.File.Delete(newFileName);
}
Logger.Error("Error converting video {0}", originalFile);
throw new Exception(string.Format("Unable to process the video {0}", originalFile));
}
process.Close();
}
}Despite the errormode setting code AND the code that tries to kill the process after 30 minutes, I still end up with it hung occasionally and have to manually kill the process. What am I doing wrong that would allow my system to more gracefully handle the "hung" ffmpeg processes ?
-
Anomalie #3296 : Styles des boutons d’actions des Box
25 octobre 2014, par Nicolas DorignyTous les thèmes sont mis à jour, on peut fermer ce ticket.
+ ajout du box-sizing par Cerdic (#3000)