LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-04-2008, 12:12 PM   #1
manuken
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Rep: Reputation: 0
Green screen after video conversion, AVI to MP4 using Mencoder,Mplayer,FFmpeg,x264,


Hi there,

I am trying perform a video conversion,using Mencoder,Mplayer,FFmpeg,x264,
everything works OK, no mesagge errors when performing the script, but when i check the mp4 result, the video plays green, the video is ok but like with a green filter, sound is OK, any help would be appreciated.

I am using the script below.

//massanti.com/2008/01/01/encoding-h264-aacplus-with-mencoder-for-flash/[/url]



* Video Bitrate: 593 kbps.
* Audio Bitrate: 48 kbps.
* Platform: Linux.
* * * Starting video encoding pass 1... * * *
MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67, Stepping: 2)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0x12a1510
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO: [tscc] 1280x720 24bpp 15.000 fps 259.9 kbps (31.7 kbyte/s)
[V] filefmt:3 fourcc:0x63637374 size:1280x720 fps:15.00 ftime:=0.0667
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffcamtasia] vfm: ffmpeg (TechSmith Camtasia Screen Codec (native))
==========================================================================
VDec: vo config request - 1280 x 720 (preferred colorspace: BGR 24-bit)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using BGR 24-bit as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: using unscaled bgr24 -> yuv420p special converter
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!

Flushing video frames

Video stream: 597.839 kbit/s (74729 B/s) size: 6929950 bytes 92.733 secs 1391 frames
x264 [info]: slice I:8 Avg QP:39.75 size: 39747
x264 [info]: slice P:400 Avg QP:41.80 size: 13201
x264 [info]: slice B:983 Avg QP:43.21 size: 1351
x264 [info]: mb I I16..4: 2.2% 97.1% 0.7%
x264 [info]: mb P I16..4: 0.0% 6.0% 0.0% P16..4: 91.2% 1.1% 1.6% 0.1% 0.0% skip: 0.0%
x264 [info]: mb B I16..4: 0.0% 0.4% 0.0% B16..8: 5.3% 0.0% 0.1% direct: 0.0% skip:94.1%
x264 [info]: final ratefactor: 51.57
x264 [info]: 8x8 transform intra:98.5% inter:87.5%
x264 [info]: ref P 43.0% 13.5% 10.9% 6.2% 6.4% 7.5% 8.1% 4.4%
x264 [info]: ref B 32.9% 16.8% 13.8% 7.9% 8.2% 7.7% 8.2% 4.5%
x264 [info]: kb/s:597.5
* * * Starting video encoding pass 2... * * *
MEncoder 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67, Stepping: 2)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0x12a1510
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO: [tscc] 1280x720 24bpp 15.000 fps 259.9 kbps (31.7 kbyte/s)
[V] filefmt:3 fourcc:0x63637374 size:1280x720 fps:15.00 ftime:=0.0667
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffcamtasia] vfm: ffmpeg (TechSmith Camtasia Screen Codec (native))
==========================================================================

==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffcamtasia] vfm: ffmpeg (TechSmith Camtasia Screen Codec (native))
==========================================================================
VDec: vo config request - 1280 x 720 (preferred colorspace: BGR 24-bit)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using BGR 24-bit as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: using unscaled bgr24 -> yuv420p special converter
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!

Flushing video frames

Video stream: 593.693 kbit/s (74211 B/s) size: 6881891 bytes 92.733 secs 1391 frames
x264 [info]: slice I:8 Avg QP:35.25 size: 60159
x264 [info]: slice P:400 Avg QP:38.50 size: 13380
x264 [info]: slice B:983 Avg QP:40.43 size: 1064
x264 [info]: mb I I16..4: 2.6% 96.3% 1.1%
x264 [info]: mb P I16..4: 0.0% 9.2% 0.0% P16..4: 88.9% 0.6% 1.1% 0.1% 0.0% skip: 0.0%
x264 [info]: mb B I16..4: 0.0% 0.5% 0.0% B16..8: 3.9% 0.0% 0.0% direct: 0.0% skip:95.5%
x264 [info]: 8x8 transform intra:98.8% inter:96.7%
x264 [info]: ref P 44.7% 12.1% 10.6% 5.9% 6.4% 7.2% 8.5% 4.6%
x264 [info]: ref B 40.7% 13.2% 13.9% 6.1% 7.1% 7.0% 7.6% 4.5%
x264 [info]: kb/s:593.5
* * * Extracting Audio... * * *
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
CPU: Dual-Core AMD Opteron(tm) Processor 1212 (Family: 15, Model: 67, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
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 latesttestst.avi.
AVI file format detected.
VIDEO: [tscc] 1280x720 24bpp 15.000 fps 259.9 kbps (31.7 kbyte/s)
==========================================================================
Forced video codec: dummy
Cannot find codec matching selected -vo and video format 0x63637374.
Read DOCS/HTML/en/codecs.html!
==========================================================================
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO PCM] File: latesttestst_temp.wav (WAVE)
PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 92.7 (01:32.7) of 110.2 (01:50.2) 0.8%

Exiting... (End of file)
* * * Encoding Audio... * * *
*************************************************************
* *
* Nero Digital Audio Reference MPEG-4 & 3GPP Audio Encoder *
* Copyright 2007 Nero AG *
* All Rights Reserved Worldwide *
* *
* Package build date: Aug 6 2007 *
* *
* *
* See -help for a complete list of available parameters. *
* *
*************************************************************

