Encoder error: Output file was not created

d r
2008-03-18
2012-09-15
  • d r

    d r - 2008-03-18

    I seem to be unable to encode to any format (actuaqlly to save the encoded file):

    switched to clip test.ts
    Frames=4436 type=mpegpes size=544x480 bpp=24 fps=29.970
    Audio: 48000 Hz 2 channel(s) 16 bps
    Deleting frames 1 to 681...done.
    Saving frames 1 to 3755
    as "/home/XXX/Desktop/test.avi" : encoder mencoder_encoder : format = MJPG...failed.
    Resampling video at 2.99970003 frames per second...done.
    Length of video is now 376 frames.
    Saving frames 1 to 376
    as "/tmp/test.mpg" : encoder mjpegtools_encoder : format = vcd (NTSC)...failed.
    Resampling video at 25.000 frames per second...done.
    Length of video is now 3134 frames.
    Saving frames 1 to 3134
    as "/tmp/test.avi" : encoder ffmpeg_encoder : format = divx (25 fps)...failed.
    =================
    I tried a few codecs, I can see progress and completion of resampling, then get the "Encoder error" and failure to save the new file. Both destination directories are writable.

    Thanks for any suggestions.

    regards
    JC

     
    • d r

      d r - 2008-03-21

      Hi Salsaman, here is what I've found so far:
      According to ffmpeg documentation ( http://ffmpeg.mplayerhq.hu/faq.html#TOC12 and http://ffmpeg.mplayerhq.hu/faq.html#TOC20 ), there is no support for JPEG, the command should have "image2" format passed to it instead of "image". As you can see below - it is working when manually executed with "image2" option. I have no clue why audio fails yet, but I guess it's a step in the right direction
      ++++++++++++++++++++
      $ ffmpeg -comment "Created with LiVES" -author "" -title "STREAM: Author: Albeu" -y -f image2 -i %8d.jpg -i /tmp/livestmp//192197159/audio -acodec copy -r 25.000 -t 16.76 "/tmp/test.avi"
      FFmpeg version SVN-r11174, Copyright (c) 2000-2007 Fabrice Bellard, et al.
      configuration: --prefix=/usr --libdir=${prefix}/lib --shlibdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg --enable-shared --enable-libmp3lame --enable-gpl --enable-libfaad --mandir=${prefix}/share/man --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-pp --enable-libamr-nb --enable-libamr-wb --enable-x11grab --enable-libgsm --enable-libx264 --enable-liba52 --enable-libtheora --extra-cflags=-Wall -g -fPIC -DPIC --cc=ccache cc --enable-swscaler --disable-mmx
      libavutil version: 49.5.0
      libavcodec version: 51.48.0
      libavformat version: 52.1.0
      built on Mar 7 2008 19:01:56, gcc: 4.2.3 (Debian 4.2.3-2)
      Input #0, image2, from '%8d.jpg':
      Duration: 00:00:16.7, start: 0.000000, bitrate: N/A
      Stream #0.0: Video: mjpeg, yuvj420p, 592x320 [PAR 72:72 DAR 37:20], 25.00 tb(r)
      [mp3 @ 0xb7f72220]Could not find codec parameters (Audio: mp1, 416 kb/s)
      /tmp/livestmp//192197159/audio: could not find codec parameters

      ffmpeg -comment "Created with LiVES" -author "" -title "STREAM: Author: Albeu" -y -f image2 -i %8d.jpg "/tmp/test.avi"
      FFmpeg version SVN-r11174, Copyright (c) 2000-2007 Fabrice Bellard, et al.
      configuration: --prefix=/usr --libdir=${prefix}/lib --shlibdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg --enable-shared --enable-libmp3lame --enable-gpl --enable-libfaad --mandir=${prefix}/share/man --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-pp --enable-libamr-nb --enable-libamr-wb --enable-x11grab --enable-libgsm --enable-libx264 --enable-liba52 --enable-libtheora --extra-cflags=-Wall -g -fPIC -DPIC --cc=ccache cc --enable-swscaler --disable-mmx
      libavutil version: 49.5.0
      libavcodec version: 51.48.0
      libavformat version: 52.1.0
      built on Mar 7 2008 19:01:56, gcc: 4.2.3 (Debian 4.2.3-2)
      Input #0, image2, from '%8d.jpg':
      Duration: 00:00:16.7, start: 0.000000, bitrate: N/A
      Stream #0.0: Video: mjpeg, yuvj420p, 592x320 [PAR 72:72 DAR 37:20], 25.00 tb(r)
      Output #0, avi, to '/tmp/test.avi':
      Stream #0.0: Video: mpeg4, yuv420p, 592x320 [PAR 1:1 DAR 37:20], q=2-31, 200 kb/s, 25.00 tb(c)
      Stream mapping:
      Stream #0.0 -> #0.0
      Press [q] to stop encoding
      frame= 419 fps= 28 q=13.8 Lsize= 669kB time=16.8 bitrate= 326.9kbits/s
      video:653kB audio:0kB global headers:0kB muxing overhead 2.389722%
      $
      ++++++++++++++++++++++++
      When I drop audio from ffmpeg- it creates the file, and it is readable by VLC.

      The question now is - how do I change "image" to "image2", when run from GUI?

       
      • Salsaman

        Salsaman - 2008-03-21

        Thanks for the information. It seems like somewhere along the way, the format in ffmpeg changed from image to image2. So I will update this in CVS.

        Regarding non-encoding of audio, this is probably OK, since LiVES will convert the raw audio into a wav file before passing it to ffmpeg.

        You can edit your ffmpeg_encoder in /usr/share/lives/plugins/encoders and change image -> image2 and see if it now works.

         
    • Salsaman

      Salsaman - 2008-03-19

      Please enable "debug encoders", and cut and paste the output from the terminal window.

       
    • d r

      d r - 2008-03-19

      I aqdded the following options to smogrify:
      $DEBUG_OPEN=1;
      &rc_set_if_not_set("debug_encoders","true"); (changed from "false"

      Here is the result of debug run:
      ============8<===============
      $ lives

      LiVES 0.9.8.9
      ... #removed disclaimer
      jackd 0.109.2
      Copyright 2001-2005 Paul Davis and others.
      JACK compiled with System V SHM support.
      ... #removed disclaimer
      loading driver ..
      creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
      control device hw:0
      configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
      ALSA: final selected sample format for capture: 16bit little-endian
      ALSA: use 2 periods for capture
      ALSA: final selected sample format for playback: 16bit little-endian
      ALSA: use 2 periods for playback
      ffmpeg_encoder command is: ffmpeg -comment "" -author "" -title "" -y -f image -i %8d.jpg -i /tmp/livestmp//770989249/audiodump.wav -acodec copy -r 25.000 -t 125.36 "/home/XXX/Desktop/test.avi" 1>&2
      FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
      configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-liba52 --enable-libdts --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
      libavutil version: 1d.49.3.0
      libavcodec version: 1d.51.38.0
      libavformat version: 1d.51.10.0
      built on Jun 23 2007 14:31:53, gcc: 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)
      Unknown input or output format: image

      **** alsa_pcm: xrun of at least 3.680 msecs
      ==========8<===========

      Note: source file is in .ts format

      Thank you

       
      • Salsaman

        Salsaman - 2008-03-19

        It seems like in this case the version of ffmpeg you are using was compiled without image format input. You can confirm this with:

        ffmpeg -formats

        What about the other encoders - mjpegtools_encoder and multi_encoder ?

         
    • d r

      d r - 2008-03-20

      I didn't compile ffmpeg myself, installed it as Debian package. I suppose I could recompile it, if you can give me a few pointers as of which options have to be enabled. mjpegtools was compiled as default. Any custom options here? Multi_encoder test succeded in creating a file, but it won't open the output file with mplayer and vlc. I also got this on liVES console:
      "Saving frames 1 to 189 (with no sound)
      as "/tmp/test.mng" : encoder multi_encoder : format = MNG (MNG/NONE) format...done."

      Thank you for helping me, I really appreciate your time and effort, and find this application very interesting and hope to get it running :)
      JC

      MJPEGTOOLS_ENCODER test:

      open command for 880945596 is: LANGUAGE=en LANG=en /usr/bin/mplayer -quiet -osd
      level 0 -vo jpeg:quality=75 -noframedrop -ao pcm -channels 2 -vf scale -mc 0
      "/movies/test.ts" </dev/null
      Encoder: video command was jpeg2yuv -b 1 -n 189 -I p -f 29.97000000 -L 0 -j %08d
      .jpg| mpeg2enc -F 4 -n p -f 3 -b 3800 -B 265 -V 1000 -4 1 -2 1 -g 6 -G 18 -r 24
      -o tmpvid.m1v 1>&2
      INFO: [jpeg2yuv] Parsing & checking input files.
      INFO: [jpeg2yuv] YUV colorspace detected.

      INFO: [jpeg2yuv] Starting decompression
      INFO: [jpeg2yuv] Image dimensions are 512x512
      INFO: [jpeg2yuv] Movie frame rate is: 29.970030 frames/second
      INFO: [jpeg2yuv] Non-interlaced/progressive frames.
      INFO: [jpeg2yuv] Frame size: 512 x 512
      INFO: [jpeg2yuv] Number of Loops 1
      INFO: [jpeg2yuv] Number of Frames 189
      INFO: [jpeg2yuv] Start at frame 1
      INFO: [jpeg2yuv] Now generating YUV4MPEG stream.
      INFO: [jpeg2yuv] Processing non-interlaced/interleaved 00000001.jpg, size 127
      526
      INFO: [jpeg2yuv] Rescaling color values.
      INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
      INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!
      INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!
      INFO: [mpeg2enc] Selecting Generic MPEG2 output profile
      INFO: [mpeg2enc] Progressive input - selecting progressive encoding.
      INFO: [mpeg2enc] Encoding MPEG-2 video to tmpvid.m1v
      INFO: [mpeg2enc] Horizontal size: 512 pel
      INFO: [mpeg2enc] Vertical size: 512 pel
      INFO: [mpeg2enc] Aspect ratio code: 1 = 1:1 pixels
      INFO: [mpeg2enc] Frame rate code: 4 = 30000.0/1001.0 (NTSC VIDEO)
      INFO: [mpeg2enc] Bitrate: 3800 KBit/s
      INFO: [mpeg2enc] Quality factor: 8 (Quantisation = 9) (1=best, 31=worst)
      INFO: [mpeg2enc] Field order for input: none/progressive
      INFO: [mpeg2enc] Sequence unlimited length
      INFO: [mpeg2enc] Search radius: 24
      INFO: [mpeg2enc] DualPrime: no
      INFO: [mpeg2enc] Using one-pass rate controller
      INFO: [mpeg2enc] GOP SIZE RANGE 6 TO 18
      INFO: [mpeg2enc] Setting colour/gamma parameters to "PAL B/G"
      INFO: [mpeg2enc] Progressive format frames = 1
      INFO: [mpeg2enc] Using default unmodified quantization matrices
      INFO: [mpeg2enc] SETTING MMX and MMX for QUANTIZER!
      INFO: [mpeg2enc] PAR = 0

      INFO: [mpeg2enc] NEW GOP INIT length 18
      INFO: [jpeg2yuv] Processing non-interlaced/interleaved 00000002.jpg, size 126
      982
      INFO: [jpeg2yuv] Rescaling color values.
      INFO: [jpeg2yuv] Processing non-interlaced/interleaved 00000003.jpg, size 126
      317
      INFO: [mpeg2enc] Enc1 0 0( 0) I q=9.05 [100% Intra]
      INFO: [jpeg2yuv] Rescaling color values.
      INFO: [jpeg2yuv] Processing non-interlaced/interleaved 00000004.jpg, size 129
      505
      ...-...-...-...-SKIPPED ...-...-...

      INFO: [mpeg2enc] Enc1 185 185( 0) I q=9.00 [100% Intra]
      INFO: [jpeg2yuv] Processing non-interlaced/interleaved 00000189.jpg, size 122031
      INFO: [jpeg2yuv] Rescaling color values.
      INFO: [mpeg2enc] Enc1 186 186( 1) P q=9.00 [0% Intra]
      INFO: [mpeg2enc] Enc1 187 187( 2) P q=9.00 [0% Intra]
      INFO: [mpeg2enc] Signaling last frame = 188
      INFO: [mpeg2enc] Pass2 167 167( 0) I q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 168 168( 1) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 169 169( 2) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 170 170( 3) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 171 171( 4) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 172 172( 5) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 173 173( 6) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 174 174( 7) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 175 175( 8) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 176 176( 9) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 177 177(10) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 178 178(11) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 179 179(12) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 180 180(13) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 181 181(14) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 182 182(15) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 183 183(16) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 184 184(17) P q=9.00 RETAINED
      INFO: [mpeg2enc] Enc1 188 188( 3) P q=9.00 [0% Intra]
      INFO: [mpeg2enc] Sequence end reached
      INFO: [mpeg2enc] Pass2 185 185( 0) I q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 186 186( 1) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 187 187( 2) P q=9.00 RETAINED
      INFO: [mpeg2enc] Pass2 188 188( 3) P q=9.00 RETAINED
      INFO: [mpeg2enc] Guesstimated final muxed size = 1751596

      Encoder: audio command was mp2enc -b 224 -r 48000 -o tmpaud.mpa < /tmp/livestmp//880945596/audiodump.wav 1>&2
      sh: /tmp/livestmp//880945596/audiodump.wav: No such file or directory
      Encoder: mplex command was mplex -b 1000 -V -f 3 -o "/tmp/test.mpg" tmpvid.m1v tmpaud.mpa 1>&2
      INFO: [mplex] mplex version 1.9.0 (2.2.7 $Date: 2006/02/01 22:23:01 $)
      **ERROR: [mplex] Unable to open file tmpaud.mpa for reading.

      MULTI_ENCODER test:
      I got the following arguments:

          multi_encoder version = 0.2.9
          fps = 29.97000000
          outfile = &quot;/tmp/test.mng&quot;
          start = 1
          end = 189
          ext = .jpg
          vformat = hi-mng
          aformat = 32
          hsize = 512
          vsize = 512
      
          I will use the following:
      
          fpsc = 4
          aspect = 1.0
          arc = 1
          type = hi
          prog = mng
          tempdir = /tmp/livestmp/880945596/metd
      
          I will run the following command:
          mng_encoder.py -o &quot;/tmp/test.mng&quot; -w /tmp/livestmp/880945596/metd -a 1 -f 4 -v -t hi -s ./audiodump.wav 1 189
      

      /usr/bin/convert: found
      Linear audio delay (ms): 0
      Found: /tmp/livestmp/880945596/00000001.jpg
      Creating /tmp/livestmp/880945596/metd
      Creating MNG file
      Running:
      cd /tmp/livestmp/880945596 ; \ convert -delay 3.33666666667 temporary_symlink_*.jpg /tmp/livestmp/880945596/metd/BYxt6b.mng

      === ... ===
      Deleting all enhanced images (if any)
      Done!
      Deleting /tmp/livestmp/880945596/metd

       
      • Salsaman

        Salsaman - 2008-03-20

        Regarding building ffmpeg from source, I am not sure what options you would use, but you want to make sure it includes jpeg and png support.

        The output you provide here shows encoding for multi_encoder/mng format, and it looks like it is working. Mng files can only be played by certain web browsers, see:
        http://en.wikipedia.org/wiki/Mng

        I suggest you try either the mjpegtools_encoder, or the multi_encoder with mpeg or ogg theora or h264 codecs.

        Note, you may need to install some additional libraries/programs to use some of these other formats. There is a helpful guide for this on the LiVES site, under the "documentation" link:

        http://www.xs4all.nl/%7Esalsaman/lives/docs/multi_encoder.html

        At the bottom of the "downloads" page, there is another link to the same document, and also a list of optional requirements for all of the encoder plugins.

         
    • Salsaman

      Salsaman - 2008-03-20

      Also, who is the maintainer of the ffmpeg debian package ? I would like to email them and ask them to include image support in future releases.

       
    • d r

      d r - 2008-03-20

      According to this info - it's Fabrice Bellard, this should be his website: http://fabrice.bellard.free.fr/, and this is his email: fabrice at bellard dot org:
      $ ffmpeg -h
      FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
      configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-liba52 --enable-libdts --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
      libavutil version: 1d.49.3.0
      libavcodec version: 1d.51.38.0
      libavformat version: 1d.51.10.0
      built on Jun 23 2007 14:31:53, gcc: 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)
      FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
      configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-liba52 --enable-libdts --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
      libavutil version: 1d.49.3.0
      libavcodec version: 1d.51.38.0
      libavformat version: 1d.51.10.0
      built on Jun 23 2007 14:31:53, gcc: 4.1.3 20070601 (prerelease) (Debian 4.1.2-12)
      usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...
      Hyper fast Audio and Video encoder

      Thanks again, I'll do my part of reading, poke around and report back

       
      • Salsaman

        Salsaman - 2008-03-20

        BTW, where did you build LiVES from source or install from .deb ?

        There are .debs of LiVES on debian-multimedia.org, and I see there that there are also ffmpeg builds on that site.

        You could try installing ffmpeg from debian-multimedia.org, and see if that helps.

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks