#Timelapse Conversion Failed

83 messages Β· Page 1 of 1 (latest)

burnt mason
#

Hey all, I'm stumped on this conversion failure in moonraker-timelapse. Could anyone please take a look and help me out? Thanks in advance!

wraith quail
#

Send the log of today

#

In that sent log, you only got pictures taken until midnight

burnt mason
#

apologies

#

one sec

wraith quail
#

I saw those messager ^^

burnt mason
#

ye

#

just irrelevant nonsense on my part

wraith quail
#
Rendering Video failed: /usr/bin/ffmpeg -r 30 -i '/tmp/timelapse/printer/frame%6d.jpg' -threads 2 -g 5 -crf 23 -vcodec libx264 -pix_fmt yuv420p -an  '/tmp/timelapse/printer/timelapse_Benchy_PLA_41m13s.gcode_20240623_0026.mp4' -y : Conversion failed!
burnt mason
#

yes did I mess up my config or something?

wraith quail
#

Just posting it to make searching easier in future ^^

#

Can you just make some pictures with TIMELAPSE_TAKE_FRAME and run that command on a ssh console?

burnt mason
#

which command in ssh?

wraith quail
#
/usr/bin/ffmpeg -r 30 -i '/tmp/timelapse/printer/frame%6d.jpg' -threads 2 -g 5 -crf 23 -vcodec libx264 -pix_fmt yuv420p -an  '/tmp/timelapse/printer/timelapse_Benchy_PLA_41m13s.gcode_20240623_0026.mp4' -y
burnt mason
#
ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[image2 @ 0xaaaad26cbae0] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2, from '/tmp/timelapse/printer/frame%6d.jpg':
  Duration: 00:00:00.20, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 25 tbr, 25 tbn, 25 tbc
Output #0, mp4, to '/tmp/timelapse/printer/timelapse_test.mp4':
Output file #0 does not contain any stream
wraith quail
#

Did it work?

burnt mason
#

no

wraith quail
#

What exact device is this?

#

How many fasmer did you take and did they appear at /tmp/timelapse/printer/frame%6d.jpg?

burnt mason
#

I took 5 frames and yes

#

it's an M8P + CB1, camera is a Pixel 2XL

wraith quail
#

Is there anything inside those images?

#

The size of 0kb seem weird

#

Send one of the images

#

once as jpg and once as .txt

burnt mason
#

yeah let me get a print going, they're empty. a benchy last night had size to the jpgs

wraith quail
#

Empty frames woud at least explain the problem ig

burnt mason
#

I can in theory terminate the print a few layers in and then use the command in ssh?

wraith quail
#

Yes, but check the frames before that in winscp

#

If they again don't contain anything, it's useless

burnt mason
#

I will, and send at least one as proof

#

there are no voice channels here? was gonna just pop in a stream the progress

wraith quail
#

No voice chat and tbh, I don't think any of us helpers wants to take his time to talk to people ^^

burnt mason
#

oof

wraith quail
#

Just record and send it here

#

And send a screenshot of your Mainsail settings

wraith quail
# burnt mason oof

I'm doing this in my free time and as you can see, I don't answer to every message within seconds, as I'm watching YouTube, research stuff, learning for university....

burnt mason
#

I understand, this just happens to be a weekend I have decided to settle down and work on printer things

#

I found one issue, I mistakenly defined my snapshot url - that errored the timelapse_take_frame macro and created 0kb pics

wraith quail
#

That's the reason I asked for the screenshot of the Mainsail settings ^^

burnt mason
wraith quail
#

Select a cam in the timelapse settings

burnt mason
#

yessir

#

windows claims to not open .jpgs?

#
ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[mjpeg @ 0xaaaae464ad70] No JPEG data found in image
    Last message repeated 37 times
[image2 @ 0xaaaae4649ae0] decoding for stream 0 failed
[image2 @ 0xaaaae4649ae0] Could not find codec parameters for stream 0 (Video: mjpeg, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2, from '/tmp/timelapse/printer/frame%6d.jpg':
  Duration: 00:00:01.52, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, none(bt470bg/unknown/unknown), 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[mjpeg @ 0xaaaae4663ea0] No JPEG data found in image
Error while decoding stream #0:0: Invalid data found when processing input
#

okay no jpeg data in the image

#
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0" />
        <title>Mainsail</title>
        <meta name="description" content="Mainsail is the popular web interface for Klipper." />

        <link rel="icon" type="image/png" sizes="32x32" href="/img/icons/favicon-32x32.png" />
        <link rel="icon" type="image/png" sizes="16x16" href="/img/icons/favicon-16x16.png" />
        <meta name="theme-color" content="#121212" />
        <meta name="mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="black" />
        <meta name="apple-mobile-web-app-title" content="Mainsail" />
        <link rel="apple-touch-icon" sizes="180x180" href="/img/icons/apple-touch-icon-180x180.png" />
        <link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#d51f26" />
        <meta name="msapplication-TileImage" content="/img/icons/mstile-150x150.png" />
        <meta name="msapplication-TileColor" content="#d51f26" />

        
      <script type="module" crossorigin src="/assets/index-b968dd65.js"></script>
      <link rel="modulepreload" crossorigin href="/assets/vuetify-4c65b4c3.js">
      <link rel="modulepreload" crossorigin href="/assets/overlayscrollbars-44d87bcf.js">
      <link rel="modulepreload" crossorigin href="/assets/echarts-9bc570b0.js">
      <link rel="stylesheet" href="/assets/vuetify-950d1cb0.css">
      <link rel="stylesheet" href="/assets/overlayscrollbars-a16bc3d3.css">
      <link rel="stylesheet" href="/assets/index-5470f3e4.css">
    <link rel="manifest" href="/manifest.webmanifest"></head>
    <body style="background-color: #121212">
        <noscript>
            <strong>
                We're sorry but Mainsail doesn't work properly without JavaScript enabled. Please enable it to continue.
            </strong>
        </noscript>
        <div id="app"></div>
    </body>
</html>
#

the text data in a .jpg

wraith quail
#

.jpgs
I hope you mean .jpg
Most likely not a valid jpg then

burnt mason
#

yes but plural

wraith quail
wraith quail
#

Did you select the cam inside the timelapse settings in the interface settings?

burnt mason
#

I can assure you it outputs the right file extensions πŸ˜…

wraith quail
# burnt mason

Also add http: in front of the urls, just to rule out problems with that

burnt mason
#

done and done

wraith quail
#

Now test again the TIMELAPSE_TAKE_FRAME macro

burnt mason
#

it's creating 0kb files again

wraith quail
#

Open the snapshot url in your browser directly, while watching the stream in Mainsail

#

Maybe it doesn't provide both endpoints at the same time

burnt mason
#

you are right, snapshot url goes to Error 404: Not found

wraith quail
#

Then try without watching the stream in Mainsail

burnt mason
#

still Error 404

#

so this is why people have python scripts to send frame capture commands to phones as ip cams...

wraith quail
#

timelapse is just a python script xD

burnt mason
#

huh

burnt mason
#

yes

#

I understand that

#

but my setup requires some extra work I did not know to give it?

wraith quail
#

If the ip cam app of you doesn't provide a snapshot endpoint, then yes

burnt mason
#

OH IT DOES! just a different link πŸ˜„

wraith quail
#

So everything working now?

burnt mason
#

hehe... added http:// back in

#

ignore the hazards.. but yes it works, thank you for pointing me in the right direction!

wraith quail
#

Then please close this post, if there are no further related questions

#

For completeness, as you only shared it on the klipper discord: http://your.i.p.here:8080/photo.jpg