Page 2 of 30 FirstFirst 123412 ... LastLast
Results 11 to 20 of 296

Thread: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

  1. #11
    Join Date
    Jul 2005
    Beans
    74

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    I used this script to encode some videos for my 3.90 PSP and everything worked great.

    After an update to 4.01, my PSP can no longer play files that I used this script to encode (media type not supported).

    Any idea what types of modification to the script (or the flags I pass to it during creation) must be made to continue using this awesome script with 4.01 firmware?

    Thanks,

    jdmpike

  2. #12
    Join Date
    Jul 2008
    Beans
    130

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    Updated script to 2.7.

    -----------

    I don't know what the problem could be jdmpike. I have encoded everything with 4.01 M33-2, a Dark Alex custom firmware release.

    I suggest resetting PSP to defaults, making a backup of your memory stick and then formatting it using the PSP.

    Everything created with this script should be 100% compatible with 4.01 M33-2. I have never been able to create something that wasn't compatible.

    As of this posting I am using ffmpeg SVN-r15418 and x264 0.64.979 6d4af8d.

    It's nothing wrong with the script that is causing you issues. Its either your ffmpeg or your x264 or your PSP firmware and memory stick, etc. Upgrade to the PSP firmware I am using and reset your PSP to defaults and wipe your memory stick and try again.

    -HR
    Last edited by HolyRoses; September 29th, 2008 at 10:22 PM.

  3. #13
    Join Date
    Jul 2008
    Beans
    130

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    toying with the idea of adding a new blocking option. This option will let you block to the next height that is dividable by 16.

    Here is what I have worked up so far:

    macroblocks of 16 and AR by 480
    16*17 = 272 1.76
    16*16 = 256 1.875
    16*15 = 240 2
    16*14 = 224 2.142857
    16*13 = 208 2.3076
    16*12 = 192 2.5
    16*11 = 176 2.7272~
    16*10 = 160 3
    16*9 = 144 3.3333~
    16*8 = 128 3.75

    Here are some sizes I have used before:

    psp sizes i have used
    480x196 = 2.4489
    480x200 = 2.4
    480x202 = 2.3762
    480x204 = 2.3529
    480x208 = 2.3076
    480x252 = 1.9047
    480x258 = 1.8604
    480x260 = 1.8461
    480x262 = 1.8320
    480x264 = 1.8181~
    480x266 = 1.8045
    480x268 = 1.7910
    480x270 = 1.7777~ (1.78:1)

    So basically what we would do would be to pad or block to the next macroblock size. The original video will be the same, we are just letterboxing it to the next 16 dividable size and adjusting the AR to the new letterboxed size.

    Can read more about macro blocks here:
    http://en.wikipedia.org/wiki/Macroblock

    This will stop h264 from complaining about not correct size, compression will suffer, it will also make it so the green bar disappears while playing video in VLC.

    -HR

  4. #14
    Join Date
    Jul 2005
    Beans
    74

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    I think this is a great idea.

    Keep up the great work HR!

  5. #15
    Join Date
    Jul 2008
    Beans
    130

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    added new blocking option as previously discussed.

    add -g to block to next macro block height.

    I didn't put in any logic to handle non widescreen sources, so it may mess up the AR if you attempt to use -g with a non widescreen image. I didn't do any testing with it.

    Also of note if you are using the latest ffmpeg and x264 then the B frames option isn't going to work properly since the developers have made changes to -subq and the removal of -flags2 +brdo and -bidir_refine 1. I haven't made code to determine if you have those options in your ffmpeg or not to make a decision on which flags to use.

    Your new 2 pass PSP encode with iPhone, iPod touch, Nano 3G compatiblity will be something like this:

    ./encode-handheld.pl -t psp -pig -n "Good Movie" -f Desktop/Movies/Good Movie/good\ movie.avi -r 24000/1001 -o 512


    -HR
    Last edited by HolyRoses; October 8th, 2008 at 09:22 PM.

  6. #16
    Join Date
    Jul 2005
    Beans
    74

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    Can we get this script in the the repos? I would love to have apt or Synaptic update this thing for me.

    If you can't tell I am a big fan of this. I use it on several machines, so updating it everywhere is more tedious than I would like.

    Just a thought.

    Keep up the great work!

  7. #17
    Join Date
    Jul 2008
    Beans
    130

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    I haven't tested this using ffmpegX under MacOS in a long time and noticed there is a bug with me method detection.

    To fix latest script to work under MacOS X using ffmpegX find this area in the code:

    # determine me method
    open(ME_METHOD, "$ffmpeg 2>&1 |");
    while(<ME_METHOD>){
    if (/-me_method/) {
    $me_method = "-me_method";
    last;
    } else {
    $me_method = "-me";
    }
    }
    close(ME_METHOD);

    then add the following right under it:

    # override for ffmpegX
    if ( $kernel_name eq "Darwin" ) {
    $me_method = "-me";
    }

    Not the prettiest work around but it works. I supposed I could change the detection and see if you have -me first and then use that, if you don't have -me then use -me_method. Until then though, use that.

    -HR

  8. #18
    Join Date
    Feb 2005
    Location
    Cleveland, OH
    Beans
    231
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    Can this support passing along subtitles to the output mp4 file? I have been playing with your 1.9 version since september, and today after building new svn ffmpeg and x264, and changing the -me option to -me_method, I was able to produce a working psp video with threads 4 option. However, subtitles didn't seem to be getting added to the output file. I could extract the subs from the original file and mux them, but I don't want to have to manually do it each time...

  9. #19
    Join Date
    Jul 2008
    Beans
    130

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    version 1.9 is old. Go to the first page and download 2.8. read the options and example encode string as I changed many things since 1.9.

    I don't think you can burn subs into the video using ffmpeg. I have done it successfully however using mencoder.

    -HR

  10. #20
    Join Date
    Feb 2005
    Location
    Cleveland, OH
    Beans
    231
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: encode-handheld.pl v1.8 (encodes for psp, zune, ipod) using ffmpeg.

    Quote Originally Posted by HolyRoses View Post
    version 1.9 is old. Go to the first page and download 2.8. read the options and example encode string as I changed many things since 1.9.

    I don't think you can burn subs into the video using ffmpeg. I have done it successfully however using mencoder.

    -HR
    I know 1.9 is old, but it's working for me, and you know, if it's not broke, don't fix it

    I was able to add the -scodec copy command to the script, but PSP video doesn' support subtitle streams, so that idea went out the window...

    Did you make PSP videos with mencoder? If so, do you have command line settings for it? If you could provide that for me I'd be glad to see if I could work it into my script.

Page 2 of 30 FirstFirst 123412 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •