Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#5151 closed enhancement (fixed)

mjpeg2jpeg bitstream filter only works for AVI1 mjpeg streams

Reported by: thebombzen Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: mjpeg2jpeg
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
The mjpeg2jpeg bitstream filter whines that a stream is not in the mjpeg format, even though it is. The bitstream filter does nothing as well.
How to reproduce:

$ ./ffmpeg -i bitstream_filter_test.mjpeg -c copy -bsf mjpeg2jpeg out.mjpeg
ffmpeg version N-77803-g7c97946 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: 
  libavutil      55. 13.100 / 55. 13.100
  libavfilter     6. 23.100 /  6. 23.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
[mjpeg @ 0x3bad440] Format mjpeg detected only with low score of 25, misdetection possible!
[mjpeg @ 0x3bae5a0] Changing bps to 8
Input #0, mjpeg, from 'bitstream_filter_test.mjpeg':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 25 tbr, 1200k tbn, 25 tbc
Output #0, mjpeg, to 'out.mjpeg':
  Metadata:
    encoder         : Lavf57.21.101
    Stream #0:0: Video: mjpeg, yuvj422p, 1280x720, q=2-31, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
[NULL @ 0x3bb0680] input is not MJPEG/AVI1
[NULL @ 0x3bb0680] Failed to open bitstream filter mjpeg2jpeg for stream 0 with codec copy: Invalid data found when processing input
frame=   22 fps=0.0 q=-1.0 Lsize=    4199kB time=00:00:00.88 bitrate=39084.4kbits/s speed=58.8x    
video:4199kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

bitstream_filter_test.mjpeg (1.3 MB) - added by thebombzen 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by thebombzen

comment:1 Changed 3 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Keywords bitstream filter bsf mjpeg jpeg removed
  • Priority changed from normal to wish
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from mjpeg2jpeg bitstream filter does not correctly recognize mjpeg streams to mjpeg2jpeg bitstream filter only works for AVI1 mjpeg streams
  • Type changed from defect to enhancement

For future tickets please do not tamper with the console output, always provide the unedited console output.

Patch sent.

comment:2 Changed 3 years ago by thebombzen

I didn't try to tamper with the console output. I provided the console output, went to upload the sample, but it was too big, so I created a new, smaller one and I didn't want to edit the original ticket given that the information on it was basically the same.

But yea, thanks.

comment:3 Changed 3 years ago by cehoyos

This console output cannot be produced by (unpatched) FFmpeg:

  configuration: 
  libavutil      55. 13.100 / 55. 13.100
  libavfilter     6. 23.100 /  6. 23.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101

comment:4 follow-up: Changed 3 years ago by thebombzen

That actually happened, I noticed it, and was confused by it too. I can't reproduce it now either. Maybe it was a buffering issue in my shell. But that would be a topic for another ticket.

comment:5 in reply to: ↑ 4 Changed 3 years ago by cehoyos

  • Status changed from open to closed

Replying to thebombzen:

That actually happened, I noticed it, and was confused by it too. I can't reproduce it now either. Maybe it was a buffering issue in my shell.

Sorry for my comment then!
The issue should be fixed in d3fe2e0dc991720bab723e6bc467976e0b14709a - thank you for the report!

comment:6 Changed 2 years ago by cehoyos

  • Resolution set to fixed
Note: See TracTickets for help on using tickets.