Opened 3 years ago

Closed 2 years ago

#5001 closed defect (needs_more_info)

stream_type video option "V" not respected in ffmpeg but is in ffprobe

Reported by: macman104 Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I hope I have provided the proper information, this is my first time submitting a bug (at least it seems like a bug). If I have erred in some way, please let me know and I will correct it as quick as possible.

Summary of the bug: Trying to use the capital V option for a stream_type is not respected in ffmpeg, when it appears to function correctly on the same video if I check with ffprobe

How to reproduce:
I have some videos to convert from h264 to h265, I used the following command
ffmpeg -i filename.mkv -map 0 -c copy -c:v libx265 265_filename.mkv

However, recently, I have some files that have mpjeg streams for cover art. They are picked up as video to be converted, which causes an error (and if I use -strict experimental which muscles through it, my video player does not read the file properly)

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (h264 (native) -> hevc (libx265))
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (mjpeg (native) -> hevc (libx265))
  Stream #0:4 -> #0:4 (mjpeg (native) -> hevc (libx265))
  Stream #0:5 -> #0:5 (mjpeg (native) -> hevc (libx265))
  Stream #0:6 -> #0:6 (mjpeg (native) -> hevc (libx265))

So, I thought I would use -c:V instead of -c:v, which according to the documentation v’ matches all video streams, ’V’ only matches video streams which are not attached pictures, video thumbnails or cover arts.

I tested this with ffprobe, with little v, it correctly shows all the streams:

ffprobe -v error -show_entries "stream=codec_name" -select_streams v filename.mkv
[STREAM]
codec_name=h264
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]

And switching to using capital V, correctly shows only the one stream

ffprobe -v error -show_entries "stream=codec_name" -select_streams V filename.mkv
[STREAM]
codec_name=h264
[/STREAM]

However, when I carry this convention over to ffmpeg with:
ffmpeg -i filename.mkv -map 0 -c copy -c:V libx265 265_filename.mkv

It gives the exact same behavior as the lowercase v option, and again tries to convert all the "video" streams (including the mpjeg), not just the H264 stream like the ffprobe command does.

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (h264 (native) -> hevc (libx265))
  Stream #0:2 -> #0:2 (copy)
  Stream #0:3 -> #0:3 (mjpeg (native) -> hevc (libx265))
  Stream #0:4 -> #0:4 (mjpeg (native) -> hevc (libx265))
  Stream #0:5 -> #0:5 (mjpeg (native) -> hevc (libx265))
  Stream #0:6 -> #0:6 (mjpeg (native) -> hevc (libx265))

I admit I know very little about how ffmpeg operates, but it seems like a bug only based on the fact that ffprobe reads this stream_type correctly, while ffmpeg does not honor this stream_type it seems.

This is just the windows Zeranoe build found here
http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20151105-git-c878082-win64-static.7z
ffmpeg version N-76479-gc878082
built with gcc 5.2.0

The directions for bug reporting I found here also seem to have asked me to provide this rather large chunk of text as well

Z:\Media\Transfers\TV\H265\test>ffmpeg -v 9 -loglevel 99 -i "AmerH503 - Mommy.mkv"
ffmpeg version N-76479-gc878082 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --e
nable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-li
bass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libf
reetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libm
p3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable
-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --en
able-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libv
o-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-deckli
nk --enable-zlib
  libavutil      55.  5.100 / 55.  5.100
  libavcodec     57. 14.100 / 57. 14.100
  libavformat    57. 14.100 / 57. 14.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 14.101 /  6. 14.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argum
