ffprobe
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| ffprobe [2016-03-27 15:11:50] – angelegt manfred | ffprobe [2024-05-12 22:14:11] (aktuell) – [ffprobe] manfred | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== ffprobe ====== | ||
| + | |||
| + | * [[http:// | ||
| + | |||
| + | > ffprobe -v error -show_format -i Film.mkv | ||
| + | > ffprobe -v error -show_packets -i Film.mkv | ||
| + | > ffprobe -v error -show_streams -i Film.mkv | ||
| + | | ||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_entries stream=codec_type -of default=noprint_wrappers=1 -i Film.mkv | ||
| + | |||
| + | **Zum auslesen der Video-Eigenschaften ist [[mediainfo]] deutlich besser geeignet! Es kann auch den Scan-Type (// | ||
| + | |||
| + | |||
| + | ===== Video-Eigenschaften auslesen ===== | ||
| + | |||
| + | Die wichtigsten Infos kann man mit diesem Kommando auslesen: | ||
| + | ffprobe Film.wmv | ||
| + | ... | ||
| + | Duration: 00: | ||
| + | Stream #0.0(heb): Audio: wmav2, 22050 Hz, 1 channels, s16, 16 kb/s | ||
| + | Stream #0.1(heb): Video: wmv3 (Main), yuv420p, 640x480, 413 kb/s, 20 tbr, 1k tbn, 1k tbc | ||
| + | |||
| + | Manchmal wird direkt vor " | ||
| + | |||
| + | FFmpeg verwendet drei verschiedene Zeitangaben: | ||
| + | * http:// | ||
| + | * http:// | ||
| + | |||
| + | tbn = the time base in AVStream that has come from the container | ||
| + | tbc = the time base in AVCodecContext for the codec used for a particular stream | ||
| + | tbr = tbr is guessed from the video stream and is the value users want to see when they look for the video frame rate | ||
| + | |||
| + | 25 fps - Bilder/ | ||
| + | 25 tbr - geratene Bildwiederholrate des Datenstromes | ||
| + | 90k tbn - Zeitbasis des AV-Kontainers | ||
| + | 50 tbc - Zeitbasis im AV-Kodec-Kontext | ||
| + | |||
| + | **Also ist die Angabe " | ||
| + | |||
| + | Man kann sich die Infos auch in einem anderen Format ausgeben lassen. | ||
| + | Eines, welches besser maschinenlesbar ist: | ||
| + | > ffprobe -i Film.wmv -show_streams 2>/ | ||
| + | [STREAM] | ||
| + | index=0 | ||
| + | codec_name=wmav2 | ||
| + | codec_long_name=Windows Media Audio 2 | ||
| + | codec_type=audio | ||
| + | codec_time_base=0/ | ||
| + | codec_tag_string=a[1][0][0] | ||
| + | codec_tag=0x0161 | ||
| + | sample_rate=22050.000000 | ||
| + | channels=1 | ||
| + | bits_per_sample=0 | ||
| + | r_frame_rate=0/ | ||
| + | avg_frame_rate=250/ | ||
| + | time_base=1/ | ||
| + | start_time=0.000000 | ||
| + | duration=130.000000 | ||
| + | TAG: | ||
| + | [/STREAM] | ||
| + | [STREAM] | ||
| + | index=1 | ||
| + | codec_name=wmv3 | ||
| + | codec_long_name=Windows Media Video 9 | ||
| + | codec_type=video | ||
| + | codec_time_base=1/ | ||
| + | codec_tag_string=WMV3 | ||
| + | codec_tag=0x33564d57 | ||
| + | width=640 | ||
| + | height=480 | ||
| + | has_b_frames=0 | ||
| + | pix_fmt=yuv420p | ||
| + | r_frame_rate=20/ | ||
| + | avg_frame_rate=0/ | ||
| + | time_base=1/ | ||
| + | start_time=0.000000 | ||
| + | duration=130.000000 | ||
| + | TAG: | ||
| + | [/STREAM] | ||
| + | |||
| + | > ffprobe -show_streams Film.mpg 2>/ | ||
| + | codec_time_base=1/ | ||
| + | r_frame_rate=25/ | ||
| + | avg_frame_rate=25/ | ||
| + | time_base=1/ | ||
| + | |||
| + | weitere Infos kann man sich mit diesem Kommando anzeigen lassen: | ||
| + | > ffprobe -show_format Film.wmv 2>/ | ||
| + | [FORMAT] | ||
| + | filename=Film.wmv | ||
| + | nb_streams=2 | ||
| + | format_name=asf | ||
| + | format_long_name=ASF format | ||
| + | start_time=0.000000 | ||
| + | duration=130.000000 | ||
| + | size=7197119.000000 | ||
| + | bit_rate=442899.000000 | ||
| + | TAG: | ||
| + | TAG: | ||
| + | TAG:IsVBR=0 | ||
| + | [/FORMAT] | ||
| + | |||
| + | > ffprobe -show_format Film.mpg 2>/ | ||
| + | [FORMAT] | ||
| + | filename=Du_bist_was_Du_isst.mpg | ||
| + | nb_streams=3 | ||
| + | format_name=mpeg | ||
| + | format_long_name=MPEG-PS format | ||
| + | start_time=0.287267 | ||
| + | duration=0.928000 | ||
| + | size=4992397312.000000 | ||
| + | bit_rate=-2147483648.000000 | ||
| + | [/FORMAT] | ||
| + | |||
| + | > ffprobe -show_packets Film.mpg 2>/ | ||
| + | stream_index=0 | ||
| + | stream_index=1 | ||
| + | stream_index=2 | ||
| + | |||
| + | $ du -k Avengers_4_-_Endgame.mpg | ||
| + | 7448081 Avengers_4_-_Endgame.mpg | ||
| + | | ||
| + | $ ffprobe -probesize 9223372036G -analyzeduration 9223372036G Avengers_4_-_Endgame.mpg | ||
| + | |||
| + | Die Option '' | ||
| + | $ ffprobe -probesize 9223372036G -analyzeduration 9223372036G -i Avengers_4_-_Endgame.mpg | ||
| + | |||
| + | __Die besten Ergebnisse erhält man, wenn die beiden Optionen '' | ||
| + | $ ffprobe -probesize 9223372036G -analyzeduration 9223372036G -i Avengers_4_-_Endgame.mpg | ||
| + | |||
| + | |||
| + | ===== Show Streams ===== | ||
| + | |||
| + | < | ||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_streams -i " | ||
| + | [STREAM] | ||
| + | index=0 | ||
| + | codec_name=mpeg2video | ||
| + | codec_long_name=MPEG-2 video | ||
| + | profile=Main | ||
| + | codec_type=video | ||
| + | codec_tag_string=[0][0][0][0] | ||
| + | codec_tag=0x0000 | ||
| + | width=720 | ||
| + | height=576 | ||
| + | coded_width=0 | ||
| + | coded_height=0 | ||
| + | closed_captions=0 | ||
| + | film_grain=0 | ||
| + | has_b_frames=1 | ||
| + | sample_aspect_ratio=16: | ||
| + | display_aspect_ratio=4: | ||
| + | pix_fmt=yuv420p | ||
| + | level=8 | ||
| + | color_range=tv | ||
| + | color_space=unknown | ||
| + | color_transfer=unknown | ||
| + | color_primaries=unknown | ||
| + | chroma_location=left | ||
| + | field_order=progressive | ||
| + | refs=1 | ||
| + | id=0x1e0 | ||
| + | r_frame_rate=25/ | ||
| + | avg_frame_rate=25/ | ||
| + | time_base=1/ | ||
| + | start_pts=25854 | ||
| + | start_time=0.287267 | ||
| + | duration_ts=146073600 | ||
| + | duration=1623.040000 | ||
| + | ... | ||
| + | |||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_streams -show_data | ||
| + | [STREAM] | ||
| + | index=0 | ||
| + | codec_name=mpeg2video | ||
| + | codec_long_name=MPEG-2 video | ||
| + | profile=Main | ||
| + | codec_type=video | ||
| + | codec_tag_string=[0][0][0][0] | ||
| + | codec_tag=0x0000 | ||
| + | width=720 | ||
| + | height=576 | ||
| + | coded_width=0 | ||
| + | coded_height=0 | ||
| + | closed_captions=0 | ||
| + | film_grain=0 | ||
| + | has_b_frames=1 | ||
| + | sample_aspect_ratio=16: | ||
| + | display_aspect_ratio=4: | ||
| + | pix_fmt=yuv420p | ||
| + | level=8 | ||
| + | color_range=tv | ||
| + | color_space=unknown | ||
| + | color_transfer=unknown | ||
| + | color_primaries=unknown | ||
| + | chroma_location=left | ||
| + | field_order=progressive | ||
| + | refs=1 | ||
| + | id=0x1e0 | ||
| + | r_frame_rate=25/ | ||
| + | avg_frame_rate=25/ | ||
| + | time_base=1/ | ||
| + | start_pts=25854 | ||
| + | start_time=0.287267 | ||
| + | duration_ts=146073600 | ||
| + | duration=1623.040000 | ||
| + | ... | ||
| + | |||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_streams -show_format -loglevel warning -print_format json -i " | ||
| + | { | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Show Entries ===== | ||
| + | |||
| + | < | ||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_entries format_tags=title -of compact=p=0: | ||
| + | Winnetou - Eine neue Welt (Originaltitel: | ||
| + | |||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_entries format_tags=comment -of compact=p=0: | ||
| + | FSK 12 / 2016 / 117 Min. / imdb tt4893452 / Nik Xhelilaj, Wotan Wilke Möhring, Jürgen Vogel | ||
| + | |||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_entries format_tags=description -of compact=p=0: | ||
| + | Apachenhäuptling Winnetou schließt Freundschaft mit dem deutschen Eisenbahningenieur Karl May, der später Old Shatterhand genannt wird. | ||
| + | |||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -show_entries stream=codec_type -of default=noprint_wrappers=1 -i " | ||
| + | codec_type=video | ||
| + | codec_type=audio | ||
| + | codec_type=subtitle | ||
| + | |||
| + | > ffprobe -v error -probesize 9223372036G -analyzeduration 9223372036G -select_streams v:0 -show_entries stream=width, | ||
| + | width=720 | ||
| + | height=576 | ||
| + | duration=1623.040000 | ||
| + | bit_rate=N/ | ||
| + | </ | ||
| + | |||
| + | Spuren zählen: | ||
| + | > CODEC_TYPE=" | ||
| + | | ||
| + | > echo " | ||
| + | 1 video | ||
| + | | ||
| + | > echo " | ||
| + | 4 audio | ||
| + | | ||
| + | > echo " | ||
| + | 3 subtitle | ||
| + | |||
| + | |||
