<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="161847" data-post-id="161847">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kokolegorille" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/120/4784_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kokolegorille
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>After many tests, I found the solution. The format to specify is now image2 for png.</p>
<p>This works</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def transform(:thumb, _) do
    {:ffmpeg, fn(input, output) -&gt; ["-i", input, "-f", "image2", "-vframes", "1", output] end, :png}
  end

# or this too

  def transform(:thumb, _) do
    {:ffmpeg, fn(input, output) -&gt; "-i #{input} -f image2 -vframes 1 #{output}" end, :png}
  end
</code></pre>
<p>It’s possible to pass a list or a string, but <strong>-f image2</strong> is the key.</p>
<p>For reference, this is where I found the way to correctly transform a video to a png thumbnail.</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence">
  <header class="source">
      <img src="https://en.wikibooks.org/static/favicon/wikibooks.ico" class="site-icon" alt="" width="48" height="48">

      <a href="https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence" target="_blank" rel="noopener nofollow">en.wikibooks.org</a>
  </header>

  <article class="onebox-body">
    

<h3><a href="https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence" target="_blank" rel="noopener nofollow">FFMPEG An Intermediate Guide/image sequence - Wikibooks, open books for an...</a></h3>



  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>

<p>Thank You all for the helps <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="161847" data-batch-url="/posts/batch_likers">
                        6
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/ffmpeg-video-to-png/28839/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-161847" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="161847"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>