Forum Replies Created

  • C david Young

    September 30, 2011 at 6:34 pm in reply to: Mux 3gp audio file with jpg image to create video clip

    I tried putting “-map 0:v” after the video input and it made no difference. I also put “-map 0:a” after the audio input and it said there was no such stream. However, I am having some success as follows. Now to see if I can append the individual slides, each of which will be an mp4 file.

    I can convert the 3gp audio to aac with the following:

    ffmpeg -y -i IMAG001.3gp -ab 128k -ar 48k -ac 2 -strict experimental -acodec aac IMAG001.aac

    When I add the video the resulting mp4 plays the audio with the image.

    ffmpeg -y -f image2 -r .2 -i IMAG001.jpg -i IMAG001.aac -s 720×480 IMAG001.mp4

  • C david Young

    September 30, 2011 at 5:46 pm in reply to: Mux 3gp audio file with jpg image to create video clip

    Michael,

    Thanks for your patience.

    I am trying to follow the instructions in the INSTALL file that follow. Is this the correct way to install libfaac? In particular, the part about libmp4v2 is confusing.

    General FAAC compiling instructions

    1. Make sure you have recent versions of autoconf, automake and libtool installed.
    For MP4 writing and tagging support, you must enable compiling with internal libmp4v2 (included in /common/mp4v2/).
    2. cd to FAAC source dir
    3. Run:
    ./configure
    make
    make install

  • C david Young

    September 29, 2011 at 4:31 pm in reply to: Mux 3gp audio file with jpg image to create video clip

    Well, another stumbling block.

    ../ffmpeg/configure –enable-memalign-hack –arch=x86 –target-os=mingw32 –enable-nonfree –enable-libfaac –cross-prefix=i686-w64-mingw32-
    ERROR: libfaac not found

    I have the latest git from ffmpeg…

  • C david Young

    September 29, 2011 at 3:54 pm in reply to: Mux 3gp audio file with jpg image to create video clip

    Thanks for the info. I tried

    ffmpeg -y -f image2 -r .2 -i IMAG001.jpg -i IMAG001.3gp -ab 128k -ar 48k -ac 2 -strict experimental -acodec aac IMAG001.mp4

    and it does not give me an error now but, as you said, the results were not good. The audio sounds ok but the image is missing.

    I’ll try recompiling with the –enable-libfaac. It is a good thing that I have spent days trying to get the Win32 cross-compile to work and finally succeeded. I’ll give this a try later today. Thanks!

  • C david Young

    September 29, 2011 at 5:11 am in reply to: Mux 3gp audio file with jpg image to create video clip

    Thanks for your suggestion, Michael. I am tried aac and got the following error. I also tried just converting the .3gp file to .aac and got the same error. Am I doing anything obviously wrong?

    C:\Android\images>C:/Android/ffmpeg-git-a254452-win32-static/bin/ffmpeg -y -i IMAG001.3gp -acodec aac IMAG001.aac
    ffmpeg version N-32726-ga254452, Copyright (c) 2000-2011 the FFmpeg developers
    built on Sep 19 2011 19:49:13 with gcc 4.6.1
    configuration: –enable-gpl –enable-version3 –enable-runtime-cpudetect –enable-avisynth –enable-bzlib –enable-frei0r –enable-libo
    enable-libspeex –enable-libtheora –enable-libvo-aacenc –enable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libx264 –en
    libavutil 51. 16. 1 / 51. 16. 1
    libavcodec 53. 16. 0 / 53. 16. 0
    libavformat 53. 12. 0 / 53. 12. 0
    libavdevice 53. 4. 0 / 53. 4. 0
    libavfilter 2. 43. 2 / 2. 43. 2
    libswscale 2. 1. 0 / 2. 1. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    [amr @ 01B785E0] max_analyze_duration 5000000 reached at 5000000
    [amr @ 01B785E0] Estimating duration from bitrate, this may be inaccurate
    Input #0, amr, from ‘IMAG001.3gp’:
    Duration: 00:00:06.74, bitrate: 12 kb/s
    Stream #0.0: Audio: amr_nb (samr / 0x726D6173), 8000 Hz, 1 channels, flt, 12 kb/s
    Incompatible sample format ‘flt’ for codec ‘aac’, auto-selecting format ‘s16’
    [aac @ 01A07BE0] Too many bits per frame requested
    Output #0, adts, to ‘IMAG001.aac’:
    Stream #0.0: Audio: aac, 8000 Hz, 1 channels, s16, 128 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0 (amrnb -> aac)
    Error while opening encoder for output stream #0.0 – maybe incorrect parameters such as bit_rate, rate, width or height

    C:\Android\images>C:/Android/ffmpeg-git-a254452-win32-static/bin/ffmpeg -y -i IMAG001.3gp -acodec aac IMAG001.aac

  • I would call the ffmpeg main passing the string as if it came from the command line.

  • C david Young

    September 23, 2011 at 11:05 am in reply to: converting series of images to a video slideshow

    Wow. With the following line (-r .2) I was able to get each image to show for 5 seconds. Thanks!

    $ ffmpeg -y -f image2 -r .2 -i test-%03d.jpg -s 720×480 a.mp4

    Now regarding the audio clips that I want to play in synchronization with the images, is there a similar command for muxing the audio files (.3gp) with this a.mp4? Or should I mux the audio files with the images first to create a series of .mp4 files and then concatenate them?

  • C david Young

    September 22, 2011 at 10:29 pm in reply to: converting series of images to a video slideshow

    Yes, that is how my image files are named.

    What does your output look like? Does it dwell for a second or two on each image? What OS are you running? Which player are you using?

    Thanks!

  • C david Young

    September 22, 2011 at 9:32 pm in reply to: converting series of images to a video slideshow

    As I read more about ffmpeg I figure my best approach might be to create a separate video file of the correct duration for each image muxed with the narration, and then concatenate the files while muxing the music. Does that make any sense?

  • C david Young

    September 22, 2011 at 9:17 pm in reply to: converting series of images to a video slideshow

    Well, for one thing it only seems to be adding the first image, which only shows up briefly when playing in VLC. If I set the frame rate really low (-r .1) the image shows longer but I don’t think that is the right technique. So I guess the first hurdle is to figure out why only the first image is showing up. The output below seems to indicate that only the first image is being processed.

    C:Androidffmpeg for windowsffmpeg-git-a254452-win32-staticbin>ffmpeg -y -f image2 -i IMAG-%03d.jpg -s 720×480 a.mp4
    ffmpeg version N-32726-ga254452, Copyright (c) 2000-2011 the FFmpeg developers
    built on Sep 19 2011 19:49:13 with gcc 4.6.1
    configuration: –enable-gpl –enable-version3 –enable-runtime-cpudetect –enable-avisynth –enable-bzlib –enable-frei0r –enable-libopencore-amrnb
    libavutil 51. 16. 1 / 51. 16. 1
    libavcodec 53. 16. 0 / 53. 16. 0
    libavformat 53. 12. 0 / 53. 12. 0
    libavdevice 53. 4. 0 / 53. 4. 0
    libavfilter 2. 43. 2 / 2. 43. 2
    libswscale 2. 1. 0 / 2. 1. 0
    libpostproc 51. 2. 0 / 51. 2. 0
    Input #0, image2, from ‘IMAG-%03d.jpg’:
    Duration: 00:00:00.28, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: mjpeg, yuvj420p, 3264×1952, 25 fps, 25 tbr, 25 tbn, 25 tbc
    [buffer @ 024C5FE0] w:3264 h:1952 pixfmt:yuvj420p tb:1/1000000 sar:0/1 sws_param:
    [scale @ 024C5060] w:3264 h:1952 fmt:yuvj420p -> w:720 h:480 fmt:yuvj420p flags:0x4
    [libx264 @ 02511A60] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
    [libx264 @ 02511A60] profile High, level 3.0
    [libx264 @ 02511A60] 264 – core 116 r2074 2641b9e – H.264/MPEG-4 AVC codec – Copyleft 2003-2011 – https://www.videolan.org/x264.html – options: cabac=1
    eightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1
    Output #0, mp4, to ‘a.mp4’:
    Metadata:
    encoder : Lavf53.12.0
    Stream #0.0: Video: h264 (![0][0][0] / 0x0021), yuvj420p, 720×480, q=-1–1, 25 tbn, 25 tbc
    Stream mapping:
    Stream #0.0 -> #0.0 (mjpeg -> libx264)
    Press [q] to stop, [?] for help
    frame= 7 fps= 0 q=-1.0 Lsize= 84kB time=00:00:00.20 bitrate=3451.2kbits/s
    video:83kB audio:0kB global headers:0kB muxing overhead 1.000866%
    frame I:1 Avg QP:25.84 size: 16625
    [libx264 @ 02511A60] frame P:6 Avg QP:26.97 size: 11349
    [libx264 @ 02511A60] mb I I16..4: 15.7% 59.7% 24.6%
    [libx264 @ 02511A60] mb P I16..4: 12.1% 54.0% 16.5% P16..4: 1.3% 0.2% 0.2% 0.0% 0.0% skip:15.8%
    [libx264 @ 02511A60] 8×8 transform intra:64.4% inter:84.1%
    [libx264 @ 02511A60] coded y,uvDC,uvAC intra: 60.8% 70.7% 30.0% inter: 3.1% 5.7% 0.1%
    [libx264 @ 02511A60] i16 v,h,dc,p: 35% 14% 3% 48%
    [libx264 @ 02511A60] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 14% 14% 7% 8% 8% 8% 9% 9%
    [libx264 @ 02511A60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 18% 13% 7% 9% 8% 7% 6% 4%
    [libx264 @ 02511A60] i8c dc,h,v,p: 50% 17% 23% 10%
    [libx264 @ 02511A60] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 02511A60] ref P L0: 69.4% 5.4% 11.1% 14.1%
    [libx264 @ 02511A60] kb/s:2420.51

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy