question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Support]: Http Api ffmpeg error : pipe:: Invalid data found when processing input

See original GitHub issue

Describe the problem you are having

Hello,

i’m trying to get a mp4 clip from timestamp with http APi. this api endpoint is not documented, but it is implemented in that file http.py

Here’s my call http://my-ip:5000/api/mast/start/1633672800/end/1633672920/clip.mp4

and the FFmpg error :

[2021-10-08 11:13:08] frigate.http                   ERROR   : ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-rkmpp --enable-libdrm --enable-v4l2_m2m --enable-neon --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  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
pipe:: Invalid data found when processing input

I’ve record in media path for that period.

Can we use that api point?

Any though about this error?

Kr,

Johan

Version

0.9.1-800F33E

Frigate config file

mqtt:
  host: my_ip
  user: mqtt_user
  password: ********
cameras:
  mast:
    ffmpeg:
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
      inputs:
        - path: rtsp://ipcam:8557/PSIA/Streaming/channels/2?videoCodecType=H.264
          roles:
            - detect
            - rtmp
            - record
    detect:
      width: 1280
      height: 720
    objects:
      track:
        - person
        - car
    record:
      enabled: True
    rtmp:
      enabled: True
    snapshots:
      enabled: True

Relevant log output

[2021-10-08 11:18:36] frigate.http                   ERROR   : ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-rkmpp --enable-libdrm --enable-v4l2_m2m --enable-neon --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
  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
pipe:: Invalid data found when processing input

FFprobe output from your camera

(* from another os *)

ffprobe version 4.3.2-0+deb11u2 Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --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-libmfx --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
[rtsp @ 0x55d0e7560a00] max delay reached. need to consume packet
[rtsp @ 0x55d0e7560a00] RTP: missed 4 packets
Input #0, rtsp, from 'rtsp://10.1.24.203:8557/PSIA/Streaming/channels/2?videoCodecType=H.264':
  Metadata:
    title           : RTSP/RTP stream from IPNC
    comment         : 2?videoCodecType=H.264
  Duration: N/A, start: 1.880000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc, progressive), 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc

Frigate stats

{"detection_fps":0.0,"detectors":{"cpu":{"detection_start":0.0,"inference_speed":131.86,"pid":217}},"mast":{"camera_fps":5.0,"capture_pid":223,"detection_fps":0.0,"pid":221,"process_fps":0.0,"skipped_fps":0.0},"service":{"storage":{"/dev/shm":{"free":1987.1,"mount_type":"tmpfs","total":1989.1,"used":2.0},"/media/frigate/clips":{"free":933051.7,"mount_type":"ext4","total":983358.5,"used":279.8},"/media/frigate/recordings":{"free":933051.7,"mount_type":"ext4","total":983358.5,"used":279.8},"/tmp/cache":{"free":1988.8,"mount_type":"tmpfs","total":1989.1,"used":0.3}},"uptime":82048,"version":"0.9.1-800f33e"}}

Operating system

HassOS

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

redvision RVX_IPNC

Any other information that may be helpful

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
blakeblackshearcommented, Oct 13, 2021

I would try using the VOD endpoints instead. That won’t require assembling a mp4 in cache and should work better.

0reactions
adminabcomtechcommented, Nov 4, 2021

Ok, i haven’t no retain in records, seem it’s now ok. I’ll close it, and sorry for disturbance

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipe:0: Invalid data found when processing input #15 - GitHub
The reason could be that ffmpeg does not understand the data you give it. Could be because the data is not actually a...
Read more >
FFmpeg "Pipe:0: Invalid data found when processing input ...
I've run into a problem when using FFmpeg to process TGA files into an MP4 file. This is a version of what I'm...
Read more >
ffmpeg pipe Invalid data found when processing input
The image file muxer writes video frames to image files, http://underpop.online.fr/f/ffmpeg/help/image2-1.htm.gz '-f', 'image2', ...
Read more >
ffmpeg - trascoding multiple streams from stdin errors out: pipe
I'm trying to transcode(below just copy) a/v streams from stdin and generate a thumbnail simultaneously. The issue that I get an error pipe:: ......
Read more >
ffmpeg exited with code 1: pipe:0 - Issuehunt
ffmpeg exited with code 1: pipe:0: Invalid data found when processing input #567 ... I used both example to try but I've got...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found