[FFmpeg-user] JPEG2000 streaming over RTP

Никита Скиба zaulan at gmail.com
Tue Nov 17 10:37:48 CET 2015


Hello all!
When I'm trying to stream jpeg2000 from gdigrab (for example), I get an
error on server:

D:\work\FFMPEG\ffmpeg-20150205-git-21051af-win32-shared\ffmpeg-20150205-git-2105
1af-win32-shared\bin>ffmpeg -f gdigrab  -framerate 20 -i desktop -vf
scale=1280:
720 -vcodec libopenjpeg -pix_fmt yuv444p -f rtsp -rtsp_transport tcp
rtsp://loca
lhost:8554/live.sdp
ffmpeg version N-69568-g21051af Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl
--enable-version3
 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig
--ena
ble-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --e
nable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-lib
gsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencor
e-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enabl
e-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-l
ibtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc
--enable-
libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-l
ibwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--ena
ble-lzma --enable-decklink --enable-zlib
  libavutil      54. 18.100 / 54. 18.100
  libavcodec     56. 21.102 / 56. 21.102
  libavformat    56. 19.100 / 56. 19.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5.  9.103 /  5.  9.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[gdigrab @ 00650da0] Capturing whole desktop as 3840x1024x32 at (0,0)
Input #0, gdigrab, from 'desktop':
  Duration: N/A, start: 1447326847.847988, bitrate: N/A
    Stream #0:0: Video: bmp, bgra, 3840x1024, -2147483 kb/s, 20 tbr, 1000k
tbn,
20 tbc
[rtp @ 00697880] Unsupported codec jpeg2000
Output #0, rtsp, to 'rtsp://localhost:8554/live.sdp':
  Metadata:
    encoder         : Lavf56.19.100
    Stream #0:0: Video: jpeg2000 (libopenjpeg), yuv444p, 1280x720, q=2-31,
200 k
b/s, 20 fps, 20 tbn, 20 tbc
    Metadata:
      encoder         : Lavc56.21.102 libopenjpeg
Stream mapping:
  Stream #0:0 -> #0:0 (bmp (native) -> jpeg2000 (libopenjpeg))
Could not write header for output file #0 (incorrect codec parameters ?):
Error
number -1 occurred

And on the client:
D:\work\FFMPEG\ffmpeg-20150205-git-21051af-win32-shared\ffmpeg-20150205-git-2105
1af-win32-shared\bin>ffplay -rtsp_flags listen
rtsp://localhost:8554/live.sdp
ffplay version N-69568-g21051af Copyright (c) 2003-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl
--enable-version3
 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig
--ena
ble-frei0r --enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --e
nable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-lib
gsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencor
e-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enabl
e-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-l
ibtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc
--enable-
libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-l
ibwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
--ena
ble-lzma --enable-decklink --enable-zlib
  libavutil      54. 18.100 / 54. 18.100
  libavcodec     56. 21.102 / 56. 21.102
  libavformat    56. 19.100 / 56. 19.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5.  9.103 /  5.  9.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
rtsp://localhost:8554/live.sdp: End of file   0KB sq=    0B f=0/0
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

Is there are a way to broadcast JPEG 2000 over RTP/RTSP? I have found
RFC5371 https://tools.ietf.org/html/rfc5371 about it.

Thanks in advance,
Nikita Skiba


More information about the ffmpeg-user mailing list