LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-06-2008, 11:41 PM   #1
allstarzero
LQ Newbie
 
Registered: Nov 2004
Location: georgia, us
Distribution: linux mint
Posts: 18

Rep: Reputation: 0
ffmpeg psp encoding woes (with a solution!)


I recently decided I wanted to encode a few videos off of my computer to watch on my PSP. I'd done this successfully a few years back, but I didn't really remember what I had done. So to begin with, my starting point was this website.

If you scroll down to the section entitled Using ffmpeg to Transcode Videos, you'll see the following command line entry:

Code:
ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact -vcodec
xvid -s 320x240 -r 29.97 -b 1500 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp -muxvb 768
M4V80113.mp4
I typed this in almost verbatim and ran into the following error:

Code:
Unable to find a suitable output format for 'xvid'
Googling for this error yielded plenty of hits, but no solutions that were applicable to my situation. The real reason I'm posting this is so that hopefully when people search for that error in the future, they will stumble across my solution for it here.

The first thing I did was to simply take out the -vcodec xvid parameter. This resulted in another error, this time with 'aac' as the problem. I took out every single parameter until the only one left was -bitexact, and discovered that it takes an argument! The man page doesn't mention this. I just put a 1 after it, and that got me to this:

Code:
ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact 1 -vcodec
xvid -s 320x240 -r 29.97 -b 1500 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp -muxvb 768
M4V80113.mp4
This still didn't work. However, it was a lot closer to the right answer. While tinkering with it, I got various error messages including the following:

Code:
ffmpeg: unrecognized option '-muxvb'
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Unknown encoder 'xvid'
Unknown encoder 'aac'
A very useful command I discovered at this point was "ffmpeg -formats" which prints out all the supported formats for ffmpeg. This allowed me to find "libxvid" and "libfaac," the proper names for the encoders I was trying to use. The exact commands are:

Code:
ffmpeg -formats | grep xvid
ffmpeg -formats | grep aac
After fiddling with the options a little bit more, I came up with the following command line entry:

Code:
ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact 1 -vcodec
libxvid -s 320x240 -r 29.97 -b 1500 -acodec libfaac -ac 2 -ar 24000 -ab 65535 -f psp M4V80113.mp4
And this worked. Not only did it work, but I was able to immediately copy over and watch the video from my memcard. Notice the changes I had to make:

1) added parameter argument of 1 to -bitexact
2) took out unsupported (YMMV) -muxvb 768 option
3) replaced -vcodec xvid with -vcodec libxvid
4) replaced -acodec aac with -acodec libfaac
5) changed -ab 64 to -ab 65535

Good luck!
 
Old 02-07-2008, 07:30 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Last year the ffmpeg bitrate flags (-b and -ab) were changed. They used to be read as kbits/sec, but now they've been changed to bits/sec. Any examples you find on the web older than a year or so will thus be way to low, and will probably either fail or drop to the default numbers.

You can change the rate to bps, as you've done here, or you can simply append 'k' to the original number, i.e. '-ab 64k'.

And from your description, it looks like changes to the format and codec names have also been made.

(By the way, did you notice that your video bitrate is still being read as 1500bps?)
 
Old 02-07-2008, 11:54 AM   #3
allstarzero
LQ Newbie
 
Registered: Nov 2004
Location: georgia, us
Distribution: linux mint
Posts: 18

Original Poster
Rep: Reputation: 0
By the way, did you notice that your video bitrate is still being read as 1500bps?

Hehe, yes I did notice (talk about a grainy video!). I forgot to post that part. Good catch.
 
Old 02-13-2008, 07:52 PM   #4
454redhawk
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
Edit

Never mind I see you have it worked out.

Last edited by 454redhawk; 02-13-2008 at 07:53 PM.
 
Old 06-22-2008, 10:59 AM   #5
Corley Kinnane
LQ Newbie
 
Registered: Nov 2004
Posts: 1

Rep: Reputation: 0
Smile PSP AVC video encode

Hi,
I have made a perl script to convert DVDs to PSP.

Features:

- Auto frame rate conversion for PAL or interlaced NTSC source DVD down to 23.976

- embedded subtitles placed below the film if possible.

- others

This is a URL, guess the missing part:

corley.kinnane.net/blog/2008/06/22/psp-encode/

mencoder, ffmpeg and unix tools.
 
Old 06-22-2008, 12:50 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian 11
Posts: 6,130

Rep: Reputation: 419Reputation: 419Reputation: 419Reputation: 419Reputation: 419
Looks like nice work!
Although I don't have a PSP.
Welcome to LQ!
 
Old 08-10-2013, 03:09 PM   #7
d33tah
LQ Newbie
 
Registered: Aug 2013
Posts: 1

Rep: Reputation: Disabled
As of ffmpeg 2.0, here's what works:

ffmpeg -y -i INPUTFILENAME -flags +bitexact -s 400x192 -r 29.97 -b:v 512k -acodec libfaac -b 672k -ab 96k -ar 24000 -f psp -strict -2 OUTPUTFILENAME.mp4

Last edited by d33tah; 08-10-2013 at 04:02 PM.
 
  


Reply

Tags
aac, encode, encoder, ffmpeg, output, psp, video, xvid


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
Problem AAC while encoding mp4 for my PSP J_angel2000 Linux - General 4 04-29-2007 02:40 AM
ffmpeg - psp [] Need help encoding to mp4 nomb Linux - Software 7 01-08-2007 07:42 PM
An easy solution for k3b - error while encoding audio files Ariel A. Linux - Software 0 01-09-2005 10:18 AM
Solution to wlan woes. Ikebo Linux - Wireless Networking 1 10-01-2004 04:15 PM
Solution to ppp woes opened my way to linux as an OS geesloper LinuxQuestions.org Member Success Stories 1 06-20-2004 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:27 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration