LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-01-2008, 08:37 PM   #1
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Rep: Reputation: 31
Question [solved] stuttering sound in avi


Hi--

Got a new Canon A580 camera and the sound it produces in videos cuts in and out--it sounds to me like a loose microphone cable causing crackles to be recorded.

But here's the weird part--I can play the file on my Ubuntu 8.04.1 box 6 times in a row and each time, the crackles will appear in a different place! In one 24 second clip, it will crackle 7 times the first time I play it, 4 the next, 6 the next, 6 the next, 5 the next, etc. Sometimes in the same places, sometimes not.

I have sent the camera back to Canon for repairs twice on this, along with a couple video samples. They apparently cannot hear the problem on their end, even playing on a computer and listening with earphones. The second time they replaced the "pcb assembly," whatever that is.

So I am thinking it is not a camera issue. I have even tested uploading the file to my computer from the camera using different cables. So I wonder if it is something where the computer's audio playback is not keeping up with the video and skips ahead.

Now I have another camera, a Polaroid PDC 5080, and the sound playback there is flawless. (But it makes poor indoor still pictures, so I don't like that camera!) Both cameras produce .avi files.

Is there a way to get good quality sound out of these files?

Thanks!

Last edited by dgermann; 10-06-2008 at 05:30 PM.
 
Old 10-06-2008, 12:29 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by dgermann View Post
So I am thinking it is not a camera issue. I have even tested uploading the file to my computer from the camera using different cables. So I wonder if it is something where the computer's audio playback is not keeping up with the video and skips ahead.
If you think it's not a cam issue but a decoding issue then keeping VLC, Mplayer or whatever else player's debug log windows open could show skips due to timing issues or whatever else. If it is then changing compression options (less?) (or reviewing demuxed content) should show a difference.
 
Old 10-06-2008, 02:47 PM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Sounds more like a codec issue. Or perhaps your processing power isn't fast enough to playback the content. Which would explain the inconsistency. Many codecs do not utilize multi-threading yet (dual core / dual cpu). You might try other players. mplayer / xine / vlc / ffplay / avifile. You might try some optimizations -skiploopfilter all (or however that's implemented on your player). You might try windows (*cringe*) to see if it has the same issue. You might try extracting both audio and video separately and see if the issue persists if playing one or the other by itself.

ffmpeg -i infile.avi -sameq -an outfile.avi
ffmpeg -i infile.avi -vn outfile.wav

You might try converting the footage to something more universally supported.

ffmpeg -i infile.avi -sameq -target ntsc-dvd outfile.mpeg

And various mencoder / vlc routes for the same. ffmpeg seems to be a little more capable on the newer stuff. And otherwise simpler for me. Baring the 25 fps default which causes sync issues on my 30 fps content.

HTH
 
Old 10-06-2008, 05:30 PM   #4
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Original Poster
Rep: Reputation: 31
Smile

unSpawn--

Thanks!

How does one open and keep open debug logs for those things?

Shadow_7--

Thanks for the code.

Actually, using mplayer instead of totem seems to have gotten rid of the problem, at least for now. So your intuition seems to have been proven correct!

Thanks to both of you!

:- Doug.
 
Old 10-06-2008, 06:01 PM   #5
Kingtiger01
Member
 
Registered: Nov 2006
Distribution: ArchLinux
Posts: 59

Rep: Reputation: 16
Doug, id suggest Mplayer or VLC over Tottem any day. Tottem has some very Odd codec problems, that almost everyone here can say they have seen once or twice.

(Error: Error connecting to file stream. for example when using w32codecs package)

Stick with more "Main Stream" Media players and you should be fine for playback, if it continues, try changing Codecs or adding a faster processor, or additional RAM to youre System. as is could be a System performance issue.

~Kingtiger

Last edited by Kingtiger01; 10-06-2008 at 06:02 PM.
 
Old 10-06-2008, 06:26 PM   #6
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Original Poster
Rep: Reputation: 31
Kingtiger01--

Thanks for your additional help!

Must be that totem comes as the norm in Ubuntu 8.04.1--don't remember seeing it much before. I have a dual core processor and 2 gigs of ram and would have thought that enough for a few little video clips from a pocket camera....

So it does seem to be the player.

Thanks!
 
Old 10-06-2008, 06:38 PM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Not always the case. Each has their strengths. Xine / Totem seem to be better able to play vcd's and other odd formats or oddly named devices. Ogle to play DVDs with menus. Mplayer for most everything else. VLC for H.264 content. ffmpeg for video conversion. And other options for when that doesn't quite work.
 
Old 10-06-2008, 07:10 PM   #8
Kingtiger01
Member
 
Registered: Nov 2006
Distribution: ArchLinux
Posts: 59

Rep: Reputation: 16
Quote:
Originally Posted by Shadow_7 View Post
VLC for H.264 content.
Ive had the Opposite Response with VLC and H.264 Encoded video. Very Choppy, on both my X2 5600+ and my intel 478 P4(3.3) Prescott.

Both which run high end video cards and 2gb of ram(7800gs on p4, 8800gts on the x2)

Doesnt appear to be the Hardware for me, and the VLC community still uses included source version ffdShow Codecs, which havent change since version "e"

i find, with Mplayer using Opengl2, i get the best overall performance for video, but with VLC i get the Best audio performance.

Still just a matter of opinion i suppose though. Version is everything, though also.
 
Old 10-06-2008, 07:13 PM   #9
dgermann
Member
 
Registered: Aug 2004
Distribution: Ubuntu 16.04 lts desk; Ubuntu 14.04 server
Posts: 366

Original Poster
Rep: Reputation: 31
Shadow_7--

Thanks for the overview. It gives us a list of things to try (most of which I have never heard of before!).

Kingtiger01--

Thanks for your additional info!
 
Old 10-06-2008, 08:24 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Quote:
Originally Posted by Kingtiger01 View Post
Ive had the Opposite Response with VLC and H.264 Encoded video. Very Choppy, on both my X2 5600+ and my intel 478 P4(3.3) Prescott.
VLC does seem to be a resource hog. And I tend to use cvlc more often. Console based, from an xterm. Compiled from source along with most things kernel / media for cpu optimizations and such. I'm just saying that VLC seems to have the best picture quality and playback options in terms of filters to make interlaced video look better. Not that I can use them on my current system. But I can crop off part of the 1920x1080 footage with ffmpeg to get a glimpse of sunshine.

cvlc --no-skip-frames --no-drop-late-frames --no-video-deco --swscale-mode 0 --no-ffmpeg-hurry-up --ffmpeg-skiploopfilter 4 --no-audio 00000.mts

cvlc --advanced --full-help

But like I said, I have to be at 25% speed to see all frames in vlc (gui) at about 95% cpu usage on my 2GHz machine. --no-audio seems to be a big performance boost. And some others.
 
Old 10-06-2008, 08:44 PM   #11
Kingtiger01
Member
 
Registered: Nov 2006
Distribution: ArchLinux
Posts: 59

Rep: Reputation: 16
Quote:
Originally Posted by Shadow_7 View Post
VLC does seem to be a resource hog. And I tend to use cvlc more often. Console based, from an xterm. Compiled from source along with most things kernel / media for cpu optimizations and such. I'm just saying that VLC seems to have the best picture quality and playback options in terms of filters to make interlaced video look better. Not that I can use them on my current system. But I can crop off part of the 1920x1080 footage with ffmpeg to get a glimpse of sunshine.

cvlc --no-skip-frames --no-drop-late-frames --no-video-deco --swscale-mode 0 --no-ffmpeg-hurry-up --ffmpeg-skiploopfilter 4 --no-audio 00000.mts

cvlc --advanced --full-help

But like I said, I have to be at 25% speed to see all frames in vlc (gui) at about 95% cpu usage on my 2GHz machine. --no-audio seems to be a big performance boost. And some others.
Ohh i already know, thats not the issue. ive spent nearly 6 years covering at Videolans forums. i know the ups and downs..

Issue is purely not the media player its self, its has alot to do with the fact of me using pre-compiled binaries, that are not optimised for my specific hardware platform. but the same goes for most people.

my whole point is Audio performance and Video performance while using high end Codec like AC3 and H.264/263, and FourCC codec will perform slow when its relying completly on a single thread to handle everything, at high resolution video and then to down-mix the video to a respectable lower resolution.

my only point was purely, that I get poor performance under VLC for h.264 video on My platform.


i am by far NO EXPERT. but i try to think of my self as not a idiot when it comes to BSD like Os'es.
--

on a Side note Shadow-7, could you message me elsewhere. i think you could help me with another issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuttering sound in Ubuntu - was fine hamster Linux - Hardware 3 12-15-2007 08:25 PM
Kernel 2.6.17.13 Audigy sound stuttering Erik_FL Slackware 1 03-18-2007 03:06 PM
Quake 2 sound stuttering - can I cure this? rockhard1972 Linux - Games 15 07-26-2005 05:25 PM
Stuttering Sound in MDK10 iainagray Mandriva 2 06-23-2004 01:15 AM
Stuttering sound after upgrade to MDK10.0 iainagray Linux - Laptop and Netbook 1 06-22-2004 03:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration