You are not logged in.

#1 2007-09-11 02:06:58

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Find which codec is used?

How can I tell which codec is being used for sound in an avi file.  I have problems playing some avi's in VLC.  The sound is crackly.  Other files are fine so I figure there is some encoding difference I wanted to track down before I reported a bug.  Totem plays the files fine.

Offline

#2 2007-09-11 02:18:57

AlmaMater
Member
Registered: 2007-02-28
Posts: 97

Re: Find which codec is used?

have u run VLC from command line, and play the movie, and  see the output??

Offline

#3 2007-09-11 02:40:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: Find which codec is used?

That gave no information.  But I did find View > Stream and Media Info in VLC.

Strange this is all the avi's I have to compare use mpga codec for sound. The ones that don't work are at 48000Hz/128kb/s and 44100Hz/133kb/s.  The one that does 48000Hz/122kb/s.  Don't know if this will be an easy one to figure out....

Offline

#4 2007-09-11 02:42:37

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Find which codec is used?

You can use FFMPEG with ffmpeg -i <your file>. What you're looking for is at the end of the output:

ffmpeg -i kali.mp4

....

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'kali.mp4':
  Duration: 00:06:48.1, start: 0.000000, bitrate: 2924 kb/s
  Stream #0.0(und): Video: h264, yuv420p, 720x576,  9.99 fps(r)
  Stream #0.1(und): Audio: mpeg4aac, 44100 Hz, stereo

Offline

#5 2007-09-11 03:17:38

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: Find which codec is used?

OK.  From the ffmpeg output I have two avi files, both the same video and audia (mp3) codecs, audio with same bitrate, video with same framerate.  But one doesn't play nice in VLC - sound crackles substantially.   

That seems almost impossible to solve to me!  That OK though, I only use VLC when I have subtitle embedded within the file (ogm, mkv).  Waiting for that to arrive in gstreamer.

Offline

#6 2007-09-11 04:11:45

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Find which codec is used?

Out of curiosity, does the file with bad sound play any better using ffplay?

ffplay <your file>

Offline

#7 2007-09-11 05:36:17

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: Find which codec is used?

One series appears to play absolutely fine.  The other series giving me trouble plays even worse...

Offline

#8 2007-09-11 09:14:26

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: Find which codec is used?

btw...

theres a command in linux that can be used to get info from any file, its called file smile

file /media/Files/Download/movie.avi 
/media/Files/Download/movie.avi: RIFF (little-endian) data, AVI, 640 x 272, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)

as for your other problem, could it be a problem in the video instead of vlc?

Offline

#9 2007-09-11 10:00:55

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,487
Website

Re: Find which codec is used?

Maybe there is something wrong with the file, but it appears to play in totem so...

Offline

#10 2007-09-11 13:29:49

Noneus
Member
From: Munich
Registered: 2006-09-26
Posts: 118
Website

Re: Find which codec is used?

I play videos with smplayer. You just view the mplayer log with ctrl+m and you will audio codec and video codec.

Offline

Board footer

Powered by FluxBB