Fansite and Forum for Meizu Products
 
       



Go Back   Meizu Me > General > Video and Imaging

Yet Another Mencoder Script

Video and Imaging

Reply
 
Thread Tools Display Modes
Old 03-30-2008   #11 (permalink)
Passing By DrScholl is on a distinguished road
 
Join Date: Mar 2008
Posts: 4
Actually mplayer and mplayer lib were not installed.
So I installed them and also modified the script.
There's some progress but errors again.
Here's my last attempt :
Code:
rem@ubuntu-rem:~$ /home/rem/Documents/meizuconvert.sh '/home/rem/Vidéos/Breaking Bad/Breaking.Bad.S01E04.avi' 
Moviefile is /home/rem/Vidéos/Breaking Bad/Breaking.Bad.S01E04.avi
Extension is .avi
Filename is therefore Breaking.Bad.S01E04
Found Breaking.Bad.S01E04.srt.
Converting /home/rem/Vidéos/Breaking Bad/Breaking.Bad.S01E04.avi
/home/rem/Vidéos/Breaking Bad/Breaking.Bad.S01E04.avi appears to be Widescreen
MEncoder 2:1.0~rc1-0ubuntu13.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ (Family: 15, Model: 107, 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 - 0x15e0a800
AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO:  [XVID]  624x352  12bpp  23.976 fps  891.5 kbps (108.8 kbyte/s)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [rotate=1]
Opening video filter: [expand w=320 h=240 osd=1]
Expand: 320 x 240, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [crop w=320 h=240]
Crop: 320 x 240, -1 ; -1
Opening video filter: [scale w=320 h=-2]
Opening video filter: [softskip]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 13 -> 12
SwScaler: reducing / aligning filtersize 13 -> 12

SwScaler: Lanczos scaler, from yuv420p 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: 624x352 -> 320x180
Writing header...1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
ODML: vprp aspect is 4:3.
Writing header...
ODML: vprp aspect is 4:3.
Writing index...53f (99%) 213.12fps Trem:   0min 116mb  A-V:0.000 [343:0]
Writing header...
ODML: vprp aspect is 4:3.
MEncoder 2:1.0~rc1-0ubuntu13.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ (Family: 15, Model: 107, 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 - 0x15e0a800
AVI file format detected.
VIDEO:  [XVID]  624x352  12bpp  23.976 fps  891.5 kbps (108.8 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
SUB: Detected subtitle file format: subviewer
SUB: error opening iconv descriptor.
SUB: Read 540 subtitles.
SUB: Adjusted 22 subtitle(s).
Opening video filter: [rotate=1]
Opening video filter: [expand w=320 h=240 osd=1]
Expand: 320 x 240, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [crop w=320 h=240]
Crop: 320 x 240, -1 ; -1
Opening video filter: [scale w=320 h=-2]
Opening video filter: [softskip]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio LAVC, couldn't find encoder for codec mp3lame.
 Finished converting /home/rem/Vidéos/Breaking Bad/Breaking.Bad.S01E04.avi
I tried to see what codecs mencoder installed
Code:
 mencoder -oac help
MEncoder 2:1.0~rc1-0ubuntu13.2 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4400+ (Family: 15, Model: 107, Stepping: 2)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

Available codecs:
   copy     - frame copy, without re-encoding (useful for AC3)
   pcm      - uncompressed PCM audio
   mp3lame  - cbr/abr/vbr MP3 using libmp3lame
   lavc     - FFmpeg audio encoder (MP2, AC3, ...)
   faac     - FAAC AAC audio encoder
DrScholl is offline   Reply With Quote
Old 04-08-2008   #12 (permalink)
Passing By wishmechaos is on a distinguished road
 
Join Date: Oct 2007
Posts: 18
if mplayer wasn't installed, then that explains the subfont issue. I've uploaded a new version with some corrections, try it out and see if it works for you. Cheers.

Last edited by wishmechaos : 04-08-2008 at 08:29 AM.
wishmechaos is offline   Reply With Quote
Old 05-21-2008   #13 (permalink)
Lev
Stalker Lev is on a distinguished road
 
Join Date: May 2008
Location: Overasselt/Delft
Posts: 1
a Tip for Ubuntu 8.04 users, ~/bin/ is in the search-path of the console, so by placing the script in here you can just use meizu-convert MOVIEFILE
Lev is offline   Reply With Quote
Old 05-21-2008   #14 (permalink)
Passing By wishmechaos is on a distinguished road
 
Join Date: Oct 2007
Posts: 18
Quote:
Originally Posted by Lev View Post
a Tip for Ubuntu 8.04 users, ~/bin/ is in the search-path of the console, so by placing the script in here you can just use meizu-convert MOVIEFILE
That's what I meant when I said it's useful to place the script in $PATH. In a console you can type 'echo $PATH' to print all "search-paths"... ~/bin and /usr/local/bin are the usual places to put a script in.

Cheers
wishmechaos is offline   Reply With Quote
Old 08-23-2008   #15 (permalink)
Passing By mangust22 is on a distinguished road
 
Join Date: Jun 2008
Posts: 2
Quote:
Originally Posted by wishmechaos View Post
Since it was kinda hard to find it in the old thread, I've decided to give my script its own one. This is a script to transcode videos for the Meizu M6.
Thanks a lot for script, mate. I had integrated it in Gnome. Nice working for 1 or multi files.

Can you help me to improve it? I have another device - SonyEricsson mobile phone. I added in the end of script:

ffmpeg -i "$filename.meizu.avi" -f mp4 -r 20 -b 192000 -y -acodec aac -ab 64 -vol 512 "$filename.k790.mp4"
del "$filename.meizu.avi"

It works for 1 file only as i need.
Where do I have to put this for multi files converting?

I meen commands like this: meizu-convert 1.avi 2.avi 3.avi
mangust22 is offline   Reply With Quote
Old 08-23-2008   #16 (permalink)
Passing By wishmechaos is on a distinguished road
 
Join Date: Oct 2007
Posts: 18
Quote:
Originally Posted by mangust22 View Post
I added in the end of script:

ffmpeg -i "$filename.meizu.avi" -f mp4 -r 20 -b 192000 -y -acodec aac -ab 64 -vol 512 "$filename.k790.mp4"
del "$filename.meizu.avi"

It works for 1 file only as i need.
Where do I have to put this for multi files converting?
If you're using single pass, you have to put that line below this mencoder line. Are you converting the already transcoded file into another format?

Code:
if [[ "$twopass" == "no" ]]; then
        mencoder "${subs[@]}" -vf softskip,$vf,rotate=1 "$moviefile" $common -lavcopts threads=8:vcodec=mpeg4:mbd=2:trell:vbitrate=$vbitrate:vrc_maxrate=$vrc_maxrate:vrc_buf_size=$vrc_buf_size:vmax_b_frames=0:vhq:acodec=libmp3lame:abitrate=$abitrate:keyint=100:sc_factor=5 -sws 9 -srate $srate -oac lavc -af volnorm,delay=230:230 -o "$filename.meizu.avi" || return_error
ffmpeg -i "$filename.meizu.avi" -f mp4 -r 20 -b 192000 -y -acodec aac -ab 64 -vol 512 "$filename.k790.mp4"
rm "$filename.meizu.avi"
If you're using two-pass encoding, then you should place the line twice under the "if [[ "$twopass" == "no" ]]", but you'd have to modify your command to somehow do twopass encoding.

Cheers
wishmechaos is offline   Reply With Quote
Old 08-24-2008   #17 (permalink)
Passing By mangust22 is on a distinguished road
 
Join Date: Jun 2008
Posts: 2
it's what exactly I need. Thanks a lot!
mangust22 is offline   Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script for conversion under Linux parena Video and Imaging 9 3 Weeks Ago 08:42 PM
Linux script for mencoder. shookie Video and Imaging 50 05-20-2008 09:10 PM
Batman / Mencoder script based conversion in windows hitman Video and Imaging 2 11-10-2007 12:10 PM
nvops and mencoder - how to? Lolita Video and Imaging 1 06-30-2007 12:04 PM
Cropping With Mencoder? jabowabo Video and Imaging 0 05-22-2007 05:13 PM

All times are GMT. The time now is 12:17 AM.


Powered by vBulletin. Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0 ©2007, Crawlability, Inc.
 
Meizu Me is an independent resource for all things Meizu. Meizu, Mini Player, Music Card, Mini One and all other related names are properties of MEIZU Electronic Technology, Inc. Designed by ForumTemplates. All content © 2007 MeizuMe. All Rights Reserved.