Opened 9 years ago

Closed 8 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 Niedermayer 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 9 years ago.
rtsp streaming failed for yuvj420p h264 video format
ffmpeg-20150601-222202.log (4.6 KB ) - added by tapas 9 years ago.
ffmpeg cannot convert avi to flv format

Download all attachments as: .zip

Change History (6)

by tapas, 9 years ago

Attachment: ffmpeg-20150601-223924.log added

rtsp streaming failed for yuvj420p h264 video format

by tapas, 9 years ago

Attachment: ffmpeg-20150601-222202.log added

ffmpeg cannot convert avi to flv format

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: ffmpegundetermined
Keywords: h264 added; yuvj420p streaming fails removed
Priority: criticalnormal
Reproduced by developer: unset

comment:2 by Michael Niedermayer, 9 years ago

How can this issue be reproduced ?

comment:3 by Michael Niedermayer, 9 years ago

Cc: Michael Niedermayer added

comment:4 by Carl Eugen Hoyos, 8 years ago

Resolution: needs_more_info
Status: newclosed
Note: See TracTickets for help on using tickets.