#10592 closed defect (invalid)

piped input partial file error

Reported by: Mark Owned by:
Priority: normal Component: undetermined
Version: 6.0 Keywords:
Cc: Mark Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

ffmpeg failes to read file from the piped input

ffmpeg -i - out.mp3 < in.mp4 # it works perfectly

cat in.mp4 | ffmpeg -i - out.mp3 # fails with the error below.

Why do I need it:
I'm trying to convert to pcm_s16le file while downloading it from the internet. And this is the simplest example to reproduce the issue. cat is the replacement of wget/curl.

How to reproduce:

% cat in.mp4 | ffmpeg -i - out.mp3
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
  built with Apple clang version 14.0.3 (clang-1403.0.22.14.1)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe6f5704b80] stream 0, offset 0x2c: partial file
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fd:':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf60.3.100
  Duration: 00:00:08.00, start: 0.000000, bitrate: N/A
  Stream #0:0[0x1](eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
    Metadata:
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fe6f5704b80] stream 0, offset 0x2c: partial file
Error demuxing input file 0: Invalid data found when processing input
fd:: Invalid data found when processing input
Output #0, mp3, to 'out.mp3':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    TSSE            : Lavf60.3.100
  Stream #0:0(eng): Audio: mp3, 48000 Hz, mono, fltp (default)
    Metadata:
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.3.100 libmp3lame
size=       0kB time=-577014:32:22.77 bitrate=N/A speed=N/A    ed=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)

Attachments (1)

piped_input_fail.mp4 (70.8 KB ) - added by Mark 14 months ago.

Download all attachments as: .zip

Change History (3)

by Mark, 14 months ago

Attachment: piped_input_fail.mp4 added

comment:1 by Elon Musk, 14 months ago

for mp4 one usually needs to seek to end and than to beginning and that can not work via pipe.
Not really ffmpeg fault but of mp4 file.

comment:2 by Elon Musk, 14 months ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.