[FFmpeg-user] Help Please
James Linder
jam at tigger.ws
Mon Jul 15 14:44:48 CEST 2013
If any kind soul can show me the error of my ways I'd appreciate it lots:
I want to record audio and video to a file
I want to display the video as it is being recorded.
This has worked with different v4l hardware :-(
I record:
/usr/bin/ffmpeg -f pulse -itsoffset 0.2 -i default -f v4l2 -i /dev/video0 -vtag divx -s 720x576 -r pal -q:v 5 mon.avi -s 720x576 -f rawvideo - |/usr/bin/ffplay -f rawvideo -i - -s 720x576
The rawvideo size has no effect.
I get:
ffplay version N-54580-g694550f Copyright (c) 2003-2013 the FFmpeg developers
built on Jul 10 2013 11:43:58 with gcc 4.7 (SUSE Linux)
configuration: --enable-libv4l2 --enable-libpulse
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 11.101 / 55. 11.101
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 79.100 / 3. 79.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Option -s is deprecated, use -video_size.
ffmpeg version N-54580-g694550f Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 10 2013 11:43:58 with gcc 4.7 (SUSE Linux)
configuration: --enable-libv4l2 --enable-libpulse
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 11.101 / 55. 11.101
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 79.100 / 3. 79.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
Duration: N/A, start: 0.010790, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, video4linux2,v4l2, from '/dev/video0':B sq= 0B f=0/0
Duration: N/A, start: 1373874168.744534, bitrate: 165888 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
File 'mon.avi' already exists. Overwrite ? [y/N] nan : 0.000 fd= 0 aq= nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Output #0, avi, to 'mon.avi':
Metadata:
ISFT : Lavf55.11.101
Stream #0:0: Video: mpeg4 (divx / 0x78766964), yuv420p, 720x576, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
Output #1, rawvideo, to 'pipe:':
Metadata:
encoder : Lavf55.11.101
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 800x600, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo -> mpeg4)
Stream #0:0 -> #0:1 (pcm_s16le -> ac3)
Stream #1:0 -> #1:0 (rawvideo -> rawvideo)
Press [q] to stop, [?] for help
Input #0, rawvideo, from 'pipe:':
Duration: N/A, start: 0.000000, bitrate: 144000 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 800x600, 144000 kb/s, 25 tbr, 25 tbn, 25 tbc
frame= 16 fps=0.0 q=5.0 q=0.0 size= 155kB time=00:00:00.64 bitrate=1981.5k 10.36 M-V: -0.002 fd= 0 aq= 0KB vq= 4219KB sq= 0B f=0/0
My live picture is garbled/all one colour/lines
The recorded file is perfect
I get even more confused, I try to use tee
/usr/bin/ffmpeg -f pulse -itsoffset 0.2 -i default -f v4l2 -i /dev/video0 -vtag divx -s 720x576 -r pal -q:v 5 -f tee -map a:0 -map v:0 -c copy mon.avi |mplayer -
and get:
ffmpeg version N-54580-g694550f Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 10 2013 11:43:58 with gcc 4.7 (SUSE Linux)
configuration: --enable-libv4l2 --enable-libpulse
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 11.101 / 55. 11.101
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 79.100 / 3. 79.100
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
MPlayer dev-SVN-r35127-4.7-openSUSE Linux 12.3 (x86_64)-Packman (C) 2000-2012 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing -.
Reading from stdin...
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
Duration: N/A, start: 0.009793, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 1373877364.072402, bitrate: 165888 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Stream map 'v:0' matches no streams.
libavformat version 54.25.104 (internal)
I don't understand why tee does not do what I expect
I don't understand why rawvideo from one v4l device works fine, another does not
Thanks
James
More information about the ffmpeg-user
mailing list