
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (8)
-
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (4151)
-
Why a batch processing of ffmpeg is freezing the system ?
3 septembre 2019, par Krishna ChebroluI have a requirement of splitting smaller chunks of videos from 50+ mp4 source files for 5000+ records. Each record may result in 2 or 3 smaller chunks from as many source files out of those 50+.
The logic to determine which source file to be picked up is written in Java and then fed to
ffmpeg
onRuntime.getRuntime().exec()
usingExecutorService
withnewFixedThreadPool
as below :private static boolean processqueue(ArrayList<string> cmds) {
final ExecutorService pool;
int threadsnum = Runtime.getRuntime().availableProcessors()-2;
pool = Executors.newFixedThreadPool(threadsnum);
for(final String cmd: cmds){
pool.execute(new Runnable() {
public void run() {
System.out.println(cmd);
try {
Runtime.getRuntime().exec(cmd);
} catch (IOException e) {
e.printStackTrace();
pool.shutdown();
}
}
});
}
pool.shutdown();
// wait for them to finish for up to one minute.
try {
if(!pool.awaitTermination(1, TimeUnit.MINUTES)) {
pool.shutdownNow();
}
//Wait a while for tasks to respond to being cancelled
if(!pool.awaitTermination(1, TimeUnit.MINUTES))
System.err.println("Pool did not shutdown properly");
} catch (InterruptedException e) {
e.printStackTrace();
pool.shutdownNow();
//Preserve interrupt status
Thread.currentThread().interrupt();
return false;
}
return true;
}
</string>the String
cmd
value is one of these based on split or merge requirement :for split :
ffmpeg -y -ss 00:00:00 -t 00:08 -i E:/tmp/fin12.mp4 -acodec copy -vcodec copy E:/tmp/Intermed/0136f.mp4
or
for merge :
ffmpeg -y -i E:/tmp/Inter/0136c0.mp4 -i E:/tmp/Inter/0136c1.mp4 -i E:/tmp/Inter/0136f.mp4 -i E:/tmp/Jingle.mp4 -i E:/tmp/wm1280.png -filter_complex "[0:v][0:a][1:v][1:a][2:v][2:a][3:v][3:a]concat=n=4:v=1:a=1[vv][a];[vv][4:v]overlay=x=0:y=H-overlay_h[v]" -map "[v]" -map "[a]" E:/tmp/final/0136.mp4
On first attempt, only 250 records were processed. And, on subsequent attempt of balance records processing, it threw below exception ; but, processed another 300 records :
java.io.IOException: Cannot run program "ffmpeg": CreateProcess error=1455, The paging file is too small for this operation to complete
at java.lang.ProcessBuilder.start(Unknown Source)And, this code freezes often. Why is
ExecutorService
not holding up the queue to process all the records and exit gracefully ? What am I doing wrong ?Note : I’m calling Java class from windows batch script by passing relevant arguments which is executed from command line.
-
Adaptive part in MPD using MP4box
28 janvier 2019, par enigmaVadaI have used ffmpeg to encode audio and video files of my video sample.mp4 for the dash player. The commands are as follows :
ffmpeg -i sample.mp4 -s 426x240 -c:v libx264 -b:v 640k -g 90 -an sample_video_240.mp4
ffmpeg -i sample.mp4 -s 480x360 -c:v libx264 -b:v 960k -g 90 -an sample_video_360.mp4
ffmpeg -i sample.mp4 -s 640x480 -c:v libx264 -b:v 1280k -g 90 -an sample_video_480.mp4
ffmpeg -i sample.mp4 -s 1280x720 -c:v libx264 -b:v 2560k -g 90 -an sample_video_720.mp4
ffmpeg -i sample.mp4 -c:a aac -b:a 128k -vn sample_audio.mp4I have generated 240p,360p,480p and 720p videos and audio file.
Then I have used mp4box to generate the mpd file using the following command :
mp4box -dash 10000 -rap -profile dashavc264:onDemand -mpd-title BBB -out sample.mpd -frag 5000 sample_audio.mp4 sample_video_240.mp4 sample_video_360.mp4 sample_video_480.mp4 sample_video_720.mp4
I am using the dash.js player to play the video. The problem is, the adaptive part of DASH isn’t working. The player is just using the 240p video and not switching to a better format even if proper bandwidth is available. I am checking using the network tab of chrome dev tools.
What am i doing wrong ? Please help.
Here is the mpd file for reference :
<?xml version="1.0"?>
<mpd xmlns="urn:mpeg:dash:schema:mpd:2011" minbuffertime="PT1.500S" type="static" mediapresentationduration="PT0H1M9.869S" maxsegmentduration="PT0H0M9.985S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011,http://dashif.org/guidelines/dash264">
<programinformation moreinformationurl="http://gpac.io">
</programinformation>
<period duration="PT0H1M9.869S">
<adaptationset segmentalignment="true" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
<representation mimetype="audio/mp4" codecs="mp4a.40.2" audiosamplingrate="44100" startwithsap="1" bandwidth="130920">
<audiochannelconfiguration schemeiduri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></audiochannelconfiguration>
<baseurl>sample_audio_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="902-1017">
<initialization range="0-901"></initialization>
</segmentbase>
</representation>
</adaptationset>
<adaptationset segmentalignment="true" group="1" maxwidth="426" maxheight="240" maxframerate="30" par="426:240" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
<representation mimetype="video/mp4" codecs="avc1.640015" width="426" height="240" framerate="30" sar="1:1" startwithsap="1" bandwidth="590708">
<baseurl>sample_video_240_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="914-1053">
<initialization range="0-913"></initialization>
</segmentbase>
</representation>
</adaptationset>
<adaptationset segmentalignment="true" group="1" maxwidth="640" maxheight="480" maxframerate="30" par="4:3" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
<representation mimetype="video/mp4" codecs="avc1.64001E" width="480" height="360" framerate="30" sar="1:1" startwithsap="1" bandwidth="883873">
<baseurl>sample_video_360_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="914-1053">
<initialization range="0-913"></initialization>
</segmentbase>
</representation>
<representation mimetype="video/mp4" codecs="avc1.64001E" width="640" height="480" framerate="30" sar="1:1" startwithsap="1" bandwidth="1188712">
<baseurl>sample_video_480_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="913-1052">
<initialization range="0-912"></initialization>
</segmentbase>
</representation>
</adaptationset>
<adaptationset segmentalignment="true" group="1" maxwidth="1280" maxheight="720" maxframerate="30" par="16:9" lang="und" subsegmentalignment="true" subsegmentstartswithsap="1">
<representation mimetype="video/mp4" codecs="avc1.64001F" width="1280" height="720" framerate="30" sar="1:1" startwithsap="1" bandwidth="2365717">
<baseurl>sample_video_720_dashinit.mp4</baseurl>
<segmentbase indexrangeexact="true" indexrange="914-1053">
<initialization range="0-913"></initialization>
</segmentbase>
</representation>
</adaptationset>
</period>
</mpd> -
Why aren't the videos in my S3 bucket buffering to html video tag ?
2 juin 2019, par Michael CainI have so far successfully programmed a node script on a Udoo x86 advanced plus that captures an Ethernet connected IP cam’s RTSP stream. I use ffmpeg to trans-code the stream into 5 second mp4 files. As soon as the files show up in the folder they are uploaded/synced to my AWS S3 Bucket. Next I have a Node server that GET’s the most recently created mp4 file from the S3 bucket and runs it through mediasource extension and finally to an html video tag.
The videos are playing on the browser but not in any kind of synchronous manner. No buffering seems to be taking place. one video plays then another and so on. Video is skipping all over the place.
I would really appreciate any guidance with this bug.
export function startlivestream() {
const videoElement = document.getElementById("my-video");
const myMediaSource = new MediaSource();
const url = URL.createObjectURL(myMediaSource);
videoElement.src = url;
myMediaSource.addEventListener("sourceopen", sourceOpen);
}
function sourceOpen() {
if (window.MediaSource.isTypeSupported(
'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'
)
)
{
console.log("YES");
}
// 1. add source buffers
const mediaCodec = 'video/mp4; codecs="avc1.4D601F"';
var mediasource = this;
const videoSourceBuffer = mediasource.addSourceBuffer(mediaCodec);
// 2. download and add our audio/video to the SourceBuffers
function checkVideo(url) {
var oReq = new XMLHttpRequest();
oReq.open("GET", url, true);
oReq.responseType = "arraybuffer";
oReq.onload = function(oEvent) {
var arrayBuffer = oReq.response; // Note: not oReq.responseText
if (arrayBuffer) {
videoSourceBuffer.addEventListener("updateend", function(_) {
mediasource.endOfStream();
document.getElementById("my-video").play();
});
videoSourceBuffer.appendBuffer(arrayBuffer);
}
};
oReq.send(null);
}
setInterval(function() {
checkVideo("http://localhost:8080");
}, 5000);My ffmpeg tags :
const startRecording = () => {
const args = [
"-rtsp_transport",
"tcp",
"-i",
inputURL,
"-f",
"segment",
"-segment_time",
"5",
"-segment_format",
"mp4",
"-segment_format_options",
"movflags=frag_keyframe+empty_moov+default_base_moof",
"-segment_time",
"5",
"-segment_list_type",
"m3u8",
"-c:v",
"copy",
"-strftime",
"1",
`${path.join(savePath, "test-%Y-%m-%dT%H-%M-%S.mp4")}`
];From what I have learned about Mediasource extensions they allow multiple videos to be taken in and allow the client to buffer them so it looks like one longer video. In simple terms.