[FFmpeg-trac] #2882(undetermined:open): ffmpeg can't save h264 stream from webcam into file without recoding

FFmpeg trac at avcodec.org
Sun Aug 18 22:04:55 CEST 2013


#2882: ffmpeg can't save h264 stream from webcam into file without recoding
-------------------------------------+-------------------------------------
             Reporter:  pchel        |                    Owner:
                 Type:  defect       |                   Status:  open
             Priority:  normal       |                Component:
              Version:  git-master   |  undetermined
             Keywords:  v4l2 h264    |               Resolution:
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------

Comment (by pchel):

 The -vcodec option is needed to turn yuvj420p mode on. Without this option
 I get YUY2 video, not yuvj420p.

 See below:
 Without codec
 ➜  ffmpeg git:(master) ✗ ./ffmpeg -f v4l2 -i /dev/video0 -vcodec copy -y
 out.mkv 2>&1 | grep "Stream #0:0"
     Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
 165888 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
     Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080,
 q=2-31, 165888 kb/s, 5 fps, 1k tbn, 1000k tbc

 With the codec
 ➜  ffmpeg git:(master) ✗ ./ffmpeg -f v4l2 -vcodec h264 -i /dev/video0
 -vcodec copy -y out.mkv 2>&1 | grep "Stream #0:0"
     Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p, 1920x1080
 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc
     Stream #0:0: Video: h264 (H264 / 0x34363248), yuvj420p, 1920x1080 [SAR
 1:1 DAR 16:9], q=2-31, -5 kb/s, 30 fps, 1k tbn, 1000k tbc
   Stream #0:0 -> #0:0 (copy)

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2882#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list