0

My main goal is creating a video file using series of images. then I build the Ffmpeg library to android using Roman10 Tutorial.

When creating a android app I add .so files and ffmpeg File to assert folder.

Then executing command,

ffmpeg -f image2 -i img%d.jpg a.mov

Then following error display in my LogCat,

04-20 09:47:16.133: V/MJPEG_FFMPEG(1095): * libavutil 55. 17.103 / 55. 17.103*** 04-20 09:47:16.133: V/MJPEG_FFMPEG(1095): * libavcodec 57. 24.102 / 57. 24.102*** 04-20 09:47:16.133: V/MJPEG_FFMPEG(1095): * libavformat 57. 25.100 / 57. 25.100*** 04-20 09:47:16.133: V/MJPEG_FFMPEG(1095): * libavfilter 6. 31.100 / 6. 31.100*** 04-20 09:47:16.133: V/MJPEG_FFMPEG(1095): * libswscale 4. 0.100 / 4. 0.100*** 04-20 09:47:16.133: V/MJPEG_FFMPEG(1095): * libswresample 2. 0.101 / 2. 0.101*** 04-20 09:47:16.143: V/MJPEG_FFMPEG(1095): * [mjpeg @ 0x1fffc0] bits 222 is invalid*** 04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): * Last message repeated 25 times*** 04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): * [image2 @ 0x1ff180] decoding for stream 0 failed*** 04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): * [image2 @ 0x1ff180] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *nConsider increasing the value for the 'analyzeduration' and 'probesize' options***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): */storage/emulated/0/com.example.createvideo/frame_%05d.jpg: could not find codec parameters***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *Input #0, image2, from '/storage/emulated/0/com.example.createvideo/frame_%05d.jpg':***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): * Duration: 00:00:01.04, start: 0.000000, bitrate: N/A***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): * Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn, 25 tbc***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *[buffer @ 0x1ff020] Unable to parse option value "0x0" as image size***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *[buffer @ 0x1ff020] Unable to parse option value "-1" as pixel format***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *[buffer @ 0x1ff020] Unable to parse option value "0x0" as image size***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *[buffer @ 0x1ff020] Error setting option video_size to value 0x0.***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *[graph 0 input from stream 0:0 @ 0x1ff100] Error applying options to the filter.***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *Error opening filters!***

04-20 09:47:16.163: V/MJPEG_FFMPEG(1095): *Ending FFMPEG***

I set the -analyzeduration and -probesize but same LogCat displayed.

Please someone help me to do this.

Thanks for your time..

msj
  • 199
  • 1
  • 2
  • 13

1 Answers1

0

You didn't encode your image for the container where you want to put them on. For mov file, you can encode your images with qtrle.

So try this command:

ffmpeg -framerate 1 -f image2 -i img%1d.png -r 25 -vcodec qtrle output.mov
Ediruth
  • 168
  • 1
  • 7
  • Thanx for answer.. @Sandra , I try it but same error displayed. I change the command in many ways but error log is same. – msj Apr 21 '16 at 13:40
  • Unable to parse option value "0x0" as image size***, Unable to parse option value "-1" as pixel format***, Error setting option video_size to value 0x0.***; The command you give doesn't reflect those attributes – Ediruth Apr 21 '16 at 15:28
  • ya, finally video created. I set image scale to `-s 640x480` and pixel format to `-pix_fmt yuv420p`. thanx for helping me. – msj Apr 21 '16 at 16:08