[FFmpeg-user] ffprobe different outputs for file input and binary data input
Ming Tu
tuming16 at gmail.com
Wed Jun 10 00:00:56 EEST 2020
Hi,
I noticed the different outputs of ffprobe for file input and binary data
input.
ffprobe -v error -show_streams -print_format xml Y001BAQ9k3SU-140.mp4
Output:
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
<streams>
<stream index="0" codec_name="h264" codec_long_name="H.264 / AVC /
MPEG-4 AVC / MPEG-4 part 10" profile="Main" codec_type="video"
codec_time_base="1001/60000" codec_tag_string="avc1" codec_tag="0x31637661"
width="1280" height="720" coded_width="1280" coded_height="720"
has_b_frames="1" sample_aspect_ratio="1:1" display_aspect_ratio="16:9"
pix_fmt="yuv420p" level="31" color_range="tv" color_space="bt709"
color_transfer="bt709" color_primaries="bt709" chroma_location="left"
refs="1" is_avc="true" nal_length_size="4" r_frame_rate="30000/1001"
avg_frame_rate="30000/1001" time_base="1/90000" start_pts="3780"
start_time="0.042000" duration_ts="1015830" duration="11.287000"
bit_rate="1041887" bits_per_raw_sample="8" nb_frames="337">
<disposition default="1" dub="0" original="0" comment="0"
lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0"
clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="ISO Media file produced by
Google Inc. Created on: 12/09/2017."/>
</stream>
<stream index="1" codec_name="aac" codec_long_name="AAC (Advanced
Audio Coding)" profile="LC" codec_type="audio" codec_time_base="1/44100"
codec_tag_string="mp4a" codec_tag="0x6134706d" sample_fmt="fltp"
sample_rate="44100" channels="2" channel_layout="stereo"
bits_per_sample="0" r_frame_rate="0/0" avg_frame_rate="0/0"
time_base="1/44100" start_pts="0" start_time="0.000000"
duration_ts="495640" duration="11.239002" bit_rate="125667"
max_bit_rate="125667" nb_frames="484">
<disposition default="1" dub="0" original="0" comment="0"
lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0"
clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="ISO Media file produced by
Google Inc. Created on: 12/09/2017."/>
</stream>
</streams>
</ffprobe>
cat Y001BAQ9k3SU-140.mp4 | ffprobe -v error -show_streams -i pipe:
-print_format xml
<?xml version="1.0" encoding="UTF-8"?>
<ffprobe>
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d1d5959ae0] stream 1, offset 0x30: partial
file
<streams>
<stream index="0" codec_name="h264" codec_long_name="H.264 / AVC /
MPEG-4 AVC / MPEG-4 part 10" codec_type="video"
codec_time_base="1001/60000" codec_tag_string="avc1" codec_tag="0x31637661"
width="1280" height="720" coded_width="1280" coded_height="720"
has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="16:9"
level="-99" chroma_location="left" refs="1" is_avc="true"
nal_length_size="4" r_frame_rate="30000/1001" avg_frame_rate="30000/1001"
time_base="1/90000" duration_ts="1012050" duration="11.245000"
bit_rate="1041887" nb_frames="337">
<disposition default="1" dub="0" original="0" comment="0"
lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0"
clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="ISO Media file produced by
Google Inc. Created on: 12/09/2017."/>
</stream>
<stream index="1" codec_name="aac" codec_long_name="AAC (Advanced
Audio Coding)" codec_type="audio" codec_time_base="1/44100"
codec_tag_string="mp4a" codec_tag="0x6134706d" sample_fmt="fltp"
sample_rate="44100" channels="2" channel_layout="stereo"
bits_per_sample="0" r_frame_rate="0/0" avg_frame_rate="0/0"
time_base="1/44100" duration_ts="495905" duration="11.245011"
bit_rate="125667" max_bit_rate="125667" nb_frames="484">
<disposition default="1" dub="0" original="0" comment="0"
lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0"
clean_effects="0" attached_pic="0" timed_thumbnails="0"/>
<tag key="language" value="und"/>
<tag key="handler_name" value="ISO Media file produced by
Google Inc. Created on: 12/09/2017."/>
</stream>
</streams>
</ffprobe>
You can see there are some differences. The pix_fmt="yuv420p" is lost. And
because of this, if I send the same pipe input to ffmpeg, it gives me
errors:
cat Y001BAQ9k3SU-140.mp4 | ffmpeg -nostats -probesize 100M -analyzeduration
100M -i pipe: -s 456x256 -r 5 -f image2pipe -pix_fmt rgb24 -vcodec rawvideo
pipe:
And the error is
ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
configuration: --prefix=/usr --extra-version='1~deb9u1'
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libebur128 --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq
--enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2
--enable-libdc1394 --enable-libiec61883 --enable-chromaprint
--enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56129aff3f80] stream 1, offset 0x30: partial
file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56129aff3f80] Could not find codec parameters
for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1280x720, 1041 kb/s):
unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize'
options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Duration: 00:00:11.25, bitrate: N/A
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1280x720, 1041
kb/s, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on:
12/09/2017.
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 125 kb/s (default)
Metadata:
handler_name : ISO Media file produced by Google Inc. Created on:
12/09/2017.
[buffer @ 0x56129b00d060] Unable to parse option value "-1" as pixel format
Last message repeated 1 times
[buffer @ 0x56129b00d060] Error setting option pix_fmt to value -1.
[graph 0 input from stream 0:0 @ 0x56129b00cf60] Error applying options to
the filter.
Error opening filters!
Please check!
Thanks,
Ming
More information about the ffmpeg-user
mailing list