Audio / Video

Index

General




video audio
Analogue
4:3
  • PAL
  • SECAM
  • NTSC

16:9
  • PAL Plus
  • (D2-MAC)
Digital NICAM

  • NICAM
    (PAL, SECAM)
MPEG 1
  • Video-CD

  • Layer I: DCC (Digital Compact Cassette)
  • Layer II: MP2
  • Layer III: MP3
2
  • DVB
    (Digital Video Broadcasting)
  • DVD-Video
    (Digital Versatile Disk)
  • ATSC
    (Advanced Television Systems Commitee)
  • SVCD

  • Layer I
  • Layer II
  • Layer III
  • AAC-> LiquidAudio, MP4, a2b
4
  • DivX ;-)

  • AAC
  • TwinVQ
Dolby Digital (AC-3)

DTS

PCM



  • CD-Audio
  • DAT
DVD-Audio

ATRAC

DSD


Resolucions / Resolutions


width
128 176 320 352 360 384 400 480 528 544 640 704 720 768 800 853 960 1024 1056 1152 1280 1366 1400 1408 1440 1600 1680 1920 2048 3840
height 96 SQCIF




























120
QCIF



























144
QCIF



























176

W-QVGA


























200

CGA


























220
QCIF+



























240

QVGA CIF-601, D4, SIF* SIF
























288


CIF-601, D4, SIF* SIF x




D3

















320





x HVGA





















350









EGA


















352






x





















360









nHD


















384






x





















480


1/2 D1, D2


2/3 D1 3/4 D1 x VGA CCIR-601, D1, 4CIF CCIR-601, D1 x W-VGA W-VGA













512









x


















544















x












576


1/2 D1, D2


2/3 D1 3/4 D1 x
CCIR-601, D1, 4CIF CCIR-601, D1 x


W-SVGA











600













SVGA














720















x
9CIF
720








768
















XGA

W-XGA W-XGA







800



















W-XGA








854


















XGA+









864

















9CIF










900























W-XGA+




960



















x

16CIF





1024



















SXGA








1035


























x

1050





















SXGA+


W-SXGA+


1080























x

1080

1152






















16CIF x

x

1200
























UXGA
W-UXGA

1536



























QXGA
2160




























4K
Aspect ratio:
  • 5:4 (1.25)
  • 4:3 (1.33)
  • 16:10 (1.60)
  • 15:9 (1.66)
  • 16:9 (1.77)

Resolucions de pantalla / Screen resolutions 

name resolution aspect W name W resolution aspect used
QXGA 2048x1536 1.33 (4:3)



UXGA 1600x1200 1.33 (4:3) W-UXGA 1920x1200 1.60 (16:10)




1920x1080 1.77 (16:9) Full HD
SXGA+ 1400x1050 1.33 (4:3) W-SXGA+ 1680x1050 1.60 (16:10)
SXGA 1280x1024 1.25 (5:4)



XGA+ 1152x854 1.35 W-XGA+ 1440x900 1.60 (16:10)
XGA 1024x768 1.33 (4:3) W-XGA 1366x768 1.77 (16:9) HD Ready
1280x768 1.66 (15:9)
1280x800 1.60 (16:10)
SVGA 800x600 1.33 (4:3) W-SVGA 1024x576 (Sharp Aquos P) 1.77 (16:9)



nHD 640x360 1.77 (16:9)
VGA 640x480 1.33 (4:3) W-VGA 853x480 1.77 (16:9)
800x480 1.66 (15:9)
EGA 640x350 1.82



HVGA 480x320 1.33 (4:3)



QVGA 320x240 1.33 (4:3) W-QVGA 320x176 1.81
CGA 320x200 1.6



Pantalles / Screens

Programari / Software


audio video/audio
file TV (analogue) frontend DVB frontend
play Amarok


Freeamp


Songbird (iTunes)



Democracy Player


Mplayer

mplayerxp


kmplayer


ffdshow (MS windows)


Freevo

MythTV

Open Quicktime


PYUV Player (yuv)


Real Player


XANIM


xine
kaffeine

totem 

XMMS (.com)


XMPS


VideoLAN/VLC

Ogle DVD player







xawtv (X11) / fbtv (framebuffer/console)


xawdecode / xdTV


kdetv kwintv - QtVision 


tvtime


AVview


fstv (svgalib, fbdev or glide)


taztv


Exo TV (ATI AIW)


Zapping



Klear



KaxTV



qdvbzap
edit Audacity 


DAP


Mix


SOX - Sound eXchange
Studio (gui)




Auteur (*)


Avidemux


Avisynth


Blender (sequencer)


Cinelerra


Film Gimp Cinepaint


EditShare (Lightworks)


flowblade (MLT)


Jahshaka


jumptheshark (cli)


Kaltura (Flash, HTML5)


kdenlive (vectoscopi / vectorscope)


Kino (Linux DV)
SMIL Utils



KmPg2 (KDE MPEG2 encoder)


Lightworks (wine)


Linux Video Editing System (LiVES)


Linux Video Editor - LVE


Linux Video Studio


melt (command line) (MLT)


Motion Perfect (DynaPel)


mpgtx (command linne)


OpenMovieEditor


OpenShot


PiTiVi


PVAStrumento


Shotcut (MLT)


slowmoVideo


VirtualDub


VLMC (trac) (videolan)


Stopmotion (frame by frame)



Project X
convert / transcode
3gp movie wizard


AutoMKV (MS Windows)


Avidemux


Carbon Coder


Digital Rapids


Episode Encoder (Telestream) ($495-$995)


ffmpeg / ffmpegX (MacOX)


Handbrake


iriverter


konverter


MeGUI


mencoder / MediaCoder (MS Windows)


pspvideo9


MPEG4IP


MP4Box / YAMB (GPAC)


OggConvert (Ogg, Theora, Dirac, Vorbis)


pspvideo9


restream


RipCode


SUPER (ffmpeg, mencoder...) (MS Windows)


TCVP


TMPGEnc


transcode


VideoLan VLC

analysis / info
DVB utilities: dvbt-ts-info (Linux-DVB-DVBT-TS-0.07) (perl CPAN)


audio file TV (analogue) frontend DVB frontend
video/audio

  • General
  • Gestió de continguts mèdia / Media content management
  • Biblioteques / Libraries
  • Aplicacions d'àudio / Audio appplications
  • Pilots d'àudio / Audio drivers
  • Servidors de so / Sound servers
  • Reproductors d'àudio / Audio players
  • Edició d'àudio / Audio edition
  • Veu / Speech
  • Captura / Capture
  • Mixer
  • Edició de vídeo / Video edition
  • Multimedia (video + audio)
  • Reproductors multimèdia / Multimedia players
  • Media Centre
  • Conversió / Conversion
  • Encoders
  • Codecs
  • Sintonització TV / TV Tuner
  • DVB / MPEG-TS
  • Teletext
  • EPG
  • Gravació àudio/vídeo sobre CD/DVD / Audio/video on CD/DVD burning
  • Altres / Other
  • Eines / Tools
  • Streaming
    • (HTTP) Streaming a video using a program in C/C++: A tutorial on creating your own video on demand streaming server in C/C++ under Linux
    • VideoLAN/VLC
      • vlc --list
      • VLC command-line help (vlc -H) (vlc -p stream_out_standard --advanced) (vlc -p access --advanced)
        • Chapter 3. Advanced streaming using the command line
        • Syntax
          • MRL syntax
            • vlc input_stream --sout '#module1{option1=parameter1{parameter-option1},option2=parameter2}:module2{option1=…,option2=…}:…'
            • vlc input_stream --sout '#standard{access=http{mime=video/mpeg},mux=ts,dst=/toto}'
          • general options
            • vlc input_stream --sout-standard-access http --sout-http-mime video/mpeg --sout-standard-mux ts --sout-standard-dst=/toto
        • sout
          • transcode
          • standard
            • access=
              • http
                • mime=<mime_type>
              • https
              • udp
              • file
              • mmsh
              • rtp is deprecated; use sout-rtp instead
            • mux=
              • ts
                • pid-video=<pid>
                • pid-audio=<pid>
                • pid-spu=<pid>
                • pid-pmt=<pid>
                • shaping=<shaping delay in ms>
                • use-key-frames
                • pcr=<pcr interval im ms>
                • dts-delay=<delay in ms>
                • crypto-audio
                • csa-ck=<key>
              • ps
              • mpeg1
              • ogg
              • asf
              • asfh
              • avi
              • mpjpeg
            • dst=
            • bind
            • path
            • sap
            • name=
            • description=
            • url=
            • email=
            • phone=
          • duplicate
          • smem
          • setid
          • rtp
            • dst
            • sdp
              • file://
              • http://
              • rtsp://
              • sap://
            • mux
            • sap
            • name
            • cat
            • description
            • url
            • email
            • phone
            • proto
            • port
            • port-audio
            • port-video
            • ttl
            • rtcp-mux
            • caching
            • key
            • salt
            • mp4a-latm
          • rtsp
            • user
            • pwd
          • record
          • raop
          • mosaic
          • langfromtelx
          • es
          • display
          • delay
          • bridge
          • ts
          • ps
          • mp4
          • asf
      • Instal·lació / Installation
        • Mageia
          • urpmi vlc vlc-plugin-lua
        • Problems:
          • qt4 interface error: Unable to load extensions module
            • Solució / Solution
              • lua is needed to load the modules
              • Mageia
                • urpmi vlc-plugin-lua
      • Logs
        • cvlc --extraintf=http:logger --verbose=3 --file-logging --logfile=/tmp/vlc-log.txt
      • How to play multiple instances of VLC
      • Chapter 4.  Examples for advanced use of VLC's stream output (transcoding, multiple streaming, etc...)
        • TS over HTTP
          • without transcoding:
            • cvlc -vvv my_input --sout '#standard{access=http{mime=video/mpeg},mux=ts,dst=my_real_ip_address:8888}'
            • cvlc -vvv my_input --sout '#standard{access=http{mime=video/mpeg},mux=ts,dst=/pdw/e3}' [--http-host=my_real_ip_address] --http-port=8888
          • Problems:
            • "no suitable sout mux module for http..."
              • check that mux_ts is present:
                • vlc --list | grep mux_ts
                  •   mux_ts                 TS muxer (libdvbpsi)
      • VLM - Multiple streaming and Video on demand
        • VideoLAN Manager is a small media manager designed to control multiple streams with only one instance of VLC.
        • Documentation:Streaming HowTo/VLM
        • Chapter 5.  VLM - Multiple streaming and Video on demand
        • telnet
          • Servidor / Server
            • Establiu una contrasenya / Setup a password:
              • Eines / Preferències / Mostra els paràmetres: Tot / Interfície / Interfícies principals / Lua / Telnet Lua:
                • Contrasenya: xxxx
              • o bé establiu-la en engegar el procés / or set it when starting the process
            • des de línia d'odres:
            • o bé, des de GUI / or, from GUI:
              • Visualitza / Afegeix una interfície / Telnet
          • Client (to configure streams):
            • telnet localhost 4212 (netcat localhost 4212)
              • Add channels:
                • new channel1 broadcast enabled
                • setup channel1 input sintel.mp4
                • setup channel1 output #standard{access=http{mime=video/mpeg},mux=ts,dst=192.168.0.8:8888/sintel}
                • control channel1 play
                • new channel2 broadcast enabled
                • setup channel2 input ed.mp4
                • setup channel2 output #standard{access=http{mime=video/mpeg},mux=ts,dst=192.168.0.8:8888/ed}
                • control channel2 play
              • List channels:
                • show
              • Remove channel:
                • del channel1
        • http server
          • Servidor / Server
            • cvlc -I http --http-port 8088 --http-password toto
          • Client (to configure streams):
            • http://localhost:8088/vlm.html
              • username: - / password: toto
              • Send command batch:
                • new channel1 broadcast enabled
                  setup channel1 input sintel.mp4
                  setup channel1 output #standard{access=http{mime=video/mpeg},mux=ts,dst=192.168.0.8:8888/sintel}
                  control channel1 play
                  new channel2 broadcast enabled
                  setup channel2 input ed.mp4
                  setup channel2 output #standard{access=http{mime=video/mpeg},mux=ts,dst=192.168.0.8:8888/ed}
                  control channel2 play
        • Client (to play streams):
          • ffplay -i -http://192.168.0.8:8888/sintel
          • ffplay -i -http://192.168.0.8:8888/ed
        • Problemes / Problems:
      • Chapter 9.  Advanced use of VLC's stream output (transcoding, multiple streaming, etc...)
      • DVBlast (live streaming)
      • VLMa (broadcast)
      • Compilació / Compilation
      • MPEG-DASH plugin
      • UPnP with VLC
      • Desentrellaçat / Deinterlacing
      • Get Started--and Get Streaming--With VLC Media Player
      • developers
      • nightly builds
      • ftp
      • freehd (H264 MBAFF)
      • Transcode (Wiki)
      • PocketPC
      • Streaming for the iPhone
      • The Mozilla plugin (HTML code example)
      • i18n
    • streamripper / KStreamRipper  
    • Fenice LS3
    • Icecast / Icecast2 (Ogg Vorbis)
    • LIVE555 Media Server (LIVE555 Streaming Media libraries)
    • MIMD
    • Network-Integrated Multimedia Middleware (NMM)
    • RTP
    • Adobe
    • Darwin streaming server (Apple) (*)
      • QuickTime Streaming Server Administrator's guide (PDF) (qtss_admin_guide.pdf)
      • Download (macosforge)
      • How to setup Darwin Streaming Server on Windows
      • HOWTO to set-up Apple's Darwin Streaming Server under Linux
      • Darwin Streaming Server 6.0.3 on Linux
      • Darwin Streaming Server on Ubuntu
      • Implementación de un servidor de streaming de vídeo adaptativo (PFM de la UPC)
      • Please explain new DSS 5.0 features (broadcasting, reflector)
      • Mandriva
        • urpmi darwinstreamingserver-utils (QTBroadcaster)
        • urpmi darwinstreamingserver darwinstreamingserver-webadmin (2008.1: Contrib Testing)
          • dss-setup
            • proposed username: dssadmin
          • /etc/dss/streamingserver.xml: /etd... -> /etc...
          • chown dss.dss -R /var/lib/dss/Playlists
          • service darwinstreamingserver start
          • service streamingadminserver start

      • from source Mandriva
        dependencies urpmi make gcc gcc-c++
        install groupadd qtss
        adduser -M -g qtss qtss
        ...
        urpmi darwinstreamingserver-utils darwinstreamingserver darwinstreamingserver-webadmin
        movies path /usr/local/movies/ /var/lib/dss/Movies/
        SDP path /var/streaming/playlists/ /var/lib/dss/Playlists/
        post-install setup open ports: 554/tcp 1220/tcp dss-setup
        open ports: 554/tcp 1220/tcp
        server start /usr/local/sbin/streamingadminserver.pl service darwinstreamingserver start service streamingadminserver start
        play open port: 15947/udp (to avoid "invalid IP address: 0x0")
        • VOD: vlc rtsp://127.0.0.1/sample_h264_100kbit.mp4
        • Playing playlist:
          • create a playlist called playlist_name and start it
          • {vlc,mplayer} rtsp://server_ip_address[:554]/playlist_name[.sdp]
      • server admin:
      • Errors:
        • "An error occurred while creating your playlist."
          • solution: chown dss.dss -R /var/lib/dss/Playlists
        • "An error occurred while starting or stopping your playlist."
          • solution: don't use Mandriva package; compile it yourself
      • Darwin compilation on Mandriva (based on script)
        • urpmi make gcc gcc-c++
        • #!/bin/bash
          groupadd qtss
          adduser -M -g qtss qtss

          wget http://static.macosforge.org/dss/downloads/DarwinStreamingSrvr6.0.3-Source.tar
          tar -xvf DarwinStreamingSrvr6.0.3-Source.tar
          mv DarwinStreamingSrvr6.0.3-Source DarwinStreamingSrvr6.0.3-Source.orig
          wget http://dss.macosforge.org/trac/raw-attachment/ticket/6/dss-6.0.3.patch
          patch -p0 < dss-6.0.3.patch
          mv DarwinStreamingSrvr6.0.3-Source.orig DarwinStreamingSrvr6.0.3-Source
          wget http://dss.macosforge.org/trac/raw-attachment/ticket/6/dss-hh-20080728-1.patch
          patch -p0 < dss-hh-20080728-1.patch
          #need to answer n then y
          cd DarwinStreamingSrvr6.0.3-Source
          mv Install Install.orig
          wget http://dss.macosforge.org/trac/raw-attachment/ticket/6/Install
          chmod +x Install
          ./Buildit
          sudo ./Install
      • Hinting
    • Bento4
    • MPEG4IP / mp4v2 (see Bento4)
      • Instal·lació / Installation
        • Mageia
          • urpmi libmp4v2-utils (libmp4v2_1)
      • mp4art, mp4chaps, mp4extract, mp4file, mp4info, mp4subtitle, mp4tags, mp4track, mp4trackdump
      • Hinting
      • Info / Analysis
      • mp4live (capture + coding in SP/H.264 + streaming)
    • Flumotion (Fluendo)
    • GStreamer
    • ffserver (ffserver-all) (ffmpeg)
    • HelixMedia
    • Helix DNA Server (Helix Community)
    • MJPG-streamer
    • Moovida (Elisa Media Centre)
    • NinSuna (Metadata-driven Media Adaptation and Delivery)
    • Open Broadcaster Software (OBS)
      • Installation
        • Install Instructions
        • Dependències / Dependencies
          • v4l2
          • SRT: ffmpeg compiled with srt
          • Mageia
            • urpmi cmake gcc-c++ lib64curl-devel lib64qt5widgets-devel lib64qt5x11extras-devel lib64qt5svg-devel lib64qt5xml-devel lib64speexdsp-devel lib64xcomposite-devel lib64mbedtls-devel [ffmpeg-devel]
            • urpmi lib64pulseaudio-devel lib64v4l-devel
            • NOTE: add ffmpeg-devel only if you are not using compiled ffmpeg
        • Passos / Steps
          • git clone https://github.com/obsproject/obs-studio.git
          • cd obs-studio
          • latest_version="25.0.8"
          • git checkout ${latest_version}
          • mkdir -p build && cd build
          • cmake -DUNIX_STRUCTURE=1 ..
          • make -j4
          • sudo make install
          • echo /usr/local/lib >/etc/ld.so.conf.d/local.conf
          • sudo ldconfig
      • Configuració / Setup
        • ~/.configure/obs-studio/
      • Ús / Usage
      • Problemes / Problems
    • QStream (gscope, db container, SPEG codec)
    • Nimble
    • Wowza
    • Palantir (i386, PPC, MIPS, ARM)
    • GPAC
    • Programari HTTP streaming / HTTP streaming software
      • Servidor / Server
        • DASH Encoder (github) (uni-klu)
        • libi2dash (i2cat)
        • Dash.encrypt Segmenter (castLabs) (Java)
          • inputs are several mp4 files (several representations)
          • DRM Today (*) (cloud DRM service):  Widevine, PlayReady, Adobe Access, Marlin, OMA 
          • dashencrypt (github)
        • Bento4
          • mp4fragmenter
          • mp4-dash.py
        • EBU Test engine for encoding (github)
        • Microsoft Azure
        • HTTP streaming with GPAC
        • Nimble
        • Wowza
        • Nginx-based nginx-vod-module (Kaltura)
          • VOD (On-the-fly repackaging of MP4 files to DASH, HDS, HLS, MSS)
          • progressive download
          • Compilació / Compilation
          • Info
          • Problemes / Problems
          • Config
            • specification json (mapped) media content nginx conf (sample configs) urls
              - local files:
              • /disc/videos/
                • toto.mp4
                • bbb/
                  • bbb_320p.mp4
                  • bbb_720p.mp4
                  • bbb_1080p.mp4
                • ccc/
                  • ccc_320p.mp4
                  • ccc_720p.mp4
                  • ccc_cat.srt
              server {
                  # vod settings
                  vod_mode local;
                  vod_last_modified 'Sun, 19 Nov 2000 08:52:00 GMT';
                  vod_last_modified_types *;

                  # vod caches
                  vod_metadata_cache metadata_cache 512m;
                  vod_response_cache response_cache 128m;

                  # gzip manifests
                  gzip on;
                  gzip_types application/vnd.apple.mpegurl;

                  # file handle caching / aio
                  open_file_cache          max=1000 inactive=5m;
                  open_file_cache_valid    2m;
                  open_file_cache_min_uses 1;
                  open_file_cache_errors   on;
                  #aio on;

                  location /videos/ {
                      # will prepend:
                      root /disc/;

                      vod hls;

                      add_header Access-Control-Allow-Headers '*';
                      add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
                      add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
                      add_header Access-Control-Allow-Origin '*';
                      expires 100d;
                  }
              }
              • http://localhost/videos/toto.mp4/index.m3u8
              • http://localhost/videos/bbb/bbb_,320,720,1080,p.mp4.urlset/master.m3u8
              • http://localhost/videos/ccc/ccc_,320p.mp4,720p.mp4,lang/cat/cat.str,.urlset/master.m3u8
              local file:
              • /etc/nginx/json/bbb.json
                • {
                    "sequences": [
                      {
                        "clips": [
                          {
                            "type": "source",
                            "path": "/disc/videos/bbb/bbb_720p.mp4"
                          }
                        ]
                      },
                      {
                        "clips": [
                          {
                            "type": "source",
                            "path": "/disc/videos/bbb/bbb_1080p.mp4"
                          }
                        ]
                      }
                    ]
                  }
              local files:
              • /disc/videos/bbb/
                • bbb_720p.mp4
                • bbb_1080p.mp4
              server {
                  # vod mode
                  vod_mode mapped;

                  vod_last_modified 'Sun, 19 Nov 2000 08:52:00 GMT';
                  vod_last_modified_types *;

                  # vod caches
                  vod_metadata_cache metadata_cache 512m;
                  vod_response_cache response_cache 128m;
                  vod_mapping_cache mapping_cache 5m;

                  # gzip manifests
                  gzip on;
                  gzip_types application/vnd.apple.mpegurl;

                  # file handle caching
                  open_file_cache          max=1000 inactive=5m;
                  open_file_cache_valid    2m;
                  open_file_cache_min_uses 1;
                  open_file_cache_errors   on;

                  location ^~ /videos/ {
                      # will replace:
                      alias /etc/nginx/json/;

                      vod hls;

                      add_header Access-Control-Allow-Headers '*';
                      add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
                      add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
                      add_header Access-Control-Allow-Origin '*';
                      expires 100d;
                  }
              }

              • http://localhost/videos/bbb.json/master.m3u8
              - remote content:
              • # https://github.com/kaltura/nginx-vod-module/blob/master/conf/vod-remote-nginx.conf.template
                upstream media {
                    # step 3: redirected by proxy_pass in /media/proxy
                    #server @MEDIA_HOST@;
                    server commondatastorage.googleapis.com;
                    keepalive 32;
                }

                server {
                    # vod remote settings
                    vod_mode remote;
                    # redirect step 1 to step 2
                    vod_upstream_location /media_proxy;

                    # internal location for vod subrequests
                    location ~ /media_proxy/[^/]+/(.*) {
                        # step 2: internal point from step 1,
                        # as instructed by vod_upstream_location

                        internal;
                        proxy_pass http://media/$1;
                        proxy_http_version 1.1;
                        #proxy_set_header Host @MEDIA_HOST@;
                        proxy_set_header Host commondatastorage.googleapis.com;
                        proxy_set_header Connection "";
                    }


                    # serve flavor HLS
                    location /hls/ {
                        # step 1: request arrives here
                        vod hls;
                        vod_bootstrap_segment_durations 2000;
                        vod_bootstrap_segment_durations 2000;
                        vod_bootstrap_segment_durations 2000;
                        vod_bootstrap_segment_durations 4000;

                        #include @NGINX_CONF_PATH@/cors.conf;
                    }
                   
                }
              • ...
              • http://localhost/hls/gtv-videos-bucket/sample/BigBuckBunny.mp4/master.m3u8
              • ...
              local file:
              • /usr/share/nginx/html/test.json
                • {
                    "sequences": [
                      {
                        "clips": [
                          {
                            "type": "source",
                            "path": "/http/commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
                          }
                        ]
                      }
                    ]
                  }
              remote content:
              upstream jsonupstream {
                  # step 3: redirected by proxy_pass in /json/hls1/
                  server localhost:80;
              }

              server {
                  # vod settings
                  vod_mode mapped;
                 
                  # redirect step 1 to step 2
                  vod_upstream_location /json2;

                  vod_remote_upstream_location /proxy;
                  vod_upstream_extra_args "pathOnly=1";
                  vod_last_modified 'Sun, 19 Nov 2000 08:52:00 GMT';
                  vod_last_modified_types *;

                  # vod caches
                  vod_metadata_cache metadata_cache 512m;
                  vod_response_cache response_cache 128m;
                  vod_mapping_cache mapping_cache 5m;

                  # gzip manifests
                  gzip on;
                  gzip_types application/vnd.apple.mpegurl;

                  # file handle caching / aio
                  open_file_cache      max=1000 inactive=5m;
                  open_file_cache_valid    2m;
                  open_file_cache_min_uses 1;
                  open_file_cache_errors   on;
                  #aio on;

                  location ^~ /json2/hls1/ {
                      # step 2: internal point from step 1,
                      # as instructed by vod_upstream_location

                      internal;

                      # redirect to step 3
                      proxy_pass http://jsonupstream/;
                      proxy_set_header Host $http_host;
                  }

                  location ~ /proxy/([^/]+)/(.*) {
                      internal;
                      proxy_pass $1://$2;
                      resolver 8.8.8.8;
                  }

                  location ~ ^/hls1/ {
                      # step 1: request arrives here
                      vod hls;

                      add_header Access-Control-Allow-Headers '*';
                      add_header Access-Control-Expose-Headers 'Server,range,Content-Length,Content-Range';
                      add_header Access-Control-Allow-Methods 'GET, HEAD, OPTIONS';
                      add_header Access-Control-Allow-Origin '*';
                      expires 100d;
                  }
              }

              • http://localhost/hls1/test.json/master.m3u8
              remote:
              •  http://jsonserver:80/test.json
                • with same content as above
              remote content:
              • http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
              upstream jsonupstream {
                  # step 3: redirected by proxy_pass in /json/hls/
                  server jsonserver:80;
              }

              [same as above]
              • http://localhost/hls1/test.json/master.m3u8
              XML status
              # vod status page
              location /vod_status {
                  vod_status;
                  access_log off;
              }
              • http://localhost/vod_status
            • URL structure
              • ...



                exemple
                http://<domain>

                http://localhost
                /<location>

                /videos
                Basic: /<fileuri>

                /toto.mp4
                Multi: /<prefix>,<middle1>,<middle2>,<middle3>,<postfix>.urlset

                /toto_,6,9,15,00k.mp4.urlset
                Mapped, remote: /<fileuri>?<extraargs>


                /<url_path_params> /clipFrom/<value>
                /clipFrom/10000
                /clipTo/<value>
                /clipTo/60000
                /tracks/v<id1>-v<id2>-a<id1>-a<id2>...
                /tracks/v1-a1
                /shift/v<vshift>-a<ashift>-s<sshift>
                /shift/v100
                /<filename> <basename>[<seqparams>][<fileparams>][<trackparams>][<langparams>].<extension> basename + extension
                • dash: manifest.mpd
                • hds:. manifest.f4m
                • hls master playlist (multivariant): master.m3u8
                • hls media playlist (monovariant): index.m3u8
                • mss: manifest
                • thumb: thumb-<offset>[<resizeparams>].jpg
                • volume_map: volume_map.csv
                /index.m3u8


                seqparams /master-sseq1.m3u8


                fileparams /manifest-f1.mpd


                trackparams /manifest-a1.f4m


                langparams /master-leng.m3u8


                resizeparams /thumb-1000-w150-h100.jpg
            • Directives


              • base
                • vod
                • vod_mode
                • vod_status
                segmentation
                • vod_segment_duration
                • vod_live_window_duration
                • vod_force_playlist_type_vod
                • vod_force_continuous_timestamps
                • vod_bootstrap_segment_durations
                • vod_align_segments_to_key_frames
                • vod_segment_count_policy
                • vod_manifest_duration_policy
                • vod_manifest_segment_durations_mode
                • vod_media_set_override_json
                upstream
                • vod_upstream_location
                • vod_remote_upstream_location
                • vod_max_upstream_headers_size
                • vod_upstream_extra_args
                • vod_media_set_map_uri
                • vod_path_response_postfix
                • vod_max_mapping_response_size
                fallback
                • vod_fallback_upstream_location
                • vod_proxy_header_name
                • vod_proxy_header_value
                performance
                • vod_metadata_cache
                • vod_mapping_cache
                • vod_live_mapping_cache
                • vod_response_cache
                • vod_live_response_cache
                • vod_initial_read_size
                • vod_max_metadata_size
                • vod_max_frames_size
                • vod_max_frame_count
                • vod_segment_max_frame_count
                • vod_cache_buffer_size
                  • vod_cache_buffer_size 1m;
                • vod_open_file_thread_pool
                • vod_output_buffer_pool
                • vod_performance_counters
                url structure
                • vod_base_url
                • vod_segments_base_url
                • vod_multi_uri_suffix (.urlset)
                • vod_clip_to_param_name (clipTo)
                • vod_clip_from_param_name (clipFrom)
                • vod_tracks_param_name (tracks)
                • vod_time_shift_param_name (shift)
                • vod_speed_param_name (speed)
                • vod_lang_param_name (lang)
                • vod_force_sequence_index (off)
                response headers
                • vod_expires
                • vod_expires_live
                • vod_expires_live_time_dependent
                • vod_last_modified
                • vod_last_modified_types
                ad stiching
                (mapped mode only)
                • vod_dynamic_mapping_cache
                • vod_dynamic_clip_map_uri
                • vod_source_clip_map_uri
                • vod_redirect_segments_url
                • vod_apply_dynamic_mapping
                • vod_notification_uri
                DRM / encryption
                • vod_secret_key
                • vod_encryption_iv_seed
                • vod_drm_enabled
                • vod_drm_single_key
                • vod_drm_clear_lead_segment_count
                • vod_drm_max_info_length
                • vod_drm_upstream_location
                • vod_drm_info_cache
                • vod_drm_request_uri
                • vod_min_single_nalu_per_frame_segment
                DASH
                • vod_dash_absolute_manifest_urls (on)
                • vod_dash_manifest_file_name_prefix (manifest)[.mpd]
                • vod_dash_profiles (urn:mpeg:dash:profile:isoff-main:2011)
                • vod_dash_init_file_name_prefix (init)[.mp4]
                • vod_dash_fragment_file_name_prefix (frag)[.m4s]
                • vod_dash_manifest_format (segmenttimeline)
                • vod_dash_subtitle_format (webvtt)
                • vod_dash_init_mp4_pssh (on)
                • vod_dash_duplicate_bitrate_threshold
                • vod_dash_use_base_url_tag
                HDS
                • ...
                HLS
                • vod_hls_encryption_method
                • vod_hls_force_unmuxed_segments (EXT-X-MEDIA)
                  • # multilanguage
                    vod_hls_force_unmuxed_segments on;
                • vod_hls_container_format (auto)
                • vod_hls_absolute_master_urls (on)
                • vod_hls_absolute_index_urls (on)
                • vod_hls_absolute_iframe_urls
                • vod_hls_output_iframes_playlist
                • vod_hls_master_file_name_prefix (master)[.m3u8]
                • vod_hls_index_file_name_prefix (index)[.m3u8]
                • vod_hls_iframes_file_name_prefix (iframes)[.m3u8]
                • vod_hls_segment_file_name_prefix (seg)[.ts]
                • vod_hls_init_file_name_prefix (init)
                • vod_hls_encryption_key_file_name (encryption.key)
                • vod_hls_encryption_key_uri
                • vod_hls_encryption_key_format
                • vod_hls_encryption_key_format_versions
                • vod_hls_mpegts_interleave_frames (off)
                • vod_hls_mpegts_align_frames (on)
                • vod_hls_mpegts_output_id3_timestamps (off)
                • vod_hls_mpegts_id3_data ({"timestamp":$vod_segment_time,"sequenceId":"$vod_sequence_id"})
                • vod_hls_mpegts_align_pts (off)
                • vod_hls_encryption_output_iv (off)
                MSS
                • ...
                thumbnail capture
                • vod_thumb_file_name_prefix (thumb)[.jpg]
                • vod_thumb_accurate_positioning (on)
                • vod_gop_look_behind (10000)
                • vod_gop_look_ahead (1000)
                volume map
                • vod_volume_map_file_name_prefix (volume_map)[.csv]
                • vod_volume_map_interval (1000)
                misc
                • vod_ignore_edit_list
                • vod_parse_hdlr_name
                • vod_parse_udta_name
            • Nginx variables
              • $vod_suburi
                $vod_filepath
                $vod_set_id
                $vod_sequence_id
                $vod_clip_id
                $vod_notification_id
                $vod_dynamic_mapping
                $vod_request_params
                $vod_status
                $vod_segment_time
                $vod_segment_duration
                $vod_frames_bytes_read
            • Multi audio
              • How to all audios as EXT-X-MEDIA in HLS #840

              • http://192.168.18.90/videos/multi_,360,720,p.mp4.urlset/master.m3u8
                # default
                vod_hls_force_unmuxed_segments off;
                #EXTM3U
                #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=419074,RESOLUTION=640x360,FRAME-RATE=25.000,CODECS="avc1.64001e,mp4a.40.2"
                http://192.168.18.90/videos/multi_360p.mp4/index-v1-a1.m3u8
                #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1740993,RESOLUTION=1280x720,FRAME-RATE=25.000,CODECS="avc1.64001f,mp4a.40.2"
                http://192.168.18.90/videos/multi_720p.mp4/index-v1-a1.m3u8

                #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=8184,RESOLUTION=640x360,CODECS="avc1.64001e",URI="http://192.168.18.90/videos/multi_360p.mp4/iframes-v1-a1.m3u8"
                #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=20857,RESOLUTION=1280x720,CODECS="avc1.64001f",URI="http://192.168.18.90/videos/multi_720p.mp4/iframes-v1-a1.m3u8"
                vod_hls_force_unmuxed_segments on; #EXTM3U

                #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio0",NAME="default",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="http://192.168.18.90/videos/multi_360p.mp4/index-a1.m3u8"

                #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=419074,RESOLUTION=640x360,FRAME-RATE=25.000,CODECS="avc1.64001e,mp4a.40.2",AUDIO="audio0"
                http://192.168.18.90/videos/multi_360p.mp4/index-v1.m3u8
                #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1740993,RESOLUTION=1280x720,FRAME-RATE=25.000,CODECS="avc1.64001f,mp4a.40.2",AUDIO="audio0"
                http://192.168.18.90/videos/multi_720p.mp4/index-v1.m3u8

                #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=8184,RESOLUTION=640x360,CODECS="avc1.64001e",URI="http://192.168.18.90/videos/multi_360p.mp4/iframes-v1.m3u8"
                #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=20857,RESOLUTION=1280x720,CODECS="avc1.64001f",URI="http://192.168.18.90/videos/multi_720p.mp4/iframes-v1.m3u8"

                #EXTM3U

                #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio0",NAME="Català",LANGUAGE="ca",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="http://192.168.18.90/videos/multilang_360p.mp4/index-a1.m3u8"
                #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio0",NAME="English",LANGUAGE="en",AUTOSELECT=NO,DEFAULT=NO,CHANNELS="2",URI="http://192.168.18.90/videos/multilang_360p.mp4/index-a2.m3u8"

                #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=869261,RESOLUTION=640x360,FRAME-RATE=25.000,CODECS="avc1.64001e,mp4a.40.2",AUDIO="audio0"
                http://192.168.18.90/videos/multilang_360p.mp4/index-v1.m3u8
                #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1671753,RESOLUTION=1280x720,FRAME-RATE=25.000,CODECS="avc1.64001f,mp4a.40.2",AUDIO="audio0"
                http://192.168.18.90/videos/multilang_720p.mp4/index-v1.m3u8

                #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=7203,RESOLUTION=640x360,CODECS="avc1.64001e",URI="http://192.168.18.90/videos/multilang_360p.mp4/iframes-v1.m3u8"
                #EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=14164,RESOLUTION=1280x720,CODECS="avc1.64001f",URI="http://192.168.18.90/videos/multilang_720p.mp4/iframes-v1.m3u8"
              • server
                • vod_hls_force_unmuxed_segments on;
              • client
                • ffplay http://192.168.18.90/videos/multi_,360,720,p.mp4.urlset/master.m3u8

            • Subtítols / Subtitles
              • http://localhost/videos/ccc/ccc_,320p.mp4,720p.mp4,lang/cat/ca.str,.urlset/master.m3u8
              • if subtitles file is not in English, you must specify the language with infix: lang/<3-letter-lang-code>
              • subtitles in mp4 #974
              • ...
            • ...
        • NGINX-based Media Streaming Server (nginx-rtmp-module)
          • RTMP module for nginx
          • Compilació / Compilation
          • Problemes / Problems
          • Live streaming config
            • RTMP
              • nginx.conf
                • rtmp {
                    server {
                      listen 1935;
                      ping 30s;
                      notify_method get;

                      application app-live {
                        live on;

                        # drop a publisher if inactive during 10s.
                        # NOTE: if you are using an RTMP load balancer (e.g. on AWS),
                        #   its timeout must have the same value as here
                        drop_idle_publisher 10s;

                        # wait for video (solves sync issues with audio)
                        wait_video on;
                        wait_key on;

                        # allow recursive kill of processes using trap on TERM
                        exec_kill_signal term;

                        respawn off;

                        # exec debug       # sudo chown nginx.nginx /var/log/nginx
                        exec_push /usr/local/bin/exec.sh exec_push $app $name >>/var/log/nginx/exec.log;
                        exec_publish /usr/local/bin/exec.sh exec_publish $app $name >>/var/log/nginx/exec.log;
                        exec_publish_done /usr/local/bin/exec.sh exec_publish_done $app $name >>/var/log/nginx/exec.log;
                      }
                    }
                  }
                • # nginx debug
                  error_log /var/log/nginx/error.log info;
                  #error_log /var/log/nginx/error.log debug; http {
                      server {
                          ...

                          #
                  rtmp statistics
                          location /stat {
                              rtmp_stat all;
                              rtmp_stat_stylesheet stat.xsl;
                          }

                          location /stat.xsl {
                              # e.g. /home/myuser/src/nginx/nginx-rtmp-module;
                              root /path/to/parent/dir/of/stat/xsl/file;
                          }
                      }
                  }
            • HLS
              • Is there any option for HLS re-streaming on Nginx-rtmp module like rtmp edge server ? #668
              • Cache TS but not m3u8 (see also cache on CloudFront):
                • nginx.conf
                  • # as no Cache-Control is added, if this is the origin for CloudFront, CloudFront will cache these files
                    location
                    ~* \.(ts|trp)$ {
                        root /tmp;
                        add_header 'X-Hls-Cache-Status' 'Cached TS';
                        add_header 'Access-Control-Allow-Origin' '*' always;
                        types {
                              video/mp2t ts;
                              }
                    }

                    # big cache (1 day) for index.m3u8
                    location ~* index.m3u8$ {
                        root /tmp;
                        add_header 'X-Hls-Cache-Status' 'Cached m3u8';
                        add_header 'Access-Control-Allow-Origin' '*' always;
                        types {
                             application/vnd.apple.mpegurl m3u8;
                        }
                        expires 1d;

                        # OPTIONS (section needed? see below)
                    }

                    # small cache (2 seconds) for other m3u8 files
                    location ~* \.m3u8$ {
                        root /tmp;
                        add_header 'X-Hls-Cache-Status' 'Almost fresh m3u8';
                        add_header 'Access-Control-Allow-Origin' '*' always;
                        types {
                             application/vnd.apple.mpegurl m3u8;
                        }
                        expires 2s;

                        # OPTIONS (section needed? see below)
                    }
                  • # do not cache m3u8 files
                    location /hls {
                        root /tmp;
                        add_header 'X-Hls-Cache-Status' 'Fresh content';
                        add_header Cache-Control no-cache;
                        add_header 'Access-Control-Allow-Origin' '*' always;
                        types {
                             application/vnd.apple.mpegurl m3u8;
                              }

                        # OPTIONS
                        if ($request_method = 'OPTIONS') {
                            add_header 'Access-Control-Allow-Origin' '*' always;
                            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
                            #
                            # Custom headers and headers various browsers *should* be OK with but aren't
                            #
                            add_header 'Access-Control-Allow-Headers' 'Authorization,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
                            #
                            # Tell client that this pre-flight info is valid for 20 days
                            #
                            add_header 'Access-Control-Max-Age' 1728000;
                            add_header 'Content-Type' 'text/plain charset=UTF-8';
                            add_header 'Content-Length' 0;
                            return 204;
                         }
                    }
            • MPEG-DASH
          • VOD config
            • MP4
              • location ~* \.(mp4)$ {
                    root /tmp;
                    add_header 'Access-Control-Allow-Origin' '*' always;

                    if ($arg_download = 'true') {
                            add_header Content-Disposition 'attachment; filename="$arg_filename"';
                    }

                    types {
                          video/mp4 mp4;
                          }
                   }
          • Debug
            • Nginx rtmp logs
            • comportament / behaviour (estàndard RTMP / RTMP standard)
              • Opció 1: sense drop_idle_publisher
                1. ffmpeg ... -f flv rtmp://myserver/myapp/mystream
                2. quan el servidor rep el flux, genera els senyals:
                  • push
                  • publish
                3. estat al servidor: publishing
                4. si fem CTRL-Z a l'ffmpeg, no passa res al servidor. Continua publishing i la connexió es manté
                5. reprenem (fg) l'ffmpeg. Cap canvi al servidor
                6. aturem (CTRL-C) l'ffmpeg. Al servidor, la connexió es tanca i genera el senyal:
                  • publish_done
              • Opció 2: amb drop_idle_publisher 10s;
                1. ffmpeg ... -f flv rtmp://myserver/myapp/mystream
                2. quan el servidor rep el flux, genera els senyals:
                  • push
                  • publish
                3. estat al servidor: publishing
                4. si fem CTRL-Z a l'ffmpeg, al servidor, al cap de 10s (valor especificat amb drop_idle_publisher), la connexió es tanca i genera el senyal:
                  • publish_done
                5. si reprenem (fg) l'ffmpeg, ens apareixen aquests errors, i no pot continuar:
                  • av_interleaved_write_frame(): Operation not permitted
                    Error writing trailer of rtmp://myserver/myapp/mystream: Operation not permitted
                    Conversion failed!
            • RTMP on tshark / Wireshark
            • exec
              • /usr/local/bin/exec.sh (exec_push.sh, exec_publish.sh, exec_publish_done.sh)
                • #!/bin/bash event=$1
                  app=$2
                  name=$3

                  echo $(date '+%Y-%m-%dT%H:%M:%S.%06NZ' --utc) [${event}] ${app} ${name}
                  exit 0
                • #!/bin/bash
                  event=$1
                  app=$2
                  name=$3

                  is_publishing=$(curl -X GET "http://127.0.0.1/
                  publishing?app=${app}&name=${name}")
                  echo $(date '+%Y-%m-%dT%H:%M:%S.%06NZ' --utc) [${event}] ${app} ${name} ${is_publishing}
                  exit 0
                • !/bin/bash
                  event=$1
                  app=$2
                  name=$3
                  addr=$4
                  flashver=$5
                  swfurl=$6
                  tcurl=$7
                  pageurl=$8
                  is_publishing=$(curl -X GET "http://127.0.0.1/publishing?app=${app}&name=${name}")
                  echo $(date '+%Y-%m-%dT%H:%M:%S.%06NZ' --utc) [${event}] app=${app} name=${name} addr=
                  ${addr} flasver=${flashver} swfurl=${swfurl} tcurl=${tcurl} pageurl=${pageurl} is_publishing=${is_publishing}


                  if [[ ${event} =~ "publish"$ ]]
                  then
                      if [[ ${is_publishing} = "true" ]]
                      then
                          echo "publish and publishing"
                      else
                          echo "publish and not publishing"
                      fi
                  fi

                  if [[ ${event} =~ "publish_done"$ ]]
                  then
                      if [[ ${is_publishing} = "true" ]]
                      then
                          echo "publish_done but still publishing -> this publish_done is not mine: abort exec"
                      else
                          echo "publish_done and not publishing -> proceed with exec"
                      fi
                  fi

                  exit 0
              • my_app.conf
                • application my_app {
                      live on;

                      # drop a publisher if inactive (connected but not sending content) during this time
                      drop_idle_publisher 10s;       

                      # wait for video (solves sync issues with audio)
                      wait_video on;
                      wait_key on;

                      # allow recursive kill of processes using trap on TERM
                      exec_kill_signal term;

                      respawn off;

                      # exec to debug
                      exec_push /usr/local/bin/exec.sh exec_push $app $name $addr $flashver $swfurl $tcurl $pageurl >>/var/log/nginx/exec.log;
                      exec_publish /usr/local/bin/exec.sh exec_publish $app $name
                  $addr $flashver $swfurl $tcurl $pageurl >>/var/log/nginx/exec.log;
                      exec_publish_done /usr/local/bin/exec.sh exec_publish_done $app $name
                  $addr $flashver $swfurl $tcurl $pageurl >>/var/log/nginx/exec.log;
                  }
            • Nginx logs
              • Estàndard RTMP / RTMP standard
              • tail -n 2000 -f /var/log/nginx/error.log | grep -E "connect:|disconnect|Stream|drop|publish:|play:"
              • client: 192.168.1.135 server: 192.168.1.138 exec_publish /usr/local/bin/exec_publish.sh exec /usr/local/bin/exec_push.sh
                exec_push
                /usr/local/bin/exec_push.sh
                exec_publish_done /usr/local/bin/exec_publish_done.sh
                • ffmpeg -re -i sintel.mp4 -c copy -f flv rtmp://192.168.1.138/my_app/sintel
                • [info] client connected '192.168.1.135'
                • [info] connect: app='my_app' args='' flashver='' swf_url='' tc_url='rtmp://192.168.1.138/my_app' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] createStream, client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] publish: name='sintel' args='' type=live silent=0, client: 192.168.1.135, server: 0.0.0.0:1935




                • [info] exec: starting unmanaged child '/usr/local/bin/exec_publish.sh', client: 192.168.1.135, server: 0.0.0.0:1935
                • [notice] signal 17 (SIGCHLD) received
                • [notice] unknown process 5886 exited with code 0
                • [info] epoll_wait() failed (4: Interrupted system call)




                • [info] exec: starting managed child '/usr/local/bin/exec_push.sh', client: 192.168.1.135, server: 0.0.0.0:1935
                • [notice] signal 17 (SIGCHLD) received
                • [notice] unknown process 4563 exited with code 0
                • [info] exec: child 4563 exited; respawning, client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] exec: terminating child 4563, client: 192.168.1.135, server: 0.0.0.0:1935

                • ...
                • [debug] RTMP recv video (9) csid=4 timestamp=1166 mlen=7514 msid=1 nbufs=59
                • [debug] RTMP recv audio (8) csid=4 timestamp=1171 mlen=172 msid=1 nbufs=2
                • [debug] RTMP recv audio (8) csid=4 timestamp=1192 mlen=172 msid=1 nbufs=2
                • [debug] RTMP recv video (9) csid=4 timestamp=1208 mlen=12101 msid=1 nbufs=95
                • [debug] RTMP recv audio (8) csid=4 timestamp=1214 mlen=180 msid=1 nbufs=2
                • [debug] RTMP recv audio (8) csid=4 timestamp=1235 mlen=176 msid=1 nbufs=2
                • ...



                • CTRL-C on ffmpeg
                • end of streamed file
                • [debug] AMF read (11) 46 43 55 6E 70 75 62 6C 69 73 68 'FCUnpublish'
                • [debug] AMF read (12) 64 65 6C 65 74 65 53 74 72 65 61 6D 'deleteStream'
                • [info] deleteStream, client: 192.168.1.135, server: 0.0.0.0:1935
                • [debug] AMF write (15) 53 74 6F 70 20 70 75 62 6C 69 73 68 69 6E 67 'Stop publishing'






                • [info] exec: starting unmanaged child '/usr/local/bin/exec_publish_done.sh', client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] disconnect, client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] deleteStream, client: 192.168.1.135, server: 0.0.0.0:1935







                • [notice] signal 17 (SIGCHLD) received
                • [notice] unknown process 7048 exited with code 0
                • [info] epoll_wait() failed (4: Interrupted system call)
                • after CTRL-Z on ffmpeg + drop_idle_publisher seconds
                • [error] live: drop idle publisher, client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] disconnect, client: 192.168.1.135, server: 0.0.0.0:1935
                • [info] deleteStream, client: 192.168.1.135, server: 0.0.0.0:1935
                • [debug] AMF write (15) 53 74 6F 70 20 70 75 62 6C 69 73 68 69 6E 67 'Stop publishing'






                • [info] exec: starting unmanaged child '/usr/local/bin/exec_publish_done.sh', client: 192.168.1.135, server: 0.0.0.0:1935
                • [notice] signal 17 (SIGCHLD) received
                • [notice] unknown process 7163 exited with code 0
                • [info] epoll_wait() failed (4: Interrupted system call)
            • ...
          • on
          • exec
            • Exec when produced by
              exec_static nginx is started
              exec_options

              exec_kill_signal

              respawn

              respawn_timeout

              exec_publish connection open
              exec_push
              exec
              ? a publisher starts sending content
              exec_pull a relay is consuming the stream
              exec_play a player starts consuming the stream
              exec_play_done a player stops consuming the stream
              exec_publish_done connection closed
              • CTRL-C ffmpeg
              • after time specified by drop_idle_publisher, if content is not received
              exec_record_done

            • One common exec issue (PATH preservation)
              • # keep $PATH
                env PATH;
            • debug
              • IMPORTANT: no space between ">>" and log filename
                • exec /path/to/my_script.sh >>/var/log/nginx/exec/exec.log 2>&1;
              • su -c 'su -s /bin/bash nginx' (sudo -u nginx -s)
                • (type root password)
                • /path/to/my_script.sh
            • /tmp and chroot
              • if specified in nginx.service: [Service] PrivateTmp=true, nginx service uses a /tmp directory different from system-wide /tmp:
                • /tmp/systemd-private-...-nginx.service-.../tmp/...
            • Exec wrapper in bash (to avoid non terminated processes, e.g. ffmpeg)
              • trap
              • ...conf
                • application myapp {
                      live on;

                      exec /var/scripts/exec_wrapper.sh $name;
                      exec_kill_signal term;
                  }
              • /var/scripts/exec_wrapper.sh
                • #!/bin/bash

                  on_die ()
                  {
                      # kill all children
                      #pkill -KILL -P $$
                      # terminate ffmpeg gently (so as it can close its output, e.g. m3u8)
                      kill -INT $ffmpeg_pid
                  }

                  trap
                  'on_die' TERM

                  ffmpeg -i rtmp://localhost/myapp/$1 -c copy -f flv rtmp://localhost/myapp2/$1 &
                  ffmpeg_pid=$!

                  # wait for ffmpeg
                  wait $ffmpeg_pid
          • Statistics
          • Escalabilitat / Scalability
          • transcoding: ffmpeg (exec_push)
          • recording thumbnails
            • Screenshots of live stream
            • time format takes timezone from /etc/localtime
            • one single flv video file that will contain only keyframes. Playing the resulting file will show the frames at the correct time. Note that ffplay/ffmpeg don't like ":" in filename.
              • recorder case1 {
                    record keyframes;
                    record_unique off;
                    record_path /tmp/case1;
                    record_suffix _
                %Y-%m-%dT%H:%M:%S%z.flv;
                }
            • different thumbnails created from keyframes. When no keyframe is available during the interval (2s), generated flv file is empty. If more than one keyframe is found during the period, all of them will be put in the resulting flv file
              • recorder case2 {
                    record keyframes;
                    record_unique off;
                    record_path /tmp/case2;
                    record_suffix _
                %Y-%m-%dT%H%M%S%z.flv;
                    record_interval 2s;
                }
            • different thumbnails created from frame (even if not a key frame). Each flv will contain only one frame. After creation of flv file, it will be converted to jpeg.
              • recorder case3 {
                    record video;
                    record_unique off;
                    record_path /tmp/case3;
                    record_suffix _
                %Y-%m-%dT%H%M%S%z.flv;
                    record_interval 2s;
                    record_max_frames 1;
                    exec_record_done ffmpeg -y -i $path $dirname/$basename.jpeg;
                }
            • different approach: no recorded used; ffmpeg does all job (one jpeg thumbnail every 10s):
              • exec_push ffmpeg -i rtmp://localhost:1935/$app/$name -r 1/10 $name_%06d.jpeg;
              • Warning: ffmpeg may miss the first keyframe
          • Wiki
            • Getting started with nginx rtmp
            • Directives
            • Getting number of subscribers
              • Estructura / Structure:
                • rtmp
                  • nginx_version
                  • nginx_rtmp_version
                  • compiler
                  • built
                  • pid
                  • uptime
                  • naccepted
                  • bw_in
                  • bytes_in
                  • bw_out
                  • bytes_out
                  • server
                    • application
                      • name
                      • live
                        • stream
                          • name
                          • time
                          • bytes_in
                          • bw_out
                          • bytes_out
                          • bw_audio
                          • bw_video
                          • client
                            • id
                            • address
                            • time
                            • dropped
                            • avsync
                            • timestamp
                            • publishing
                            • active
                          • client
                            • ...
                        • stream
                          • ...
                      • application
                        • ...
              • Whether a stream is receiving a publisher
                • publishing.xsl
                  • <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

                      <xsl:output method="text" media-type="text/plain"/>
                     
                      <xsl:param name="app"/>
                      <xsl:param name="name"/>
                     
                      <xsl:template match="/">
                        <xsl:choose>
                          <xsl:when test="//application[name=$app]/live/stream[name=$name]/client[publishing and active]">true</xsl:when>
                          <xsl:otherwise>false</xsl:otherwise>
                        </xsl:choose>
                       
                      </xsl:template>
                     
                    </xsl:stylesheet>
                • .conf
                  • location /publishing {
                        proxy_pass http://127.0.0.1/stat;
                        xslt_stylesheet /usr/share/nginx/html/publishing.xsl app='$arg_app' name='$arg_name';
                    }
                • Usage
                  • http://.../publishing?app=...&name=...
                  • xmlstarlet tr publishing.xsl -s app=my_app -s name=my_name stats.xml
              • Other information from stats, using XSLT (e.g. given the name of the application, return a plain text with several lines, each line containing: stream_name, video_width, video_height):
                • /var/www/stat_streams.xslt
                  • <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

                    <xsl:output method="text" media-type="text/plain"/>

                    <xsl:param name="app"/>

                    <xsl:template match="/">
                        <xsl:apply-templates select="//application[name=$app]"/>
                    </xsl:template>

                    <xsl:template match="application">
                      <xsl:for-each select="live/stream">
                        <xsl:value-of select="name"/>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="meta/video/width"/>
                        <xsl:text> </xsl:text>
                        <xsl:value-of select="meta/video/height"/>
                        <xsl:text>&#xa;</xsl:text>
                      </xsl:for-each>
                    </xsl:template>

                    </xsl:stylesheet>
                • /etc/nginx/conf.d/stat_streams.conf
                  • location /stat_streams {
                        proxy_pass http://127.0.0.1/stat;
                        xslt_stylesheet /var/www/stat_streams.xslt app='$arg_app';
                    }
                • Usage
                  • http://.../stat_streams?app=...
                  • xmlstarlet tr stat_streams.xslt -s app=my_app stats.xml
            • Control module

              • syntax
                args
                info
                Record http://server.com/control/record/start|stop?
                srv=SRV&app=APP&name=NAME&rec=REC


                Drop
                http://server.com/control/drop/publisher|subscriber|client?
                srv=SRV&app=APP&name=NAME&addr=ADDR&clientid=CLIENTID


                Redirect

                http://server.com/control/redirect/publisher|subscriber|client?
                srv=SRV&app=APP&name=NAME&addr=ADDR&clientid=CLIENTID&newname=NEWNAME
                • publisher: publishing
                • subscriber: playing
                • client: publishing, playing
                • given an app, change stream name for a publisher or a subscriber -> affects connection
                • publisher o subscriber can be identified by: name, clientid or address
                • Redirecting streams in version 1.1.1
              • Parameters:
                • SRV: optional server{} block number within rtmp{} block, default to first server{} block
                • APP: application name
                • NAME: stream name
                • REC: optional recorder name, defaults to root (unnamed) recorder
                • ADDR: optional client address (the same as returned by rtmp_stat)
                • CLIENTID: optional nginx client id (displayed in log and stat)
                • NEWNAME: new stream name to redirect to
            • Record
          • Relay
          • MPEG-DASH in nginx-rtmp-module: live video in the browser without flesh
      • Client:
      • WebM DASH
      • HTTP streaming with GPAC
        • Documentació / Documentation
        • HbbTV
          • Live
          • duration of fragment must be the duration of segment: do not specify fragment duration; only segment duration
        • OnDemand
        • Live
          • MP4Box (exemples / examples)
            • Open bugs:
            • Exemples / Examples:
              • MP4Box -dash-live 10000 -segment-name '%s_$RepresentationID$_$Number$' sintel_trailer-720p.mp4
              • similar to output generated by DashCast: (-dash-live implies -rap)
                • MP4Box -dash-live 10000 -url-template -segment-name '$RepresentationID$_$Number$_gpac' -out mp4box.mpd ../sintel_trailer-720p.mp4#audio:id="a1" ../sintel_trailer-720p.mp4#video:id="v1"
              • MP4Box -dash-ctx dash-live.txt -dash 10000 -rap -no-frags-default -bs-switching no -mpd-refresh 10 -min-buffer 30000 -url-template -time-shift 1800 -segment-name 'live_$RepresentationID$_' -out live -dynamic toto_rep1.mp4#id=1 toto_rep2.mp4#id=2
              • several representations
            • -dash-live=F
            • Utilització / Usage
              • HbbTV
              • DASH AVC/264 / dash.js
                • svn r4990
                • MP4Box -profile dashavc264:live ...
                • Problem playing MPEG DASH streams on DASH IF reference player
                • Dash.js 1.1 compatibility
                • mp4box segmented files stop playback (26 Sep 2014) (24fps; real duration: 1m:07s:11f -> 67500ms)




                  • mpd
                    player
                    MP4Box -dash 5000 ... video.mp4


                    segment duration number of segments MP4Client dash.js



                    Period SegmentList


                    - -
                    PT0H1M7.50S 120000 14 1:07:11 -
                    -segment-name '%s_r$RepresentationID$_n$Number$_t$Time$' -
                    PT0H1M7.50S 120000 14 1:07:11 MEDIA_ERR_DECODE: 3
                    - -rap - PT0H1M7.50S 96000 20 1:07:11 -
                    -segment-name '%s_r$RepresentationID$_n$Number$_t$Time$' -rap - PT0H1M7.50S 96000 20 1:07:11 0:53:14 (only 16 segments)
                    Index for time 0 is 0
                    ...
                    Index for time 60 is 15 (?)
                    -segment-name '%s_r$RepresentationID$_n$Number$_t$Time$' -rap -frag-rap PT0H1M7.50S 96000 20 1:07:11 0:53:14 (only 16 segments)
                    Index for time 0 is 0
                    ...
                    Index for time 60 is 15
                    - - -profile live
                    (implies: -segment-name "%s_dash" -rap -url-template)
                    PT0H1M7.50S 96000 20 0:57:16 (only 17 segments)
                    0:57:16 (only 17 segments)
                    Index for time 60 is 15
                    Index for time 64 is 16
                    -segment-name '%s_dash' -rap -url-template PT0H1M7.50S 96000 20 0:57:16 (only 17 segments)
                    -segment-name '%s_dash' - -profile dashavc264:live
                    (implies -rap -url-template)
                    (but not: -segment-name '%s_dash')





                  • conclusions:
                    • dash.js necessita "-rap -segment-name ..." (i també -url-template, segons la recomanació, però el reproductor també el reprodueix [falten segments finals])
                    • bug a MP4Box fa que duration del segment sigui la durada del primer segment i no la mitjana
                      • si no hi ha url-template i hi ha la llista de segments: MP4Client ho fa bé
                      • si hi ha url-template, el càlcul de quins segments són necessaris es fa a partir de duration (del primer segment) i el temps total del periode. Això fa que cregui que necessita menys segments dels que realment necessita => no demana els segments finals
                    • solució:
                      • generació:
                        • MP4Box -dash 5000 -segment-name '%s_r$RepresentationID$_n$Number$' -profile dashavc264:live DashTest_5600.mp4
                          • millor, perquè incorpora: profiles="urn:mpeg:dash:profile:isoff-live:2011, http://dashif.org/guildelines/dash264"
                          • no cal especificar: -rap -url-template
                        • MP4Box -dash 5000 -segment-name '%s_r$RepresentationID$_n$Number$' -rap -url-template DashTest_5600.mp4
                      • modificació de l'mpd per a posar duration=average_duration
          • DashCast usage (live support)
          • Parameters:
            MPD
            MP4Box DashCast


            -logs ...

            segment duration (ms) -dash 10000
            -

            -dash-live 10000
            -seg-dur 10000

            fragment duration (ms) -frag
            -frag-dur 5000
            startWithSAP="1" gop alignment in segments -rap
            -

            gop alignment in fragments (needed by dash.js) -frag-rap
            -


            -url-template



            -segment-name ...
            • %s (input file name)
            • $RepresentationID$, $ID$
            • $Number$
              • $Number%05d$
            • $Time$
              • $Time%020d$
            • $Bandwidth$
              • $Bandwidth%010d$
            • $Init=VALUE$
              • default: $Init=init$
            • $Index=VALUE$

            -

            inband carriage of video parameter sets (avc3, hev1) (default if option is not specified) -bs-switching inband -

            bitstream switching mode not used no

            generate initialization segments compatible with each representation
            in the adaptation set by merging video parameter sets in a single cinfig,
            if possible. If not possible, defaults to no
            merge

            forces inband mode when a single input is used single

            generate a single init segment with multiple sample description entries for each track
            (required by HbbTV)
            multi

            output dir

            -out output

            generated mpd name (toto.mpd) -out toto
            -mpd toto.mpd
            availabilityStartTime updated at every mpd generation

            -dynamic-ast
            offset -ast-offset 1
            -ast-offset 1000
            TimeShiftBufferDepth
            -time-shift 10
            -time-shift 10
            minBufferTime
            -min-buffer 1000
            -min-buffer 1.0

            Gradual Decoder Refresh

            -gdr
            SegmentTimeLine
            -segment-timeline

            BaseURL
            -base-url
            -base-url
            minimumUpdatePeriod
            -mpd-refresh 10
            -mpd-refresh 10




            -npts
        • avc3 (iso6 brand)

        • output
          Apple approach

          MPEG/3GPP/OIPF approach
          m3u8 MPEG-2 TS
          (segmented)
          mpd MP4
          (segmented)
          input MPEG-2 TS over UDP udptsseg - -
          file MP4Box -dash ... -
          MP4 file MP42TS -prog=file.mp4 -rate=4000 -real-time -dst-file=file.ts
          MP4Box -dash 10000 -frags-per-sidx 5 -segment-name output_seg -rap
          file.mp4

        • Examples / Exemples
          • Generation of representations with ffmpeg
          • Limitation: MP4Box accepts only mp4 and ts local files as inputs (urls are not valid)
          • one single output file (input_dashinit.mp4, a concatenation of init and all the segments) with byte pointer references (mediaRange, indexRange), without rap alignment (startWithSAP="0"):
            • MP4Box -dash 4000 -frag 500 input.mp4
          • several (-segment-name) output files with a given mpd file name (-out), aligned to rap images (-rap -> startWithSAP="1"):
            • MP4Box -dash 4000 -frag 500 -rap -out nom_fitxer_mpd -segment-name nom_segment_ input.mp4
          • # output files command options mpd
            1 (dashinit)
            <BaseURL>input_dashinit.mp4</BaseURL>
            <SegmentList timescale="1000" duration="9576">
              <Initialization range="0-1283"/>
              <SegmentURL mediaRange="1284-484737" indexRange="1284-1388"/>
              <SegmentURL mediaRange="484738-856492" indexRange="484738-484890"/>
              ...
            </SegmentList>
            1 (init) +
            n (segments)
            -segment-name nom_segment_ <SegmentList timescale="1000" duration="9576">
              <Initialization sourceURL="nom_segment_init.mp4"/>
              <SegmentURL media="nom_segment_1.m4s"/>
              <SegmentURL media="nom_segment_2.m4s"/>
              ...
            </SegmentList>
            -segment-name '%s_$RepresentationID$_$Number$'
            (%s is the name of the input file)

            -segment-name '%s_$RepresentationID$_$Time$'
            (%s is the name of the input file)

            -url-template -segment-name nom_segment_ <SegmentTemplate timescale="1000" duration="9576" media="nom_segment_$Number$.m4s" startNumber="1" initialization="nom_segment_init.mp4"/>
          • profile command option other options automatically activated



            live
            -url-template
            on demand
            -single-segment
          • MPD: Adaptation sets, representations, init files, from AV files (mp4 files where generated as described in: generation of representations with ffmpeg):
            MP4Box -dash 5000 -frag 5000 -rap -frag-rap ... segments MPD info
            sintel_trailer_640x360_500k.mp4
            • audio/video
              • sintel_trailer_640x360_500k_dashinit.mp4
             <Period duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="24" par="16:9">
               <ContentComponent id="1" contentType="video" />
               <ContentComponent id="2" contentType="audio" />
               <Representation id="1" mimeType="video/mp4" codecs="avc1.64001e,mp4a.40.2" width="640" height="360" frameRate="24" sar="1:1" audioSamplingRate="48000" startWithSAP="1" bandwidth="562881">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
                <BaseURL>sintel_trailer_640x360_500k_dashinit.mp4</BaseURL>
                <SegmentList timescale="1000" duration="4000">
                 <Initialization range="0-1622"/>
                  <SegmentURL mediaRange="1623-470516" indexRange="1623-1666"/>
                  <SegmentURL mediaRange="470517-751949" indexRange="470517-470560"/>
                  ...
                 <SegmentURL mediaRange="3570178-3673389" indexRange="3570178-3570221"/>
                </SegmentList>
               </Representation>
              </AdaptationSet>
             </Period>
            • dash.js does not work
            -segment-name toto_ sintel_trailer_640x360_500k.mp4
            • audio/video
              • toto_init.mp4
              • toto_1.m4s
              • toto_2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="24" par="16:9">
               <ContentComponent id="1" contentType="video"  lang="und"/>
               <ContentComponent id="2" contentType="audio"  lang="und"/>
               <Representation id="1" mimeType="video/mp4" codecs="avc1.64001e,mp4a.40.2" width="640" height="360" frameRate="24" sar="1:1" audioSamplingRate="48000" s
            tartWithSAP="1" bandwidth="560713">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
                <SegmentList timescale="1000" duration="4096">
                 <Initialization sourceURL="toto_init.mp4"/>
                 <SegmentURL media="toto_1.m4s"/>
                 <SegmentURL media="toto_2.m4s"/>
                 ...
                </SegmentList>
               </Representation>
              </AdaptationSet>
             </Period>
            single AdaptationSet, with AV segments
            -segment-name 'toto_r$RepresentationID$_n$Number$' sintel_trailer_640x360_500k.mp4
            • audio/video
              • toto_r1_n.mp4
              • toto_r1_n1.m4s
              • toto_r1_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="24" par="16:9">
               <ContentComponent id="1" contentType="video"  lang="und"/>
               <ContentComponent id="2" contentType="audio"  lang="und"/>
               <Representation id="1" mimeType="video/mp4" codecs="avc1.64001e,mp4a.40.2" width="640" height="360" frameRate="24" sar="1:1" audioSamplingRate="48000" s
            tartWithSAP="1" bandwidth="560713">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
                <SegmentList timescale="1000" duration="4096">
                 <Initialization sourceURL="toto_r1_n.mp4"/>
                 <SegmentURL media="toto_r1_n1.m4s"/>
                 <SegmentURL media="toto_r1_n2.m4s"/>
                 ...
                </SegmentList>
               </Representation>
              </AdaptationSet>
             </Period>

            -url-template -segment-name 'toto_r$RepresentationID$_n$Number$' sintel_trailer_640x360_500k.mp4
            • audio/video
              • toto_r1_n.mp4
              • toto_r1_n1.m4s
              • toto_r1_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="24" par="16:9">
               <ContentComponent id="1" contentType="video"  lang="und"/>
               <ContentComponent id="2" contentType="audio"  lang="und"/>
               <SegmentTemplate timescale="1000" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="4096" initialization="toto_r$RepresentationID
            $_n.mp4"/>
               <Representation id="1" mimeType="video/mp4" codecs="avc1.64001e,mp4a.40.2" width="640" height="360" frameRate="24" sar="1:1" audioSamplingRate="48000" s
            tartWithSAP="1" bandwidth="560713">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
               </Representation>
              </AdaptationSet>
             </Period>

            -url-template -segment-name 'toto_r$RepresentationID$_n$Number$' sintel_trailer_640x360_500k.mp4#audio sintel_trailer_640x360_500k.mp4#video
            • audio
              • toto_r1_n.mp4
              • toto_r1_n1.m4s
              • toto_r1_n2.m4s
              • ...
            • video
              • toto_r2_n.mp4
              • toto_r2_n1.m4s
              • toto_r2_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true">
               <SegmentTemplate timescale="48000" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="239615" initialization="toto_r$Representatio
            nID$_n.mp4"/>
               <Representation id="1" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="128778">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
               </Representation>
              </AdaptationSet>
              <AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="24" par="16:9">
               <SegmentTemplate timescale="12288" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="49152" initialization="toto_r$Representation
            ID$_n.mp4"/>
               <Representation id="2" mimeType="video/mp4" codecs="avc1.64001e" width="640" height="360" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="432815">
               </Representation>
              </AdaptationSet>
             </Period>
            separated adaptationsets, but representation  id is 1 for audio and 2 for video
            -url-template -segment-name 'toto_r$RepresentationID$_n$Number$' sintel_trailer_640x360_500k.mp4#audio:id='a1' sintel_trailer_640x360_500k.mp4#video:id='v1'
            • audio
              • toto_ra1_n.mp4
              • toto_ra1_n1.m4s
              • toto_ra1_n2.m4s
              • ...
            • video
              • toto_rv1_n.mp4
              • toto_rv1_n1.m4s
              • toto_rv1_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true">
               <SegmentTemplate timescale="48000" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="239615" initialization="toto_r$Representatio
            nID$_n.mp4"/>
               <Representation id="a1" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="128778">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
               </Representation>
              </AdaptationSet>
              <AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="24" par="16:9">
               <SegmentTemplate timescale="12288" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="49152" initialization="toto_r$Representation
            ID$_n.mp4"/>
               <Representation id="v1" mimeType="video/mp4" codecs="avc1.64001e" width="640" height="360" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="432815">
               </Representation>
              </AdaptationSet>
             </Period>

            -url-template -segment-name 'toto_r$RepresentationID$_n$Number$' sintel_trailer_640x360_500k.mp4#audio:id='a1' sintel_trailer_640x360_500k.mp4#video:id='v1' sintel_trailer_1280x720_1500k.mp4#video:id='v2'
            • audio
              • toto_ra1_n.mp4
              • toto_ra1_n1.m4s
              • toto_ra1_n2.m4s
              • ...
            • video
              • sintel_trailer_640x360_500k_dash_set2_init.mp4
              • toto_rv1_n1.m4s
              • toto_rv1_n2.m4s
              • ...
              • toto_rv2_n1.m4s
              • toto_rv2_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true">
               <SegmentTemplate timescale="48000" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="239615" initialization="toto_r$Representatio
            nID$_n.mp4"/>
               <Representation id="a1" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="128778">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
               </Representation>
              </AdaptationSet>
              <AdaptationSet segmentAlignment="true" bitstreamSwitching="true" maxWidth="1280" maxHeight="720" maxFrameRate="24" par="16:9">
               <SegmentTemplate timescale="12288" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="49152" initialization="sintel_trailer_640x36
            0_500k_dash_set2_init.mp4"/>
               <Representation id="v1" mimeType="video/mp4" codecs="avc3.64001e" width="640" height="360" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="432757">
               </Representation>
               <Representation id="v2" mimeType="video/mp4" codecs="avc3.64001e" width="1280" height="720" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="1276459
            ">
               </Representation>
              </AdaptationSet>
             </Period>
            • one adaptationset for audio, another one for video
            • (as bs-switching is not specified, it defaults to "inband") => one single init for all video representations (PPS/SPS will be on segment files: avc3)

            -segment-name 'toto_r$RepresentationID$_n$Number$' -bs-switching merge sintel_trailer_640x360_500k.mp4#audio:id='a1' sintel_trailer_640x360_500k.mp4#video:id='v1' sintel_trailer_1280x720_1500k.mp4#video:id='v2'
            • audio
              • toto_ra1_n.mp4
              • toto_ra1_n1.m4s
              • toto_ra1_n2.m4s
              • ...
            • video
              • toto_rv1_n.mp4
              • toto_rv1_n1.m4s
              • toto_rv1_n2.m4s
              • ...
              • toto_rv2_n.mp4
              • toto_rv2_n1.m4s
              • toto_rv2_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true">
               <SegmentTemplate timescale="48000" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="239615" initialization="toto_r$Representatio
            nID$_n.mp4"/>
               <Representation id="a1" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="128778">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
               </Representation>
              </AdaptationSet>
              <AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="24" par="16:9">
               <SegmentTemplate timescale="12288" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="49152" initialization="toto_r$Representation
            ID$_n.mp4"/>
               <Representation id="v1" mimeType="video/mp4" codecs="avc1.64001e" width="640" height="360" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="432593">
               </Representation>
               <Representation id="v2" mimeType="video/mp4" codecs="avc1.64001f" width="1280" height="720" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="1276295
            ">
               </Representation>
              </AdaptationSet>
             </Period>
             
            -segment-name 'toto_r$RepresentationID$_n$Number$' -bs-switching no sintel_trailer_640x360_500k.mp4#audio:id='a1' sintel_trailer_640x360_500k.mp4#video:id='v1' sintel_trailer_1280x720_1500k.mp4#video:id='v2'
            • audio
              • toto_ra1_n.mp4
              • toto_ra1_n1.m4s
              • toto_ra1_n2.m4s
              • ...
            • video
              • toto_rv1_n.mp4
              • toto_rv1_n1.m4s
              • toto_rv1_n2.m4s
              • ...
              • toto_rv2_n.mp4
              • toto_rv2_n1.m4s
              • toto_rv2_n2.m4s
              • ...
             <Period id="" duration="PT0H0M52.21S">
              <AdaptationSet segmentAlignment="true">
               <SegmentTemplate timescale="48000" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="239615" initialization="toto_r$RepresentationID$_n.mp4"/>
               <Representation id="a1" mimeType="audio/mp4" codecs="mp4a.40.2" audioSamplingRate="48000" startWithSAP="1" bandwidth="128778">
                <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
               </Representation>
              </AdaptationSet>
              <AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="24" par="16:9">
               <SegmentTemplate timescale="12288" media="toto_r$RepresentationID$_n$Number$.m4s" startNumber="1" duration="49152" initialization="toto_r$RepresentationID$_n.mp4"/>
               <Representation id="v1" mimeType="video/mp4" codecs="avc1.64001e" width="640" height="360" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="432593">
               </Representation>
               <Representation id="v2" mimeType="video/mp4" codecs="avc1.64001f" width="1280" height="720" frameRate="24" sar="1:1" startWithSAP="1" bandwidth="1276295">
               </Representation>
              </AdaptationSet>
             </Period>
            • same mpd and same segment file structure as the one obtained with -bs-switching merge
            • differences?
          • conversió m3u8 (HLS) a mpd (DASH) / conversion from m3u8 (HLS) to mpd (DASH):
            • MP4Box -mpd test.mpd [-url-template] [http://...]myfile.m3u8
          • a single mpd file from multiple representations
          • Some guidelines
            • x264: --sps-id option

          • segment duration subsegment duration fragment duration subsegments per segment command

            -dash (calculated) -frag -subsegs-per-sidx
            default value ->

            500


            10000 1000 1000
            MP4Box -dash 10000 -frag 1000 -rap test.mp4

            10000
            1000 5 MP4Box -dash 10000 -frag 1000 -rap -segment-name myDash  -subsegs-per-sidx 5 -url-template test.mp4

            10000
            1000
            MP4Box -dash 10000 -frag 1000 -rap -single-segment test.mp4






3D Vídeo

DLNA / UPnP

Resolucions vídeo digital / Digital video resolutions

name h_size PAL (25ips, 50Hz) NTSC (30ips, 60Hz) used by MPEG-2 level
resolution
(active)
size aspect resolution
(active)
size aspect





7680 x 4320

SHV

1920 1920 x 1152

1920 x 1080
1.77 (16:9) HDTV (1080i, 1080p) High





1920 x 1035




1440 1440 x 1152

1440 x 1080


High-1440
16CIF 1408 1408 × 1152

1408 × 960




1280


1280 x 720
1.77 (16:9) HDTV (720p)
9CIF 1056 1056 × 864

1056 × 720




768 768 x 576 442368 1.33 (4:3) 768 x 480 368640 1.60 DV, DivX
Full CCIR-601, CCIR-601 D1 720 720 x 576 414720 1.25 (5:4) 720 x 480 345600 1.50 most DVD Main
CCIR-601 1/1 D1, cropped CCIR-601 D1, D1, 4CIF 704 704 x 576 405504 1.22 704 x 480 337920 1.46 some DVD

640 640 x 512 327680 1.25 (5:4) 640 x 480

DivX, (sq.p. NTSC)

544 544 x 576 313344 0.94 544 x 480

(LD)
3/4 D1 528 528 x 576 304128 0.92 528 x 480 253440 1.10 (LD)
2/3 D1 480 480 x 576 276480 0.84 480 x 480 230400 1.00 SVCD
1/2 D1, D2 352 352 x 576 202752 0.61 352 x 480 168960 0.73 DVD, CVD, (SVHS)
D3
704 x 288 202752 2.44





480


480 x 352




480 x 384 184320 1.25 (5:4) 480 x 320 153600 1.50 DivX

400 400 x 320 128000 1.25 (5:4)


DivX

384 384 x 288 110592 1.33 (4:3)


DivX
SIF 360 360 x 288

360 x 240



CIF-601, D4, SIF* 352 352 x 288 101376 1.22 352 x 240 84480 1.26 VCD, DVD, (VHS) Low
QCIF+ 176 176 x 220

176 x 220



QCIF 176 x 144

176 x 120



SQCIF 128 128 x 96







* DVB MPEG2: ETSI TS 101 154 Annex A

128 144 176 320 352 360 384 400 480 528 544 640 704 720 768 960 1056 1280 1408 1440 1920
80

30 (A)


















96
SQCIF
30 (A)




















144


QCIF
15 (A), 30 (B)


















176



W-QVGA 15 (B), 30 (C)
















220


QCIF

















224







30 (C)












240



QVGA 15 (B), 30 (C) CIF
(a)
, 24p, 30p, 60p, 30i
SIF














288




CIF
(a), 25p, 50p, 25i
SIF x




D3 (b)







320







x x











352








x











360











nHD








384








x











480 i



(c), 30p, 24p, 30i


(d), 30p, 24p, 30i (e) x, 30p, 24p, 30i x30p, 24p, 30i 4CIF (f) CCIR-601 (g)
30Hz
(NTSC)
30i, 30i
x





p











4CIF
30Hz
24p, 30p, 60p, 30p, 60p







576 i



D2 (c), 25p, 25i


(d), 25p, 25i (e) x 25p, 25i
4CIF (f) CCIR-601 (g)
25Hz (PAL)
 25i, 25i
x





p



D2






4CIF
25Hz
25p, 25p,  50p







720 i















9CIF



p










25Hz 30Hz
25p, 50p 24p, 30p, 60p



25Hz 30Hz
25p, 50p 24p, 30p, 60p
25Hz 30Hz
50p, 25p, 50p 24p, 30p, 60p, 24p, 30p, 60p



864
















9CIF



960


















16CIF

1035




















x
1080 i














25Hz 30Hz
25i 30i

25Hz 30Hz
25i 30i

25Hz 30Hz
25i 30i
25Hz 30Hz
25i, 25i 30i, 30i
p














25Hz 30Hz
25p 24p

25Hz 30Hz
25p 24p

25Hz 30Hz
25p 24p
25Hz 30Hz
24p, 25p, 25p 24p,
30p, 24p
1152


















16CIF x x

128
176
352 360 384 400 480 528 544 640 704 720 768 960 1056 1280 1408 1440 1920
ETSI TS 101 154 v1.8 (MPEG-2 TS) Annex A - Full screen luminance resolutions for SDTV and HDTV:
  • DVB MPEG2
  • DVB AVC
ETSI TS 102 005 (IP):
  • 480i, 576i, 720p, 1080i, 1080p
  • Annex B: DVB-IP datacast
    • H264/AVC
    • VC-1
MPEG-2 level:
  • low
  • main
  • high-1440
  • high
* 30i = 30 frames/s = 60 fields/s
** 30p = 30 frames/s
Notes:
  • a: CIF-601, D4, SIF*
  • b: D3
  • c: 1/2 D1, D2
  • d: 2/3 D1
  • e: 3/4 D1
  • f: CCIR-601 1/1 D1, cropped CCIR-601 D1, D1, 4CIF
  • g: Full CCIR-601, CCIR-601 D1

ITU-R  SMPTE EBU 3299

frames/s fields/s lines/frame samples/line
sampling rate (MHz) bitrate (Mbps) at 4:2:2 anamorphic (ARS)

EHRI LSDI
luma chroma sample aspect ratio target square active pixels / line pixel aspect ratio (PAR)

active
(AL/F)
total active
(S/AL)
total
(S/TL)
active total
luma chroma
(4:2:2)
8b 10b 4:3 16:9 DAR
4:3
DAR
16:9
BT 601



NTSC
(480i)
i30 30 59.94 480 525 720 858 360 429
13,50 6,75 216 270 480*4/3 = 640 480*16/9 = 853 640/704 (10/11)
640/720? ()
853/704 ()
853/720? ()




PAL
(576i)
i25 25 50 576 625 720 864 360 432 720/576 = 5/4 13,50 6,75 216 270 576*4/3 = 768 576*16/9 = 1024 768/704 (12/11)
768/720? (16/15)
1024/704 (16/11)
1024/720? (64/45)
BT-1543

296M S3
720 p60 60 - 720 750 1280 1980


74,25

921.6







S1 p50 50 -




0.92G



BT-709



1125 i30 30 60 1035 1125




74,25 37,125





BT 709 (>=4) EHRI-0 BT-1680 274 S6 S2 1080 i25 25 50 1080 1125 1920 2640


74,25

1036.8





i30 30 60












p24 24 -










274 S9 S3 p25 25 -


74,25

1036.8





p30 30 60










274 S3 S4 p50 50 -


148.5

2073.6





p60 60 -














1250 i25 25 50 1152 1250




74,25 37,125





BT.2020 EHRI-1 BT-1769

4k


2160
3840












EHRI-2






3240
5760











BT.2020 EHRI-3 BT-1769

Super Hi-Vision


4320
7680












Relació d'aspecte / Aspect ratio


...

Refresc / Framerates

Entrellaçat / Interlace

Colorimetria / Colorimetry

  • Colorimetria / Colorimetry
  • Documents:
    • colorimetria.ods
    • Colour primaries and reference white:
    • ITU-R BT.601: "2.6  Colour and opto-electronic transfer characteristic"
      • reference white:

        • 625 / 525

          x y
          D65 0.3127 0.3290
      • primary colours:

        • 625 525

          x y x y
          R 0.640 0.330 0.630 0.340
          G 0.290 0.600 0.310 0.595
          B 0.150 0.060 0.155 0.070
    • EBU primaries: EBU Tech.3213 "EBU standard for chromacity tolerances for studio monitors"
      • reference white:

        • CIE 1931 CIE 1960

          x y u v
          D65 0.313 0.329 0.1978 0.3122
      • primary colours:

        • CIE 1931 CIE 1960

          x y u v
          R 0.64 0.33 0.451 0.349
          G 0.29 0.60 0.121 0.374
          B 0.15 0.06 0.175 0.105
  • Gamma
    • EBU Tech 3320:
      • system_gamma (1.2) = camera_encoding_gamma_OETF (0.51) x display_gamma_EOTF (2.35)
    • Gamma FAQ
  • Chroma subsampling (wp)
    • Chrominance Subsampling in Digital Images (pdf) 4:2:0, 4:2:2, ... 4:x:x explained
    • Notació / Notation
      • J/a/b
        • J (usually 4): width of a 2-row reference block
        • a: number of chroma samples in the first row
        • b: number of chroma samples in the second row
    • ●: Y'+Cb+Cr; ○: Y'
    • 4:1:0
    • 4:1:1
    • 4:2:0
    • 4:2:2
    • 4:4:0
    • 4:4:4
  • Demos

Sincronització àudio/vídeo / Audio/video synchronisation


  • Streaming audio/video synchronisation

  • solució / solution ffmpeg vlc kdenlive snowmix


    -itsoffset Eines -> Sincronització de la pista Afegeix un clip
    Ungroup
    Edita la durada
    add silence / drop
    l'àudio està avançat respecte el vídeo /
    audio is ahead of the video (e.g. 200ms at 25fps)
    retardar l'àudio /
    delay the audio
    • ffmpeg -i clip.mp4 -itsoffset 0.200 -i clip.mp4 -c copy -map 0:0 -map 1:1 output.mp4
    • ffmpeg -i video_source -itsoffset delay -i audio_source_to_be_delayed -map 0:x -map 1:y ...
    Sincronització de la pista d'àudio: 0,200ms (Retardat)
    Tecla: k (+50ms)
    Àudio -> Posició: 00:00:00:08
    • temporarily
      • audio feed add silence 1 200
      • audio mixer add silence 1 200
      • audio sink add silence 1 200
    • permanently
      • audio feed delay ...
      • audio mixer delay ...
      • audio sink delay ...
    el vídeo està avançat; l'àudio està retardat respecte el vídeo /
    audio is behind the video (e.g. 100ms at 25fps)
    retardar el vídeo; avançar l'àudio /
    delay the video; hasten audio
    • ffmpeg -i clip.mp4 -itsoffset 0.100 -i clip.mp4 -c copy -map 1:0 -map 0:1 output.mp4
    • ffmpeg -i audio_source -itsoffset delay -i video_source_to_be_delayed -map 1:x -map 0:y ...
    Sincronització de la pista d'àudio: -0,100ms (Accelerat)
    Tecla: j (-50ms)
    Vídeo -> Posició: 00:00:00:04
    • temporarily
      • audio mixer drop 1 100
    • permanently
      • system output delay ...

Pantalles TV Screens - Distàncies/Distances

dimensions distància d (cm)
D
(diagonal)
H
(alçada)
W
(amplada)
480 576 720 1080
(HD)
2160
(UHD)
4320 N
(# of lines)
7H 6H (5H-7H) 4,78H 3,19H 1,6H
0,75H d =  H /(2(N-1)tg(1'/2))
" cm 4/3 16/9 4/3 16/9 4/3 16/9 4/3 16/9 16/9 16/9 16/9 16/9








15deg H
30deg H

100deg  H


0,60D 0,49D 0,8D 0,87D 4,2D 3,5D 3,6D 3D 2,39D 1,5D



3W/4 9W/16 4H/3 16H/9




1,7W

65"










257
128

55"









218
109

50" 130 78 64 104 113 560 457 466 381 304 203

49"










194
97

46" 117 70 57 93 102 503 411 419 342 274 182

43" 109

54

95





170
85

42" 107 64 52 86 93 461 376 383 313 251 167

40" 102 61 50 82 89 439 358 366 298 239 159

32 " 82 49 40 66 71 353 288 294 240 192 128

30" 76 46 37 61 66 327 267 272 222 178 119

28" 72 43 35 58 63 310 253 258 211 169 112

25" 63 38 31 50 55 222 221 226 185 148 98


Acústica / Acoustics

Àudio / Audio

  • Audio Web
  • Audio Review
  • Audio Video Cine En Casa (Garrido)
  • HDCD
  • Hi Fi on WWW
  • Audiophilia
  • SoundStage!
  • The World Wide Web Virtual Library: Audio
  • MIDI
  • Corrupt audio discs, aka "Copy-Protected CDs" 
  • Comercial
    • USB
    • Alpine (Europe)
    • B&W Speakers
    • Bose
    • Clarion (eu, es)
    • Denon (es)
      • Europe
      • AVC 3801 review (T3)
      • Mini D-250
        UPO-250 etapa de potència 4Ω: 2x..W; 8Ω: 2x50 W 270 (ampl.) x 86 x 330 4,1kg
        UDRW-250 doble platina

        4,4kg
        UTP-250 sintonitzador, preamplificador

        3,2kg
        UCD-250 lector CD

        3,1kg
        AVC-77 preamplificador AV


        JM 220D caixes acústiques 4Ω 40-60W

      • PMA-900HNE
        • Manual Web (pdf)
        •  (ampl.), 8,3 kg
        • 4Ω: 2x85 W; 8Ω: 2x50 W
      • DRA-100
        • Manual Web (pdf)
        • Reviews
        • 280mm (ampl.) x 160 mm (al.) x 337 mm (fond.)
        • 4Ω: 2x70 W; 8Ω: 2x35 W
        • Advanced AL32 (every PCM stream is converted in 32 bits and 192 kHz)
        • DLNA 1.5
        • Bluetooth 2.1 + EDR
          • A2DP (Advanced Audio Distribution Profile) 1.2, AVRCP (Audio Video Remote Control Profile) 1.4, apt-X
          • codecs: SBC, AAC
        • formats:

          format freqüència de mostratge bit-rate bits extensió
          des de fitxer
          (USB, PC, NAS)
          WMA 32 / 44,1 / 48 kHz 48-192 kbps - .wma
          MP3 32 / 44,1 / 48 kHz 32-320 kbps - .mp3
          WAV 32 / 44,1 / 48 / 88,2 / 96 / 176,4 / 192 kHz - 16 / 24 bits .wav
          MPEG-4 AAC 32 / 44,1 / 48 kHz 16-320 kbps - .aac / .m4a / .mp4
          FLAC 32 / 44,1 / 48 / 88,2 / 96 / 176,4 / 192 kHz - 16 / 24 bits .flac
          ALAC 32 / 44.1 / 48 / 88,2 / 96 kHz - 16 / 24 bits .m4a
          AIFF 32 / 44,1 / 48 / 88,2 / 96 / 176,4 / 192 kHz - 16 / 24 bits .aif / .aiff
          DSD (2 canals) 2,8 / 5,6 MHz - 1 bit .dsf / .dff
          ràdio per Internet WMA 32 / 44,1 / 48 kHz 48-192 kbps
          .wma
          MP3 32 / 44,1 / 48 kHz 32-320 kbps
          .mp3
          MPEG-4 AAC 32 / 44,1 / 48 kHz 16-320 kbps
          .aac / .m4a / .mp4
      • ...
    • Dolby Laboratories
    • Harman Kardon
    • Holophonics
    • Jean Maurer
    • Sound Professionals (micròfons)
    • Xitel (PC-HiFi)
  • Conversors / Converters
  • Multicanal / Multi-channel
  • Multi-channel formats

    codec ús canals (max) used transport

    cinema casa total (.sub) front centre surround surround back height1 height2 sub stereo DVB DVD BD S/PDIF
    (IEC 60958/61937)
    HDMI

    FL
    L
    FR
    R
    C SL SR RL RR H1L H1R H2L H2R SW DVD-V DVD-A HD-DVD
    1.0 1.1 1.2 1.3 1.4 2.0 2.1
    matrix
    (analogue, digital)
    (total: Lt, Rt)

    Dolby
    SR (Spectral Recording)
    x



























    Surround

    x 3.0 L R -

    S





    - x












    Pro-logic

    x 4.0 L R C

    S





    - Denon AVC-77













    Pro-logic II

    x 5.0 L R C

    Ls
    Rs




    x PS2













    Pro-logic IIx


    6.1, 7.1


























    Pro-logic IIz


    9.1

























    DTS Neo6






























    PCM LPCM





























    discrete
    (digital)
    MPEG
    MPEG-1 layer 2
    mp2















    x












    MPEG-4 aac




























    Dolby Digital (AC-3) ac3


    5.1 x x x

    x
    x




    x
    x x x mandatory (448kb/s) mandatory (640kb/s)







    Digital EX


    7.1

























    Digital Live





























    Digital Surround EX
    x



























    Digital Plus / Enhanced AC-3 eac3















    x


    mandatory (3Mb/s) optional (1.6Mb/s)



    x


    True HD



















    mandatory (18Mb/s) optional (18Mb/s)







    dts surround

















    x

    x








    ES





























    NEO:6





























    96/24





























    HD master audio




















    x








    connect





























    virtual





























  • Sony Bravia AG9 (pdf)


    • LPCM Dolby Digital Dolby Digital Plus DTS
      in HDMI 5.1ch 32/44.1/48/88.2/96/176.4/192kHz 16/20/24bits x x x
      HDMI eARC (refer to help guide)


      out HDMI ARC 2ch 48kHz 16bits x x x

      HDMI eARC




      S/PDIF (optical) 2ch 48kHz 16bits x - x
    • HDMI
    • HDMI ARC
    • HDMI eARC
    • S/PDIF (optical)
      • 2 channel LPCM: 48kHz 16 bits
      • Dolby Digital
      • DTS
  • Sony PS4
    • ...
  • ...

Càmeres / Cameras


y (mm) x (mm) d (mm)
1" 12,8 9,6 16
2/3" 8,8 6,6 11
1/2" 6,4 4,8 8
1/3" 4,8 3,6 6
1/4" 3,6 2,7 4,5
  • HD Camcorder database (slashCAM)
  • Formats
    • Sony RX100V
        File format
        Record setting
        video
        audio
        data
        file

        major_brand

        resolution
        framerate coder
        bitrate
        sampling rate
        channels coder bitrate
        coder
        bitrate

        XAVC S 4K

        25p 100M










        25p 60M










        XAVC S HD
        XAVC
        50p 50M 1920x1080
        50 fps, 50 tbr h264 (High)
        50011 kb/s
        48000 Hz
        2ch pcm_s16be (twos) 1536 kb/s
        none (rtmd)
        409 kb/s
        PRIVATE/M4ROOT/CLIP/Cxxxx.MP4
        25p 50M










        100p 100M










        100p 60M










        AVCHD

        50i 24M(FX)










        50i 17M(FH)










        50p 28M(PS)










        25p 24M(FX)










        25p 17M(FH)










        MP4

        1920x1080 50p 28M










        1920x1080 25p 16M










        1280x720 25p 6M










        HFR
  • Sistema de fitxers / Filesystem
    • Video cameras
      • Sony Handycam HDR-CX550VE
        • Internal memory
          • ...
        • SD card
          • AVF_INFO/
            • AVINxxxx.INT
            • AVINxxxx.INP
            • AVINxxxx.BNP
          • PRIVATE/
            • AVCHD/
              • BDMV/
                • CLIPINF/
                  • xxxxx.CPI
                • INDEX.BDM
                • MOVIEOBJ.BDM
                • PLAYLIST/
                  • xxxxx.MPL
                • STREAM/
                  • xxxxx.MTS
      • Sony Action Cam
        • ...
    • Photo cameras
      • Canon Digital Ixus 860
        • DCIM/
          • 100CANON/
            • IMG_xxxx.JPG
            • MVI_xxxx.THM
            • MVI_xxxx.AVI
          • CANONMSC/
        • MISC/
          • M01xx.CTG
        • SNDR/
      • Nikon D90
        • DCIM/
          • 100NCD90/
            • DSC_xxxx.JPG
            • DSC_xxxx.NEF
            • DSC_xxxx.AVI
        • NIKON/
          • CUSTOMPC/
        • NIKONxxx.DSC
      • Sony RX100V
        • AVF_INFO/
          • AVINxxxx.INT
          • PRVxxxxx.BIN
        • DCIM/
          • 100MSDCF/
            • DSCxxxxx.JPG
            • DSCxxxxx.ARW
        • MISC/
        • MP_ROOT/
          • 100ANV01/
        • PRIVATE/
          • AVCHD/
            • BDMV/
              • CLIPINF/
                • xxxxx.CPI
              • INDEX.BDM
              • MOVIEOBJ.BDM
              • PLAYLIST/
                • xxxxx.MPL
              • STREAM/
                • xxxxx.MTS
          • M4ROOT/
            • CLIP/
              • Cxxxx.MP4
              • CxxxxMyy.XML
            • GENERAL/
            • MEDIAPRO.XML
            • STATUS.BIN
            • SUB/
            • THMBNL/
              • CxxxxTyy.JPG
          • SONY/
    • Càmeres endoscòpiques
      • marca model app usb resolució wifi longitud diàmetre accessoris preu
        Aopick Lentille Unique 5m Sup-Anesok USB-C+adapt. 1920x1440 - 5m 7,9mm ganxo, imant, mirall 39,99€
        Aopick (doble lent) Sup-Anesok USB-C+adapt. 1280 x 960
        1920 x 1440
        - 5m 7,9mm ganxo, imant 49,99€
        Depstech

        USB-C+adapt. 1280x720 - 5m 5,5mm x 33,99€
        Hopefox W300-ONE Anesok USB-C+adapt. 1920x1440 x 3m 7,9mm
        34,99€
        Hopefox W300-D (doble lent) Anesok USB-C+adapt. 1920x1440 x 3m 7,9mm
        42,99€
        Lightswim 1920P
        USB-C+adapt. 1920x1440
        5m 7,9mm
        39,90€
        Lightswim 1432P (doble lent)
        USB-A + adapt. 712p (lateral),
        720p (frontal)

        5m


        Yovoca
        Anesok USB-C+adapt. 1920x1440 x 3m 7,9mm
        39,79€
    • ...

Car audio

Comercial / Commercial

Component Connectivity

  • Open S-link project
  • Nirvis
  • HAVi (Home Audio Video Interoperability)
  • IEEE 1394 vs. DVI 
  • Serial Digital Interface - SDI (wp)(vp)
    • name standard bit-rate
      SD-SDI SMPTE 259M
      • 270 Mbps (10b,4:2:2) (13,5*10+6,75*10+6,75*10)
      • 360 Mbps (16:9)
      • 177 Mbps (8b, 4:2:0) (13,5*8+6,75*8+audio)
      ED-SDI SMPTE 344M
      HD-SDI SMPTE 292M
      Dual link HD-SDI SMPTE 372M
      3G-SDI SMPTE 424M
    • Synchronisation packets:
      • 4 10bit words
        1st 2nd 3rd XYZ word
        1 F V H p3p2p1p0 00
        0x3FF
        1111111111b
        0x000
        0000000000b
        0x000
        0000000000b
        1 0


        00 first field
        1

        second field

        0
        active picture

        1
        vertical interval


        0 Start of Active Video (SAV)


        1 End of Active Video (EAV)
    • Ancilliary data (audio, subtitles, timecode, metadata):
      • 0x000, 0x3FF, 0x3FF


    • line 720 pixels 12 pixels 132 pixels

      pixel ->
      0,1 ... 718,719 720, 721 (EAV) ... 730, 731 732, 733 ... 862, 863 (SAV)

      sample ->
      0 1 2 3 ... 1436 1437 1438 1439 1440 1441 1442 1443 ... 1460 1461 1462 1463 1464 1465 1466 1467 ... 1724 1725 1726 1727
      first field vertical F1:1



      ...



      0x3FF 0x000 0x000 .011.....









      0x3FF 0x000 0x000 .010.....
      ...



      ...



      ...









      ...
      F1:22



      ...



      .011.....









      .010.....
      active F1:23 Cb Y Cr Y' ... Cb Y Cr Y' .001.....









      .000.....
      F1:24 Cb Y Cr Y' ... Cb Y Cr Y' .001.....









      .000.....
      ... Cb Y Cr Y' ... Cb Y Cr Y' ...









      ...
      F1:310 Cb Y Cr Y' ... Cb Y Cr Y' .001.....









      .000.....
      vertical
      F1:311



      ...



      .011.....









      .010.....
      F1:312



      ...



      .011.....









      .010.....
      F1:313



      ...


      second field
      ...



      .111.....









      .110.....
      F2:314



      ...



      .111.....









      .110.....
      ...



      ...



      ...









      ...
      F2:335



      ...



      .111.....









      .110.....
      active F2:336 Cb Y Cr Y' ... Cb Y Cr Y' .101.....









      .100.....
      F2:337 Cb Y Cr Y' ... Cb Y Cr Y' .101.....









      .100.....
      ... Cb Y Cr Y' ... Cb Y Cr Y' ...









      ...
      F2:623 Cb Y Cr Y' ... Cb Y Cr Y' .101.....









      .100.....
      vertical F2:624



      ...



      .111.....









      .110.....
      F2:625



      ...



      .111.....









      .110.....
      SAVEAVactivevertical... ancilliary data , XYZ word: 1FVHppp00
      • F: first field (F=0), second field (F=1)
      • V: active (V=0), vertical sync (V=1)
      • H: SAV (H=0), EAV (H=1)
    • ITU recommendations:
      • ITU-R BT.1364
  • HDMI
    • Wikipedia
    • 3D portion of the HDMI Specification v1.4a
    • content

      movie frame packing
      • 1080p @ 23.98/24Hz
      game frame packing
      • 720p @ 50 or 59.94/60Hz
      broadcast side-by-side horizontal
      • 1080i @ 50 or 59.94/60Hz
      top and bottom
      • 720p @ 50 or 59.94/60Hz

      • 1080p @ 23.97/24Hz
    • Senyalització 3D / 3D signalling (1.4a):
      • 3D_Structure (HDMI 1.4a table 8.13, table H.2)
        3D_Structure meaning 3D_Ext_Data
        0000 frame packing not present
        0001 field alternative
        0010 line alternative
        0011 side-by-side (full)
        0100 L+depth
        0101 L+depth+graphics+graphics_depth
        0110 top-and-bottom (half)
        0111 reserved for future use
        1000 side-by-side (half) present (next table)
        1001-1110 reserved for future use present
        1111 not in use
      • 3D_Ext_Data (in VendorSpecific info frame) (HDMI 1.4a table H.3)
        3D_Ext_Data meaning
        00xx horizontal subsampling
        0100 quincunx matrix odd/left picture, odd/right picture
        0101 odd/left picture, even/right picture
        0110 even/left picture, odd/right picture
        0111 even/left picture, even/right picture
        1000-1111 reserved
    • HDMI converters (eBay)
    • DVI, HDCP, HDMI (Time Warner Cable FAQ)
    • ver date bandwidth video audio
      MHz Gbps RGB bits colour space Dolby DTS
      YCbCr CE RGB xvYCC Digital TrueHD
      HD
      1.0 12/02 165 4,95







      1.1 05/04



      x


      1.2 08/05 24 x x - x x
      x
      1.2a 12/05

      1.3 06/06 340 10,2 30, 36, 48 x x x x x x x
      1.4










  • HDBaseT (wp) (*)
  • HAVi / IEEE1394 
  • WirelessHD

Connexions / Connections

Video

RCA S-video
(4pin MiniDIN)
scart 15Dsub DVI HDMI
A I D
analogue composite SD
SD




Y/C
SD SD




components RGB HD
SD HD HD

YCC/YPP HD






digital TMDS




HD HD

DAC (Digital to Analogue Converter)

DV 

Discs

Gestió de drets / Rights Management

Home Cinema

Home Theater PC (HTPC)

Maquinari / Hardware

MIDI

Minidisc

MP3 (MPEG-1 Layer III)

Qualitat / Quality

Salons / Events

AFD Active Format Description

...





STB into 4:3 display STB into 16:9 display


AR (source aspect ratio)
(coded frame)
AFD
(area of interest)

result
STB user preferences decoder format conversion signalling to TV
display user preference decoder format conversion signalling to TV
display user preference
coded into -> MPEG-2 video aspect_ratio_information (DAR) (sequence header)
(TS 101 154: 5.1.3, 5.2.3, 5.3.3, 5.4.3, B.3.1)

user identifier: active_format
(sequence, GOP, picture headers)
WSS scart pin 8
WSS scart pin 8 4:3 pillar box
14:9 pillar box
zoom auto wide smart
AVC
aspect_ratio_idc
(TS 101 154: 5.6.1.3, 5.7.1.2, B.3.2)
SEI message


code description code description code description code desc code desc






















































0010 4:3

1000 as coded 4:3
full frame 0001 full 4:3 12v
full frame









0001 full 4:3 12v





B (PB) D (14:9 PB) C (crop top & bottom) B (PB) A (fill)
?


1001 4:3 (centre)


1010 16:9 (centre) 16:9 LB 1101 16:9 LB centre
1101 16:9 LB centre C C C C C C


1011 14:9 (centre) 14:9 LB 1000 14:9 LB centre
1000 14:9 LB centre D D C D A ?


1100 reserved
0001 full 4:3
0001 full 4:3 B D C B A ?


1101 4:3 (with shoot & protect 14:9 centre) full 4:3,
S&P 14:9
0111 full 4:3,
S&P 14:9

0111 full 4:3,
S&P 14:9
B D C D A ?


1110 16:9 (with shoot & protect 14:9 centre) 16:9 LB,
S&P 14:9
1101 16:9 LB centre
1101 16:9 LB centre C C C C C C


1111 16:9 (with shoot & protect 4:3 centre) 4:3 0001 full 4:3
0001 full 4:3 B D C B A ?
0011
16:9



1000 as coded 16:9 16:9 LB 16:9 LB 1101 16:9 LB centre 12v
1110 full 16:9 6v A A

A
A
A
A


14:9 LB 14:9 LB 1000 14:9 LB centre


centre cut-out centre cut-out 0001 full 4:3


TV feature full frame 1110 full 16:9 6v


1001 4:3 (centre) 4:3 PB - centre cut-out 0001 full 4:3 12v
centre cut-out 0001 full 4:3 12v B D C B A ?


1010 16:9 (centre) 16:9 carta 16:9
16:9 LB 16:9 LB 1101 16:9 LB centre 12v
full frame



1110
full 16:9
6v



A
A
A
A
A
A


14:9 LB 14:9 LB 1000 14:9 LB centre


centre cut-out centre cut-out 0001 full 4:3


TV feature full frame 1110 full 16:9 6v


1011 14:9 (centre) 14:9 PB - centre cut-out 0001 full 4:3 12v


1100 reserved








1101 4:3 (with shoot & protect 14:9 centre) 4:3 PB, S&P 14:9 - centre cut-out 0001 full 4:3 12v
centre cut-out 0111 full 4:3,
S&P 14:9
12v B D C D A ?


1110 16:9 (with shoot & protect 14:9 centre) full 16:9, S&P 14:9 16:9 LB 16:9 LB 1101 16:9 LB centre 12v
full frame





1110





full 16:9




6v



A




A



A




A




A




A






14:9 LB 14:9 LB 1000 14:9 LB centre


centre cut-out centre cut-out 0001 full 4:3


TV feature full frame 1110 full 16:9 6v


1111 16:9 (with shoot & protect 4:3 centre) full 16:9, S&P 4:3 16:9 LB 16:9 LB 1101 16:9 LB centre 12v


14:9 LB 14:9 LB 1000 14:9 LB centre


centre cut-out centre cut-out 0001 full 4:3


TV feature full frame 1110 full 16:9 6v
0100 2.21:1 - -



















  • A: Makes incoming picture fill the display. Preserves geometry of 16:9, but distorts 4:3 based formats.
  • B: Makes pillar box of 4:3 signal.
  • C: Expands 4:3 to fill width.Crops top & bottom to preserve geometry
  • D: Expands 14:9 letter box to 14:9 pillar box with correct geometry.

...

Auriculars


marca model control de volum
als auriculars
cancel·lació
de soroll
info preu




The Best Wireless Earbuds under $100 - October 2025
Google Pixel Buds A-Series -
-
2a: 149€

Pixel Buds Pro x x
Pro2: 249€
OnePlus Buds 4 x x
idealo
119€
97€
Sennheiser




Sony WF-C700N x x
idealo
69€
Xiaomi Xiaomi Buds 5 Pro ?



Xiaomi Buds 5




REDMI Buds 6 Pro x x review 59,99€

REDMI Buds 6




REDMI Buds 5 Pro - x


REDMI Buds 5




http://www.francescpinyol.cat/audio_video.html
Darrera modificació: 26 d'octubre de 2025 / Last update: 26th October 2025

Valid HTML 4.0!

Cap a casa / Back home.