Analog H264 Hardware capture

About encoding, codec settings, muxers and filter usage
mundu
Blank Cone
Blank Cone
Posts: 53
Joined: 25 May 2011 19:56
VLC version: 2.1.5
Operating System: Linux

Analog H264 Hardware capture

Postby mundu » 07 Mar 2013 13:08

Hi,

I'm currently trying to capture an H264 feed but with no luck so far.

This is the command line i'm using. Perhaps i'm not using it the right way. How can I tell VLC that the video input should be the output? I tried vcodec copy but VLC says it does not know any fourcc? copy codec.

Code: Select all

./src/vlc-2.0.5/vlc -I dummy -vvv v4l2c/h264:///dev/video${INPUT}:input=0:chroma=h264:width=720:height=576 \ --input-slave "alsa://hw:1" --alsa-samplerate 48000 \ --v4l2-set-ctrls "mute=0" --v4l2-audio-volume 5000 --sout-standard-bind 10.0.30.121\ --sout "#std{access=udp{ttl=12},mux=ts,dst=239.192.50.50:1234}"\ --sout-all
I'm a bit confused. This device has H264 hardware compression so the CPU should be null. But with this command VLC goes up to 135% with a lot of:

Code: Select all

[0x88f8f00] access_output_udp access out warning: send error: Resource temporarily unavailable [0x88f8f00] access_output_udp access out warning: send error: Resource temporarily unavailable ... [0x884bc00] main input error: demux doesn't like DEMUX_GET_TIME [0x884bc00] main input error: demux doesn't like DEMUX_GET_TIME [0x884bc00] main input error: demux doesn't like DEMUX_GET_TIME [0x884bc00] main input error: demux doesn't like DEMUX_GET_TIME ... [0x85cdf00] access_output_udp access out debug: late packet for UDP input (682891) [0x85cdf00] access_output_udp access out debug: late packet for UDP input (682835) [0x85cdf00] access_output_udp access out debug: late packet for UDP input (682778)
Full log https://dl.dropbox.com/u/63418458/output.log

Thank you.

Rémi Denis-Courmont
Developer
Developer
Posts: 15231
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Analog H264 Hardware capture

Postby Rémi Denis-Courmont » 07 Mar 2013 20:29

You will need to transcode audio. Alsom the udp error probably means your kernel queues are full because the bandwidth is too high.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mundu
Blank Cone
Blank Cone
Posts: 53
Joined: 25 May 2011 19:56
VLC version: 2.1.5
Operating System: Linux

Re: Analog H264 Hardware capture

Postby mundu » 07 Mar 2013 20:57

I recently used an ImpactVCB to capture analog video and transcoded to mpeg2video. In the same hardware specifications the cpu load was around 50%.

I still have some tests to run. I'll try to post the final solution if I ever find one.

Thank you,
Nuno

mundu
Blank Cone
Blank Cone
Posts: 53
Joined: 25 May 2011 19:56
VLC version: 2.1.5
Operating System: Linux

Re: Analog H264 Hardware capture

Postby mundu » 19 Mar 2013 16:13

I eventually fixed this issue. Besides being forced to include some ioctls for the board to work (i.e. V4L2*MPEG stuff), I forced the H264 pixel format recognition. I'm on a kernel <3.2 and so the board says its YUYV [ H264,...] leading VLC to believe its YUYV while it is not. Adding this lines on the source and forcing H264 when its a not YUYV does the trick. VLC immediatly assumes stdin/v4l2 stream its a H264.

Code: Select all

#ifndef V4L2_PIX_FMT_H264 #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ #endif
PS: Obviously it will have to be something H264ish otherwise VLC won't be able to decode it.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 3 guests