Asterisk Playback kann die Videodatei nicht finden

Asterisk Playback kann die Videodatei nicht finden

Ich möchte eine Videodatei (h264) mit Asterisk Version 14.7.6 abspielen. Es läuft auf einem Raspberry Pi.

Ich gehe davon aus, dass die Playback-Anwendung hierfür die beste Wahl ist. Wenn Asterisk jedoch versucht, auf die Datei zuzugreifen, erhalte ich die folgenden Fehlermeldungen:

[May 29 18:19:41] WARNING[1306][C-00000001]: file.c:774 ast_openstream_full: File MyVideo.h264 does not exist in any format
[May 29 18:19:41] WARNING[1306][C-00000001]: file.c:1247 ast_streamfile: Unable to open MyVideo.h264 (format (h264|ulaw)): No such file or directory
[May 29 18:19:41] WARNING[1306][C-00000001]: app_playback.c:494 playback_exec: Playback failed on SIP/7041-00000000 for MyVideo.h264

Hier sind Ausschnitte einiger der relevanten Konfigurationsdateien auf meinem System:

/etc/asterisk/extensions.conf:

...
exten => 111,1,Answer()
exten => 111,n,Playback(MyVideo.h264)
exten => 111,n,Hangup()

/etc/asterisk/asterisk.conf:

[directories](!) ; remove the (!) to enable this
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdbdir => /var/lib/asterisk
astkeydir => /var/lib/asterisk
astdatadir => /usr/share/asterisk
astagidir => /usr/share/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run/asterisk
astlogdir => /var/log/asterisk
...

„Core Show Codecs“ in der Asterisk-CLI:

sipserver*CLI> core show codecs
Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
      ID TYPE  NAME         FORMAT           DESCRIPTION
------------------------------------------------------------------------------------------------
      30 image png          png              (PNG Image)
       5 audio g726         g726             (G.726 RFC3551)
       3 audio alaw         alaw             (G.711 a-law)
       1 audio g723         g723             (G.723.1)
      19 audio speex        speex            (SpeeX)
      20 audio speex        speex16          (SpeeX 16khz)
      21 audio speex        speex32          (SpeeX 32khz)
      23 audio g722         g722             (G722)
      24 audio siren7       siren7           (ITU G.722.1 (Siren7, licensed from Polycom))
      31 video h261         h261             (H.261 video)
      32 video h263         h263             (H.263 video)
       7 audio adpcm        adpcm            (Dialogic ADPCM)
      41 audio silk         silk8            (SILK Codec (8 KHz))
      42 audio silk         silk12           (SILK Codec (12 KHz))
      43 audio silk         silk16           (SILK Codec (16 KHz))
      44 audio silk         silk24           (SILK Codec (24 KHz))
      27 audio g719         g719             (ITU G.719)
      33 video h263p        h263p            (H.263+ video)
      34 video h264         h264             (H.264 video)
      18 audio g729         g729             (G.729A)
       8 audio slin         slin             (16 bit Signed Linear PCM)
       9 audio slin         slin12           (16 bit Signed Linear PCM (12kHz))
      10 audio slin         slin16           (16 bit Signed Linear PCM (16kHz))
      11 audio slin         slin24           (16 bit Signed Linear PCM (24kHz))
      12 audio slin         slin32           (16 bit Signed Linear PCM (32kHz))
      13 audio slin         slin44           (16 bit Signed Linear PCM (44kHz))
      14 audio slin         slin48           (16 bit Signed Linear PCM (48kHz))
      15 audio slin         slin96           (16 bit Signed Linear PCM (96kHz))
      16 audio slin         slin192          (16 bit Signed Linear PCM (192kHz))
       2 audio ulaw         ulaw             (G.711 u-law)
      17 audio lpc10        lpc10            (LPC10)
      26 audio testlaw      testlaw          (G.711 test-law)
      40 audio none         none             (<Null> codec)
      37 video vp9          vp9              (VP9 video)
      36 video vp8          vp8              (VP8 video)
       4 audio gsm          gsm              (GSM)
      35 video mpeg4        mpeg4            (MPEG4 video)
      22 audio ilbc         ilbc             (iLBC)
      38 text  red          red              (T.140 Realtime Text with redundancy)
      39 text  t140         t140             (Passthrough T.140 Realtime Text)
      28 audio opus         opus             (Opus Codec)
      29 image jpeg         jpeg             (JPEG image)
       6 audio g726aal2     g726aal2         (G.726 AAL2)
      25 audio siren14      siren14          (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))

Mediainfo-Scan einer Videodatei:

root@sipserver:~# mediainfo --fullscan MyVideo.h264
General
Count                                    : 322
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Complete name                            : MyVideo.h264
File name                                : MyVideo
File extension                           : h264
Format                                   : AVC
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Format/Extensions usually used           : avc h264
Commercial name                          : AVC
Internet media type                      : video/H264
Codec                                    : AVC
Codec                                    : AVC
Codec/Info                               : Advanced Video Codec
Codec/Url                                : http://developers.videolan.org/x264.html
Codec/Extensions usually used            : avc h264
File size                                : 4976111
File size                                : 4.75 MiB
File size                                : 5 MiB
File size                                : 4.7 MiB
File size                                : 4.75 MiB
File size                                : 4.746 MiB
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
File last modification date              : UTC 2018-05-29 17:55:07
File last modification date (local)      : 2018-05-29 17:55:07

Video
Count                                    : 334
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : [email protected]
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 1
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : M=1, N=80
Internet media type                      : video/H264
Codec                                    : AVC
Codec                                    : AVC
Codec/Family                             : AVC
Codec/Info                               : Advanced Video Codec
Codec/Url                                : http://developers.videolan.org/x264.html
Codec profile                            : [email protected]
Codec settings                           : CABAC / 1 Ref Frames
Codec settings, CABAC                    : Yes
Codec_Settings_RefFrames                 : 1
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Maximum bit rate                         : 1801984
Maximum bit rate                         : 1 802 kb/s
Width                                    : 800
Width                                    : 800 pixels
Height                                   : 480
Height                                   : 480 pixels
Sampled_Width                            : 800
Sampled_Height                           : 480
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.667
Display aspect ratio                     : 5:3
Resolution                               : 8
Resolution                               : 8 bits
Colorimetry                              : 4:2:0
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Interlacement                            : PPF
Interlacement                            : Progressive
Buffer size                              : 2027200
Color range                              : Limited
colour_description_present               : Yes

Was ich versucht habe:

  • Ersetzen Sie den Wiedergabeparameter, um den vollständigen Dateipfad zu verwenden. Beispiel:Playback(/root/MyVideo.h264)
  • Ausprobieren des MP4-Videoformats (Ändern der Kodierung und der Dateinamen)
  • Platzieren der Videodatei in meinem „astdatadir“ (/usr/share/asterisk/)
  • Platzieren der Videodatei in meinem Soundverzeichnis (/var/lib/asterisk/sounds/en/)
  • Ändern der Berechtigungen der Videodatei auf 777
  • Weglassen der Dateierweiterung im Wiedergabebefehl. Beispiel:Playback(MyVideo)
  • Downgrade von Asterisk auf 11.16.0 (von 14.7.6)

Einige Artikel, die ich gelesen habe, die aber nicht geholfen haben:

Antwort1

Sie haben eines vergessen: Asterisk ist KEIN Videoplayer, sondern eine Telefonanlage.

Es wird nur gespieltrohDatei, die mit dem Codec codiert ist, den Sie derzeit für das Video verwenden. Andere Videoformate werden nicht abgespielt, es wirdNIEMALSVersuchen Sie, das Video in ein anderes Format zu konvertieren.

Sie haben VerwendungAufzeichnenApp während einer Video-Sitzung, um eine Rohdatei abzurufen.

Vergleichen Sie das Dateiformat, das Sie erhalten, mit dem, was Sie abspielen möchten.

Noch einmal: Asterisk versucht nicht, das Videoformat oder den Codec zu ändern. Verwenden Sie ffmepg oder eine andere Bibliothek/einen anderen Player.

verwandte Informationen