Opened 3 years ago

Closed 2 years ago

#4586 closed defect (needs_more_info)

ffmpeg cannot re-stream yuvj420 h264 format video from ip camera

Reported by: tapas Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: h264 rtsp
Cc: michael Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I can save camera video to hard disk by running following command :

/home/broadcaster/bin/ffmpeg -use_wallclock_as_timestamps 1 -r 25 -thread_queue_size 51200 -threads 4 -i "rtsp://admin:admin@$1:8557/PSIA/Streaming/channels/2?videoCodecType=H.264" -use_wallclock_as_timestamps 1 -r 25 -b:v 2048k -bufsize 20480 -c:v copy -f avi cam.avi

But I cannot re-stream video from above ip camera to any FMS server.

here is the command which I am using for re-streaming:

/home/broadcaster/bin/ffmpeg -use_wallclock_as_timestamps 1 -r 25 -thread_queue_size 51200 -threads 4 -i "rtsp://admin:admin@$1:8557/PSIA/Streaming/channels/2?videoCodecType=H.264" -use_wallclock_as_timestamps 1 -r 25 -b:v 2048k -bufsize 20480 -c:v copy -f flv rtmp://ip_url

Further debugging showed me that it happens only when ip camera generates yuvj420p stream.
But above command works if I use a different ip camera which outputs video format as yuv420p.

here is the bug report generated with "-report" arguments for affected ip camera using above command.

http://pastebin.com/V7AGrkCQ

But if I try to record video to hard disk in avi container then ffmpeg does it successfully. here is the command which I used to save camera h264 stream into avi file:

/home/broadcaster/bin/ffmpeg -use_wallclock_as_timestamps 1 -r 25 -thread_queue_size 51200 -threads 4 -i "rtsp://admin:admin@$1:8557/PSIA/Streaming/channels/2?videoCodecType=H.264" -use_wallclock_as_timestamps 1 -r 25 -b:v 2048k -bufsize 20480 -c:v copy -f avi cam.avi

saved Avi file from above command :
[1] http://www.datafilehost.com/d/4c6e8f04

This issue can be easily reproduced if we run following command on above [1] avi file:

ffmpeg -v 9 -loglevel 99 -i cam.avi -codec copy -f flv cam.flv -report

ffmpeg does not give any error but it can generate correct flv file too.

Issue is present on latest ffmpeg as of today (1st June, 2015) found in http://johnvansickle.com/ffmpeg/

Attachments (2)

ffmpeg-20150601-223924.log (15.2 KB) - added by tapas 3 years ago.
rtsp streaming failed for yuvj420p h264 video format
ffmpeg-20150601-222202.log (4.6 KB) - added by tapas 3 years ago.
ffmpeg cannot convert avi to flv format

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by tapas

rtsp streaming failed for yuvj420p h264 video format

Changed 3 years ago by tapas

ffmpeg cannot convert avi to flv format

comment:1 Changed 3 years ago by cehoyos

  • Component changed from ffmpeg to undetermined
  • Keywords h264 added; yuvj420p streaming fails removed
  • Priority changed from critical to normal
  • Reproduced by developer unset

comment:2 Changed 3 years ago by michael

How can this issue be reproduced ?

comment:3 Changed 3 years ago by michael

  • Cc michael added

comment:4 Changed 2 years ago by cehoyos

  • Resolution set to needs_more_info
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.