
Recherche avancée
Médias (10)
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon seed (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
The four of us are dying (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Corona radiata (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Lights in the sky (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (94)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)
Sur d’autres sites (15854)
-
IO.copy_stream performance in ruby
19 juillet 2016, par stiller_leserI am trying to continously read a file in ruby (which is growing over time and needs to be processed in a separate process). Currently I am archiving this with the following bit of code :
r,w = IO.pipe
pid = Process.spawn('ffmpeg'+ffmpeg_args, {STDIN => r, STDERR => STDOUT})
Process.detach pid
while true do
IO.copy_stream(open(@options['filename']), w)
sleep 1
endHowever - while working - I can’t imagine that this is the most performant way of doing it. An alternative would be to use the following variation :
step = 1024*4
copied = 0
pid = Process.spawn('ffmpeg'+ffmpeg_args, {STDIN => r, STDERR => STDOUT})
Process.detach pid
while true do
IO.copy_stream(open(@options['filename']), w, step, copied)
copied += step
sleep 1
endwhich would only continously copy parts of the file (the issue here being if the step should ever overreach the end of the file). Other approaches such a simple read-file led to ffmpeg failing when there was no new data. With this solution the frames are dropped if no new data is available (which is what I need).
Is there a better way (more performant) to archive something like that ?
EDIT :
Using the method proposed by @RaVeN I am now using the following code :
open(@options['filename'], 'rb') do |stream|
stream.seek(0, IO::SEEK_END)
queue = INotify::Notifier.new
queue.watch(@options['filename'], :modify) do
w.write stream.read
end
queue.run
endHowever now ffmpeg complaints about invalid data. Is there another method than
read
? -
Calculate Bitrate from m3u8 ts files ffmpeg
16 janvier 2017, par JohnI im using ffmpeg to connect to source and then make hls chunks (ts files) so that i can restream.
I use following ffmpeg command to connect to source and generate hls segments :
ffmpeg -y -nostdin -hide_banner -fflags +genpts -async 1 -i http://livestream.com/stream_name.ts -acodec copy -vcodec copy -scodec copy -f hls -hls_time 10 -hls_list_size 6 -hls_flags delete_segments /tmp/chunks/1_.m3u8
Files are generated in /tmp/chunks/ folder ==>♦ 1_.m3u8 index file and 1_0.ts 1_1.ts 1_2.ts 1_3.ts
So question is how can i calulate bitrate of stream ?
If i use -f mpegts i can see from ffmpeg bitrate in terminal...but i don’t have chunks and opening stream is slow because stream is written in one file 1_.m3u8 on HDD and is growing..so this solution is not good.
I use to calulate this way :
When 1_1.ts is generated i read file size of 1_0.ts, read duration of 1_0.ts and calulate bitrate....let’s say that file size is : 2360904 bytes and file duration is : 12seconds) :
I calucalte it using forumula :
BITRATE = ((file_size / 1024) / file_duration) * 8 [kbit/s]
So in my example this is :
BITRATE = ((2360904 / 1024) / 12) * 8 = 1537 [kbit/s]
Is this correct calulation and is this valid for ffmpeg ? Because in ffmpeg when i don’t use hls segmenter only -f mpegts i get bitrate around 1770kbit/s so would need to ask if this is correct way of calculating bitrate of stream or if is not how is correct way and formula...thanks.
Also i need to use HLS segmenter from ffmpeg because this way streams opens very quick and cpu usage is lower (ram usage is 1-2MB per connection witch is good)
-
Playing fragmented mp4 doesnt continue playing
18 mai 2017, par advinerUsing ffmpeg I create an mp4 using my video camera as the source.
ffmpeg -f dshow -i video="Integrated Webcam":audio="Microphone (Realtek High Definition Audio)"^
-g 52^
-vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3^
-f mp4 -movflags empty_moov+default_base_moof+frag_keyframe^
%OUTPUT%\video.mp4Works with IE11, Chrome and Firefox
And my html video tags :
<video controls="controls" autoplay="autoplay" style="width:640px;height:360px;">
<source src="http://localhost/video.mp4" type="video/mp4;codecs="avc1.42E01E, mp4a.40.2""></source>
</video>The node web server version just has src="http://localhost/" for the
using
I’ve tried nginx and a node version that I got from this site
The nginx doesnt do anything special. I just basically point the root to the folder so it sees the mp4.The problem is it only plays however much the webserver sees when the page is loaded. The file is still continuously growing. And if I refresh the page I can see the time length is now longer since the last time.
My question is how can I make the video tag continuously play the fragmented video data without stopping and refreshing the page (which starts from the beginning again) ?