
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (51)
-
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 -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...)
Sur d’autres sites (6524)
-
WebM file not seekable in Chrome, when generated with ffmpeg
11 avril 2014, par ZoonI am having a mind-boggling problem, I just can't seem to resolve.
Providing a WebM file through PHP is nothing new in my world, and I even know how to work with HTTP 206 Partial Content. But for some reason Chrome does not like it.
A simple HTML5 video playback
<video width="640" height="360" poster="picture/preview/V00000006.jpg" controls="controls" preload="preload">
<source type="video/webm" src="/video/V00000006.webm">
</source></video>where
/video/V00000006.webm
is rewritten to a PHP-file in Apache, will playback just fine.
But in Chrome the seekbar is not effective. When clicking on the seekbar the player will freeze and no longer playback until page is refreshed. Firefox handles it just fine !If I change
/video/V00000006.webm
to be a direct link to the same video it works just fine. I even compared the network requests between the two versions (with and without PHP) and there is barely any difference in the first request, but the second is failing in the PHP-delivered video.Initial request and seek request for Apache-delivered video file :
Request URL :http://mytestserver.net/movie1152x720.webm Request Method:GET Status Code:206 Partial Content Request Headers Accept :*/* Accept-Encoding:identity ;q=1, * ;q=0 Accept-Language:da-DK,da ;q=0.8,en-US ;q=0.6,en ;q=0.4 Cache-Control:no-cache Connection:keep-alive Cookie:PHPSESSID=i562540rek172mnv3nk528acj0 ; userPassword= ; userEmail= Host:mytestserver.net Pragma:no-cache Range:bytes=0- Referer :http://mytestserver.net/video.html User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36 Response Headers Accept-Ranges:bytes Connection:close Content-Length:4446451 Content-Range:bytes 0-4446450/4446451 Content-Type:video/webm Date:Fri, 11 Apr 2014 13:07:30 GMT ETag :"d2d0027-43d8f3-b91417c0" Last-Modified:Fri, 11 Apr 2014 12:46:31 GMT Server:Apache/2.2.3 (CentOS)
—
Request URL :http://mytestserver.net/movie1152x720.webm
Request Method:GET
Status Code:206 Partial Content
Request Headers
Accept :*/*
Accept-Encoding:identity ;q=1, * ;q=0
Accept-Language:da-DK,da ;q=0.8,en-US ;q=0.6,en ;q=0.4
Cache-Control:no-cache
Connection:keep-alive
Cookie:PHPSESSID=i562540rek172mnv3nk528acj0 ; userPassword= ; userEmail=
Host:mytestserver.net
Pragma:no-cache
Range:bytes=4445881-
Referer :http://mytestserver.net/video.html
User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
Response Headers
Accept-Ranges:bytes
Connection:close
Content-Length:570
Content-Range:bytes 4445881-4446450/4446451
Content-Type:video/webm
Date:Fri, 11 Apr 2014 13:09:02 GMT
ETag :"d2d0027-43d8f3-b91417c0"
Last-Modified:Fri, 11 Apr 2014 12:46:31 GMT
Server:Apache/2.2.3 (CentOS)Initial request and seek request for PHP-streamed video :
Request URL :http://mytestserver.net/video/V00000006.webm Request Method:GET Status Code:206 Partial Content Request Headers Accept :*/* Accept-Encoding:identity ;q=1, * ;q=0 Accept-Language:da-DK,da ;q=0.8,en-US ;q=0.6,en ;q=0.4 Cache-Control:no-cache Connection:keep-alive Cookie:PHPSESSID=i562540rek172mnv3nk528acj0 ; userPassword= ; userEmail= Host:mytestserver.net Pragma:no-cache Range:bytes=0- Referer :http://mytestserver.net/video.html User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36 Response Headers Accept-Ranges:bytes Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection:close Content-Length:8566268 Content-Range:bytes 0-8566267/8566268 Content-Type:video/webm Date:Fri, 11 Apr 2014 13:31:27 GMT Expires:Thu, 19 Nov 1981 08:52:00 GMT Pragma:no-cache Server:Apache/2.2.3 (CentOS) X-Powered-By:PHP/5.3.27
—
Request URL :http://mytestserver.net/video/V00000006.webm
Request Headers CAUTION : Provisional headers are shown.
Accept-Encoding:identity ;q=1, * ;q=0
Cache-Control:no-cache
Pragma:no-cache
Range:bytes=4338314-
Referer :http://mytestserver.net/video.html
User-Agent:Mozilla/5.0 (X11 ; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36Notice how the second request does not complete, Provisional headers are shown.
I have tried altering the cache headers, setting it to the future, setting them blank and using file attachment headers.
I tried fiddling around a lot with the serving code, but lately I have ended up with a simple example.
<?php
$path = 'test.webm';
$size=filesize($path);
$fm=@fopen($path,'rb');
if(!$fm) {
header ("HTTP/1.0 404 Not Found");
die();
}
$begin=0;
$end = $size-1;
if(isset($_SERVER['HTTP_RANGE'])) {
if(preg_match('/bytes=\h*(\d+)-(\d*)[\D.*]?/i', $_SERVER['HTTP_RANGE'], $matches)) {
$begin=intval($matches[0]);
if(!empty($matches[1])) {
$end=intval($matches[1]);
}
}
}
if($begin>0||$end<$size)
header('HTTP/1.0 206 Partial Content');
else
header('HTTP/1.0 200 OK');
header("Content-Type: video/webm");
header('Accept-Ranges: bytes');
header('Content-Length:'.($end-$begin+1));
header("Content-Disposition: inline;");
header("Content-Range: bytes $begin-$end/$size");
header("Content-Transfer-Encoding: binary\n");
header('Connection: close');
ob_get_clean();
flush();
$f = fopen($path, 'r');
fseek($f, $offset);
$pos = 0;
$length = $end-$begin;
while($pos < $length)
{
$chunk = min($length-$pos, 1024);
echo fread($f, $chunk);
flush();
$pos += $chunk;
}
?>Please note, entering the PHP-delivered video URL directly into the browser does not make a difference from showing it in a HTML page.
I hope someone has an answer to why seeking might not work. Let me know if you have any suggestions.
Thanks !
-
offloading to ffmpeg via named pipes in c#/dotnet core
1er avril 2022, par bepI tried to break this down to the base elements so I hope this is clear. I want to take in a network stream, it may be a 1 way, it may be a protocol that requires 2 way communication, such as RTMP during handshake.


I want to pass that stream straight through to a spawned FFMPEG process. I then want to capture the output of FFMPEG, in this example I just want to pipe it out to a file. The file is not my end goal, but for simplicity if I can get that far I think I'll be ok.




I want the code to be as plain as possible and offload the core processing to FFMPEG. If I ask FFMPEG to output webrtc stream, a file, whatever, I just want to capture that. FFMPEG shouldn't be used directly, just indirectly via
IncomingConnectionHandler
.

Only other component is OBS, which I am using to create the RTMP stream coming in.


As things stand now, running this results in the following error, which I'm a little unclear on. I don't feel like I'm causing concurrent reads at any point.


System.InvalidOperationException: Concurrent reads are not allowed
 at Medallion.Shell.Throw`1.If(Boolean condition, String message)
 at Medallion.Shell.Streams.Pipe.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout, CancellationToken cancellationToken)
 at Medallion.Shell.Streams.Pipe.PipeOutputStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
 at System.IO.Stream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
 at System.IO.StreamReader.ReadBufferAsync(CancellationToken cancellationToken)
 at System.IO.StreamReader.ReadLineAsyncInternal()
 at Medallion.Shell.Streams.MergedLinesEnumerable.GetEnumeratorInternal()+MoveNext()
 at System.String.Join(String separator, IEnumerable`1 values)
 at VideoIngest.IncomingRtmpConnectionHandler.OnConnectedAsync(ConnectionContext connection) in Program.cs:line 55
 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection`1.ExecuteAsync()



Code :


namespace VideoIngest
{
 public class IncomingRtmpConnectionHandler : ConnectionHandler
 {
 private readonly ILogger<incomingrtmpconnectionhandler> logger;

 public IncomingRtmpConnectionHandler(ILogger<incomingrtmpconnectionhandler> logger)
 {
 this.logger = logger;
 }

 public override async Task OnConnectedAsync(ConnectionContext connection)
 {
 logger?.LogInformation("connection started");

 var outputFileName = @"C:\Temp\bunny.mp4";

 var rtmpPassthroughPipeName = Guid.NewGuid().ToString();
 var cmdPath = @"C:\Opt\ffmpeg\bin\ffmpeg.exe";
 var cmdArgs = $"-i pipe:{rtmpPassthroughPipeName} -preset slow -c copy -f mp4 -y pipe:1";

 var cancellationToken = connection.ConnectionClosed;
 var rtmpStream = connection.Transport;

 using (var outputStream = new FileStream(outputFileName, FileMode.Create))
 using (var cmd = Command.Run(cmdPath, options: o => { o.StartInfo(i => i.Arguments = cmdArgs); o.CancellationToken(cancellationToken); }))
 {
 // create a pipe to pass the RTMP data straight to FFMPEG. This code should be dumb to proto etc being used
 var ffmpegPassthroughStream = new NamedPipeServerStream(rtmpPassthroughPipeName, PipeDirection.InOut, 10, PipeTransmissionMode.Byte, System.IO.Pipes.PipeOptions.Asynchronous);

 // take the network stream and pass data to/from ffmpeg process
 var fromFfmpegTask = ffmpegPassthroughStream.CopyToAsync(rtmpStream.Output.AsStream(), cancellationToken);
 var toFfmpegTask = rtmpStream.Input.AsStream().CopyToAsync(ffmpegPassthroughStream, cancellationToken);

 // take the ffmpeg process output (not stdout) into target file
 var outputTask = cmd.StandardOutput.PipeToAsync(outputStream);

 while (!outputTask.IsCompleted && !outputTask.IsCanceled)
 {
 var errs = cmd.GetOutputAndErrorLines();
 logger.LogInformation(string.Join(Environment.NewLine, errs));

 await Task.Delay(1000);
 }

 CommandResult result = result = cmd.Result;

 if (result != null && result.Success)
 {
 logger.LogInformation("Created file");
 }
 else
 {
 logger.LogError(result.StandardError);
 }
 }

 logger?.LogInformation("connection closed");
 }
 }

 public class Startup
 {
 public void ConfigureServices(IServiceCollection services) { }

 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
 {
 app.Run(async (context) =>
 {
 var log = context.RequestServices.GetRequiredService>();
 await context.Response.WriteAsync("Hello World!");
 });
 }
 }

 public class Program
 {
 public static void Main(string[] args)
 {
 CreateHostBuilder(args).Build().Run();
 }

 public static IWebHostBuilder CreateHostBuilder(string[] args) =>
 WebHost
 .CreateDefaultBuilder(args)
 .ConfigureServices(services =>
 {
 services.AddLogging(options =>
 {
 options.AddDebug().AddConsole().SetMinimumLevel(LogLevel.Information);
 });
 })
 .UseKestrel(options =>
 {
 options.ListenAnyIP(15666, builder =>
 {
 builder.UseConnectionHandler<incomingrtmpconnectionhandler>();
 });

 options.ListenLocalhost(5000);

 // HTTPS 5001
 options.ListenLocalhost(5001, builder =>
 {
 builder.UseHttps();
 });
 })
 .UseStartup<startup>();
 }
 

}
</startup></incomingrtmpconnectionhandler></incomingrtmpconnectionhandler></incomingrtmpconnectionhandler>


Questions :


- 

- Is this a valid approach, do you see any fundamental issues ?
- Is the pipe naming correct, is the convention just
pipe:someName
? - Any ideas on what specifically may be causing the
Concurrent reads are not allowed
? - If #3 is solved, does the rest of this seem valid ?










-
Things I Have Learned About Emscripten
1er septembre 2015, par Multimedia Mike — Cirrus Retro3 years ago, I released my Game Music Appreciation project, a website with a ludicrously uninspired title which allowed users a relatively frictionless method to experience a range of specialized music files related to old video games. However, the site required use of a special Chrome plugin. Ever since that initial release, my #1 most requested feature has been for a pure JavaScript version of the music player.
“Impossible !” I exclaimed. “There’s no way JS could ever run fast enough to run these CPU emulators and audio synthesizers in real time, and allow for the visualization that I demand !” Well, I’m pleased to report that I have proved me wrong. I recently quietly launched a new site with what I hope is a catchier title, meant to evoke a cloud-based retro-music-as-a-service product : Cirrus Retro. Right now, it’s basically the same as the old site, but without the wonky Chrome-specific technology.
Along the way, I’ve learned a few things about using Emscripten that I thought might be useful to share with other people who wish to embark on a similar journey. This is geared more towards someone who has a stronger low-level background (such as C/C++) vs. high-level (like JavaScript).
General Goals
Do you want to cross-compile an entire desktop application, one that relies on an extensive GUI toolkit ? That might be difficult (though I believe there is a path for porting qt code directly with Emscripten). Your better wager might be to abstract out the core logic and processes of the program and then create a new web UI to access them.Do you want to compile a game that basically just paints stuff to a 2D canvas ? You’re in luck ! Emscripten has a porting path for SDL. Make a version of your C/C++ software that targets SDL (generally not a tall order) and then compile that with Emscripten.
Do you just want to cross-compile some functionality that lives in a library ? That’s what I’ve done with the Cirrus Retro project. For this, plan to compile the library into a JS file that exports some public functions that other, higher-level, native JS (i.e., JS written by a human and not a computer) will invoke.
Memory Levels
When porting C/C++ software to JavaScript using Emscripten, you have to think on 2 different levels. Or perhaps you need to force JavaScript into a low level C lens, especially if you want to write native JS code that will interact with Emscripten-compiled code. This often means somehow allocating chunks of memory via JS and passing them to the Emscripten-compiled functions. And you wouldn’t believe the type of gymnastics you need to execute to get native JS and Emscripten-compiled JS to cooperate.
“Emscripten : Pointers and Pointers” is the best (and, really, ONLY) explanation I could find for understanding the basic mechanics of this process, at least when I started this journey. However, there’s a mistake in the explanation that left me confused for a little while, and I’m at a loss to contact the author (doesn’t anyone post a simple email address anymore ?).
Per the best of my understanding, Emscripten allocates a large JS array and calls that the memory space that the compiled C/C++ code is allowed to operate in. A pointer in C/C++ code will just be an index into that mighty array. Really, that’s not too far off from how a low-level program process is supposed to view memory– as a flat array.
Eventually, I just learned to cargo-cult my way through the memory allocation process. Here’s the JS code for allocating an Emscripten-compatible byte buffer, taken from my test harness (more on that later) :
var musicBuffer = fs.readFileSync(testSpec[’filename’]) ; var musicBufferBytes = new Uint8Array(musicBuffer) ; var bytesMalloc = player._malloc(musicBufferBytes.length) ; var bytes = new Uint8Array(player.HEAPU8.buffer, bytesMalloc, musicBufferBytes.length) ; bytes.set(new Uint8Array(musicBufferBytes.buffer)) ;
So, read the array of bytes from some input source, create a Uint8Array from the bytes, use the Emscripten _malloc() function to allocate enough bytes from the Emscripten memory array for the input bytes, then create a new array… then copy the bytes…
You know what ? It’s late and I can’t remember how it works exactly, but it does. It has been a few months since I touched that code (been fighting with front-end website tech since then). You write that memory allocation code enough times and it begins to make sense, and then you hope you don’t have to write it too many more times.
Multithreading
You can’t port multithreaded code to JS via Emscripten. JavaScript has no notion of threads ! If you don’t understand the computer science behind this limitation, a more thorough explanation is beyond the scope of this post. But trust me, I’ve thought about it a lot. In fact, the official Emscripten literature states that you should be able to port most any C/C++ code as long as 1) none of the code is proprietary (i.e., all the raw source is available) ; and 2) there are no threads.Yes, I read about the experimental pthreads support added to Emscripten recently. Don’t get too excited ; that won’t be ready and widespread for a long time to come as it relies on a new browser API. In the meantime, figure out how to make your multithreaded C/C++ code run in a single thread if you want it to run in a browser.
Printing Facility
Eventually, getting software to work boils down to debugging, and the most primitive tool in many a programmer’s toolbox is the humble print statement. A print statement allows you to inspect a piece of a program’s state at key junctures. Eventually, when you try to cross-compile C/C++ code to JS using Emscripten, something is not going to work correctly in the generated JS “object code” and you need to understand what. You’ll be pleading for a method of just inspecting one variable deep in the original C/C++ code.I came up with this simple printf-workalike called emprintf() :
#ifndef EMPRINTF_H #define EMPRINTF_H
#include <stdio .h>
#include <stdarg .h>
#include <emscripten .h>#define MAX_MSG_LEN 1000
/* NOTE : Don’t pass format strings that contain single quote (’) or newline
* characters. */
static void emprintf(const char *format, ...)
char msg[MAX_MSG_LEN] ;
char consoleMsg[MAX_MSG_LEN + 16] ;
va_list args ;/* create the string */
va_start(args, format) ;
vsnprintf(msg, MAX_MSG_LEN, format, args) ;
va_end(args) ;/* wrap the string in a console.log(’’) statement */
snprintf(consoleMsg, MAX_MSG_LEN + 16, "console.log(’%s’)", msg) ;/* send the final string to the JavaScript console */
emscripten_run_script(consoleMsg) ;
#endif /* EMPRINTF_H */
Put it in a file called “emprint.h”. Include it into any C/C++ file where you need debugging visibility, use emprintf() as a replacement for printf() and the output will magically show up on the browser’s JavaScript debug console. Heed the comments and don’t put any single quotes or newlines in strings, and keep it under 1000 characters. I didn’t say it was perfect, but it has helped me a lot in my Emscripten adventures.
Optimization Levels
Remember to turn on optimization when compiling. I have empirically found that optimizing for size (-Os) leads to the best performance all around, in addition to having the smallest size. Just be sure to specify some optimization level. If you don’t, the default is -O0 which offers horrible performance when running in JS.Static Compression For HTTP Delivery
JavaScript code compresses pretty efficiently, even after it has been optimized for size using -Os. I routinely see compression ratios between 3.5:1 and 5:1 using gzip.Web servers in this day and age are supposed to be smart enough to detect when a requesting web browser can accept gzip-compressed data and do the compression on the fly. They’re even supposed to be smart enough to cache compressed output so the same content is not recompressed for each request. I would have to set up a series of tests to establish whether either of the foregoing assertions are correct and I can’t be bothered. Instead, I took it into my own hands. The trick is to pre-compress the JS files and then instruct the webserver to serve these files with a ‘Content-Type’ of ‘application/javascript’ and a ‘Content-Encoding’ of ‘gzip’.
- Compress your large Emscripten-build JS files with ‘gzip’ : ‘gzip compiled-code.js’
- Rename them from extension .js.gz to .jsgz
- Tell the webserver to deliver .jsgz files with the correct Content-Type and Content-Encoding headers
To do that last step with Apache, specify these lines :
AddType application/javascript jsgz AddEncoding gzip jsgz
They belong in either a directory’s .htaccess file or in the sitewide configuration (/etc/apache2/mods-available/mime.conf works on my setup).
Build System and Build Time Optimization
Oh goodie, build systems ! I had a very specific manner in which I wanted to build my JS modules using Emscripten. Can I possibly coerce any of the many popular build systems to do this ? It has been a few months since I worked on this problem specifically but I seem to recall that the build systems I tried to used would freak out at the prospect of compiling stuff to a final binary target of .js.I had high hopes for Bazel, which Google released while I was developing Cirrus Retro. Surely, this is software that has been battle-tested in the harshest conditions of one of the most prominent software-developing companies in the world, needing to take into account the most bizarre corner cases and still build efficiently and correctly every time. And I have little doubt that it fulfills the order. Similarly, I’m confident that Google also has a team of no fewer than 100 or so people dedicated to developing and supporting the project within the organization. When you only have, at best, 1-2 hours per night to work on projects like this, you prefer not to fight with such cutting edge technology and after losing 2 or 3 nights trying to make a go of Bazel, I eventually put it aside.
I also tried to use Autotools. It failed horribly for me, mostly for my own carelessness and lack of early-project source control.
After that, it was strictly vanilla makefiles with no real dependency management. But you know what helps in these cases ? ccache ! Or at least, it would if it didn’t fail with Emscripten.
Quick tip : ccache has trouble with LLVM unless you set the CCACHE_CPP2 environment variable (e.g. : “export CCACHE_CPP2=1”). I don’t remember the specifics, but it magically fixes things. Then, the lazy build process becomes “make clean && make”.
Testing
If you have never used Node.js, testing Emscripten-compiled JS code might be a good opportunity to start. I was able to use Node.js to great effect for testing the individually-compiled music player modules, wiring up a series of invocations using Python for a broader test suite (wouldn’t want to go too deep down the JS rabbit hole, after all).Be advised that Node.js doesn’t enjoy the same kind of JIT optimizations that the browser engines leverage. Thus, in the case of time critical code like, say, an audio synthesis library, the code might not run in real time. But as long as it produces the correct bitwise waveform, that’s good enough for continuous integration.
Also, if you have largely been a low-level programmer for your whole career and are generally unfamiliar with the world of single-threaded, event-driven, callback-oriented programming, you might be in for a bit of a shock. When I wanted to learn how to read the contents of a file in Node.js, this is the first tutorial I found on the matter. I thought the code presented was a parody of bad coding style :
var fs = require("fs") ; var fileName = "foo.txt" ;
fs.exists(fileName, function(exists)
if (exists)
fs.stat(fileName, function(error, stats)
fs.open(fileName, "r", function(error, fd)
var buffer = new Buffer(stats.size) ;fs.read(fd, buffer, 0, buffer.length, null, function(error, bytesRead, buffer)
var data = buffer.toString("utf8", 0, buffer.length) ;console.log(data) ;
fs.close(fd) ;
) ;
) ;
) ;
) ;Apparently, this kind of thing doesn’t raise an eyebrow in the JS world.
Now, I understand and respect the JS programming model. But this was seriously frustrating when I first encountered it because a simple script like the one I was trying to write just has an ordered list of tasks to complete. When it asks for bytes from a file, it really has nothing better to do than to wait for the answer.
Thankfully, it turns out that Node’s fs module includes synchronous versions of the various file access functions. So it’s all good.
Conclusion
I’m sure I missed or underexplained some things. But if other brave souls are interested in dipping their toes in the waters of Emscripten, I hope these tips will come in handy.The post Things I Have Learned About Emscripten first appeared on Breaking Eggs And Making Omelettes.