Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [SOLVED] Video Encoder for Sony Walkman (NWZ-A728)

  1. #1
    Join Date
    Oct 2008
    Location
    /home/brad
    Beans
    591
    Distro
    Ubuntu 11.04 Natty Narwhal

    Question [SOLVED] Video Encoder for Sony Walkman (NWZ-A728)

    Didn't know if there was anyone who could help me with video encoding for the Sony walkman on Linux. On windows, i used any video converter, which is mencoder, but couldn't get it running with wine. I then recompiled ffmpeg to support aac and x264, but that didn't work. If anybody has any idea on how to get video converting running, i would appreciate it, because printing and this are my last ties to windows.
    Thank you for your help in advance!
    By the way, all i know is that it needs x264 video and aac audio

  2. #2
    Join Date
    Sep 2006
    Beans
    3,713

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    Quote Originally Posted by djbushido View Post
    Didn't know if there was anyone who could help me with video encoding for the Sony walkman on Linux. On windows, i used any video converter, which is mencoder, but couldn't get it running with wine.
    Are you saying that you tried to get mencoder to run under Wine? Why not just install mencoder from the repository? If you like using a terminal:
    Code:
    sudo apt-get install mencoder
    I then recompiled ffmpeg to support aac and x264, but that didn't work.
    Did ffmpeg fail to encode, or did the player not work with the video ffmpeg made? Also include your ffmpeg command and the full ffmpeg response.
    If anybody has any idea on how to get video converting running, i would appreciate it, because printing and this are my last ties to windows.
    Thank you for your help in advance!
    By the way, all i know is that it needs x264 video and aac audio
    You can take a video that already works in the player and find out what it's settings are:
    Code:
    ffmpeg -i videothatworks.mp4
    You can use the specs that ffmpeg shows to help make a working video.

  3. #3
    Join Date
    Jun 2007
    Beans
    676

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    I have absolutely no idea if it will work, but here is the mencoder line I use to convert a video for my Sony Ericsson k550i phone:

    mencoder <input> -o <output> -of lavf -lavfopts format=mp4 -oac lavc -ovc lavc -lavcopts aglobal=1:vglobal=1:acodec=libfaac:abitrate=<audio bitrate>:vbitrate=<videobitrate>

    Just replace <input>, <output>, <audiobitrate> and <videobitrate> with whatever you want.

    PS: It might take an entire day to check your reply to this, but I will.
    Last edited by Keyper7; November 16th, 2008 at 09:23 PM.

  4. #4
    Join Date
    Oct 2008
    Location
    /home/brad
    Beans
    591
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    Thank you for responding!
    Anyway, I will try the ffmpeg -i thing.
    To let you know, i did install mencoder via synaptic, i had tried to get any video converter running with wine, but that failed. Horribly.
    Anyway, the mencoder line looks good, but i need to use x264, so i just need to replace libavc or whatever with libx264. I will try that, so thank you!

  5. #5
    Join Date
    Sep 2006
    Beans
    3,713

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    Your player can handle 320x240 768k bitrate h264 videos. You can try this setting for iPod, which has similar particularities. First you will need to use a version of ffmpeg that can encode with libx264 and libfaac. Either see HOWTO: Compile the latest ffmpeg and x264 from source or try (for Ibex only):
    Code:
    sudo apt-get update
    sudo apt-get purge ffmpeg
    sudo apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg
    Save the following as walkman.sh:
    Code:
    #!/bin/bash
    
    ffmpeg -i $1 -an -pass 1 -s 320x240 -vcodec libx264 -b 512k -flags +loop -cmp +chroma -partitions 0 -me_method dia -subq 1 -trellis 0 -refs 1 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 512k -maxrate 768k -bufsize 2M -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 13 -threads 0 -f mp4 /dev/null
    
    ffmpeg -i $1 -acodec libfaac -ab 96k -pass 2 -s 320x240 -vcodec libx264 -b 512k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me_method umh -subq 6 -trellis 1 -refs 5 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 512k -maxrate 768k -bufsize 2M -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 13 -threads 0 -f mp4 $2
    Make the script executable:
    Code:
    chmod +x walkman.sh
    Run the script:
    Code:
    ./walkman.sh inputfile.avi output.mp4
    If your player doesn't like it, then run output.mp4 through MP4Box and try to play it in the Walkman. Get MP4Box (it's part of gpac package):
    Code:
    sudo apt-get install gpac
    Run it:
    Code:
    MP4Box -add output.mp4 newoutput.mp4
    Last edited by FakeOutdoorsman; November 16th, 2008 at 11:42 PM.

  6. #6
    Join Date
    Oct 2008
    Location
    /home/brad
    Beans
    591
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    looks good, but how do i make ffmpeg do 1 pass? I don't usually have the time for 2-pass encoding...

    EDIT: the Walkman script works, i built my version of ffmpeg against the libx264 from git repo, so i now have videos for my Walkman!!!
    Also, not marking solved just yet, because i don't know how to have ffmpeg just do 1 pass encoding...
    Last edited by djbushido; November 17th, 2008 at 02:58 AM. Reason: works now

  7. #7
    Join Date
    Sep 2006
    Beans
    3,713

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    Robert Swain's iPod video guide has some one-pass examples.
    Last edited by FakeOutdoorsman; November 17th, 2008 at 03:27 AM.

  8. #8
    Join Date
    Oct 2008
    Location
    /home/brad
    Beans
    591
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Video Encoder for Sony Walkman (NWZ-A728)

    cool! thanks for the guide, used it to create a 1-pass script for my walkman. I'll post the script later, so anyone can use it.

    EDIT: this script can be used for converting videos for use with the Sony Walkman NWZ-A728 series of players. You must have ffmpeg built against libx264 version .65 or higher. The usage is: ./walkman-1pass.sh <input.whatever> <output.mp4>
    The input video CAN NOT have any spaces in the name. This is just ffmpeg. The video is converted to 320x240. I think that is about it, if anyone has questions, feel free to reply or PM me.
    Code:
    ffmpeg -i $1 -acodec libfaac -ab 128k -s 320x240 -vcodec libx264 -b 500k -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +mixed_refs -me_method umh -subq 6 -trellis 1 -refs 5 -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -bt 500k -maxrate 768k -bufsize 2M -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 13 -title $2 -threads 0 -f mp4 $2
    Last edited by djbushido; November 17th, 2008 at 10:40 PM.

  9. #9
    Join Date
    Jun 2007
    Beans
    676

    Re: [SOLVED] Video Encoder for Sony Walkman (NWZ-A728)

    I think quotation marks can solve the spaces problem.

  10. #10
    Join Date
    Oct 2008
    Location
    /home/brad
    Beans
    591
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: [SOLVED] Video Encoder for Sony Walkman (NWZ-A728)

    There's a thought... I'll try that later and post the results.

Page 1 of 2 12 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
  •