Opened 8 years ago

Closed 8 years ago

#5691 closed defect (fixed)

jpeg-ls parser

Reported by: akasyanov Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: jpegls
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hello. In the version 2.4.12 I'm trying to perform the next actions: in the listen mode ffmpeg through tcp make the image record jpeg-ls format into mkv file. The image is attached. We can transmit it through the nc:

cat result.jls | nc localhost 3333. 


ffmpeg receive command is the following:

ffmpeg -y -f image2pipe -pix_fmt gray -video_size 1024x2048 -vcodec jpegls -i tcp://localhost:3333?listen -vcodec libx264 -qp 0 video.mkv.

Problem:

Output #0, matroska, to 'video.mkv':
 Metadata:
   encoder         : Lavf56.4.101
   Stream #0:0, 0, 1/1000: Video: h264 (libx264) (H264 / 0x34363248), yuv420p, 1024x2048, 1/25, q=-1--1, 25 fps, 1k tbn, 25 tbc
   Metadata:
     encoder         : Lavc56.1.100 libx264
Stream mapping:
 Stream #0:0 -> #0:0 (jpegls (native) -> h264 (libx264))
Press [q] to stop, [?] for help
tcp://localhost:3333?listen: Cannot allocate memory

If I use version 3.1.1 then:

Output #0, matroska, to 'video.mkv':
  Metadata:
    encoder         : Lavf57.41.100
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj444p(pc), 1024x2048, q=-1--1, 25 fps, 1k tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.48.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
  Stream #0:0 -> #0:0 (jpegls (native) -> h264 (libx264))
Press [q] to stop, [?] for help
tcp://localhost:3333?listen: Invalid argument
frame=    0 fps=0.0 q=0.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknow

The current suggestion is - ffmpeg error.

P.S. If rawvideo used istead of image2pipe - it works.

Attachments (1)

result.jls (427.3 KB ) - added by akasyanov 8 years ago.

Download all attachments as: .zip

Change History (3)

by akasyanov, 8 years ago

Attachment: result.jls added

comment:1 by Carl Eugen Hoyos, 8 years ago

Component: ffmpegavcodec
Keywords: jpegls added; jpeg-ls tcp image2pipe removed
Reproduced by developer: set
Status: newopen
Summary: jpeg-ls transmission through tcp errorjpeg-ls needs seekable input
Version: 2.4.11git-master

I suspect that the following issue is reported, not really a regression, only the resolution detection used to work, the output was broken, ancient FFmpeg used to hang:

$ cat result.jls|ffmpeg -i - out.png
ffmpeg version N-80907-g64c6193 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[jpegls_pipe @ 0x22723a0] Could not find codec parameters for stream 0 (Video: jpegls, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, jpegls_pipe, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: jpegls, none(bt470bg/unknown/unknown), 25 tbr, 25 tbn, 25 tbc
Output #0, image2, to 'out.png':
Output file #0 does not contain any stream
$ cat result.jls|ffmpeg -f image2pipe -vcodec jpegls -i - out.png
ffmpeg version N-80907-g64c6193 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 47.100 /  6. 47.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
[image2pipe @ 0x398c460] Could not find codec parameters for stream 0 (Video: jpegls, none(bt470bg/unknown/unknown)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, image2pipe, from 'pipe:':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: jpegls, none(bt470bg/unknown/unknown), 25 tbr, 25 tbn, 25 tbc
Output #0, image2, to 'out.png':
Output file #0 does not contain any stream

comment:2 by Carl Eugen Hoyos, 8 years ago

Resolution: fixed
Status: openclosed
Summary: jpeg-ls needs seekable inputjpeg-ls parser
Note: See TracTickets for help on using tickets.