You are not logged in.

#1 2006-09-29 04:25:12

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Convert single frame .mov to .avi and join .avi(success)

Utilize mencoder to convert .mov to an .avi file with .mov of many frames.

Attempted to convert .mov with single frame(and 5 secs of audio) and it fails to handle the video.

The .mov is generated with a digital camera in still capture mode(with audio).

What modification needs to be made to the .mov to .avi convert in mencoder to enable the single frams of video to convert?

The command is:

      [root@n6re ~]# mencoder '/root/Desktop/p1000017.mov' -o movie.avi -oac pcm -ovc       
lavc -lavcopts vcodec=mpeg4.........EDIT

This command works with .mov files of greater length than single frame.


big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2006-10-26 00:50:47

erosa
Member
Registered: 2006-10-17
Posts: 14

Re: Convert single frame .mov to .avi and join .avi(success)

Below is a list of commands I have stored when encoding amoung various formats. Maybe one will help you.

#Converts an mplayer-supported audio file into a wav file.
mplayer -srate 44100 -ao pcm:file=output.wav -vc dummy -vo null input.wmv 

#Converts an mplayer-supported video into an avi video.
mencoder -ovc lavc -lavcopts vcodec=mpeg4 -oac mp3lame -o output.avi input.rm 

#Same but better quality.
mencoder in.avi -ovc lavc -lavcopts vcodec=mjpeg -oac mp3lame -o out.avi

#Saves an mp3 stream.
mpg123 -s streamlame -r -s 44100 -m s -x -b 112
- out.mp3

#Make an SVCD
ffmpeg -i movie.avi -target ntsc-svcd svcd.mpg

#MS MPEG4v2 encoding
mencoder dvd://1 -alang en -ovc lavc -oac lavc -lavcopts
acodec=mp3:abitrate=64:vcodec=msmpeg4v2 -vf scale=360:240 -o
million-dollar-baby.avi

#Video conversion for PSP
ffmpeg -i sourcemovie.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 
32 M4V00002.MP4

#Encoding a Flash video
mencoder input.flv -ofps 15 -vf scale=300:-2 -oac lavc -ovc lavc -lavcopts vcode
c=msmpeg4v2:acodec=mp3:abitrate=64 -o output.avi

#DVD to small mpeg 
mencoder dvd://1 -alang en -ovc lavc -oac lavc -o out.avi

# DVD to Dvix (two-pass)
mencoder dvd://1 -alang en -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac mp3lame
 -lameopts vbr=3 -o movie.avi
mencoder dvd://1 -alang en -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac mp3lame
 -lameopts vbr=3 -o movie.avi

# DVD to XviD (single-pass)
mencoder  dvd://1 -alang en -ovc xvid -oac mp3lame -xvidencopts bitrate=800 -o p
ut.avi

PS: It's really a bad idea to be executing things like this as root. Don't be surprised if you end up crapping out your system like many Windows uses do. Create a regular user for yourself, and use that for your non-administrative tasks.


Oh boy!

Offline

#3 2006-10-26 02:06:39

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

erosa;

Many things to test out in your post.  Appreciate the support.

The basic problem is to change the camera output for JPEG stills which have audio dubs of five secs.

If you send such a jpeg file to a friend, it may not play in his machine.  Thus, one has to ensure the format is compatible with the usual .avi format.

I experiment with every type of package and system related goodies in root and have done so since I joined arch and before that as well.

I have a very lengthy post in arch discussion about swap extended ram.  Not a great app but worth studying, especially if flash drives improve in coming years.
I am pleased to try out your references and will report back my results.
big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#4 2006-10-26 03:25:00

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

erosa;

Tried again to get the conversion with another attack:

=======================================================================================[root@n6re ~]# mencoder '/root/Desktop/p1000325.mov' -ofps 15 -vf scale=300:-2 -oac pcm -ovc lavc -lavcopts vcodec=mpeg4 -o output1.avi
MEncoder 1.0rc1-4.1.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(TM) XP 1900+ (Family: 6, Model: 6, Stepping: 2)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
98 audio & 216 video codecs
success: format: 0  data: 0x0 - 0x1ade6
Quicktime/MOV file format detected.
VIDEO:  [jpeg]  640x480  24bpp  0.250 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7  fourcc:0x6765706A  size:640x480  fps: 0.25  ftime:=4.0000
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit/100.00% (ratio: 8000->8000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=300 h=-2]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 640 x 480 (preferred colorspace: Planar 422P)
VDec: using Planar 422P as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 10 -> 12
SwScaler: reducing / aligning filtersize 10 -> 12
SwScaler: reducing / aligning filtersize 10 -> 9
SwScaler: reducing / aligning filtersize 18 -> 17