Processed 92 seconds...
* * * Generating final MP4 container... * * *
AVC-H264 import - frame size 1280 x 720 at 15.000 FPS
Import results: 1391 samples - Slices: 8 I 400 P 983 B - 1 SEI - 8 IDR
Stream uses B-slice references - max frame delay 2
Setting up iTunes/iPod file...
Forcing AVC/H264 SAR to 1:1...
Saving to latesttestst.m4v: 0.500 secs Interleaving
IsoMedia import - track ID 1 - HE-AAC (SR 24000 - SBR-SR 48000 - 2 channels)
Setting up iTunes/iPod file...
Forcing AVC/H264 SAR to 1:1...
Saving latesttestst.m4v: 0.500 secs Interleaving
Setting up iTunes/iPod file...
Forcing AVC/H264 SAR to 1:1...
Saving latesttestst.m4v: 0.500 secs Interleaving
* * * Removing temporary files... * * *
* * * Checking and/or creating thumbnails... * * *
Did not find Thumbnail, creating thumbnail
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man --incdir=/usr/include/ffmpeg --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libfaad --enable-libfaac --enable-libgsm --enable-xvid --enable-x264 --enable-liba52 --enable-liba52bin --enable-pp --enable-shared --enable-pthreads --enable-gpl --disable-strip
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
built on Jan 11 2008 02:31:29, gcc: 3.4.6 20060404 (Red Hat 3.4.6-9)
Input #0, avi, from 'latesttestst.avi':
Duration: 00:01:32.7, start: 0.000000, bitrate: 1685 kb/s
Stream #0.0: Video: camtasia, bgr24, 1280x720, 15.00 fps(r)
Stream #0.1: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
PIX_FMT_YUV420P will be used as an intermediate format for rescaling
Output #0, mjpeg, to 'latesttestst_thumbnail.jpg':
Stream #0.0: Video: mjpeg, yuvj420p, 130x74, q=2-31, 200 kb/s, 1.00 fps(c)
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
Compiler did not align stack variables. Libavcodec has been miscompiled
and may be very slow or crash. This is not a bug in libavcodec,
but in the compiler. Do not report crashes to FFmpeg developers.
frame= 1 fps= 0 q=2.7 Lsize= 4kB time=1.0 bitrate= 32.6kbits/s
video:4kB audio:0kB global headers:0kB muxing overhead 0.000000%
 
Old 09-04-2008, 01:19 PM   #2
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 306

Rep: Reputation: 37
Due to the amount of apps used in there, any one could cause the issue.

May I suggest just using Avidemux or just ffmpeg alone?

What's the goal of the conversation? any file type to MP4? This for an iPod? FFMpeg will convert pretty much anything by just simply doing:

ffmpeg -i $inputfile -f $format $outfilename
 
Old 09-04-2008, 06:43 PM   #3
manuken
LQ Newbie
 
Registered: Jul 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks arckane,

at the moment the goal of the conversion is avi to mp4, the most important is the quality of the conversion, the videos are uploaded to an online learning website,

Does the encoder h264 work with FFmeg ?

thank you again.
 
Old 10-29-2008, 01:39 AM   #4
mkmichael2
LQ Newbie
 
Registered: Oct 2008
Location: Sydney
Posts: 2

Rep: Reputation: 0
.avi with TSCC to .mov with h264 gives weird colours

Hello,

I have a similar issue that you posted in regard to encoding with the techsmith codec then decoding into .mov

I have found that when a user encodes to .avi with the TSCC video codec and we convert to .mov with the H264 video codec or the .mp4 with the h264 video codec we have the weird colourisation you described.

When I use the Camtasia recorder and record to .avi on my laptop then process with the exact same command line in ffmpeg it produces the .mov and .mp4 with the correct colours.

This suggests to me that the issue is with the Camtasia app or the colour settings on the clients machine.

I will investigate more and get back to you.
 
Old 10-29-2008, 06:40 PM   #5
mkmichael2
LQ Newbie
 
Registered: Oct 2008
Location: Sydney
Posts: 2

Rep: Reputation: 0
I worked this one out.

If the Windows display properties >> Color Quality is set to "Medium (16bit)" the Techsmith (Camtasia) codec can only encode video in an avi as RGB555 i.e. 5 bits per colour channel.

when the Windows display properties >> Color Quality (access this by Start>>Control Panel >> Display) is set to "Highest (32bit)" the Techsmith (Camtasia) codec encodes in an avi to BGR24 i.e. 8 bits per colour channel.

So just make sure the Colour Quality is 32 bit in Windows and you should be happy.



This is how i worked it out.

I created an .avi file and processed it manually in FFmpeg in a Terminal session on a Macintosh laptop.

The .avi created when Windows Colour Quality was set to 16bit has these properties (these are outputted to the Terminal when you run FFmpeg)

Stream #0.0: Video: camtasia, rgb555, 1024x768, 5.00 fps(r)
Stream #0.1: Audio: mp3, 24000 Hz, stereo, 56 kb/s

The .avi created when Windows Colour Quality was set to 32bit has these properties

Stream #0.0: Video: camtasia, bgr24, 1024x768, 15.00 fps(r)
Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, 352 kb/s
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
HOWTO make a video DVD from an avi/mp4/etc... file type? lleb Linux - Software 5 08-08-2011 12:56 PM
does mencoder allows me to convert avi to mp4? sirpelidor Linux - Software 1 12-16-2006 08:34 PM
FFMPEG vs MPLAYER vs MENCODER and batch conversions to MP4 ? AngusM Linux - Software 2 11-08-2006 08:20 AM
mencoder/ffmpeg convert video(wmv) for Windows Mobile? paulx Linux - Software 2 06-26-2006 11:24 AM
conversion from mpeg4 to avi using mplayer sanjith11 Linux - Software 1 12-06-2003 11:21 AM


All times are GMT -5. The time now is 04:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration