Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] ffmpeg: massive in
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Fri Feb 24, 2012 8:03 am    Post subject: [Solved] ffmpeg: massive in Reply with quote

Hi, all.
I have series of the images (movie1.bmp, movie2.bmp, movie3.bmp, movie4.bmp, movie5.bmp).
I do want to do movie from this images. And I choosed ffmpeg for this deal.
But I have a problem with it.
I do so as:
Code:
$ ffmpeg -i ./movie*.bmp -vcodec bmp -an movie.avi

But the ffmpeg selects one random picture and builds video from this one image only. Also meanwhile ffmpeg replaces other pictures by that one random thus spoils files.
I heard it's possible to enter files by the mask with using %d glyph but then it gives an error 'no such file or directory'.
I don't know what do I do.
Output of the ffmpeg:
Code:
$ ffmpeg -i ./movie*.bmp -vcodec bmp -an movie.avi
ffmpeg version 0.7.8, Copyright (c) 2000-2011 the FFmpeg developers
  built on Feb 20 2012 17:39:24 with gcc 4.5.3
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-static --enable-gpl --enable-version3 --enable-postproc --enable-avfilter --disable-stripping --disable-debug --disable-doc --disable-vaapi --disable-vdpau --enable-libmp3lame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libfaac --enable-nonfree --enable-libdc1394 --disable-indev=v4l --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --enable-x11grab --disable-outdev=oss --enable-libfreetype --enable-libopencore-amrwb --enable-libopencore-amrnb --enable-libvpx --disable-ssse3 --disable-altivec --disable-avx --cpu=host --enable-hardcoded-tables
  libavutil    50. 43. 0 / 50. 43. 0
  libavcodec   52.123. 0 / 52.123. 0
  libavformat  52.111. 0 / 52.111. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter   1. 80. 0 /  1. 80. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from './movie1.bmp':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: bmp, bgr24, 640x480, 25 tbr, 25 tbn, 25 tbc
[buffer @ 0x86b6f30] w:640 h:480 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
[buffer @ 0x86ba7a0] w:640 h:480 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
[buffer @ 0x86c2840] w:640 h:480 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
[buffer @ 0x86be5b0] w:640 h:480 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
[buffer @ 0x86c67a0] w:640 h:480 pixfmt:bgr24 tb:1/1000000 sar:0/1 sws_param:
Output #0, image2, to './movie2.bmp':
  Metadata:
    encoder         : Lavf52.111.0
    Stream #0.0: Video: bmp, bgr24, 640x480, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Output #1, image2, to './movie3.bmp':
  Metadata:
    encoder         : Lavf52.111.0
    Stream #1.0: Video: bmp, bgr24, 640x480, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Output #2, image2, to './movie4.bmp':
  Metadata:
    encoder         : Lavf52.111.0
    Stream #2.0: Video: bmp, bgr24, 640x480, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Output #3, image2, to './movie5.bmp':
  Metadata:
    encoder         : Lavf52.111.0
    Stream #3.0: Video: bmp, bgr24, 640x480, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Output #4, avi, to 'movie.avi':
  Metadata:
    ISFT            : Lavf52.111.0
    Stream #4.0: Video: bmp, bgr24, 640x480, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.0 -> #1.0
  Stream #0.0 -> #2.0
  Stream #0.0 -> #3.0
  Stream #0.0 -> #4.0
Press [q] to stop, [?] for help
frame=    1 fps=  0 q=0.0 Lq=0.0 q=0.0 q=0.0 q=0.0 size=      -0kB time=00:00:00.04 bitrate=  -4.4kbits/s   
video:4500kB audio:0kB global headers:0kB muxing overhead -100.000477%


Last edited by ultraincognito on Sat Feb 25, 2012 2:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
cord
Apprentice
Apprentice


Joined: 28 Apr 2007
Posts: 190

PostPosted: Fri Feb 24, 2012 1:28 pm    Post subject: Reply with quote

You may like to try something such as:
Code:
ffmpeg -f image2 -r 30 -i img%d.bmp ./out.mov
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Fri Feb 24, 2012 2:59 pm    Post subject: Reply with quote

cord wrote:
You may like to try something such as:
Code:
ffmpeg -f image2 -r 30 -i img%d.bmp ./out.mov

It writes: "No such file or directory". But there are files.
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Apprentice
Apprentice


Joined: 25 Sep 2007
Posts: 230
Location: Canada

PostPosted: Fri Feb 24, 2012 8:57 pm    Post subject: Reply with quote

I have just started to do this. It is possible to use ffmpeg to make HD video of still images that will be accepted as such by youtube.

It took me a bit of effort to get the whole thing working.

My starting point was the following reference: http://electron.mit.edu/~gsteele/ffmpeg/
ffmpeg -r 1 -b 1800 -i DSC_%4d.jpg outputfile.mp4
After getting started the next problem was to handle portrait and panorama images in the same video.
But before getting into that, look at this reference and let me know how it works out.




PS using the *.mp4 format for the video in essential for using the 1 frame per second rate that you would need to turn still images
into a "movie slideshow." Other formats such as mpeg2 just do not support it.

Of course if your stills are just the frames of a normal movie you will have to choose a faster frame rate, but I still advise using the *.mp4 format.

However if you are making a "motion"movie you will have to have more than 9 images,
so numbering them image1.bmp, image10.bmp ---- image1297.bmp (for ex) won't work because they won't all have the same number of characters in the number field.

In this case you will have to number them
image0001.bmp ---image0010.bmp---image1297.bmp and use -i image%4d.bmp


Last edited by nlsa8z6zoz7lyih3ap on Sun Feb 26, 2012 2:16 am; edited 1 time in total
Back to top
View user's profile Send private message
ultraincognito
Guru
Guru


Joined: 03 Jun 2011
Posts: 346
Location: Ukraine

PostPosted: Sat Feb 25, 2012 2:00 pm    Post subject: Reply with quote

Thanx.
I understood 2 things that I haven't knew:

Now I've done my movie so as:
Code:
$ ffmpeg -r 30 -sameq -i movie00%3d.bmp -i /home/ultraincognito/2.mp3 out.mpg
Back to top
View user's profile Send private message
nlsa8z6zoz7lyih3ap
Apprentice
Apprentice


Joined: 25 Sep 2007
Posts: 230
Location: Canada

PostPosted: Sat Feb 25, 2012 5:25 pm    Post subject: Reply with quote

Glad that you have it working now. The "man ffmpeg" certainly is confusing.

I also have had good results by modifying the command
Quote:
mencoder "mf://*.jpg" -mf fps=10 -o test.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800


which is from http://electron.mit.edu/~gsteele/ffmpeg/ .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum