Autor Thema: recording composite video  (Gelesen 9978 mal)

Ian

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
recording composite video
« am: August 17, 2016, 11:55:08 Nachmittag »
I've got a headless Raspberry Pi with a Sundtek MediaTV Pro III (EU) which has been successfully recording UK dvb-t for several months, but I now want to record video connected to the composite video input cable. I can't find any examples and my attempts to figure it out are not going well.

avconv -f oss -i /dev/dsp0 audio.mp3
Stops immediately and gives a file 500 bytes long
avconv -f video4linux2 -i /dev/video0 video.wav
also fails, but there could be other problems with the video. Surely the audio should work whatever is on the cable?
Yours
Ian


Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:recording composite video
« Antwort #1 am: August 18, 2016, 12:03:29 Vormittag »
mencoder should be the easiest way to record TV:

http://support.sundtek.com/index.php/topic,625.msg3733.html#msg3733


tvtime is the easiest way to watch s-video/composite.

please note that s-video/composite might require quite a lot resources because it's raw video.
RAW Video means it requires around 20 mbyte/second for analog Video and analog Audio

There are several more mencoder examples in this forum.
Failure is a good thing! I'll fix it

Ian

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re:recording composite video
« Antwort #2 am: August 18, 2016, 10:52:16 Vormittag »
I'm not trying to watch the TV, the Raspberry Pi is actually in another country. Mencoder is not installed and is not an available package.
One thing I'd be grateful to know, as I can't find it anywhere is, if I set to dvb:
/opt/bin/mediaclient --setdtvmode=DVBT
how can I get back to composite video? So far I'm having to ring someone to pull the plug out.

If I set to composite video:
/opt/bin/mediaclient -I 0001

Shouldn't I have the equivalent of a sound card on /dev/dsp0?

If I try:
avconv -f oss -i /dev/dsp0 audio.mp3
the data from the dsp clearly ends almost instantly


Input #0, oss, from '/dev/dsp0':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
File 'audio.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to 'audio.mp3':
  Metadata:
    TSSE            : Lavf56.1.0
    Stream #0.0: Audio: libmp3lame, 48000 Hz, stereo, s16p
    Metadata:
      encoder         : Lavc56.1.0 libmp3lame
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
Press ctrl-c to stop encoding
size=       1kB time=10000000000.00 bitrate=   0.0kbits/s   
video:0kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 52.083332%

Does there need to be video too for the audio to even work?
Yours
Ian

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:recording composite video
« Antwort #3 am: August 18, 2016, 01:01:26 Nachmittag »
You will need mencoder on it for capturing TV.

This process is not that easy, audio and video needs to be synchronized.

You will need to enable video in order to receive audio with our devices.
Failure is a good thing! I'll fix it

Ian

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re:recording composite video
« Antwort #4 am: August 18, 2016, 01:10:22 Nachmittag »
Thanks for the information that audio can only come with video. I was coming to that conclusion and it is good to know what I can and cannot be sure of.

I want to use avconv because there is a version which will use hardware compression on the Pi and it will not be fast enough to compress without using the gpu. Are you sure that it is impossible to use avconv, or is mencoder simply your preferred/supported solution?
Yours
Ian

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8604
    • Profil anzeigen
Re:recording composite video
« Antwort #5 am: August 18, 2016, 01:36:17 Nachmittag »
Hi,

can you open a ticket about your issue and post the avconv commands which you have used so far.

http://sundtek.de/tickets

We have never tested/used avconv.
mplayer/mencoder is using ffmpeg, avconv seems to be part of libav/ffmpeg.
Failure is a good thing! I'll fix it