0

I have raspberry pi 3 and tried to play m3u8 link using omxplayer directly but that didn't work.

pi@raspberrypi:~ $ omxplayer 'http://somesitename/tv/m3u8.php?channel=Discovery_HD&quality=900'

have a nice day ;)

Then I tried with --live , it showed this error.

pi@raspberrypi:~ $ omxplayer --live 'http://somesitename/tv/m3u8.php?channel=Discovery_HD&quality=900'

/usr/bin/omxplayer: line 67:  1287 Aborted                 LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"

Converting using ffmpeg showed this error :

pi@raspberrypi:~ $ ffmpeg -i 'http://somesitename/tv/m3u8.php?channel=Discovery_HD&quality=900' -c copy -bsf:a aac_adtstoasc output.mp4

ffmpeg version 3.2.10-1~deb9u1+rpt2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
  configuration: --prefix=/usr --extra-version='1~deb9u1+rpt2' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --arch=armhf --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
  libavutil      55. 34.101 / 55. 34.101
  libavcodec     57. 64.101 / 57. 64.101
  libavformat    57. 56.101 / 57. 56.101
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
[hls,applehttp @ 0x10b45c0] Opening 'https://someurl.com/live/Discovery/Discovery_HD_900-9490000.key?v=dgRGresfdEaeSEj' for reading
Unable to open key file https://someurl.com/live/Discovery/Discovery_HD_900-9490000.key?v=dgRGresfdEaeSEj
[hls,applehttp @ 0x10b45c0] Opening 'crypto+http://someurl.com/live/Discovery/Discovery_HD_900-50000.ts' for reading
[hls,applehttp @ 0x10b45c0] Opening 'crypto+http://someurl.com/live/Discovery/Discovery_HD_900-56000.ts' for reading
[hls,applehttp @ 0x10b45c0] Opening 'crypto+http://someurl.com/live/Discovery/Discovery_HD_900-62000.ts' for reading
[hls,applehttp @ 0x10b45c0] Error when loading first segment 'http://someurl.com/live/Discovery/Discovery_HD_900-50000.ts'
http://somesitename/tv/m3u8.php?channel=Discovery_HD&quality=900: Invalid data found when processing input

The m3u8 link works fine in chrome on android and in windows chrome using native hls extension.

The contents of the m3u8 file are ::

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:35789
#EXT-X-TARGETDURATION:6
#EXT-X-KEY:METHOD=AES-128,URI="https://someurl.com/live/Discovery/Discovery_HD_900-9490000.key?v=dgRGresfdEaeSEj,IV=0x0323IOFDSG
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-50000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-56000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-62000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-68000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-74000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-80000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-86000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-92000.ts
#EXTINF:6.000,
http://someurl.com/live/Discovery/Discovery_HD_900-98000.ts

I tried in VLC on raspberry pi which didn't work also. I want to stream m3u8 links directly using linux programs without using any GUI program & using cli based programs preferably omxplayer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.