"We usually encounter a variety of video files, five flowers. Usually they will have different extensions, such as AVI, RMVB, MKV, MP4, etc. according to the format, such as avi, rmvb, mkv, mp4, etc. These formats are all packaged formats. .
The process of these files usually produces: 1. Recording an image of one frame by recording tool, which may be Camera, screen intercepting tool, and the like. 2. Get the recorded image to the encoder for encoding, resulting in the original video stream, also known as bare stream. For example, the coding of H.264 format commonly used in the video. 3. Pack the original video code into the package format file to generate the video files we finally see.
Files of the package format, because they can usually contain more rich information, store transmission, and a wide range of applications, so there are also a lot of players that can play a variety of package format files.
The original video streams often provide great convenience for the knowledge of our learning video codec. The process produced by the above package format file, it can be seen that the playback of the H.264 original video code stream is clearly more simple than the package format file, but it is difficult to find the corresponding playback due to limited utility value of the original code stream. tool.
In fact, the FFMPEG project played this issue in the original H.264 stream, saved the vast video codec developer.
FFMPEG tool sets provide FFPlay to play H.264 bare stream. The H.264 bare stream saved as the file below:
00000000 00 00 00 01 67 42 80 2A DA 01 10 0F 1e 5E 52 0a .... GB. * ..... ^ r.
00000010 0C 0A 0D A1 42 6A 00 00 00 00 00 01 68 CE 06 E2 00 00 .... bj ... h .....
00000020 00 01 65 B8 40 F7 0F 84 3F 0F 42 E0 00 42 93 45 ..E. @ ...? B..b.e
00000030 1e BF FF E0 C5 4B 1e A0 3D AE 5B FF 8D 3D 34 da ..... k .. =. [.. = 4.
00000040 C2 1A FF E0 89 5E CF DA AB 58 F5 00 08 3E BB EE ..... ^ ... x ...> ..
00000050 FF FC 13 68 3B F6 B6 BF FF 7D C5 05 78 4D D4 69 ... H; ....} .. xm.i
00000060 8e 8e 2F FF 1e B8 20 E0 3F 6C 66 2D 74 35 B5 ff .. / ....? LF-T5 ..
26 bf f8 9e b8 20 E0.}.. X. (.- & ....
00000080 7e Fe E8 B5 B5 FF F7 7D DD 05 78 17 0E 75 F2 60 ~ ...} .. x..u.`
00000090 57 C1 0C 00 20 FA EF BB 00 BF F2 0F 7B 1D BE D6 W .... {...
000000A0 D6 D6 D6 D6 D7 FF E3 BB A0 AF 35 82 30 C7 46 47 ........ 5.0.fg
000000B0 EA 85 1E FF EE 7F 04 1D 96 13 B1 11 AD AD AD ................
000000c0 Ad Ad Ad Ad Ad Ad Ad AD ................
000000D0 AD AF FF FD D0 21 E0 8F 78 15 51 AF FF 8F D0 57 .....! .. x.q .... w
000000E0 85 F3 80 90 B2 DC 06 34 5C FF FA E1 82 0E 0B 0D ....... 4 \ .......
000000F0 95 C4 4D 63 D7 FF FC 73 87 AF FF A9 AD A2 D5 A8 ..MC ... S ........
00000100 77 2D FF Fe 28 10 F0 47 BC 30 8F FF 71 EA 82 BC W - .. (.. G.0..Q ...
00000110 18 81 D5 16 1D A6 0C 18 A5 04 31 7F FC D7 F3 F6 .......... 1 .....
00000120 B6 B6 B6 B6 B6 B6 BF 0F FF 41 2C 76 98 2B E9 D7 ......... A, V. + ..
00000130 E0 1F 48 30 A4 0C 56 98 7B A3 7E DC 7F FF B0 ... H0..v. {. ~ ...
00000140 9F 03 A1 8D EC 64 26 96 C9 C0 00 97 BF F5 F9 55 ..... D & ........ u
00000150 05 3C 0B B4 9A 6D FC D0 77 22 5B C3 0F FF 13 dB. <... m..w "" [.....
00000160 53 EA 37 FD 3F FF FE C2 40 43 87 1E 82 D2 C6 DD S.7.? ... @ c ......
00000170 3C 0D 9C 86 59 CE F0 F3 59 5B E4 2D 2A 73 F6 08 <... Y ... y [.- * s ..
00000180 BD 3F 6B 0B 94 37 D4 21 73 47 FD 04 CA F1 57 CC.? K..7.! Sg .... w.
00000190 CA 10 40 71 BB 3F CE BD BD B3 4C 32 D2 0E B8 B9 95 .. @ q. ... l2 .....
000001A0 64 0E C4 98 94 42 D7 6C 6B BB CF 0C 21 97 FF EA D .... B.LK ...! ...
000001B0 Fe 7F FF 28 79 20 23 0A 66 8C 40 F1 AF AB C1 EA ... (Y # .f. @ .....
000001C0 85 B9 48 4B 22 A9 2B C0 31 37 93 18 73 36 09 E1 ..HK "". +. 17..s6 ..
000001D0 Fe DA 12 AB 34 E4 E1 98 21 9D 4F 48 A8 BD 2D 9E .... 4 ...!. Oh ..-.
000001E0 3D 4F 9C F0 D7 1A 7D 21 F6 15 99 88 1F 69 99 D5 = O ....}! ..... I ..
000001F0 7F 28 79 25 10 CC D1 83 13 A6 AA 03 7F 1C C5 90. (Y% .........
00000200 7A D0 37 64 39 11 40 AF 00 C4 FB F4 42 4C 35 3e Z.7D9. @ ..... BL5>
00000210 F5 93 86 66 86 60 74 E2 61 E4 6B 7C DF 3A 5E 34 ... f.`t.a.k |.: ^ 4
00000220 A3 9C 04 2D 7C 7B FC 77 4C AA 77 3F FC 81 BD 90 ...- | {.wl.w? ....
00000230 0D 85 37 1D A6 33 07 5e A2 57 11 00 E9 38 9B 31.7..3. ^. W ... 8.1
00000240 09 39 00 15 E6 12 3F 84 2A 48 37 E7 61 C7 3D 3D .9 ....?. * H7.a. ==
00000250 94 EA B0 0C D0 D0 CD 74 A5 E3 48 83 B4 ED F6 EC ....... T, .....
00000260 5B E1 CF F8 8C 3B 69 FF 07 20 86 27 36 FD 30 21 [....; i ... '6.0!
--- Raw_H264_Stream.raw --0x0 / 0x7b68be ---------------------------------- 123456789101112131415161718192028293033940343537383940
The 0th to 21th bytes are the first NALU, and the 22nd to 29th bytes are second NALUs, and the like.
You can start playback directly as a parameter of FFPlay:
$ ffplay raw_h264_stream.h264
FFPlay Version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2003-2017 The Ffmpeg Developers
BUILT WITH GCC 5.4.0 (Ubuntu 5.4.0-6Ubuntu1 ~ 16.04.4) 20160609
Configuration: --prefix = / usr --extra-version = 0ubuntu0.16.04.1 --build-suffix = -ffmpeg --Toolchain = hardund --libdir = / usr / lib / x86_64-linux-gnu --incdir = / usr / include / x86_64-linux-gnu --cc = cc --cxx = g ++ --enable-gpl --enable-shared --disable-stripping --disable-decoder = libopenjpeg --disable-decoder = libschroedinger - Database & Sql Blog Articles - DISABLE - DISABLE - DECODER = Libschroedinger -ENABLE-AVRESAMPLE --ENABLE-AVISYNTH --ENABLE-GNUTLS --ENABLE-LADSPA --ENABLE-LIBASS --ENABLE-LIBBLURAY --ENABLE-LIBBS2B --ENABLE-LIBCACA --ENABLE-LIBCDIO --ENABLE-LIBFLITE - -ENABLE-LIBFONTCONFIG --ENABLE-LIBFREETYPE --ENABLE-LIBFRIDI --ENABLE-LIBGME --ENABLE-LIBGSM --ENABLE-LIBMODPLUG --ENABLE-LIBMP3LAME --ENABLE-LIBOPENJPEG --ENABLE-LIBOPUS --ENABLE-LIBPULSE - -ENABLE-LIBRTMP --ENABLE-LIBSCHROEDINGER --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-LIBZVBI --ENABLE-OPENABLE-OPENABLE-LIBDC1394 --ENABLE-LIBDC61883 --Nable-libzmq --enable-frei0r --enable- LIBX264 --ENABLE-LIBOpenCV
Libavutil 54. 31.100 / 54. 31.100
Libavcodec 56. 60.100 / 56. 60.100
Libavformat 56. 40.101 / 56. 40.101
LibavDevice 56. 4.100 / 56. 4.100
Libavfilter 5. 40.101 / 5. 40.101
LibavreSample 2. 1. 0 / 2. 1. 0
Libswscale 3. 101 / 3. 1.101
LibswreSample 1. 2.101 / 1. 2.101
LibPostProc 53. 3.100 / 53. 3.100
Input # 0, H264, from 'Raw_h264_stream.raw': 0kb Sq = 0B f = 0/0
Duration: N / A, Bitrate: N / A
Street # 0: 0: Video: H264 (Baseline), YUV420P (TV, BT470BG / BT470BG / SMPTE170M), 1080X1920, 25 FPS, 25 TBR, 1200K TBN, 50 TBC12345678910111213141516
FFPlay also prints some information related to the video, such as the encoding configuration of H.264, image format, resolution, and more. In addition, the configuration information of the FFMPEG library used is also output by default. The ffplay interface is shown below:
Compared to many other players for ordinary users, FFPlay is simple in the user's operation, almost no control function for the user, but it is a great convenience for the development of audio and video.
In addition to FFPLAY, FFMPEG-based VLC player also supports playing H.264 bare stream, such as:
$ VLC -VVV RAW_H264_STREAM.H264
VLC Media Player 2.2.2 WeatherWax (Revision 2.2.2-0-G6259D80)
[0000000000AAA158] Core Libvlc Debug: VLC Media Player - 2.2.2 WeatherWax
[0000000000AAA158] Core Libvlc Debug: Copyright © 1996-2016 The Videolan Team
[0000000000AAA158] Core Libvlc Debug: Revision 2.2.2-0-G6259D80
[0000000000AAA158] CORE LIBVLC Debug: configured with ./configure '--BUILD = x86_64-linux-gnu' --prefix = / usr '' --includedir = $ {prefix} / include '--Mandir = $ { Prefix} / share / man '' --infodir = $ {prefix} / share / info '' --sysconfdir = / etc '--LocalStatedir = / var' --disable-storent-rules' --Libdir = $ {prefix} / lib / x86_64-linux-gnu '--Libexecdir = $ {prefix} / lib / x86_64-linux-gnu' --disable-maintainer-mode '--disable-dependency-tracking' '--config-cache' --disable-update-check '--Nable-fast-install' --DOCDIR = / usr / share / doc / vlc-data '--Libdir = / usr / lib '' --with-binary-version = 2.2.2-5ubuntu0.16.04.3 '' --enable-a52 '' --enable-aa '' --enable-bluray '' --enable-bonjour ' -ENABLE-CACA '' --enable-chromaprint '' --enable-dbus '' --enable-dca '' --enable-directfb '--enable-dvbpsi' '--enable-dvdnav' " Enable-faad '' --enable-flac '' --enable-fuidsynth '' --enable-freerdp '' --enable-fribidi '--disable-gles1' --enable -gles2 '' --enable-gnutls' '--enable-jack' '--enable-kate' '--enable-libass' - -ENABLE-LIBMPEG2 '--enable-libxml2' '--enable-lirc' --Nable-Live555 '' --enable-mad '' --enable-mkv '' --enable-mod ' Enable-mpc '--enable-mtp' --enable-mux_ogg '' --enable-ncurses' --enable-notify '' --enable-Ogg '' --Nable-Opus' '--enable -pulse '' --enable-qt '' --enable-realte '' --enable-schroedinger '' --enable-sdl '' --enable-SDL-Image '- Enable-sftp '--enable-shine' --enable-shout '' --enable-skins2 '' --enable-speex '' --enable-svg '--enable-svgdec' '--enable -taglib '--enable-theora' '--enable-twolame' '--enable-upnp' '--enable-vcdx' '--enable-vdpau' '--enable-vnc' '--enable- Vorbis '--Nable-x264' --enable-x265 '' --enable-zvbi '' --with-kde-solid = / usr / share / kde4 / apps / solid / actions / '' --disable -Decklink '--disable-dxva2' --disable-fdkaac '--disable-gnomevfs' --disable-goom '--disable-libtar' '--disable-mfx' --disable- OpenCV '--DISABLE-Projectm' --disable-Sndio '--disable-telx' --disable-vpx '--disable-vsxu' --disable-Wasapi '' --Nable-ALSA '' ' --Nable-atmo '' --enable-dc1394 '--enable-dv1394' '--enable-linsys' --enable-omxil '' --enable-udev '--enable-v4l2' " -ENABLE-LIBVA '' --enable-vcd '' --Nable-smbclient '--disable-oss' '--enable-crystalhd' '--enable-mmx' '--enable-sse' Disable-neon '--disable-altivec' 'build_alias = x86_64-linux-gnu' 'cflags = -g -O2 -fstack-protector-strong -wformat -werror = format-security' 'LDFLAGS = -wl, -bsymbolic -functions -wl, -z, reelro -wl, - as-needed '' cppflags = -wdate-time -d_fortify_source = 2 '' cxxflags = -g-^ fTACK-Protector-strong -wformat -wrror = format- Security '' Objcflags = -g -o2 -fstack-protector-strong -wformat -werror = format-security '
[0000000000AAA158] Core Libvlc Debug: Searching Plug-in Modules
[0000000000AAA158] Core Libvlc Debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat
[0000000000AAA158] Core Libvlc Debug: Recursively Browsing `/ USR / LIB / VLC / PLUGINS '
[0000000000AAA158] Core Libvlc Debug: Saving plugins cache /usr/lib/vlc/plugins/plugins.dat
....................................
Even for H.264 bare stream, VLC also provides progress control:
The progress time is always displayed as 0. If you really go to drag the progress bar, the picture may also get rid of:
DONE. "
Our other product: