LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-02-2014, 10:38 AM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Rep: Reputation: 22
Post How Can I fix an AVI file?


Hello.
I download a Movie from the Internet but I can't play it?
I use below command to check it :

ffmpeg -v error -i my.avi -f null -

it show me :

[avi @ 0x176ecc0] Something went wrong during header parsing, I will ignore it and try to continue anyway.
[mpeg4 @ 0x175dd00] hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x175dd00] my guess is 4 bits
[ac3 @ 0x1776f20] frame sync error
Error while decoding stream #0:1: Operation not permitted
[mpeg4 @ 0x177d980] warning: first frame is no keyframe
[ac3 @ 0x1776f20] frame CRC mismatch
[mpeg4 @ 0x177d980] I cbpy damaged at 0 0
[mpeg4 @ 0x177d980] Error at MB: 0
[mpeg4 @ 0x177d980] marker does not match f_code
Last message repeated 14 times
[ac3 @ 0x1776f20] frame sync error
[mpeg4 @ 0x177d980] marker does not match f_code
[mpeg4 @ 0x177d980] marker does not match f_code
Error while decoding stream #0:1: Operation not permitted
Last message repeated 9 times
[mpeg4 @ 0x17bf760] I cbpy damaged at 0 0
[mpeg4 @ 0x17bf760] Error at MB: 0
Last message repeated 9 times
[ac3 @ 0x1776f20] frame CRC mismatch
[mpeg4 @ 0x17bf760] marker does not match f_code
Last message repeated 21 times


How can I fix it?
 
Old 11-02-2014, 11:53 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by jokar.mohsen View Post
I download a Movie from the Internet but I can't play it?
I use below command to check it:

Code:
ffmpeg -v error -i my.avi -f null -

[avi @ 0x176ecc0] Something went wrong during header parsing, I will ignore it and try to continue anyway.
[mpeg4 @ 0x175dd00] hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x175dd00] my guess is 4 bits ;)
[ac3 @ 0x1776f20] frame sync error
Error while decoding stream #0:1: Operation not permitted
[mpeg4 @ 0x177d980] warning: first frame is no keyframe
[ac3 @ 0x1776f20] frame CRC mismatch
[mpeg4 @ 0x177d980] I cbpy damaged at 0 0
[mpeg4 @ 0x177d980] Error at MB: 0
[mpeg4 @ 0x177d980] marker does not match f_code
    Last message repeated 14 times
[ac3 @ 0x1776f20] frame sync error
[mpeg4 @ 0x177d980] marker does not match f_code
[mpeg4 @ 0x177d980] marker does not match f_code
Error while decoding stream #0:1: Operation not permitted
    Last message repeated 9 times
[mpeg4 @ 0x17bf760] I cbpy damaged at 0 0
[mpeg4 @ 0x17bf760] Error at MB: 0
    Last message repeated 9 times
[ac3 @ 0x1776f20] frame CRC mismatch
[mpeg4 @ 0x17bf760] marker does not match f_code
    Last message repeated 21 times
I don't know ffmpeg well enough to go into these messages in detail. But it looks as though ffmpeg finds an mpeg4 video stream (what variant of mpeg4? H.264?) and an AC3 audio stream in the file. Assuming the video is actually H.264, this is an unusual combination for an avi container. Does ffmpeg rely too much on the file extension? Have you tried to rename the file to *.mp4 and repeat?