ent '99'.
Reading option '-i' ... matched as input file with argument 'AmerH503 - Mommy.mkv'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file AmerH503 - Mommy.mkv.
Successfully parsed a group of options.
Opening an input file: AmerH503 - Mommy.mkv.
Probing matroska,webm score:100 size:2048
[matroska,webm @ 00000077f122a400] Format matroska,webm probed with size=2048 and score=10
0
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
st:2 removing common factor 1000000 from timebase
[matroska,webm @ 00000077f122a400] Before avformat_find_stream_info() pos: 5627 bytes read
:127650 seeks:4
[mjpeg @ 00000077f1232f60] marker=d8 avail_size_in_buf=5035
[mjpeg @ 00000077f1232f60] marker parser used 0 bytes (0 bits)
[mjpeg @ 00000077f1232f60] marker=e1 avail_size_in_buf=5033
[mjpeg @ 00000077f1232f60] marker parser used 23 bytes (184 bits)
[mjpeg @ 00000077f1232f60] marker=ec avail_size_in_buf=5007
[mjpeg @ 00000077f1232f60] marker parser used 16 bytes (128 bits)
[mjpeg @ 00000077f1232f60] marker=ee avail_size_in_buf=4988
[mjpeg @ 00000077f1232f60] marker parser used 14 bytes (112 bits)
[mjpeg @ 00000077f1232f60] marker=db avail_size_in_buf=4972
[mjpeg @ 00000077f1232f60] index=0
[mjpeg @ 00000077f1232f60] qscale[0]: 0
[mjpeg @ 00000077f1232f60] index=1
[mjpeg @ 00000077f1232f60] qscale[1]: 0
[mjpeg @ 00000077f1232f60] marker parser used 132 bytes (1056 bits)
[mjpeg @ 00000077f1232f60] marker=c0 avail_size_in_buf=4838
[mjpeg @ 00000077f1232f60] Changeing bps to 8
[mjpeg @ 00000077f1232f60] sof0: picture: 120x176
[mjpeg @ 00000077f1232f60] component 0 1:1 id: 0 quant:0
[mjpeg @ 00000077f1232f60] component 1 1:1 id: 1 quant:1
[mjpeg @ 00000077f1232f60] component 2 1:1 id: 2 quant:1
[mjpeg @ 00000077f1232f60] pix fmt id 11111100
[mjpeg @ 00000077f1232f60] marker parser used 17 bytes (136 bits)
[mjpeg @ 00000077f1232f60] marker=c4 avail_size_in_buf=4819
[mjpeg @ 00000077f1232f60] class=0 index=0 nb_codes=12
[mjpeg @ 00000077f1232f60] class=0 index=1 nb_codes=9
[mjpeg @ 00000077f1232f60] class=1 index=0 nb_codes=51
[mjpeg @ 00000077f1232f60] class=1 index=1 nb_codes=114
[mjpeg @ 00000077f1232f60] marker parser used 138 bytes (1104 bits)
[mjpeg @ 00000077f1232f60] escaping removed 17 bytes
[mjpeg @ 00000077f1232f60] marker=da avail_size_in_buf=4679
[mjpeg @ 00000077f1232f60] component: 0
[mjpeg @ 00000077f1232f60] component: 1
[mjpeg @ 00000077f1232f60] component: 2
[mjpeg @ 00000077f1232f60] marker parser used 4661 bytes (37286 bits)
[mjpeg @ 00000077f1232f60] marker=d9 avail_size_in_buf=0
[mjpeg @ 00000077f1232f60] decode frame unused 0 bytes
[mjpeg @ 00000077f1249740] marker=d8 avail_size_in_buf=23752
[mjpeg @ 00000077f1249740] marker parser used 0 bytes (0 bits)
[mjpeg @ 00000077f1249740] marker=e1 avail_size_in_buf=23750
[mjpeg @ 00000077f1249740] marker parser used 23 bytes (184 bits)
[mjpeg @ 00000077f1249740] marker=ec avail_size_in_buf=23724
[mjpeg @ 00000077f1249740] marker parser used 16 bytes (128 bits)
[mjpeg @ 00000077f1249740] marker=ee avail_size_in_buf=23705
[mjpeg @ 00000077f1249740] marker parser used 14 bytes (112 bits)
[mjpeg @ 00000077f1249740] marker=db avail_size_in_buf=23689
[mjpeg @ 00000077f1249740] index=0
[mjpeg @ 00000077f1249740] qscale[0]: 0
[mjpeg @ 00000077f1249740] index=1
[mjpeg @ 00000077f1249740] qscale[1]: 0
[mjpeg @ 00000077f1249740] marker parser used 132 bytes (1056 bits)
[mjpeg @ 00000077f1249740] marker=c0 avail_size_in_buf=23555
[mjpeg @ 00000077f1249740] Changeing bps to 8
[mjpeg @ 00000077f1249740] sof0: picture: 600x882
[mjpeg @ 00000077f1249740] component 0 1:1 id: 0 quant:0
[mjpeg @ 00000077f1249740] component 1 1:1 id: 1 quant:1
[mjpeg @ 00000077f1249740] component 2 1:1 id: 2 quant:1
[mjpeg @ 00000077f1249740] pix fmt id 11111100
[mjpeg @ 00000077f1249740] marker parser used 17 bytes (136 bits)
[mjpeg @ 00000077f1249740] marker=c4 avail_size_in_buf=23536
[mjpeg @ 00000077f1249740] class=0 index=0 nb_codes=12
[mjpeg @ 00000077f1249740] class=0 index=1 nb_codes=10
[mjpeg @ 00000077f1249740] class=1 index=0 nb_codes=216
[mjpeg @ 00000077f1249740] class=1 index=1 nb_codes=226
[mjpeg @ 00000077f1249740] marker parser used 197 bytes (1576 bits)
[mjpeg @ 00000077f1249740] escaping removed 102 bytes
[mjpeg @ 00000077f1249740] marker=da avail_size_in_buf=23337
[mjpeg @ 00000077f1249740] component: 0
[mjpeg @ 00000077f1249740] component: 1
[mjpeg @ 00000077f1249740] component: 2
[mjpeg @ 00000077f1249740] marker parser used 23234 bytes (185872 bits)
[mjpeg @ 00000077f1249740] marker=d9 avail_size_in_buf=0
[mjpeg @ 00000077f1249740] decode frame unused 0 bytes
[mjpeg @ 00000077f124fde0] marker=d8 avail_size_in_buf=24550
[mjpeg @ 00000077f124fde0] marker parser used 0 bytes (0 bits)
[mjpeg @ 00000077f124fde0] marker=e1 avail_size_in_buf=24548
[mjpeg @ 00000077f124fde0] marker parser used 23 bytes (184 bits)
[mjpeg @ 00000077f124fde0] marker=ec avail_size_in_buf=24522
[mjpeg @ 00000077f124fde0] marker parser used 16 bytes (128 bits)
[mjpeg @ 00000077f124fde0] marker=ed avail_size_in_buf=24503
[mjpeg @ 00000077f124fde0] marker parser used 43 bytes (344 bits)
[mjpeg @ 00000077f124fde0] marker=ee avail_size_in_buf=24457
[mjpeg @ 00000077f124fde0] marker parser used 14 bytes (112 bits)
[mjpeg @ 00000077f124fde0] marker=db avail_size_in_buf=24441
[mjpeg @ 00000077f124fde0] index=0
[mjpeg @ 00000077f124fde0] qscale[0]: 0
[mjpeg @ 00000077f124fde0] index=1
[mjpeg @ 00000077f124fde0] qscale[1]: 0
[mjpeg @ 00000077f124fde0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 00000077f124fde0] marker=c0 avail_size_in_buf=24307
[mjpeg @ 00000077f124fde0] Changeing bps to 8
[mjpeg @ 00000077f124fde0] sof0: picture: 1067x600
[mjpeg @ 00000077f124fde0] component 0 1:1 id: 0 quant:0
[mjpeg @ 00000077f124fde0] component 1 1:1 id: 1 quant:1
[mjpeg @ 00000077f124fde0] component 2 1:1 id: 2 quant:1
[mjpeg @ 00000077f124fde0] pix fmt id 11111100
[mjpeg @ 00000077f124fde0] marker parser used 17 bytes (136 bits)
[mjpeg @ 00000077f124fde0] marker=c4 avail_size_in_buf=24288
[mjpeg @ 00000077f124fde0] class=0 index=0 nb_codes=12
[mjpeg @ 00000077f124fde0] class=0 index=1 nb_codes=10
[mjpeg @ 00000077f124fde0] class=1 index=0 nb_codes=217
[mjpeg @ 00000077f124fde0] class=1 index=1 nb_codes=211
[mjpeg @ 00000077f124fde0] marker parser used 199 bytes (1592 bits)
[mjpeg @ 00000077f124fde0] escaping removed 91 bytes
[mjpeg @ 00000077f124fde0] marker=da avail_size_in_buf=24087
[mjpeg @ 00000077f124fde0] component: 0
[mjpeg @ 00000077f124fde0] component: 1
[mjpeg @ 00000077f124fde0] component: 2
[mjpeg @ 00000077f124fde0] marker parser used 23995 bytes (191958 bits)
[mjpeg @ 00000077f124fde0] marker=d9 avail_size_in_buf=0
[mjpeg @ 00000077f124fde0] decode frame unused 0 bytes
[mjpeg @ 00000077f12567a0] marker=d8 avail_size_in_buf=8560
[mjpeg @ 00000077f12567a0] marker parser used 0 bytes (0 bits)
[mjpeg @ 00000077f12567a0] marker=e1 avail_size_in_buf=8558
[mjpeg @ 00000077f12567a0] marker parser used 23 bytes (184 bits)
[mjpeg @ 00000077f12567a0] marker=ec avail_size_in_buf=8532
[mjpeg @ 00000077f12567a0] marker parser used 16 bytes (128 bits)
[mjpeg @ 00000077f12567a0] marker=ed avail_size_in_buf=8513
[mjpeg @ 00000077f12567a0] marker parser used 43 bytes (344 bits)
[mjpeg @ 00000077f12567a0] marker=ee avail_size_in_buf=8467
[mjpeg @ 00000077f12567a0] marker parser used 14 bytes (112 bits)
[mjpeg @ 00000077f12567a0] marker=db avail_size_in_buf=8451
[mjpeg @ 00000077f12567a0] index=0
[mjpeg @ 00000077f12567a0] qscale[0]: 0
[mjpeg @ 00000077f12567a0] index=1
[mjpeg @ 00000077f12567a0] qscale[1]: 0
[mjpeg @ 00000077f12567a0] marker parser used 132 bytes (1056 bits)
[mjpeg @ 00000077f12567a0] marker=c0 avail_size_in_buf=8317
[mjpeg @ 00000077f12567a0] Changeing bps to 8
[mjpeg @ 00000077f12567a0] sof0: picture: 213x120
[mjpeg @ 00000077f12567a0] component 0 1:1 id: 0 quant:0
[mjpeg @ 00000077f12567a0] component 1 1:1 id: 1 quant:1
[mjpeg @ 00000077f12567a0] component 2 1:1 id: 2 quant:1
[mjpeg @ 00000077f12567a0] pix fmt id 11111100
[mjpeg @ 00000077f12567a0] marker parser used 17 bytes (136 bits)
[mjpeg @ 00000077f12567a0] marker=c4 avail_size_in_buf=8298
[mjpeg @ 00000077f12567a0] class=0 index=0 nb_codes=12
[mjpeg @ 00000077f12567a0] class=0 index=1 nb_codes=9
[mjpeg @ 00000077f12567a0] class=1 index=0 nb_codes=162
[mjpeg @ 00000077f12567a0] class=1 index=1 nb_codes=179
[mjpeg @ 00000077f12567a0] marker parser used 160 bytes (1280 bits)
[mjpeg @ 00000077f12567a0] escaping removed 28 bytes
[mjpeg @ 00000077f12567a0] marker=da avail_size_in_buf=8136
[mjpeg @ 00000077f12567a0] component: 0
[mjpeg @ 00000077f12567a0] component: 1
[mjpeg @ 00000077f12567a0] component: 2
[mjpeg @ 00000077f12567a0] marker parser used 8107 bytes (64855 bits)
[mjpeg @ 00000077f12567a0] marker=d9 avail_size_in_buf=0
[mjpeg @ 00000077f12567a0] decode frame unused 0 bytes
[h264 @ 00000077f1247440] user data:"?"
    Last message repeated 1 times
[h264 @ 00000077f1247440] user data:"?Çwxxxxxxxxxxxxxx"
[h264 @ 00000077f1247440] user data:"?ÇOOOOOOOOOOOOOOO"
[h264 @ 00000077f1247440] Increasing reorder buffer to 1
[h264 @ 00000077f1247440] no picture
[h264 @ 00000077f1247440] user data:"?Ç"
[h264 @ 00000077f1247440] user data:"?ÇPPPPPPPPPPPPPPP"
[h264 @ 00000077f1247440] user data:"?Ç"
    Last message repeated 2 times
[h264 @ 00000077f1247440] user data:"?ÇRRRRRRRRRRRRRRR"
[h264 @ 00000077f1247440] user data:"?Ç"
[h264 @ 00000077f1247440] user data:"?Çooooooooooooooo"
[h264 @ 00000077f1247440] user data:"?Ç"
    Last message repeated 6 times
[matroska,webm @ 00000077f122a400] first_dts 333 not matching first dts NOPTS (pts 41, dur
ation 41) in the queue
[h264 @ 00000077f1247440] user data:"?Ç"
    Last message repeated 74 times
[h264 @ 00000077f1247440] user data:"?"
[h264 @ 00000077f1247440] user data:"?Ç_''''''''''''''"
[h264 @ 00000077f1247440] user data:"?Çröööööööööööööö"
[h264 @ 00000077f1247440] user data:"?Çx??????????????"
[h264 @ 00000077f1247440] user data:"?Ç}»»»»»»»»»»»»»»"
[h264 @ 00000077f1247440] user data:"?Ç∙ïïïïïïïïïïïïïï"
[h264 @ 00000077f1247440] user data:"?Ç[°°°°°°°°°°°°°°"
[h264 @ 00000077f1247440] user data:"?Ç 55555555555555"
[h264 @ 00000077f1247440] user data:"?Ç░∞∞∞∞∞∞∞∞∞∞∞∞∞∞"
[h264 @ 00000077f1247440] user data:"?Ç╝^^^^^^^^^^^^^^"
[h264 @ 00000077f1247440] user data:"?Ç╪││││││││││││││"
[h264 @ 00000077f1247440] user data:"?Ç∩┬┬┬┬┬┬┬┬┬┬┬┬┬┬"
[h264 @ 00000077f1247440] user data:"?Ç╡▀▀▀▀▀▀▀▀▀▀▀▀▀▀"
[h264 @ 00000077f1247440] user data:"?÷÷÷÷÷÷÷÷÷÷÷÷÷÷"
[h264 @ 00000077f1247440] "ser data:"?ÇÑ
[h264 @ 00000077f1247440] user data:"?Ç♂WWWWWWWWWWWWWW"
[h264 @ 00000077f1247440] user data:"?Çóìììììììììììììì"
[h264 @ 00000077f1247440] user data:"?Çhàààààààààààààà"
[h264 @ 00000077f1247440] user data:"?Ç≥bbbbbbbbbbbbbb"
[h264 @ 00000077f1247440] user data:"?ÇΦƒƒƒƒƒƒƒƒƒƒƒƒƒƒ"
[h264 @ 00000077f1247440] user data:"?ÇΩ├├├├├├├├├├├├├├"
[h264 @ 00000077f1247440] user data:"?Çi╘╘╘╘╘╘╘╘╘╘╘╘╘╘"
[h264 @ 00000077f1247440] user data:"?Ç≥êêêêêêêêêêêêêê"
[h264 @ 00000077f1247440] user data:"?Ç╧┤┤┤┤┤┤┤┤┤┤┤┤┤┤"
[h264 @ 00000077f1247440] user data:"?Çñ╣╣╣╣╣╣╣╣╣╣╣╣╣╣"
[h264 @ 00000077f1247440] user data:"?Çcoooooooooooooo"
[h264 @ 00000077f1247440] user data:"?ÇÅ22222222222222"
[h264 @ 00000077f1247440] user data:"?Ç╕??????????????"
[h264 @ 00000077f1247440] user data:"?ⁿⁿⁿⁿⁿⁿⁿⁿⁿⁿⁿⁿⁿⁿ"
[h264 @ 00000077f1247440] user data:"?Ç┬=============="
[h264 @ 00000077f1247440] user data:"?Ç0ΓΓΓΓΓΓΓΓΓΓΓΓΓΓ"
[matroska,webm @ 00000077f122a400] max_analyze_duration 5000000 reached at 5024000 microse
conds st:2
[matroska,webm @ 00000077f122a400] 0: start_time: 0.003 duration: -9223372036854.775
[matroska,webm @ 00000077f122a400] 1: start_time: 0.000 duration: -9223372036854.775
[matroska,webm @ 00000077f122a400] 2: start_time: 0.000 duration: -9223372036854.775
[matroska,webm @ 00000077f122a400] 3: start_time: 0.002 duration: 286.920
[matroska,webm @ 00000077f122a400] 4: start_time: 0.002 duration: 286.920
[matroska,webm @ 00000077f122a400] 5: start_time: 0.002 duration: 286.920
[matroska,webm @ 00000077f122a400] 6: start_time: 0.002 duration: 286.920
[matroska,webm @ 00000077f122a400] stream: start_time: 0.025 duration: 3187.996 bitrate=52
30 kb/s
[matroska,webm @ 00000077f122a400] After avformat_find_stream_info() pos: 884191 bytes rea
d:1007545 seeks:4 frames:281
Input #0, matroska,webm, from 'AmerH503 - Mommy.mkv':
  Metadata:
    encoder         : libebml v1.3.1 + libmatroska v1.4.2
    creation_time   : 2015-10-22 11:54:31
    Encoded/Released by: B@BTN/HDB
  Duration: 00:53:08.00, start: 0.025000, bitrate: 5230 kb/s
    Stream #0:0(eng), 1, 1/1000: Subtitle: subrip (default)
    Stream #0:1(eng), 117, 1/1000: Video: h264 (High), 4 reference frames, yuv420p(tv, bt7
