ffprobe different outputs for file input and binary data input

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

ffprobe different outputs for file input and binary data input

Ming Tu
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
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Moritz Barsnick
On Tue, Jun 09, 2020 at 14:00:56 -0700, Ming Tu wrote:
> ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg developers

This version is (functionally) almost ancient. Could you please retry
with latest git? You can grab a static binary here:
https://johnvansickle.com/ffmpeg/
(Left column, git master.)

> [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

Did you try these options recommended here? (Even though I'm sure if
that was the problem, the other version of your comand wouldn't work
either.)

Cheers,
Moritz
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Ming Tu
"-probesize 100M -analyzeduration 100M " these options are from others'
suggestions but they won't work.

I will try the latest version.

Thanks,
Ming

On Tue, Jun 9, 2020 at 3:13 PM Moritz Barsnick <[hidden email]> wrote:

> On Tue, Jun 09, 2020 at 14:00:56 -0700, Ming Tu wrote:
> > ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg
> developers
>
> This version is (functionally) almost ancient. Could you please retry
> with latest git? You can grab a static binary here:
> https://johnvansickle.com/ffmpeg/
> (Left column, git master.)
>
> > [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
>
> Did you try these options recommended here? (Even though I'm sure if
> that was the problem, the other version of your comand wouldn't work
> either.)
>
> Cheers,
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Ming Tu
Updated to newest version but still has errors, different from before

ffmpeg version 4.2.3-static https://johnvansickle.com/ffmpeg/ Copyright (c)
2000-2020 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static
--disable-debug --disable-ffplay --disable-indev=sndio
--disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom
--enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libopenjpeg --enable-librubberband --enable-libsoxr
--enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus
--enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi
--enable-libzimg
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x63fc900] stream 1, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x63fc900] 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, start: 0.000000, 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
.
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x63fc900] stream 0, offset 0x19a: partial file
pipe:: Invalid data found when processing input
Cannot determine format of input stream 0:0 after EOF
Error marking filters as finished
Conversion failed!

On Tue, Jun 9, 2020 at 4:20 PM Ming Tu <[hidden email]> wrote:

> "-probesize 100M -analyzeduration 100M " these options are from others'
> suggestions but they won't work.
>
> I will try the latest version.
>
> Thanks,
> Ming
>
> On Tue, Jun 9, 2020 at 3:13 PM Moritz Barsnick <[hidden email]> wrote:
>
>> On Tue, Jun 09, 2020 at 14:00:56 -0700, Ming Tu wrote:
>> > ffmpeg version 3.2.14-1~deb9u1 Copyright (c) 2000-2019 the FFmpeg
>> developers
>>
>> This version is (functionally) almost ancient. Could you please retry
>> with latest git? You can grab a static binary here:
>> https://johnvansickle.com/ffmpeg/
>> (Left column, git master.)
>>
>> > [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
>>
>> Did you try these options recommended here? (Even though I'm sure if
>> that was the problem, the other version of your comand wouldn't work
>> either.)
>>
>> Cheers,
>> Moritz
>> _______________________________________________
>> ffmpeg-user mailing list
>> [hidden email]
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>
>> To unsubscribe, visit link above, or email
>> [hidden email] with subject "unsubscribe".
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Nicolas George
In reply to this post by Ming Tu
Ming Tu (12020-06-09):
> cat Y001BAQ9k3SU-140.mp4 |

A lot of MP4 files require reading something at the end first. It cannot
work if the file is not seekable. Try to apply qt-faststart to see if it
helps.

Regards,

--
  Nicolas George

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Carl Zwanzig
In reply to this post by Ming Tu
On 6/9/2020 4:56 PM, Ming Tu wrote:
> Updated to newest version but still has errors, different from before
>
> ffmpeg version 4.2.3-statichttps://johnvansickle.com/ffmpeg/  Copyright (c)
> 2000-2020 the FFmpeg developers
> built with gcc 8 (Debian 8.3.0-6)

You cut the command line, don't do that even if it's the same as the last time.

Also, do not top-post on this mailing list.

z!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Ming Tu
I solved it by ffmpeg -i no_streamable.mp4 -movflags faststart -f mp4 -y
streamable.mp4 according to
https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/823

Thanks all for the suggestions!

On Wed, Jun 10, 2020 at 9:13 AM Carl Zwanzig <[hidden email]> wrote:

> On 6/9/2020 4:56 PM, Ming Tu wrote:
> > Updated to newest version but still has errors, different from before
> >
> > ffmpeg version 4.2.3-statichttps://johnvansickle.com/ffmpeg/  Copyright
> (c)
> > 2000-2020 the FFmpeg developers
> > built with gcc 8 (Debian 8.3.0-6)
>
> You cut the command line, don't do that even if it's the same as the last
> time.
>
> Also, do not top-post on this mailing list.
>
> z!
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: ffprobe different outputs for file input and binary data input

Gyan Doshi-2


On 10-06-2020 10:35 pm, Ming Tu wrote:
> I solved it by ffmpeg -i no_streamable.mp4 -movflags faststart -f mp4 -y
> streamable.mp4 according to
> https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/823
>
> Thanks all for the suggestions!

You'll usually want to add    -c copy    to avoid re-encoding.

And maybe    -map 0    to make sure all input streams are carried over.
But some proprietary data streams won't be correctly described in the
output file.


Gyan
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".