[FFmpeg-trac] #4586(ffmpeg:new): ffmpeg cannot re-stream yuvj420 h264 format video from ip camera
FFmpeg
trac at avcodec.org
Tue Jun 2 07:54:08 CEST 2015
#4586: ffmpeg cannot re-stream yuvj420 h264 format video from ip camera
-------------------------------------+-------------------------------------
Reporter: tapas | Type: defect
Status: new | Priority: critical
Component: ffmpeg | Version: git-
Keywords: yuvj420p | master
rtsp streaming fails | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
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/
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4586>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list