Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to extract 3 images from mp4 video using ffmpeg.exe The images are generated just fine but I get some warning(yellow) and error (red) text

Anyone can help me fix the issue?

Thanks

Warning:

Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yu
vj420p'

Error:

[image2 @ 02e5fde0] Could not get frame filename number 2 from pattern 'C:\bob\
    Challenge\FFMPEG/jadu-1.jpg'
av_interleaved_write_frame(): Invalid argument
The system cannot find the drive specified.
The system cannot find the drive specified.

My command (in bat file):

for %%a in (%1\*.mp4) do (
   ffmpeg -i "%%a" -r 1 -t 1 -ss 1 -s sqcif "%2/%%~na-1.jpg" -r 1 -t 1 -ss 4 -s sqcif "%2/%%~na-2.jpg" -r 1 -t 1 -ss 7 -s sqcif "%2/%%~na-3.jpg"
)

Output:

ffmpeg version 0.8.14, Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 26 2013 15:57:05 with gcc 4.6.2
  configuration: --prefix=ffmpeg/ --disable-network --disable-debug --disable-ya
sm
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  8. 0 / 53.  8. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    2.  0. 0 /  2.  0. 0

Seems stream 1 codec frame rate differs from container frame rate: 60000.00 (600
00/1) -> 29.97 (30000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\bob\FFMPEG\jadu.mp4
':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    creation_time   : 2007-10-18 18:05:17
    title           : Jaadu bhare - YouTube
  Duration: 00:02:27.68, start: 0.000000, bitrate: 605 kb/s
    Stream #0.0(und): Audio: aac, 44100 Hz, stereo, s16, 102 kb/s
    Metadata:
      creation_time   : 2007-10-18 18:05:17
    Stream #0.1(und): Video: h264 (Baseline), yuv420p, 320x240 [PAR 1:1 DAR 4:3]
, 500 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
    Metadata:
      creation_time   : 2007-10-18 18:05:17
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yu
vj420p'
[buffer @ 02e4dcc0] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[scale @ 003af160] w:320 h:240 fmt:yuv420p -> w:128 h:96 fmt:yuvj420p flags:0x4
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yu
vj420p'
[buffer @ 03397b20] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[scale @ 02f2ffa0] w:320 h:240 fmt:yuv420p -> w:128 h:96 fmt:yuvj420p flags:0x4
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yu
vj420p'
[buffer @ 033b6380] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
[scale @ 033b6620] w:320 h:240 fmt:yuv420p -> w:128 h:96 fmt:yuvj420p flags:0x4
Output #0, image2, to 'C:\bob\FFMPEG/jadu-1.jpg':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    creation_time   : 2007-10-18 18:05:17
    title           : Jaadu bhare - YouTube
    encoder         : Lavf53.5.0
    Stream #0.0(und): Video: mjpeg, yuvj420p, 128x96 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 1 tbc
    Metadata:
      creation_time   : 2007-10-18 18:05:17
Output #1, image2, to 'C:\bob\FFMPEG/jadu-2.jpg':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    creation_time   : 2007-10-18 18:05:17
    title           : Jaadu bhare - YouTube
    encoder         : Lavf53.5.0
    Stream #1.0(und): Video: mjpeg, yuvj420p, 128x96 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 1 tbc
    Metadata:
      creation_time   : 2007-10-18 18:05:17
Output #2, image2, to 'C:\bob\FFMPEG/jadu-3.jpg':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isomavc1mp42
    creation_time   : 2007-10-18 18:05:17
    title           : Jaadu bhare - YouTube
    encoder         : Lavf53.5.0
    Stream #2.0(und): Video: mjpeg, yuvj420p, 128x96 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 90k tbn, 1 tbc
    Metadata:
      creation_time   : 2007-10-18 18:05:17
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.1 -> #1.0
  Stream #0.1 -> #2.0
Press [q] to stop, [?] for help
[image2 @ 02e5fde0] Could not get frame filename number 2 from pattern 'C:\bob\
Challenge\FFMPEG/jadu-1.jpg'
av_interleaved_write_frame(): Invalid argument
The system cannot find the drive specified.
The system cannot find the drive specified.
share|improve this question

migrated from stackoverflow.com Mar 18 at 15:40

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.