09, topleft), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 1/2000, 23.98 fps, 23.98 tbr, 1k t
bn, 2k tbc (default)
    Stream #0:2(eng), 159, 1/1000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (defaul
t)
    Stream #0:3, 1, 1/90000: Video: mjpeg, 1 reference frame, yuvj444p(pc, bt470bg/unknown
/unknown, center), 120x176, 1/90000, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      filename        : small_cover.jpg
      mimetype        : image/jpeg
    Stream #0:4, 1, 1/90000: Video: mjpeg, 1 reference frame, yuvj444p(pc, bt470bg/unknown
/unknown, center), 600x882, 1/90000, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      filename        : cover.jpg
      mimetype        : image/jpeg
    Stream #0:5, 1, 1/90000: Video: mjpeg, 1 reference frame, yuvj444p(pc, bt470bg/unknown
/unknown, center), 1067x600, 1/90000, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      filename        : cover_land.jpg
      mimetype        : image/jpeg
    Stream #0:6, 1, 1/90000: Video: mjpeg, 1 reference frame, yuvj444p(pc, bt470bg/unknown
/unknown, center), 213x120, 1/90000, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      filename        : small_cover_land.jpg
      mimetype        : image/jpeg
Successfully opened the file.
At least one output file must be specified
[AVIOContext @ 00000077f12334c0] Statistics: 1007545 bytes read, 4 seeks



