Results 1 to 7 of 7

Thread: ffmpeg, bash, and multiple inut files.

  1. #1

    Default ffmpeg, bash, and multiple inut files.

    I am trying to use ffmpeg to create a video file from a series of still images.
    the files are named image10000,jpg through 10150.jpg.
    I type the command
    Code:
    ffmpeg -i image%d -sameq test.mpg
    and ffmpeg reports
    Code:
    image%d.jpg: No such file or directory
    any help appreciated.

  2. #2

    Default Re: ffmpeg, bash, and multiple inut files.

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    What are you expecting to happen with that %d? 'bash' is going to need
    to interpret that, and apparently it does not like it. If nothing else
    put an asterisk '*' in its place to see if that at least gives a valid
    list of files and if then ffmpeg can handle them.

    Good luck.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.15 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJPFCSNAAoJEF+XTK08PnB5x14P/RdOAocALIXdOGBYD01PBpL0
    uyRLYOn70JbCxnGVx+2cb70YCF61H7RIntnp1fdVUKvR0uyd50J29m7dAYZyAkkW
    ccsiSaDOSfeTrBQVJcnoQ8PnF5XewlM4tU3LWvWBAEmf3sImPRv3KfYA8/aRgPuR
    80Uu2olvEjpxQ27iekWUy14X61HCF1waS4gXUeivAOT5t0eglbUPWEE/voxuVA8g
    jfez8ek1Paj9k0EawYJEJbNVyF5oLi6xMCCF4z71SWPLt0tN1sT/6uhkAYro2Crq
    utXJpHoVXjQKKO3WzoILn0JkCfUUKAKdGcf81N/T5lgNGn6ciEFiXKcbziN6K/c4
    I3ymmAvSM22Hns5ZgXDYylrLWaEcjn6g66pM3bh9UMGDRYCvKuOvVzonoYDZpyf2
    qkgn8v9eDEGvbVzzGXUUpDTZrDifyPVZoj0xf9C59hwh1he+47q41Hc+cWzpZKnX
    BbbZYq7b0MSdfF1u2+fhA+AF6/jmipncZ3tNO3a1kqm7XPlEJrSxdEV7FkWAS7Nq
    9TXPV2gsXJUZFMw0R/6ewrHgJSRgiEHdWxTAAUB+PqZgCVLPIRIs0gOfOrjS2xAF
    yz9zbatp5deS151mQ7LDFxh8ZHVuMd9ZUtf8AGgaCYiNwAKXcO8hdy7xZRlYm4XA
    im1ltOfjeACO6/F1EN8N
    =dKut
    -----END PGP SIGNATURE-----

  3. #3

    Default Re: ffmpeg, bash, and multiple inut files.

    I put the widlcard '*' in its place and get a output file but it doesn't contain any desired images, it is only 20kb in size and plays as a black image.
    I would expect the video to be at least a meg and a half in size.
    the instructions come straight from the ffmpeg site.
    I don't remember if I have used this technique before.. but there is a history of me trying it in my .bash_history
    FFmpeg FAQ
    First, rename your pictures to follow a numerical sequence. For example, img1.jpg, img2.jpg, img3.jpg,... Then you may run:
    ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
    I am puzzled.
    .....
    now that I am posting this I think I know what the problem is...
    the files do not start at 00001.
    let me rename them...

  4. #4

    Default Re: ffmpeg, bash, and multiple inut files.

    yes that was the problem the files did not start at 1 or 00001.

  5. #5

    Default Re: ffmpeg, bash, and multiple inut files.

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Thanks for posting back the result.

    Good luck.

    On 01/16/2012 06:46 AM, ed v wrote:
    >
    > yes that was the problem the files did not start at 1 or 00001.
    >
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.15 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJPFDP0AAoJEF+XTK08PnB5RzYQAMjX2Puk11OVH6/GvW1MCb+O
    JX3U7gBpVOC6vhSnyecb/Jz+SuqkHzaYdD+OZrSTWhG9agSaIZV1koqoNIhiO/WC
    lFcHB0mjC9uIzxIfbL/tH9qwXIx9+liChC74CLxQbJI3LMcG0Y6wiaNKUj3lWqLP
    yrm0QOW0/1OgrX1L7gPOekKh2TZzlWTZz4S0FLgNKIlkz0rowELVOgWzVgwQk/uK
    Oc7h9UVk1mSVNAfPfz2mBu+liLDDb6mrvTXHGMsPqvwOZv16AqZciesIMFXxOo+I
    knpYwtECrLinXJkuFo9voFqkQNCj/uHicXNodP1lXwokFeZxiidNtUcWsB1XJIOH
    ycvyON666J8g6q6AeRBKNV5rc5jTCOp04PiyK0qKL+5UzijxxZ3KlMqlLgKz4DFE
    CQ1mXiWAJLlMtkJl+5kme8iMP/ZO0lmxx3y3T4PqoJLTWlw+RUh5bcMtRR+vyYP/
    n2rF9OWEgIIvZMgFEQX1LYZRHysKeVY809ZGLI62/DImoGZlYHSVxLD9FHIlUlhB
    q8wtpuu+TjJBb/hZyvlw369R1Q/zDN1awEOXhCZXNvfG0x5hmKPgSmphtTu4c+DR
    nPaW7aQFjqTD+XSEr3eJP1oNcqHUq/vjNp+b58u9wFDMlN2GVHIEFlo6aDw9vbUW
    MNJMU4Dkec54iZ9xZ6Br
    =CftS
    -----END PGP SIGNATURE-----

  6. #6

    Default Re: ffmpeg, bash, and multiple inut files.

    I used this to create links to the originals...
    Code:
    x=1; for i in *jpg; do counter=$(printf %05d $x); echo "$i" ; ln -s "$i" img"$counter".jpg; x=$(($x+1)); done
    it worked enough that ffmpeg was able to create the desired movie with 151 frames.

  7. #7

    Default Re: ffmpeg, bash, and multiple inut files.

    On 01/16/2012 04:16 AM, ed v wrote:
    >
    > I am trying to use ffmpeg to create a video file from a series of still
    > images.
    > the files are named image10000,jpg through 10150.jpg.
    > I type the command
    >
    > Code:
    > --------------------
    >
    > ffmpeg -i image%d -sameq test.mpg
    >
    > --------------------
    >
    > and ffmpeg reports
    >
    > Code:
    > --------------------
    >
    > image%d.jpg: No such file or directory
    >
    > --------------------
    >
    > any help appreciated.


    A few years ago I captured a .jpg image from the Mendenhall Glacier
    website with wget every 5 minutes (during daylight hours). I saved them
    in month/day directories, then ran the following scripts to concatenate
    them into an .mpg file.

    The first script created a .mpg file for each day. The 2nd script
    combined each day's mpg into a single file.

    Modify to suit your needs.

    HTH...

    ....Kevin

    make_movies.sh
    ============================================================
    #!/bin/bash
    # A Bash script to step through the webcam directory
    # and convert the series of .jpg images into an mpeg sequence.
    # Author: Kevin Miller, Juneau Alaska
    # Source: http://www.fs.fed.us/r10/tongass/webcam.jpg
    # Created: December 21, 2005

    # Webcam image source directory
    WEBCAM_DIR=/local/video/GlacierCam.input/

    # Go to the webcam image source directory and check
    # for a month dir
    # If it exists, change to that directory,
    # else create it and go there.



    cd $WEBCAM_DIR




    # Loop for each month
    for MONTHDIR in *
    do
    # Check that the entry is a directory, not a file
    # If a directory, cd into it.
    if [ -d $MONTHDIR ] ; then
    cd $MONTHDIR
    # Loop for each day's directory entry.
    # Check that the entry is a directory, not a file
    # If a directory, cd into it.
    for DAYDIR in *
    do
    if [ -d $DAYDIR ] ; then
    cd $DAYDIR
    pwd
    if [ -f $MONTHDIR-$DAYDIR.mpg ] ; then
    rm $MONTHDIR-$DAYDIR.mpg
    fi
    convert *.jpg m2v:$MONTHDIR-$DAYDIR.mpg
    cd ..
    fi
    done
    cd ..
    fi
    done

    exit
    ============================================================

    cat_mpg.sh
    ============================================================
    #!/bin/bash
    # A Bash script to step through the webcam directory
    # and convert the series of .jpg images into an mpeg sequence.
    # Author: Kevin Miller, Juneau Alaska
    # Source: http://www.fs.fed.us/r10/tongass/webcam.jpg
    # Created: December 21, 2005

    # WEBCAM_DIR=/home/mkm/webcam/
    WEBCAM_DIR=/local/video/GlacierCam.done/
    OUTDIR=/local/video/GlacierCam.out/

    # Go to the webcam capture dir and check for a month dir
    # If it exists, change to that directory, else create it
    # and go there.
    cd $WEBCAM_DIR

    # Loop for each month
    for MONTHDIR in *
    do
    # Check that the entry is a directory, not a file
    # If a directory, cd into it.
    if [ -d $MONTHDIR ] ; then
    cd $MONTHDIR
    # Loop for each day's directory entry.
    # Check that the entry is a directory, not a file
    # If a directory, cd into it.
    for DAYDIR in *
    do
    if [ -d $DAYDIR ] ; then
    cd $DAYDIR
    pwd
    cat $MONTHDIR-$DAYDIR.mpg >> $OUTDIR/glacier.mpg
    cd ..
    fi
    done
    cd ..
    fi
    done

    exit
    ============================================================

    ....Kevin
    --
    Kevin Miller - http://www.alaska.net/~atftb
    Juneau, Alaska
    In a recent survey, 7 out of 10 hard drives preferred Linux
    Registered Linux User No: 307357, http://linuxcounter.net

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •