android
  #1  
Old 09-22-2008, 08:20 PM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default Converting Video on OS X

Ok I have had my NS-DV 4G for almost 2 years and one thing that kills me everytime is the lack of compatibility with an OS other than windows, I run Mac OSX 10.4 and have been trying to find alternatives for converting video and i recently attempted iriverter which i have read works but for me it doesn't, so could someone please post how instructions for iriverter cuz i just can't get it to work or if there is some other working alternative to convert video because i am frustrated out of my mind.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 09-23-2008, 10:58 AM
erinspice erinspice is offline
Junior Member
 
Join Date: Nov 2007
Posts: 11
Default

I use Linux and I have a script that has worked for me. I have it set to use the following settings, but I'm not sure which ones (except the dimensions) are required. Just start with this using your favorite encoding program.

$video_bitrate = 200;
$audio_bitrate = 96;
$audio_samplerate = 22050;
$audio_samplesize = 16;
$audio_channels = 1; #mono
$width_out = 320; #default
$height_out = 240; #default

If you have mplayer installed or are willing to install it from source (which may require installing a compiler like gcc), I'd be happy to share my script.
Reply With Quote

  #3  
Old 09-23-2008, 12:15 PM
dfkt's Avatar
dfkt dfkt is offline
Moderator
 
Join Date: May 2006
Location: Vienna, Austria
Posts: 15,330
Default

Handbrake should work fine on OS X as well.
__________________
Please don't PM me with questions that can be answered in a forum thread. Don't be an idiot.
My Gear and Reviews | My RMAA Tests | IRC: #anythingbutipod on Freenode | Last.fm | Album Art Exchange | Rockbox | Replaygain
Reply With Quote

  #4  
Old 09-23-2008, 03:06 PM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default

erinspice ya i have mplayer and mencoder on my computer but i haven't found a sufficient explanation as to how to use it, if you would be willing to share your code and tell me how to use it i would definitely try it. and dfkt handbrake works on OSX but it is a dvd converter to MP4 so it doesnt work on insignia.
Reply With Quote

  #5  
Old 09-24-2008, 08:51 AM
erinspice erinspice is offline
Junior Member
 
Join Date: Nov 2007
Posts: 11
Default

Sure, here it is! Just change the extension to .pl and give it execute permissions. Execute on command line like this:

Quote:
Useage: encode-for-insignia.pl -i <infile> -o <outfile> [-s <widthxheight>] [-hq] [-a]
Attached Files
File Type: txt encode-for-insignia.txt (4.1 KB, 7 views)
Reply With Quote

  #6  
Old 09-27-2008, 11:01 AM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default

erinspice idk what is wrong with this forum but for some reason i can't access your text file so if you could write it out or somethin cuz i don't see why abi won't let me see it.
Reply With Quote

  #7  
Old 09-27-2008, 11:09 AM
dfkt's Avatar
dfkt dfkt is offline
Moderator
 
Join Date: May 2006
Location: Vienna, Austria
Posts: 15,330
Default

There's nothing wrong with the forums - the file downloads fine for me.
__________________
Please don't PM me with questions that can be answered in a forum thread. Don't be an idiot.
My Gear and Reviews | My RMAA Tests | IRC: #anythingbutipod on Freenode | Last.fm | Album Art Exchange | Rockbox | Replaygain
Reply With Quote

  #8  
Old 09-28-2008, 03:23 PM
erinspice erinspice is offline
Junior Member
 
Join Date: Nov 2007
Posts: 11
Default

Code:
#!/usr/bin/perl

#$tcprobe = "/usr/bin/tcprobe";
#$transcode = "/usr/bin/transcode";
$mencoder = "/usr/bin/mencoder";
$mplayer = "/usr/bin/mplayer";
#$video_bitrate = 400; #normal
$video_bitrate = 200;
$audio_bitrate = 96;
$audio_samplerate = 22050;
$audio_samplesize = 16;
$audio_channels = 1; #mono
$width_out = "320"; #default
$height_out = "240"; #default


##############################################################################
# do not edit below this line ################################################
##############################################################################

# parse command line
$count = 0;
foreach (@ARGV){
    #print "processing $_\n";
    if($_ eq "-i"){
        $infile = $ARGV[$count+1];    
    }
    if($_ eq "-o"){
        $outfile = $ARGV[$count+1];    
    }
    if($_ eq "-s"){
        if($ARGV[$count+1] =~ /(\d+)x(\d+)/){
            $width_out = $1;
            $height_out = $2;
        }
    }
    if($_ eq "-a"){
        $preserve_aspect = 'yes';
    }
    if($_ eq "-hq"){
        $quality = 'high';
    }
    $count++;
}


# uncomment for transcode method
#$tcprobe_output = `$tcprobe -i $infile 2>/dev/null`;
#if($tcprobe_output =~ /-g (\d+)x(\d+)/){
#    $width_in = $1;    
#    $height_in = $2;    
#}

# uncomment for mplayer method
$probe_output = `$mplayer  -identify -frames 0 "$infile" 2>/dev/null`;
if($probe_output =~ /ID_VIDEO_WIDTH=(\d+)/){
    $width_in = $1;
}
if($probe_output =~ /ID_VIDEO_HEIGHT=(\d+)/){
    $height_in = $1;
}

if ($infile && !(-e $infile)) {
    die "Could not find file $infile.  $!\n";
}

if ($infile && !($outfile)) {
    $outfile = $infile;
    $outfile =~ s/\..{3,5}$/-insignia.avi/;    
}

# do we have all of our required information?
unless($infile && $outfile && $width_out && $height_out && $width_in && $height_in){
    print("Useage: encode-for-insignia.pl -i <infile> -o <outfile> [-s <widthxheight>] [-hq] [-a]\n");
    print "You put infile=$infile, outfile=$outfile, width_in=$width_in, height_in=$height_in, width_out=$width_out, height_out=$height_out\n";
    exit(0);
}

# verify that the input file exists
unless(-e "$infile"){
    die("encode-for-insignia: Could not find $infile: $!\n");
}

if($quality =~ /high/i){
    print "Setting to high quality\n";
    $video_bitrate = 800;
    $audio_bitrate = 128;
    $audio_samplerate = 44100;
    $audio_samplesize = 16;
}else{
    #nothing these are set above ... maybe someday I will set it here.
}

# Input aspect ratio is greater than the output aspect ratio
if(($width_in/$height_in) > ($width_out/$height_out)){
    # for transcode
    $pixels_to_crop = ($width_in - (($width_out/$height_out)*$height_in))/2;
    $crop_options = "-j 0,$pixels_to_crop";

    # for mencoder
    $width_new = int(($width_out/$height_out)*$height_in);
    $mencoder_crop_options = "crop=$width_new:$height_in,";
    
    print "cropping the width by $pixels_to_crop pixels on each side to $width_new.\n";
}

# output aspect ratio is greater than the input aspect ratio
if(($width_in/$height_in) <= ($width_out/$height_out)){
    if($preserve_aspect =~ /yes/i){ # keep aspect
        $crop_options = "";
    }else{ # maximize screensize for palm
        # for transcode
        $pixels_to_crop = int(($height_in - (($height_out/$width_out)*$width_in))/2);
        $crop_options = "-j $pixels_to_crop,0";

        # for mencoder
        $height_new = int(($height_out/$width_out)*$width_in);
        $mencoder_crop_options = "crop=$width_in:$height_new,";
        
        print "cropping the height by $pixels_to_crop pixels on each side to $height_new.\n";
    }
}

print "$infile ($width_in x $height_in) -> $outfile ($width_out x $height_out) $crop_options\n\n";

# uncomment to use transcode
#$command = "$transcode -i $infile -y ffmpeg -F mpeg4 -w $video_bitrate -N 0x55 -b $audio_bitrate -E $audio_samplerate,$audio_samplesize,$audio_channels $crop_options -Z $width_out" . "x" . "$height_out -o $outfile";

# uncomment to use mencoder
$command = "$mencoder \"$infile\" -oac mp3lame -lameopts cbr=0:br=$audio_bitrate:mode=3 -ovc lavc -srate $audio_samplerate -lavcopts vcodec=mpeg4:vbitrate=$video_bitrate:autoaspect:trell -vf $mencoder_crop_options\scale=$width_out:$height_out -ffourcc XVID -o \"$outfile\"";

print "######################################################\n$command\n###############################################\n";
print `$command 2>/dev/null`;
Reply With Quote

  #9  
Old 09-30-2008, 07:34 PM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default

woah that's a lot of stuff, you think you could give me some instructions on how to use that cause I don't really of a really profound comprehension of using a shell or terminal other than basic stuff so if you could give some help with that it would be cool.
Reply With Quote

  #10  
Old 10-01-2008, 09:03 AM
erinspice erinspice is offline
Junior Member
 
Join Date: Nov 2007
Posts: 11
Default

Sure.

Quote:
Originally Posted by erinspice View Post
Sure, here it is! Just change the extension to .pl and give it execute permissions. Execute on command line like this:

Quote:
Useage: encode-for-insignia.pl -i <infile> -o <outfile> [-s <widthxheight>] [-hq] [-a]
Reply With Quote

  #11  
Old 10-03-2008, 09:21 PM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default

Thanks i think i get most of it, but what do you mean by executing priveleges and could you give me a sample line from one of your video converts just to use as a template to make sure i get it right.
Reply With Quote

  #12  
Old 10-04-2008, 01:47 PM
erinspice erinspice is offline
Junior Member
 
Join Date: Nov 2007
Posts: 11
Default

To give a file execute permissions, open a terminal (command line) and type:

Code:
chmod 755 /whatever/path/to/encode-for-insignia.pl
Here's a sample command to use the script:

Code:
./encode-for-insignia.pl -i original-file.avi -o new-file.avi

Last edited by erinspice; 10-05-2008 at 10:44 AM.
Reply With Quote

  #13  
Old 10-10-2008, 10:35 AM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default

alright so i did what you said i gave the file execute permission and then i ran the code and it didn't convert anything it just gave me what looks like
a status report of what i told it to do.

Quote:
casa:~ joseph$ ./Desktop/Mp3Conversion\ Soft/encode-for-insignia.pl -i ./Documents/Azureus\ Downloads/Wanted.TS.XViD-mVs/mvs-wanted/mvs-wanted.avi -o ./Desktop/wanted.avi
Useage: encode-for-insignia.pl -i <infile> -o <outfile> [-s <widthxheight>] [-hq] [-a]
You put infile=./Documents/Azureus Downloads/Wanted.TS.XViD-mVs/mvs-wanted/mvs-wanted.avi, outfile=./Desktop/wanted.avi, width_in=, height_in=, width_out=320, height_out=240
so i don't know what that means because i did exactly what you gave
sorry to keep askin you to help debug and one other thing can this
convert from mp4 to avi or other formats other than avi to avi
Reply With Quote

  #14  
Old 10-10-2008, 11:55 AM
Tobey's Avatar
Tobey Tobey is offline
Insignia Moderator
 
Join Date: Oct 2006
Posts: 1,500
Default

I'm no Unix guy, but try this:

Quote:
./Desktop/Mp3Conversion/Soft/encode-for-insignia.pl -i ./Documents/Azureus/Downloads/Wanted.TS.XViD-mVs/mvs-wanted/mvs-wanted.avi -o ./Desktop/wanted.avi

Last edited by Tobey; 10-10-2008 at 12:02 PM.
Reply With Quote

  #15  
Old 10-10-2008, 09:33 PM
Pheonix23 Pheonix23 is offline
Junior Member
 
Join Date: May 2008
Posts: 10
Default

it took me a second to figure out what you'd changed tobey but those \ are to signify a space in a file name i just wish i could figure out how to get this to work.
Reply With Quote

  #16  
Old 10-10-2008, 11:34 PM
Tobey's Avatar
Tobey Tobey is offline
Insignia Moderator
 
Join Date: Oct 2006
Posts: 1,500
Default

D'oh! That's painfully obvious now.
Reply With Quote

  #17  
Old 10-11-2008, 12:41 PM
erinspice erinspice is offline
Junior Member
 
Join Date: Nov 2007
Posts: 11
Default

The problem is that the script can't find the width and height of your input file. See how width_in and height_in are blank in that output? Try running this and see what happens. This is how the script gets the width and height for the infile.

Code:
mplayer  -identify -frames 0 ./Documents/Azureus/Downloads/Wanted.TS.XViD-mVs/mvs-wanted/mvs-wanted.avi
Reply With Quote

Reply

Tags
video conversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 02:52 AM.