You may have noticed a few posts from me recently regarding recording to
AVI format. From my perspective, the important part of the process is to get the information _recorded_ so that I can edit the recorded material and write to a DVD - so it does not have to be AVI. I would be happy with OGG or MPEG so long as I can carry the file to another machine and edit it. I have successfully made a recording using gst-launch-1.0 -e v4l2src norm=PAL ! 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. avimux name=mux ! filesink location=test.avi - although I have not attempted to verify that the audio is in sync with the video. I then tried to change from AVI to QT using gst-launch-1.0 -e v4l2src norm=PAL ! 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' ! videoconvert ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. qtmux name=mux ! filesink location=test.mov - but when I play the video, I do not hear any audio. I have inspected qtmux to verify that it can take an audio input. (Check). So what have I done wrong to lose the audio? Would I be better to choose OGG or MPEG? I am thinking that the multifilesink would be a useful thing to use. I have attempted to use oggmux as in the following command gst-launch-1.0 -e v4l2src norm=PAL ! 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' ! videoconvert ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. oggmux name=mux ! filesink location=test.ogg - but it fails to link mux to the (video) queue. Your help, as ever, is appreciated. Ian -- -- Ian Davidson -- Facts used in this message may or may not reflect an underlying objective reality. Facts are supplied for personal use only. Recipients quoting supplied information do so at their own risk. Facts supplied may vary in whole or part from widely accepted standards. While painstakingly researched, facts may or may not be indicative of actually occurring events or natural phenomena. The author accepts no responsibility for personal loss or injury resulting from memorisation and subsequent use. _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
> I have successfully made a recording using
> gst-launch-1.0 -e v4l2src norm=PAL ! > 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/ > 1' ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! > 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. avimux name=mux ! > filesink location=test.avi > - although I have not attempted to verify that the audio is in sync with > the video. > > I then tried to change from AVI to QT using > gst-launch-1.0 -e v4l2src norm=PAL ! > 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/ > 1' ! videoconvert ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! > 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. qtmux name=mux ! > filesink location=test.mov > - but when I play the video, I do not hear any audio. > > I have inspected qtmux to verify that it can take an audio input. > (Check). So what have I done wrong to lose the audio? -) avimux is able to handle raw format. I am not sure if qtmux can handle raw frames. -) Inspect your recording with ffmpeg -i and/or mediainfo. this will tell you what type of track it carries. -) try using num-buffer on the video chain instead. (not sure how many seconds of recording 440 video buffers are) -) if you want raw recording you probably don't have much use for qtmux anyway. Typically QT recordings are done with encoded frames audio and video. I used the following pipeline successfully: gst-launch -e v4l2src device=/dev/video0 ! videorate ! queue ! ffenc_mpeg4 name=venc alsasrc do-timestamp=1 ! audio/x raw-int,rate=48000,channels=$achannels ! queue ! audioconvert ! faac name=aenc qtmux name=mux ! filesink location=media.mp4 aenc. ! mux. venc. ! mux." _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Ian Davidson
On Tue, 2012-12-18 at 16:43 +0000, Ian Davidson wrote:
Hi Ian, > You may have noticed a few posts from me recently regarding recording to > AVI format. From my perspective, the important part of the process is > to get the information _recorded_ so that I can edit the recorded > material and write to a DVD - so it does not have to be AVI. I would be > happy with OGG or MPEG so long as I can carry the file to another > machine and edit it. Ok. Which container to use depends a bit on the codec I guess, and on what your editing software supports (container + codecs). Quicktime/MP4 would usually be a good choice for this kind of thing. > I have successfully made a recording using > gst-launch-1.0 -e v4l2src norm=PAL ! > 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' > ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! > 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. avimux name=mux ! > filesink location=test.avi > - although I have not attempted to verify that the audio is in sync with > the video. Ok. You might want/need a videorate element between the video source and the muxer, and an audiorate element between the audio source and the muxer (to make sure the stream is 'perfect' timestamp/data wise and there are no gaps - AVI doesn't handle those things very well and you might get A/V sync issues otherwise). > I then tried to change from AVI to QT using > gst-launch-1.0 -e v4l2src norm=PAL ! > 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' > ! videoconvert ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! > 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. qtmux name=mux ! > filesink location=test.mov > - but when I play the video, I do not hear any audio. > > I have inspected qtmux to verify that it can take an audio input. > (Check). So what have I done wrong to lose the audio? Very odd! It appears to be a bug, probably in qtmux. It does not work with audiotestsrc either for me, nor in 0.10. Please file a bug. > Would I be better to choose OGG or MPEG? I am thinking that the > multifilesink would be a useful thing to use. Ogg/MPEG aren't good containers for dumping raw audio/video into. They work well with multifilesink though. > I have attempted to use oggmux as in the following command > gst-launch-1.0 -e v4l2src norm=PAL ! > 'video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1' > ! videoconvert ! queue ! mux. alsasrc num-buffers=440 ! audioconvert ! > 'audio/x-raw,rate=44100,channels=2' ! queue ! mux. oggmux name=mux ! > filesink location=test.ogg > - but it fails to link mux to the (video) queue. > > Your help, as ever, is appreciated. Ogg doesn't support raw video. (Theoretically it does via the ogm extension, but we don't have a formatter for that and it's a bit exotic). There's a mapping for raw audio (OggPCM) but we don't support that yet. You could encode to vorbis (lossy) or FLAC (lossless) instead. Try encoding the video to VP8 or Theora or Dirac (with schroenc). Might need to find out some suitable settings though (maybe I-frame only, etc.). Again, you might want to check the capabilities of your video editing software. You can probably count the number of applications supporting Ogg on the fingers of one hand (if not one finger of one hand). For mp4/quicktime, H.264 would be a good format to encode to (and x264enc is very versatile). Cheers -Tim _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |