LinuxQuestions.org
Review your favorite Linux distribution.
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 05-13-2010, 01:59 PM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Rep: Reputation: 53
.avi file plays reversed and upside down


Hello Everyone,

I have an .avi file that is a clip from a security camera recording of an incident. I am trying to edit the video with an editor and I have an issue in just playing the video. When playing the video it opens and plays just fine but reversed and upside down. I don't see any settings in any of the players I have tried (VLC, etc.) to correct this. It plays fine from the Windows computer at work. I believe there may be some special codecs related to this particular security camera software.

Does anyone know how I might deal with this to correct it?

Any thoughts appreciated.

Bob
 
Old 05-13-2010, 03:02 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Try the various players to see if they all behave the same.

vlc
mplayer
ffplay
xine
kaffeine
............................

Worst case you can edit it. Extract each frame as an image, flip them, change their order, create a video from them. Reversing audio is easy in sox or audacity. Many means to an end.
 
Old 05-13-2010, 03:18 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Something like:

Code:
mencoder input.avi -oac copy -ovc lavc -vf flip -o out.avi
for '-vf' options you can use 'flip', 'mirror', or both 'mirror,flip', not sure which one you need. Or see the man page:
http://linux.die.net/man/1/mplayer
 
Old 05-13-2010, 03:38 PM   #4
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by H_TeXMeX_H View Post
Something like:

Code:
mencoder input.avi -oac copy -ovc lavc -vf flip -o out.avi
for '-vf' options you can use 'flip', 'mirror', or both 'mirror,flip', not sure which one you need. Or see the man page:
http://linux.die.net/man/1/mplayer
Thanks for the reply H TexMex. Apparently I was correct in thinking there is some special codec provided in the security camera software, because when I run your suggestion, it looks like it is working then:

Quote:
Cannot find codec matching selected -vo and video format 0x584F4547.
Read DOCS/HTML/en/codecs.html!
The file is in "GEOX" (no idea what that is, but I will google it.)

Thanks again,

Bob
 
Old 05-14-2010, 04:05 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Hmm, well if you post the output of either 'ffmpeg -i video.avi' or the mplayer output on the console, it might help in knowing what codecs it is using.

You can also use mplayer to just play in upside down:

Code:
mplayer -vf flip movie.avi
this won't fix the file, but it might play it. Make sure you have proprietary codecs installed.
 
Old 05-14-2010, 01:10 PM   #6
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by H_TeXMeX_H View Post
Hmm, well if you post the output of either 'ffmpeg -i video.avi' or the mplayer output on the console, it might help in knowing what codecs it is using.

You can also use mplayer to just play in upside down:

Code:
mplayer -vf flip movie.avi
this won't fix the file, but it might play it. Make sure you have proprietary codecs installed.
Hi, sorry for taking so long to respond, got late here...

Here is the output of playing the file with mplayer:

Code:
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
MPlayer SVN-r1.0~rc3+svn20090426-4.4.3 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing out.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
AVI: No audio stream found -> no sound.
VIDEO:  [FMP4]  320x240  24bpp  30.000 fps  212.4 kbps (25.9 kbyte/s)
Clip info:
 Software: Lavf52.31.0
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
open: No such file or directory
[MGA] Couldn't open: /dev/mga_vid
[VO_TDFXFB] Can't open /dev/fb0: Permission denied.
[VO_3DFX] Unable to open /dev/3dfx.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO: [xv] 320x240 => 320x240 Planar YV12 
V:  12.9 387/387  3%  0%  0.0% 0 0 
Exiting... (Quit)
It plays the file, but the same reverse upside down picture. As I mentioned, it plays in Windows, but when the files are downloaded and played from a disc recorded from the security camera, it does have a dialog box before loading them that says "installing codecs". So I feel reasonably sure that is the problem. I have the disc it was record from, but I do not find a file containing codecs.

Thanks for looking at this.

Bob
 
Old 05-14-2010, 01:37 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
It looks like mpeg4, so I don't see why it mencoder can't handle it.
 
Old 05-14-2010, 01:49 PM   #8
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
Yes, it appeared that way to me, too. I did find a file on the cd it is recorded on that is labled "cdoecs.dll", so obviously there are some particular codecs that are only usable in Windows.

Thanks for your help. I'll have to find a Windows machine to do this with.

Bob
 
Old 05-16-2010, 04:05 AM   #9
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,526

Original Poster
Rep: Reputation: 53
UPDATE: Found the answer. There was indeed codecs related to playback from the security cameras, but I found that if I convert them to .mpg with ffmpeg, then use H_TexMex_H's mencoder solution, it works. Video is flipped and can now be edited with either Cinelerra or Kdenlive.

Thanks H_TexMex_H.

Bob
 
Old 05-16-2010, 06:38 AM   #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
ffmpeg has -vfilter options for stuff. I'm not sure if flipped in a current one. And the latest and greatest seems to be the most feature-full. Alternatively have you tried putting the codecs.dll into /usr/lib/codecs and see if mplayer just runs with it? Perhaps not that "simple", but something to at least try.
 
  


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
When playing an AVI with Kaffeine, the sound plays, but no video. Vetruvet Linux - Software 2 10-05-2008 03:20 PM
Cinelerra, does not open MPEG file, but file plays okay in mplayer newtovanilla Linux - Newbie 0 07-06-2008 09:58 PM
Just turn the file upside down. lothario Linux - Software 2 09-14-2007 06:37 PM
Slackware plays mpg, avi, wmv, mpeg without installing extra codecs. Is this right? reed68 Slackware 4 08-30-2007 03:04 PM
mplayer only plays first 5 secs. amx of downloaded avi file LavaDevil94 Linux - Software 0 04-28-2004 04:49 PM

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

All times are GMT -5. The time now is 08:58 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