What I would do (because I'm not familiar with ffmpeg) is to open the video file in Avidemux, and then look under File/Properties what it really is. Avidemux opens a great variety of video formats, even some that aren't valid, like AC3 audio in an AVI container. As an alternative, I might just try to play the file with VLC (Videolan) and have a look at Tools/Codec Information to find out the actual video and audio encoding.
Then think about it and see what I can do with it.

[X] Doc CPU
 
Old 11-02-2014, 12:49 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
I download a Movie from the Internet but I can't play it?
is it a real file ? and not a windows virus ?
is it DRM'ed ?
if it is a real movie and a legal one
redownload it
 
Old 11-02-2014, 01:42 PM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
what does the file command output ?
 
Old 11-02-2014, 03:53 PM   #5
whois
Member
 
Registered: Oct 2014
Posts: 39

Rep: Reputation: Disabled
If the header is corrupted or incomplete, you can try this from this site
http://falcon1986.wordpress.com/2010...quick-command/

Even though the article is around ubuntu, the mencoder command is available in many linux distros preinstalled or available to download from the repos.
 
1 members found this post helpful.
Old 11-03-2014, 07:53 AM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
^ seems to be a windows only program (is that an ad ?) ...
whois already provided a way to fix the indexing using mencoder (which seems easier/cheaper by the way).

my thinking is that if he downloaded a torrent maybe it's not really an avi file. maybe it is a mis-labeled *.mkv/*.mpg*/.mov/*.wmv/*.qt/...
stuff like that is common on file sharing sites since they aren't meticulous about quality.

Last edited by schneidz; 11-03-2014 at 07:56 AM.
 
Old 11-03-2014, 09:58 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
ffmpeg and aviconv are both pretty good. Either the poster gave you validate and repair capabilities, or they did not. Also, either the file is still available, and a legit file, or it is not. The wariness of JohnVV is a valid point. It might not be an actual movie file.

In cases like these I put in only so much horsepower and then either try to find the file from another source, conclude that it was not an actual movie, or that I just don't have enough of a valid file to repair.
 
Old 11-05-2014, 03:22 AM   #8
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by Doc CPU View Post
Hi there,



I don't know ffmpeg well enough to go into these messages in detail. But it looks as though ffmpeg finds an mpeg4 video stream (what variant of mpeg4? H.264?) and an AC3 audio stream in the file. Assuming the video is actually H.264, this is an unusual combination for an avi container. Does ffmpeg rely too much on the file extension? Have you tried to rename the file to *.mp4 and repeat?

What I would do (because I'm not familiar with ffmpeg) is to open the video file in Avidemux, and then look under File/Properties what it really is. Avidemux opens a great variety of video formats, even some that aren't valid, like AC3 audio in an AVI container. As an alternative, I might just try to play the file with VLC (Videolan) and have a look at Tools/Codec Information to find out the actual video and audio encoding.
Then think about it and see what I can do with it.

[X] Doc CPU
I rename it and use other tools like VLC too but not worked
 
Old 11-05-2014, 03:44 AM   #9
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by whois View Post
If the header is corrupted or incomplete, you can try this from this site
http://falcon1986.wordpress.com/2010...quick-command/

Even though the article is around ubuntu, the mencoder command is available in many linux distros preinstalled or available to download from the repos.
Not Worked
 
Old 11-05-2014, 08:10 AM   #10
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
we're probably chasing ghosts. what is the result of this:
Quote:
Originally Posted by schneidz View Post
what does the file command output ?
 
Old 11-05-2014, 01:29 PM   #11
whois
Member
 
Registered: Oct 2014
Posts: 39

Rep: Reputation: Disabled
@ jokar.mohsen

I agree with schneidz. Using the file command is the next logical step to identifying the video or unknown file.

Code:
file videofile.avi
 
Old 11-05-2014, 03:43 PM   #12
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
fyi, output should look like:
Code:
[schneidz@mom moo-vees]$ file miracle-at-st-anna.avi 
miracle-at-st-anna.avi: RIFF (little-endian) data, AVI, 720 x 480, ~30 fps, video: DivX 5, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
 
Old 11-10-2014, 05:09 AM   #13
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by schneidz View Post
we're probably chasing ghosts. what is the result of this:
Documents.mp4: RIFF (little-endian) data, AVI, 720 x 400, 23.98 fps, video: XviD, audio: Dolby AC3 (6 channels, 48000 Hz)

---------- Post added 11-10-14 at 02:40 PM ----------

Quote:
Originally Posted by schneidz View Post
fyi, output should look like:
Code:
[schneidz@mom moo-vees]$ file miracle-at-st-anna.avi 
miracle-at-st-anna.avi: RIFF (little-endian) data, AVI, 720 x 480, ~30 fps, video: DivX 5, audio: MPEG-1 Layer 3 (stereo, 48000 Hz)
document.mp4: RIFF (little-endian) data, AVI, 720 x 400, 23.98 fps, video: XviD, audio: Dolby AC3 (6 channels, 48000 Hz)
 
Old 11-10-2014, 08:08 AM   #14
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
my limited understanding is that the avi container is unable to hold more than 2 audio channels ?

maybe try to convert it to an mkv ?


also try playing it with mplayer in the terminal and see if it prints out any error messages ?

Last edited by schneidz; 11-10-2014 at 08:14 AM.
 
Old 11-15-2014, 09:52 AM   #15
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
MPlayer 1.1-4.7 (C) 2000-2012 MPlayer Team

Playing document.mp4.
libavformat version 54.6.100 (internal)
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
libavformat file format detected.
[lavf] stream 0: video (mpeg4), -vid 0
[lavf] stream 1: audio (ac3), -aid 0
VIDEO: [MP4V] 720x400 12bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:
encoder: VirtualDubMod 1.5.10.3 | www.virtualdub-fr.org || (build 2550/release)
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 54.23.100 (internal)
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
[AO SDL] Samplerate: 48000Hz Channels: Stereo Format s16le
AO: [null] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 720x400 => 720x400 Planar YV12
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.0 V: 0.0 A-V: -0.002 ct: 0.000 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.0 V: 0.1 A-V: -0.045 ct: -0.004 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.0 V: 0.1 A-V: -0.087 ct: -0.008 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.1 V: 0.2 A-V: -0.079 ct: -0.013 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.1 V: 0.2 A-V: -0.121 ct: -0.017 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.1 V: 0.3 A-V: -0.113 ct: -0.021 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.1 V: 0.3 A-V: -0.155 ct: -0.025 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.2 V: 0.3 A-V: -0.147 ct: -0.029 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.2 V: 0.4 A-V: -0.189 ct: -0.033 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.2 V: 0.4 A-V: -0.181 ct: -0.038 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.2 V: 0.5 A-V: -0.223 ct: -0.042 0/ 0 ??% ??% ??,?% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.3 V: 0.5 A-V: -0.215 ct: -0.046 0/ 0 20% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.3 V: 0.5 A-V: -0.257 ct: -0.050 0/ 0 18% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.3 V: 0.6 A-V: -0.249 ct: -0.054 0/ 0 17% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.3 V: 0.6 A-V: -0.291 ct: -0.058 0/ 0 16% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.4 V: 0.7 A-V: -0.269 ct: -0.063 0/ 0 15% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.4 V: 0.7 A-V: -0.311 ct: -0.067 0/ 0 15% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.4 V: 0.8 A-V: -0.303 ct: -0.071 0/ 0 14% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.4 V: 0.8 A-V: -0.345 ct: -0.075 0/ 0 14% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.5 V: 0.8 A-V: -0.337 ct: -0.079 0/ 0 14% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.5 V: 0.9 A-V: -0.379 ct: -0.083 0/ 0 14% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.5 V: 0.9 A-V: -0.371 ct: -0.088 0/ 0 13% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.5 V: 1.0 A-V: -0.414 ct: -0.092 0/ 0 13% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.6 V: 1.0 A-V: -0.406 ct: -0.096 0/ 0 12% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.6 V: 1.0 A-V: -0.447 ct: -0.100 0/ 0 12% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.6 V: 1.1 A-V: -0.439 ct: -0.104 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.6 V: 1.1 A-V: -0.481 ct: -0.108 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.7 V: 1.2 A-V: -0.473 ct: -0.113 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.7 V: 1.2 A-V: -0.515 ct: -0.117 0/ 0 10% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.8 V: 1.3 A-V: -0.493 ct: -0.121 0/ 0 12% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.8 V: 1.3 A-V: -0.536 ct: -0.125 0/ 0 12% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.8 V: 1.3 A-V: -0.528 ct: -0.129 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.8 V: 1.4 A-V: -0.570 ct: -0.133 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.9 V: 1.4 A-V: -0.561 ct: -0.138 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.9 V: 1.5 A-V: -0.603 ct: -0.142 0/ 0 11% 1% 0.3% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.9 V: 1.5 A-V: -0.594 ct: -0.146 0/ 0 10% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 0.9 V: 1.5 A-V: -0.637 ct: -0.150 0/ 0 10% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 1.0 V: 1.6 A-V: -0.629 ct: -0.154 0/ 0 10% 1% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 1.0 V: 1.6 A-V: -0.671 ct: -0.158 0/ 0 10% 0% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 1.0 V: 1.7 A-V: -0.664 ct: -0.163 0/ 0 9% 0% 0.2% 0 0 
[mpeg4 @ 0xf63920]concealing 1125 DC, 1125 AC, 1125 MV errors
A: 1.0 V: 1.7 A-V: -0.706 ct: -0.167 0/ 0 9% 0% 0.2% 0 0 
 
  


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
Gui that convert AVI to AVI DivX, with telling final avi target final size ? frenchn00b Linux - General 5 03-02-2008 05:37 AM
how can I play file avi file with DivX6.40 1280x720 24fps nos1833 Debian 2 12-27-2007 11:45 PM
mount .iso (image) file and read *.avi file smartdragonfly Linux - Software 2 12-21-2006 04:48 AM
My player cant play rmvb file while avi file is ok......what's going on??!!! shuvernce Linux - General 6 03-28-2006 09:45 PM
How to convert the MPEG file to AVI file? stiphon General 3 06-08-2004 07:22 PM

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

All times are GMT -5. The time now is 10:44 AM.

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