@@ -34,9 +34,79 @@ Gifs](https://addons.mozilla.org/en-US/firefox/addon/toggle-animated-gifs/)
3434extension for Firefox (I'm sure there's something comparable for Chrome),
3535which lets you do just that.
3636
37+ ## Addendum 17-04-28
38+
39+ If you get an error that looks like the following with some weirdly
40+ formatted ` .mov ` files:
41+
42+ ```
43+ avconv version 12, Copyright (c) 2000-2016 the Libav developers
44+ built on Mar 6 2017 22:35:59 with Apple LLVM version 8.0.0 (clang-800.0.42.1)
45+ [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc78b000000] stream 0, offset 0x30: partial file
46+ [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fc78b000000] Could not find codec parameters (Video: mpeg4 (Simple Profile) [mp4v / 0x7634706D]
47+ none, 1958 kb/s)
48+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
49+ Metadata:
50+ major_brand : qt
51+ minor_version : 537199360
52+ compatible_brands: qt
53+ creation_time : 2015-05-26 19:04:15
54+ Duration: 00:00:10.00, bitrate: N/A
55+ Stream #0:0(eng): Video: mpeg4 (Simple Profile) [mp4v / 0x7634706D]
56+ none, 1958 kb/s
57+ 600 tbn (default)
58+ Metadata:
59+ creation_time : 2015-05-26 19:04:15
60+ handler_name : Apple Alias Data Handler
61+ encoder : MPEG-4 Video
62+ Output #0, image2pipe, to 'pipe:':
63+ Output file #0 does not contain any stream
64+ convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/509.
65+ convert: no images defined `gif:-' @ error/convert.c/ConvertImageCommand/3254.
66+ convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/509.
67+ convert: no images defined `output.gif' @
68+ error/convert.c/ConvertImageCommand/3254.
69+ ```
70+
71+ Then installing the ` qtfaststart ` [ ^ 3 ] Python package via `pip install
72+ qtfaststart` and then running
73+
74+ ```
75+ qtfaststart bad_movie.mov good_movie.mov
76+ ```
77+
78+ should fix the problem and now you can use ` good_movie.mov ` with the
79+ previous commands to create all the gifs. So
80+ [ apparently] ( https://superuser.com/questions/479063/ffmpeg-pipe-input-error/479064#479064 )
81+ what is happening is that some recording software puts the ` mdat ` block
82+ prior to the ` moov ` block (the structural metadata). This is more
83+ convenient for recording since the structure isn't known till the
84+ recording is finished, however for playback it isn't as nice.
85+ ` qtfaststart ` fixes this by swapping the two blocks:
86+
87+ ```
88+ $ qtfaststart -l bad_movie.mov
89+ ftyp (32 bytes)
90+ wide (8 bytes)
91+ mdat (2448358 bytes)
92+ moov (998 bytes)
93+ ```
94+
95+ while
96+
97+ ```
98+ qtfaststart -l good_movie.mov
99+ ftyp (32 bytes)
100+ moov (998 bytes)
101+ wide (8 bytes)
102+ mdat (2448358 bytes)
103+ ```
37104
38105[ ^ 1 ] : I like Google Slides for a variety of reasons, but the main ones are
39106its simplicity, portability, and collaboration features. Hard to beat for
40107presentations.
41108
42109[ ^ 2 ] : OS X dammit
110+
111+ [ ^ 3 ] : So apparently this Python package just repackages ffmpeg's own
112+ qtfaststart.c file. Why ffmpeg can't do this on its own? Who knows.
0 commit comments