<br><br><div class="gmail_quote">On Thu, Oct 7, 2010 at 11:14 PM, Gary Thomas <span dir="ltr"><<a href="mailto:gary@mlbassoc.com">gary@mlbassoc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have a camera which only produces UYUY video - caps:<br>
video/x-raw-yuv, format=(fourcc)UYVY, width=(int)720, height=(int)480, framerate=(fraction)30/1<br>
<br>
I'd like to encode this as x264, so I tried this pipeline:<br>
gst-launch -v v4l2src num-buffers=200 ! 'video/x-raw-yuv,width=720,height=480,format=(fourcc)UYVY' ! ffmpegcolorspace ! x264enc ! filesink location=/tmp/test.h264<br>
<br>
There are no complaints and the process seems to launch, but I<br>
get no data to my file. A similar pipeline using a hardware (DSP)<br>
encoder on my platform works:<br>
gst-launch -v v4l2src num-buffers=2000 ! 'video/x-raw-yuv,width=720,height=480' ! TIVidenc1 codecName=h264enc engineName=codecServer ! filesink location=/tmp/test.h264<br>
<br>
The only difference is that I'm using ffmpegcolorspace to convert<br>
the data from UYUV to I420.<br>
<br>
Note: I enabled debug level 4 for ffmpeg and it produces lines<br>
like these:<br>
0:00:11.669219616 766 0x10bf50 DEBUG ffmpegcolorspace gstffmpegcolorspace.c:449:gst_ffmpegcsp_transform: from 35 -> to 0<br>
0:00:11.689147594 766 0x10bf50 DEBUG ffmpegcolorspace gstffmpegcolorspace.c:476:gst_ffmpegcsp_transform: from 35 -> to 0 done<br>
0:00:12.354461316 766 0x10bf50 DEBUG ffmpegcolorspace gstffmpegcolorspace.c:449:gst_ffmpegcsp_transform: from 35 -> to 0<br>
0:00:12.368774059 766 0x10bf50 DEBUG ffmpegcolorspace gstffmpegcolorspace.c:476:gst_ffmpegcsp_transform: from 35 -> to 0 done<br>
I'm not sure what they mean. I also enabled debug for x264enc and<br>
it gave me these lines (the sizes tell me that the data coming from<br>
ffmpegcolorspace is not good):<br>
0:00:10.976440135 774 0x10bf30 LOG x264enc :0::<x264enc0> frame= 1 QP=22.65 NAL=2 Slice:P Poc:8 I:31 P:982 SKIP:337 size=13873 bytes<br>
0:00:11.750701609 774 0x10bf30 LOG x264enc :0::<x264enc0> frame= 2 QP=27.69 NAL=2 Slice:B Poc:4 I:0 P:129 SKIP:1221 size=112 bytes<br>
0:00:14.098602000 774 0x10bf30 LOG x264enc :0::<x264enc0> frame= 3 QP=34.39 NAL=0 Slice:B Poc:2 I:1333 P:14 SKIP:0 size=10943 bytes<br>
0:00:14.993529978 774 0x10bf30 LOG x264enc :0::<x264enc0> frame= 4 QP=27.86 NAL=0 Slice:B Poc:6 I:3 P:63 SKIP:1284 size=174 bytes<br>
<br>
Any ideas what I'm doing wrong? My goal is just to compare the<br>
resulting encoded file between the hardware (DSP) version and the<br>
software (x264enc) version.<br>
<br>
One final question: I'd like to resize the data, e.g. from 720x480 to 360x240<br>
before the encode, but none of the pipelines I've tried (yes, I'm new to this!)<br>
seem to even want to run. Mostly, I get messages about not being able to connect<br>
one endpoint to another, but I really don't understand either the messages or the<br>
process.<br></blockquote><div><br>Hi Gary, <br><br>the reason you do not see the file dumped from your first pipeline, is because by default x264enc uses packetized stream format.<br><br>Use the "byte-stream=true" property of x264enc in your pipeline, to use a byte-stream format containing NALUs, and you should be able to playout the dumped file.<br>
<br>--<br>Raseel<br></div></div>