Attachments (1)

short-mjpeg-ffmpeg-error.mkv (93.8 KB) - added by macman104 3 years ago.
Video file that can be used to demonstrate the issue mentioned in this ticket

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by macman104

Video file that can be used to demonstrate the issue mentioned in this ticket

comment:1 in reply to: ↑ description Changed 2 years ago by cehoyos

  • Keywords ffmpeg stream_type video removed
  • Resolution set to needs_more_info
  • Status changed from new to closed

Replying to macman104:

And switching to using capital V, correctly shows only the one stream

ffprobe -v error -show_entries "stream=codec_name" -select_streams V filename.mkv
[STREAM]
codec_name=h264
[/STREAM]

I cannot reproduce this:

$ ffprobe -show_entries "stream=codec_name" -select_streams V short-mjpeg-ffmpeg-error.mkv
ffprobe version N-76479-gc878082 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55.  5.100 / 55.  5.100
  libavcodec     57. 14.100 / 57. 14.100
  libavformat    57. 14.100 / 57. 14.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 14.101 /  6. 14.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
[mjpeg @ 0x326f140] Changeing bps to 8
[mjpeg @ 0x326f900] Changeing bps to 8
[mjpeg @ 0x3270180] Changeing bps to 8
[mjpeg @ 0x3270a00] Changeing bps to 8
Input #0, matroska,webm, from 'short-mjpeg-ffmpeg-error.mkv':
  Metadata:
    ENCODER         : Lavf57.14.100
  Duration: 00:00:00.54, start: 0.000000, bitrate: 1417 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709), 1916x1076 [SAR 1:1 DAR 479:269], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Metadata:
      BPS             : 5026690
      BPS-eng         : 5026690
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION-eng    : 00:19:07.565000000
      NUMBER_OF_FRAMES: 27514
      NUMBER_OF_FRAMES-eng: 27514
      NUMBER_OF_BYTES : 721056690
      NUMBER_OF_BYTES-eng: 721056690
      _STATISTICS_WRITING_APP: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2015-10-29 01:22:49
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-10-29 01:22:49
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:00:00.542000000
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      BPS             : 384000
      BPS-eng         : 384000
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION-eng    : 00:19:07.552000000
      NUMBER_OF_FRAMES: 35861
      NUMBER_OF_FRAMES-eng: 35861
      NUMBER_OF_BYTES : 55082496
      NUMBER_OF_BYTES-eng: 55082496
      _STATISTICS_WRITING_APP: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2015-10-29 01:22:49
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-10-29 01:22:49
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:00:00.512000000
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      BPS             : 139
      BPS-eng         : 139
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION-eng    : 00:18:33.410000000
      NUMBER_OF_FRAMES: 457
      NUMBER_OF_FRAMES-eng: 457
      NUMBER_OF_BYTES : 19481
      NUMBER_OF_BYTES-eng: 19481
      _STATISTICS_WRITING_APP: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2015-10-29 01:22:49
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-10-29 01:22:49
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:00:00.000000000
    Stream #0:3: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 120x176, SAR 1:1 DAR 15:22, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : small_cover.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
    Stream #0:4: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 600x882, SAR 1:1 DAR 100:147, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : cover.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
    Stream #0:5: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1067x600, SAR 1:1 DAR 1067:600, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : cover_land.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
    Stream #0:6: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 213x120, SAR 1:1 DAR 71:40, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : small_cover_land.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
