ffmpeg cannot generate thumbnail

Alex Flo

I use ffmpeg to generate 10 .jpeg thumbs out of a video file. Most of the time it works fine but for some files (a 55seconds .mp4 for example) I get only the first 4 out of 10 captures, for the rest I get this error:
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

The command I use to convert is this one
ffmpeg -ss 16 -i /path/source.mp4 -y -f image2 -t 0.001 -s 320*240 /path/thumb4.jpg
where -ss value is a multiple of 4 and from 20 it stops working.

Command line full output:

`# ffmpeg -ss 77 -i /path/source.mp4 -y -f image2 -t 0.001 -s 320*240 /path/thumb7.jpg  
ffmpeg version git-2013-02-25-b8f6912 Copyright (c) 2000-2013 the FFmpeg developers  
  built on Feb 25 2013 15:18:21 with gcc 4.4.5 (Debian 4.4.5-8)  
  configuration: --enable-shared --enable-libx264 --enable-gpl  
  libavutil      52. 17.103 / 52. 17.103  
  libavcodec     54. 92.100 / 54. 92.100  
  libavformat    54. 63.100 / 54. 63.100  
  libavdevice    54.  3.103 / 54.  3.103  
  libavfilter     3. 41.100 /  3. 41.100  
  libswscale      2.  2.100 /  2.  2.100  
  libswresample   0. 17.102 /  0. 17.102  
  libpostproc    52.  2.100 / 52.  2.100  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/path/source.mp4':  
  Metadata:  
    major_brand     : mp42  
    minor_version   : 19529845  
    compatible_brands: mp42isom  
    creation_time   : 2013-03-20 21:45:43  
  Duration: 00:02:04.62, start: 0.000000, bitrate: 605 kb/s  
    Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s  
    Metadata:  
      creation_time   : 2013-03-20 21:45:43  
      handler_name    : Sound Media Handler  
    Stream #0:1(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 720x480 [SAR 40:33 DAR 20:11], 983 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc  
    Metadata:  
      creation_time   : 2013-03-20 21:45:43  
      handler_name    : Video Media Handler  
Output #0, image2, to '/path/thumb7.jpg':  
  Metadata:  
    major_brand     : mp42  
    minor_version   : 19529845  
    compatible_brands: mp42isom  
    encoder         : Lavf54.63.100  
    Stream #0:0(eng): Video: mjpeg, yuvj420p, 320x240 [SAR 15:11 DAR 20:11], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc  
    Metadata:
      creation_time   : 2013-03-20 21:45:43  
      handler_name    : Video Media Handler  
Stream mapping:  
  Stream #0:1 -> #0:0 (h264 -> mjpeg)  
Press [q] to stop, [?] for help  
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A      
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead -inf%  
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)`  
slhck

When you specify -t 0.001 you might end up exporting nothing. This is not the correct way of saying that you only need one frame. The -t option takes either seconds or a timestamp in the HH:MM:SS.mmm format.

Here's what should work:

ffmpeg -ss 16 -i /path/source.mp4 -frames:v 1 -s 320x240 /path/thumb4.jpg

Note that the -f image2 option is not needed as the correct output format will be chosen anyway.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Use ffmpeg for thumbnail selections

From Dev

ffmpeg video thumbnail size

From Dev

Generate Thumbnail of Pdf in Android

From Dev

ffmpeg command to create thumbnail sprites

From Dev

Generate thumbnail images dynamically into bxslider

From Dev

Generate thumbnail images dynamically into bxslider

From Dev

Create thumbnail from video using ffmpeg

From Dev

ffmpeg adding play image to thumbnail output

From Dev

Create thumbnail from video without ffmpeg in PHP

From Dev

Create thumbnail from video without ffmpeg in PHP

From Dev

FFMPEG thumbnail in php application's is not rotated properly

From Dev

Create thumbnail from a video directory using ffmpeg

From Dev

Is it possible to Generate a thumbnail from a video url in android

From Dev

Rails paperclip generate thumbnail from other style

From Dev

can't generate a thumbnail of an image using carrierwave

From Dev

Python generate thumbnail with transparancy and fixed width

From Dev

React Native generate thumbnail for video url

From Dev

ffmpeg fails to generate screenshots

From Dev

Unable to generate thumbnail generate thumbnails from phpThumb in controller in CakePHP

From Dev

How to take a thumbnail from video by using PHP without ffmpeg?

From Dev

Extract video cover/thumbnail from file with embedded cover using ffmpeg

From Dev

No thumbnail or properties after scaling down Android portrait video with ffmpeg

From Dev

ffmpeg : Generate video from picture

From Dev

How to generate a sine wave with ffmpeg?

From Dev

sorl-thumbnail doesn't generate placeholder images

From Dev

Generate thumbnail in php, posting to Azure Computer Vision API

From Dev

Generate a thumbnail/snapshot of a video file selected by a file input at a specific time

From Dev

Generate thumbnail using BufferedImage without inverting color and gain alpha in Java

From Dev

How to generate thumbnail from a uploaded video using Imagine’s library

Related Related

  1. 1

    Use ffmpeg for thumbnail selections

  2. 2

    ffmpeg video thumbnail size

  3. 3

    Generate Thumbnail of Pdf in Android

  4. 4

    ffmpeg command to create thumbnail sprites

  5. 5

    Generate thumbnail images dynamically into bxslider

  6. 6

    Generate thumbnail images dynamically into bxslider

  7. 7

    Create thumbnail from video using ffmpeg

  8. 8

    ffmpeg adding play image to thumbnail output

  9. 9

    Create thumbnail from video without ffmpeg in PHP

  10. 10

    Create thumbnail from video without ffmpeg in PHP

  11. 11

    FFMPEG thumbnail in php application's is not rotated properly

  12. 12

    Create thumbnail from a video directory using ffmpeg

  13. 13

    Is it possible to Generate a thumbnail from a video url in android

  14. 14

    Rails paperclip generate thumbnail from other style

  15. 15

    can't generate a thumbnail of an image using carrierwave

  16. 16

    Python generate thumbnail with transparancy and fixed width

  17. 17

    React Native generate thumbnail for video url

  18. 18

    ffmpeg fails to generate screenshots

  19. 19

    Unable to generate thumbnail generate thumbnails from phpThumb in controller in CakePHP

  20. 20

    How to take a thumbnail from video by using PHP without ffmpeg?

  21. 21

    Extract video cover/thumbnail from file with embedded cover using ffmpeg

  22. 22

    No thumbnail or properties after scaling down Android portrait video with ffmpeg

  23. 23

    ffmpeg : Generate video from picture

  24. 24

    How to generate a sine wave with ffmpeg?

  25. 25

    sorl-thumbnail doesn't generate placeholder images

  26. 26

    Generate thumbnail in php, posting to Azure Computer Vision API

  27. 27

    Generate a thumbnail/snapshot of a video file selected by a file input at a specific time

  28. 28

    Generate thumbnail using BufferedImage without inverting color and gain alpha in Java

  29. 29

    How to generate thumbnail from a uploaded video using Imagine’s library

HotTag

Archive