trying encoding png images to mpeg4

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

trying encoding png images to mpeg4

Dennis Roche
hi,

i need a little help; been trying for the last day to encode multiple *.png
image sequences to mpeg4.
i'm using the latest unofficial build from
http://ffdshow.faireal.net/mirror/ffmpeg/.

this is the command that i'm trying:

ffmpeg.exe -r 10 -i .\renders\bg%04d.png out.mp4

this is the output:

FFmpeg version SVN-r11870, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler
--enable-pthreads --enable-liba52 --enable-avisynth --enable-libfaac
--enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
--cpu=i686
 --enable-memalign-hack --extra-ldflags=-static
  libavutil version: 49.6.0
  libavcodec version: 51.50.0
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Feb  5 2008 23:46:38, gcc: 4.2.3
Input #0, image2, from '.\renders\bg%04d.png':
  Duration: 00:00:12.5, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, 144x176 [PAR 0:1 DAR 0:1], 10.00 tb(r)
swScaler: Unknown format is not supported as input format
Cannot get resampling context

from reading the archives I've confirmed that I have working png
support as ffmpeg
-formats lists both DEV png and DEV D zlib. (
http://readlist.com/lists/mplayerhq.hu/ffmpeg-user/0/4655.html) i also have
setup mingw/msys and have compiled a version of ffmpeg from svc (only did
./configure --enable-memalign-hack).

any ideas whats going wrong? or what i need to do?

cheers.

Dennis
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: trying encoding png images to mpeg4

Stefano Sabatini
On date Thursday 2008-02-14 14:19:36 +1000, Dennis Roche encoded:

> hi,
>
> i need a little help; been trying for the last day to encode multiple *.png
> image sequences to mpeg4.
> i'm using the latest unofficial build from
> http://ffdshow.faireal.net/mirror/ffmpeg/.
>
> this is the command that i'm trying:
>
> ffmpeg.exe -r 10 -i .\renders\bg%04d.png out.mp4
>
> this is the output:
>
> FFmpeg version SVN-r11870, Copyright (c) 2000-2008 Fabrice Bellard, et al.
>   configuration: --enable-gpl --enable-pp --enable-swscaler
> --enable-pthreads --enable-liba52 --enable-avisynth --enable-libfaac
> --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut
> --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
> --cpu=i686
>  --enable-memalign-hack --extra-ldflags=-static
>   libavutil version: 49.6.0
>   libavcodec version: 51.50.0
>   libavformat version: 52.7.0
>   libavdevice version: 52.0.0
>   built on Feb  5 2008 23:46:38, gcc: 4.2.3
> Input #0, image2, from '.\renders\bg%04d.png':
>   Duration: 00:00:12.5, start: 0.000000, bitrate: N/A
>     Stream #0.0: Video: png, 144x176 [PAR 0:1 DAR 0:1], 10.00 tb(r)
> swScaler: Unknown format is not supported as input format
> Cannot get resampling context
>
> from reading the archives I've confirmed that I have working png
> support as ffmpeg
> -formats lists both DEV png and DEV D zlib. (
> http://readlist.com/lists/mplayerhq.hu/ffmpeg-user/0/4655.html) i also have
> setup mingw/msys and have compiled a version of ffmpeg from svc (only did
> ./configure --enable-memalign-hack).
>
> any ideas whats going wrong? or what i need to do?

I tried with:

stefano@geppetto ~/tmp> ffmpeg -r 1 -i frame-%04d.png out.mp4
FFmpeg version SVN-r11906, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/home/stefano --enable-gpl --enable-pp --enable-swscaler --enable-libtheora --enable-libvorbis --disable-static --enable-shared --enable-libfaad --enable-libfaac --enable-x11grab --enable-libmp3lame --disable-optimizations --disable-mmx
  libavutil version: 49.6.0
  libavcodec version: 51.50.1
  libavformat version: 52.7.0
  libavdevice version: 52.0.0
  built on Feb 11 2008 18:06:45, gcc: 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
Input #0, image2, from 'frame-%04d.png':
  Duration: 00:00:55.0, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, rgb24, 720x576 [PAR 0:1 DAR 0:1],  1.00 tb(r)
Output #0, mp4, to 'out.mp4':
    Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 0:1 DAR 0:1], q=2-31, 200 kb/s,  1.00 tb(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
frame=   55 fps=  4 q=7.0 Lsize=    1455kB time=55.0 bitrate= 216.7kbits/s    
video:1454kB audio:0kB global headers:0kB muxing overhead 0.074684%

And it worked just fine. The only noticeable difference is the case of
mine the pixel format is specified (PNG files issued by ffmpeg
itself), maybe you need to specify the pix_fmt since for some weird
reason ffmpeg isn't able to guess it by its own, check the various
ffmpeg -pix_fmt list values.

(Mmh, maybe I'll send a patch to make ffmpeg tell it can't understand
the *pixel* format rather than to use the very ambiguos term
"format").

HTH, regards.
--
ffmpeg-user random tip #11
One minute of pure video silence with ffmpeg:
ffmpeg -t 60 -s qcif -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero \
    -y silence.mpeg
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: trying encoding png images to mpeg4

Dennis Roche
> > hi,
>  >
>  > i need a little help; been trying for the last day to encode multiple *.png
>  > image sequences to mpeg4.
>  > i'm using the latest unofficial build from
>  > http://ffdshow.faireal.net/mirror/ffmpeg/.
>  >
>  > this is the command that i'm trying:
>  >
>  > ffmpeg.exe -r 10 -i .\renders\bg%04d.png out.mp4
>  >
>  > this is the output:
>  >
>  > FFmpeg version SVN-r11870, Copyright (c) 2000-2008 Fabrice Bellard, et al.
>  >   configuration: --enable-gpl --enable-pp --enable-swscaler
>  > --enable-pthreads --enable-liba52 --enable-avisynth --enable-libfaac
>  > --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut
>  > --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid
>  > --cpu=i686
>  >  --enable-memalign-hack --extra-ldflags=-static
>  >   libavutil version: 49.6.0
>  >   libavcodec version: 51.50.0
>  >   libavformat version: 52.7.0
>  >   libavdevice version: 52.0.0
>  >   built on Feb  5 2008 23:46:38, gcc: 4.2.3
>  > Input #0, image2, from '.\renders\bg%04d.png':
>  >   Duration: 00:00:12.5, start: 0.000000, bitrate: N/A
>  >     Stream #0.0: Video: png, 144x176 [PAR 0:1 DAR 0:1], 10.00 tb(r)
>  > swScaler: Unknown format is not supported as input format
>  > Cannot get resampling context
>  >
>  > from reading the archives I've confirmed that I have working png
>  > support as ffmpeg
>  > -formats lists both DEV png and DEV D zlib. (
>  > http://readlist.com/lists/mplayerhq.hu/ffmpeg-user/0/4655.html) i also have
>  > setup mingw/msys and have compiled a version of ffmpeg from svc (only did
>  > ./configure --enable-memalign-hack).
>  >
>  > any ideas whats going wrong? or what i need to do?
>
>
> I tried with:
>
>  stefano@geppetto ~/tmp> ffmpeg -r 1 -i frame-%04d.png out.mp4
>  FFmpeg version SVN-r11906, Copyright (c) 2000-2008 Fabrice Bellard, et al.
>   configuration: --prefix=/home/stefano --enable-gpl --enable-pp --enable-swscaler --enable-libtheora --enable-libvorbis --disable-static --enable-shared --enable-libfaad --enable-libfaac --enable-x11grab --enable-libmp3lame --disable-optimizations --disable-mmx
>
>   libavutil version: 49.6.0
>   libavcodec version: 51.50.1
>   libavformat version: 52.7.0
>   libavdevice version: 52.0.0
>
>   built on Feb 11 2008 18:06:45, gcc: 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
>  Input #0, image2, from 'frame-%04d.png':
>   Duration: 00:00:55.0, start: 0.000000, bitrate: N/A
>     Stream #0.0: Video: png, rgb24, 720x576 [PAR 0:1 DAR 0:1],  1.00 tb(r)
>  Output #0, mp4, to 'out.mp4':
>     Stream #0.0: Video: mpeg4, yuv420p, 720x576 [PAR 0:1 DAR 0:1], q=2-31, 200 kb/s,  1.00 tb(c)
>  Stream mapping:
>   Stream #0.0 -> #0.0
>  Press [q] to stop encoding
>  frame=   55 fps=  4 q=7.0 Lsize=    1455kB time=55.0 bitrate= 216.7kbits/s
>  video:1454kB audio:0kB global headers:0kB muxing overhead 0.074684%
>
>  And it worked just fine. The only noticeable difference is the case of
>  mine the pixel format is specified (PNG files issued by ffmpeg
>  itself), maybe you need to specify the pix_fmt since for some weird
>  reason ffmpeg isn't able to guess it by its own, check the various
>  ffmpeg -pix_fmt list values.
>
>  (Mmh, maybe I'll send a patch to make ffmpeg tell it can't understand
>  the *pixel* format rather than to use the very ambiguos term
>  "format").

thanks stefano. i found the reason. the pngs were rendered from 3ds
max as rgb 48 bit and ffmpeg doesn't have pix_frm rgb48.

i agree - a more accurate error msg would've made it easier what was wrong.

cheers.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-user