Author Topic: Video recording lags behind audio  (Read 3028 times)

0 Members and 1 Guest are viewing this topic.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 963
  • Karma: 14
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Video recording lags behind audio
« on: December 28, 2011, 11:46:56 am »
using Ubuntu 11.04 - the Natty Narwhal.

I am trying to record a video to put on to a web page.  I am using Cheese 2.32.0 the video seems to be recording fine but when played back the video lags behind the sound.

I have a AMD duel core processor and a 500mb video card video streaming via Skype is good so would be interested in any suggestions?  Am I using the wrong program to make the recording.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #1 on: December 28, 2011, 01:03:36 pm »
Have you tried adjusting the resolution of the webcam in Cheese ?

You don't say what type of webcam youi are using, but you might want to try guvcview instead:
Code: [Select]
sudo apt-get install guvcview
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

The Linux Community Forum

Re: Video recording lags behind audio
« Reply #1 on: December 28, 2011, 01:03:36 pm »

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 963
  • Karma: 14
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #2 on: December 28, 2011, 02:57:02 pm »
I have adjusted the resolution to the min setting but the lag is not acceptable as when posted on the web page there is a lag that you notice.

I will try the program you suggest and let you know.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #3 on: December 28, 2011, 03:49:53 pm »
Does the video lag when the file is played locally through your media player ? (ie. not across the internet)

Can you provide a link to the website and video.
« Last Edit: December 28, 2011, 03:51:28 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 963
  • Karma: 14
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #4 on: December 28, 2011, 05:22:01 pm »
I have talked by Skype video link to 2 people today and they said there was no lag in the video so it can not be the camera.

I got this camera as it was recommended to work with Linux and it has been a big improvement on the one I had before.

Have noted that improving the lighting and reducing the resolution to min  has reduced the lag but then the pic quality is reduced.

The web page is not yet published and is held on my computer and viewed direct from the hard drive.

The Linux Community Forum

Re: Video recording lags behind audio
« Reply #4 on: December 28, 2011, 05:22:01 pm »

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #5 on: December 28, 2011, 06:04:09 pm »
Quote
I have talked by Skype video link to 2 people today and they said there was no lag in the video so it can not be the camera.

That wasn't why I asked about the webcam .. I just wanted to know if it was a v4l2 device or not :)

It may be something to do with the way the file is being streamed from the webpage .. how does the file play when opened directly in a media player (not a web browser) such as VLC ?

What format is the file saved in ? .. and how is it displayed on the website ? (in flashplayer ?)

Or as you suggest, it may be the recording software itself .. have you tried guvcview ?

What I'm getting at is first you need to know if it's a problem with the way Cheese is recording the file, or a problem in the way the file is being streamed from the webpage.
« Last Edit: December 28, 2011, 06:28:45 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 963
  • Karma: 14
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #6 on: December 30, 2011, 12:20:37 pm »
Ok now this is interesting.  No lag this morning whilst recording in bright sun, I was able to improve the resolution be two settings and still no lag. So the issue seems to be the lighting level in my office.

Now I only have to convert the file to FLV or MP4 so that the website creation software can embed it into the page.

Offline Mark Greaves (PCNetSpec)

  • Hero Member
  • *****
  • Posts: 18277
  • Karma: 479
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #7 on: December 30, 2011, 02:20:01 pm »
I generally use Arista to convert video .. it comes with a ton of presets for "web" optimized video.
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 963
  • Karma: 14
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: Video recording lags behind audio
« Reply #8 on: January 16, 2012, 08:56:28 am »
Thanks for the tip, this problem was defently due to the amount of light, recording in strong light conditions means no lag.

The Linux Community Forum

Re: Video recording lags behind audio
« Reply #8 on: January 16, 2012, 08:56:28 am »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal