
Recherche avancée
Médias (91)
-
Head down (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Echoplex (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Discipline (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
Letting you (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
1 000 000 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
-
999 999 (wav version)
26 septembre 2011, par
Mis à jour : Avril 2013
Langue : English
Type : Audio
Autres articles (21)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
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 (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...)
Sur d’autres sites (5182)
-
How i can add logo on any location on ffmpeg stream ? This is my command :
9 décembre 2017, par Jond Davidffmpeg -y -i input.mp4 -i "logo2.png" -filter_complex "[0:v]setpts=PTS/1.15,boxblur=2:1,scale=iw/1.75 :-1,pad=iw+26:ih+26:13:13:color=blue [v1] ; movie=bgmu.mp4:loop=999,setpts=N/(FRAME_RATE*TB) [v2] ; [v2][v1]overlay=shortest=1:x=W-w-30:y=H-h-22 [v3] ; [v3][1:v]overlay=0:0,setdar=16/9 ; [0:a]atempo=1.15, aecho=0.4:0.66:2:0.2, chorus=0.5:0.9:50|80:0.4|0.42:0.25|0.4:2|1.4, firequalizer=gain_entry=’entry(100,0) ; entry(400, -4) ; entry(1000, -6) ; entry(2000, 0)’,equalizer = f = 1000 : width_type = q : width = 1 : g = 2, equalizer = f = 100 : width_type = q : width = 2 : g = 5,pan=stereo|c0
-
FFMPEG ALSA xrun crash
13 décembre 2017, par Liam MartensI’m running a YouTube RTMP stream using FFMPEG with x11grab and an alsa loopback device but sometimes after let’s say 20 hours there is an ALSA xrun and then the ffmpeg command crashes, but I’m not sure why or how this happens. (mind you the ffmpeg command does not run continuously it gets restarted automatically every so often, but the xrun makes the command crash causing the stream to go offline sometimes because a crash restart is not fast enough)
I’m using
thread_queue_size
and I’ve even manually compiled ffmpeg with a higherALSA BUFFER SIZE
, but the issue appears to persist still. Besides this I’ve also scoured many posts with people having similar issues but these never really seem to end up resolved.This is the stream command
ffmpeg -loglevel verbose -f alsa -thread_queue_size 12288 -ac 2 -i hw:Loopback,1,0 \
-probesize 10M -f x11grab -field_order tt -thread_queue_size 12288 -video_size 1280x720 -r 30 -i :1.1 \
-c:v libx264 -c:a libmp3lame -shortest -tune fastdecode -tune zerolatency \
-crf 26 -pix_fmt yuv420p -threads 0 -maxrate 2500k -bufsize 2500k -pass 1 -af aresample=async=1 \
-movflags +faststart -flags +global_header -preset ultrafast -r 30 -g 60 -b:v 2000k -b:a 192k -ar 44100 \
-f flv -rtmp_live live rtmp://a.rtmp.youtube.com/live2/{KEY}Log excerpt
ffmpeg version N-89463-gc7a5e80 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gpl --enable-libmp3lame --enable-librtmp --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libtheora --enable-postproc --enable-pic --enable-pthreads --enable-shared --disable-stripping --disable-static --enable-vaapi --enable-libopus --enable-libfreetype --enable-libfontconfig --enable-libpulse --disable-debug
libavutil 56. 5.100 / 56. 5.100
libavcodec 58. 6.103 / 58. 6.103
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 7.100 / 7. 7.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:Loopback,1,0':
Duration: N/A, start: 1513163617.594224, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, x11grab, from ':1.1':
Duration: N/A, start: 1513163617.632434, bitrate: N/A
Stream #1:0: Video: rawvideo, 1 reference frame (BGR[0] / 0x524742), bgr0(top first), 854x480, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Parsing...
Parsed protocol: 0
Parsed host : a.rtmp.youtube.com
Parsed app : live2
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 0
HandShake: FMS Version : 4.0.0.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
Invoking connect
HandleServerBW: server BW = 2500000
HandleClientBW: client BW = 10000000 2
HandleChangeChunkSize, received: chunk size change to 256
RTMP_ClientPacket, received: invoke 240 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property: 3,5,3,824>
Property:
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
Property:
(object begin)
Property:
(object end)
(object end)
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <connect>
Invoking releaseStream
Invoking FCPublish
Invoking createStream
RTMP_ClientPacket, received: invoke 21 bytes
(object begin)
Property:
Property:
Property: NULL
(object end)
HandleInvoke, server invoking <onbwdone>
Invoking _checkbw
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <createstream>
Invoking publish
RTMP_ClientPacket, received: invoke 73 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking <onstatus>
HandleInvoke, onStatus: NetStream.Publish.Start
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[graph 0 input from stream 1:0 @ 0x5607d087e060] w:854 h:480 pixfmt:bgr0 tb:1/30 fr:30/1 sar:0/1 sws_param:flags=2
[auto_scaler_0 @ 0x5607d087d800] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x5607d087ed40] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scaler_0 @ 0x5607d087d800] w:854 h:480 fmt:bgr0 sar:0/1 -> w:854 h:480 fmt:yuv420p sar:0/1 flags:0x4
[swscaler @ 0x5607d0880260] Warning: data is not aligned! This can lead to a speed loss
[libx264 @ 0x5607d08684e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x5607d08684e0] profile Constrained Baseline, level 3.1
[libx264 @ 0x5607d08684e0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2 lookahead_threads=2 sliced_threads=1 slices=2 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=26.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=1500 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
[graph_1_in_0_0 @ 0x5607d091c840] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[Parsed_aresample_0 @ 0x5607d0916b40] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:s16p r:44100Hz
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/{KEY}':
Metadata:
encoder : Lavf58.3.100
Stream #0:0: Video: h264 (libx264), 1 reference frame ([7][0][0][0] / 0x0007), yuv420p(top coded first (swapped)), 854x480, q=-1--1, 1000 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc58.6.103 libx264
Side data:
cpb: bitrate max/min/avg: 1500000/0/1000000 buffer size: 1500000 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16p, delay 1105, 192 kb/s
Metadata:
encoder : Lavc58.6.103 libmp3lame
frame= 29 fps=0.0 q=17.0 size= 146kB time=00:00:00.94 bitrate=1267.3kbits/s speed=1.86x
frame= 44 fps= 44 q=18.0 size= 168kB time=00:00:01.46 bitrate= 942.4kbits/s speed=1.45x
frame= 60 fps= 40 q=16.0 size= 191kB time=00:00:01.96 bitrate= 794.8kbits/s speed= 1.3x
...
frame= 2740 fps= 30 q=17.0 size= 7993kB time=00:01:31.32 bitrate= 717.0kbits/s speed= 1x
frame= 2755 fps= 30 q=18.0 size= 8013kB time=00:01:31.82 bitrate= 714.9kbits/s speed= 1x
[alsa @ 0x5607d084d7e0] ALSA buffer xrun.
</onstatus></createstream></onbwdone></connect> -
Dreamcast Serial Extractor
31 décembre 2017, par Multimedia Mike — Sega DreamcastIt has not been a very productive year for blogging. But I started the year by describing an unfinished project that I developed for the Sega Dreamcast, so I may as well end the year the same way. The previous project was a media player. That initiative actually met with some amount of success and could have developed into something interesting if I had kept at it.
By contrast, this post describes an effort that was ultimately a fool’s errand that I spent way too much time trying to make work.
Problem Statement
In my neverending quest to analyze the structure of video games while also hoarding a massive collection of them (though I’m proud to report that I did play at least a few of them this past year), I wanted to be able to extract the data from my many Dreamcast titles, both games and demo discs. I had a tool called the DC Coder’s Cable, a serial cable that enables communication between a Dreamcast and a PC. With the right software, you could dump an entire Dreamcast GD-ROM, which contained a gigabyte worth of sectors.Problem : The dumping software (named ‘dreamrip’ and written by noted game hacker BERO) operated in a very basic mode, methodically dumping sector after sector and sending it down the serial cable. This meant that it took about 28 hours to extract all the data on a single disc by running at the maximum speed of 115,200 bits/second, or about 11 kilobytes/second. I wanted to create a faster method.
The Pitch
I formed a mental model of dreamrip’s operation that looked like this :
As an improvement, I envisioned this beautiful architecture :
Architectural Assumptions
My proposed architecture was predicated on the assumption that the disc reading and serial output functions were both I/O-bound operations and that the CPU would be idle much of the time. My big idea was to use that presumably idle CPU time to compress the sectors before sending them over the wire. As long as the CPU can compress the data faster than 11 kbytes/sec, it should be a win. In order to achieve this, I broke the main program into 3 threads :- The first thread reads the sectors ; more specifically, it asks the drive firmware to please read the sectors and make the data available in system RAM
- The second thread waits for sector data to appear in memory and then compresses it
- The third thread takes the compressed data when it is ready and shuffles it out through the serial cable
Simple and elegant, right ?
For data track compression, I wanted to start with zlib in order to prove the architecture, but then also try bzip2 or lzma. As long as they could compress data faster than the serial port could write it, then it should be a win. For audio track compression, I wanted to use the Flake FLAC encoder. According to my notes, I did get both bzip2 compression and the Flake compressor working on the Dreamcast. I recall choosing Flake over the official FLAC encoder because it was much simpler and had fewer dependencies, always an important consideration for platforms such as this.
Problems
I worked for quite awhile on this project. I have a lot of notes recorded but a lot of the problems I had remain a bit vague in my memory. However, there was one problem I discovered that eventually sunk the entire initiative :The serial output operation is CPU-bound.
My initial mental model was that the a buffer could be “handed off” to the serial subsystem and the CPU could go back to doing other work. Nope. Turns out that the CPU was participating at every step of the serial transfer.
Further, I eventually dug into the serial driver code and learned that there was already some compression taking place via the miniLZO library.
Lessons Learned
- Recognize the assumptions that you’re making up front at the start of the project.
- Prototype in order to ensure plausibility
- Profile to make sure you’re optimizing the right thing (this is something I have learned again and again).
Another interesting tidbit from my notes : it doesn’t matter how many sectors you read at a time, the overall speed is roughly the same. I endeavored to read 1000 2048-byte data sectors, 1 or 10 or 100 at a time, or all 1000 at once. My results :
- 1 : 19442 ms
- 10 : 19207 ms
- 100 : 19194 ms
- 1000 : 19320 ms
No difference. That surprised me.
Side Benefits
At one point, I needed to understand how BERO’s dreamrip software was operating. I knew I used to have the source code but I could no longer find it. Instead, I decided to try to reverse engineer what I needed from the SH-4 binary image that I had. It wasn’t an ELF image ; rather, it was a raw binary meant to be loaded at a particular memory location which makes it extra challenging for ‘objdump’. This led to me asking my most viewed and upvoted question on Stack Overflow : “Disassembling A Flat Binary File Using objdump”. The next day, it also led me to post one of my most upvoted answers when I found the solution elsewhere.Strangely, I have since tried out the command line shown in my answer and have been unable to make it work. But people keep upvoting both the question and the answer.
Eventually this all became moot when I discovered a misplaced copy of the source code on one of my computers.
I strongly recall binging through the Alias TV show while I was slogging away on this project, so I guess that’s a positive association since I got so many fun screenshots out of it.
The Final Resolution
Strangely, I was still determined to make this project work even though the Dreamcast SD adapter arrived for me about halfway through the effort. Part of this was just stubbornness, but part of it was my assumptions about serial port speeds, in particular, my assumption that there was a certain speed-of-light type of limitation on serial port speeds so that the SD adapter, operating over the DC’s serial port, would not be appreciably faster than the serial cable.This turned out to be very incorrect. In fact, the SD adapter is capable of extracting an entire gigabyte disc image in 35-40 minutes. This is the method I have since been using to extract Dreamcast disc images.
The post Dreamcast Serial Extractor first appeared on Breaking Eggs And Making Omelettes.