SwScaler: BICUBIC scaler, from yuv422p to yuv420p using MMX2
SwScaler: using n-tap MMX scaler for horizontal luminance scaling
SwScaler: using n-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 640x480 -> 300x226
videocodec: libavcodec (300x226 fourcc=34504d46 [FMP4])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos:   0.1s      1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
Flushing video frames
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 2692.680 kbit/s  (336585 B/s)  size: 22439 bytes  0.067 secs  1 frames

Audio stream:  128.000 kbit/s  (16000 B/s)  size: 16000 bytes  1.000 secs
[root@n6re ~]#   

As you can see, a video was produced but the audio was not long enough only i sec of the five seconds in the source.  The video displayed in mplayer for about the same time and blanked out.

Guess I need a video "hold" and an audio "size" arrangement!!

Better but no cigar, yet.....


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2006-10-26 03:52:16

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

erosa;

Tried with changed params:

===================================================================================[root@n6re ~]# mencoder '/root/Desktop/p1000326.mov' -ofps 15 -vf scale=800:-11 -oac pcm -ovc lavc -lavcopts vcodec=mpeg4 -o output2.avi
MEncoder 1.0rc1-4.1.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(TM) XP 1900+ (Family: 6, Model: 6, Stepping: 2)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
98 audio & 216 video codecs
success: format: 0  data: 0x0 - 0x1acba
Quicktime/MOV file format detected.
VIDEO:  [jpeg]  640x480  24bpp  0.250 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:7  fourcc:0x6765706A  size:640x480  fps: 0.25  ftime:=4.0000
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit/100.00% (ratio: 8000->8000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=800 h=-11]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)
==========================================================================
VDec: vo config request - 640 x 480 (preferred colorspace: Planar 422P)
VDec: using Planar 422P as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 8 -> 7

SwScaler: BICUBIC scaler, from yuv422p to yuv420p using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 640x480 -> 800x608
videocodec: libavcodec (800x608 fourcc=34504d46 [FMP4])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos:   0.1s      1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
Flushing video frames
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 14081.400 kbit/s  (1760175 B/s)  size: 117345 bytes  0.067 secs  1 frames

Audio stream:  128.000 kbit/s  (16000 B/s)  size: 16000 bytes  1.000 secs
[root@n6re ~]#     



Obtained a larger picture which still blanked after a second or so  in mplayer.......

Audio was still only one second.  In codeine, picture remained but audio inadequate at one second.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#6 2006-10-26 15:57:20

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

Modified again to increase the audio and change the size;
======================================================================================= [root@n6re ~]# mencoder '/root/Desktop/p1000325.mov' -oac pcm -ofps 3:11 -vf scale=1200:-11 -ovc lavc -lavcopts vcodec=mpeg4 -o output4.avi

Got 4.5 seconds of audio with this command.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#7 2006-10-26 16:29:36

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

The latest change provides the full 5 seconds of audio and in codeine, the audio precedes the video display which remains on display.  The same occurs in kaffeine...======================
====================================================================================


[root@n6re ~]# mencoder '/root/Desktop/p1000325.mov' -oac pcm -ofps 3:13 -vf scale=1200:-11 -ovc lavc -lavcopts vcodec=mpeg4 -o output4.avi
big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2006-10-26 23:40:36

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

The following mencoder command was successful when sent by e-mail to a computer which ran it in windows media player 9.

========================================================================================
[root@n6re ~]# mencoder '/root/Desktop/p1000326.mov' -oac pcm -ofps 3:13 -vf scale=1200:-11  -ovc lavc -lavcopts vcodec=msmpeg4v2 -o  output12.avi

It plays full screen in codeine with audio first ,pix last and holds the pix.
big_smile


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#9 2006-11-02 02:28:10

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

Further activity with this single-frame with audio .avi, indicates that the files generated can be joined with a mencoder statement as below:

     #mencoder -oac pcm -ovc copy -o output(nr).avi file1 file2 file3 ..........

This provids audio with the video of 5 seconds per pix as is the camera limits for audio with a still picture.  My pix are three shots of a blooming cattleya orchid with comments.

The picture is 640x480 and has good color support.  Plays well in codeine, kaffeine, mplayer and probably windows wmp.(Haven't tried it yet)/

EDIT:  Works just fine in wmp!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#10 2006-11-10 23:44:01

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Convert single frame .mov to .avi and join .avi(success)

One notable sidelight...

VLC video player seems to accept quicktime from the camera movie format.

Quicktime movies  cannot be joined as an avi and perhaps not at all.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2006-11-11 02:10:35

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: Convert single frame .mov to .avi and join .avi(success)

Damn, erosa - that is a goldmine!  I've been saving away similar snippets, but my grimoire is nowhere near that nice.  I tend to get to a certain point and then dump all of that sort of thing into a script to simplify things.  That's certainly enough ammo.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

Board footer

Powered by FluxBB