[STREAM]
codec_name=h264
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
$ ffprobe -show_entries "stream=codec_name" -select_streams V short-mjpeg-ffmpeg-error.mkv
ffprobe version N-83174-gcab0f3a Copyright (c) 2007-2017 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 74.100 / 57. 74.100
  libavformat    57. 62.100 / 57. 62.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 69.100 /  6. 69.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, matroska,webm, from 'short-mjpeg-ffmpeg-error.mkv':
  Metadata:
    ENCODER         : Lavf57.14.100
  Duration: 00:00:00.54, start: 0.000000, bitrate: 1417 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1916x1076 [SAR 1:1 DAR 479:269], 23.98 fps, 23.98 tbr, 1k tbn, 2k tbc (default)
    Metadata:
      BPS             : 5026690
      BPS-eng         : 5026690
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION-eng    : 00:19:07.565000000
      NUMBER_OF_FRAMES: 27514
      NUMBER_OF_FRAMES-eng: 27514
      NUMBER_OF_BYTES : 721056690
      NUMBER_OF_BYTES-eng: 721056690
      _STATISTICS_WRITING_APP: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2015-10-29 01:22:49
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-10-29 01:22:49
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:00:00.542000000
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      BPS             : 384000
      BPS-eng         : 384000
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION-eng    : 00:19:07.552000000
      NUMBER_OF_FRAMES: 35861
      NUMBER_OF_FRAMES-eng: 35861
      NUMBER_OF_BYTES : 55082496
      NUMBER_OF_BYTES-eng: 55082496
      _STATISTICS_WRITING_APP: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2015-10-29 01:22:49
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-10-29 01:22:49
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:00:00.512000000
    Stream #0:2(eng): Subtitle: subrip
    Metadata:
      BPS             : 139
      BPS-eng         : 139
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION-eng    : 00:18:33.410000000
      NUMBER_OF_FRAMES: 457
      NUMBER_OF_FRAMES-eng: 457
      NUMBER_OF_BYTES : 19481
      NUMBER_OF_BYTES-eng: 19481
      _STATISTICS_WRITING_APP: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.5.0 ('Vanishing Act') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2015-10-29 01:22:49
      _STATISTICS_WRITING_DATE_UTC-eng: 2015-10-29 01:22:49
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      DURATION        : 00:00:00.000000000
    Stream #0:3: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 120x176, SAR 1:1 DAR 15:22, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : small_cover.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
    Stream #0:4: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 600x882, SAR 1:1 DAR 100:147, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : cover.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
    Stream #0:5: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1067x600, SAR 1:1 DAR 1067:600, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : cover_land.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
    Stream #0:6: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 213x120, SAR 1:1 DAR 71:40, 30k fps, 1k tbr, 1k tbn, 1k tbc
    Metadata:
      FILENAME        : small_cover_land.jpg
      MIMETYPE        : image/jpeg
      DURATION        : 00:00:00.000000000
[STREAM]
codec_name=h264
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
[STREAM]
codec_name=mjpeg
[/STREAM]
Note: See TracTickets for help on using tickets.