Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  MPEG playback problems
« previous next »
  • Print
Pages: [1]

Author Topic: MPEG playback problems  (Read 4220 times)

Offline Delta009

  • Member
  • *
  • Posts: 25
MPEG playback problems
« on: April 10, 2008, 09:21:01 PM »
Hi !

I tried a lot of different encoders with a lot of different parameters (bitrate, frame rate, etc.), but it seems that the videos I watch with PluginMpegplayer either :
  • lags
  • or there is no sound playback

however, the sample video (elephant dreams) has a very hi video bitrate, and it doesn't lag nor has no sound : it plays just fine  :-\

also, some helpful people on the irc channel told me that the video lags because the plugin can't playback video at 30 fps
they recommended a frame rate of 15 fps.
however, the mpeg-1 and mpeg-2 formats DON'T support frame rates below 25 fps (or does it?)

what seem the best converter (but also the slowest) is Mencoder, because the videos don't lag, but there is no sound (even if it works perfectly on my computer and that the output is mp3)  ???

need help : how should i encode my video in order to have both the sound and the picture ?!
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: MPEG playback problems
« Reply #1 on: April 10, 2008, 09:25:48 PM »
MPEG-2 isn't supposed to support below that, but most encoders will let you create them. You often have to do something like "-strict -1" or some other command line parameter to tell it to stop being strict about the standard.
Logged

Offline jacotyco

  • Member
  • *
  • Posts: 7
Re: MPEG playback problems
« Reply #2 on: April 12, 2008, 01:13:30 PM »
I was using WinFF and i told it 15 fps and it just ignored me.
Logged

Offline Delta009

  • Member
  • *
  • Posts: 25
Re: MPEG playback problems
« Reply #3 on: April 12, 2008, 01:49:20 PM »
mpeg-1 and mpeg-2 support only a few specific frame rates (23.98, 25, 29.97, etc.)
however, using ffmpeg, we can still encode videos in these format with another frame rate by using the following command :
Code: [Select]
ffmpeg -strict -2
(thanks to Llorean for the advice)

after several tests, i have found that, on my ipod video 80GB, some of the best results i could get were those encoded using this command :
Code: [Select]
ffmpeg -i "INPUTFILENAME" -s 320x240 -vcodec mpeg2video -b 512k -r 12 -strict -2 -ab 128k -ac 2 -ar 44100 -acodec mp3 "OUTPUTFILENAME"
What do the parameters mean :
Code: [Select]
-i : input filename
-s : output size (ipod video and youtube are 320x240)
-vcodec : choose between mpeg1video and mpeg2video
-b : output video bitrate (must not be too high nor too low)
-r : output frame rate (on ipod video, a fullscreen video should not have a frame rate higher than 15 fps)
-strict -2 : force ffmpeg to be less strict about the mpeg standards (use this if your frame rate is below 23.98)
-bf : set number of b-frames (maximum is 16), which are supposed to ease the decoding of the video (???)
-ab : audio bitrate (128k is average quality ; youtube videos have a 64k bitrate)
-ac : (1 = mono; 2 = stereo : youtube is in mono)
-ar 44100 : MUST BE 44.1 kHz !
-acodec : can be mp1, mp2 or mp3 (N.B. under Microsoft Windows, it must be: libmp3lame)
(if the input file is in widescreen format, i.e. 16:9 without black bars at the top and bottom of the picture, you can replace the size by 320x180 and select a slightly higher frame rate)

i tested almost every encoder that was mentinned in the wiki, but the one which was the faster and the better was definitely FFmpeg.
video encoded using Mencoder had a better quality and a smoother frame rate, but the sound was bogus, and it took hours to encode a short videoclip.
WinFF 0.29.1 is just a front-end to FFmpeg, so, if you are confident enough, you should use the command-line, not the front-end : it's more complex, but there are more possibilities.

p.s. : this should be added to the wiki
« Last Edit: August 08, 2008, 04:31:49 PM by Delta009 »
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: MPEG playback problems
« Reply #4 on: April 12, 2008, 02:52:33 PM »
Does that mean you're going to add it to the wiki?
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline Delta009

  • Member
  • *
  • Posts: 25
Re: MPEG playback problems
« Reply #5 on: April 13, 2008, 03:24:18 PM »
english is not my native language
and i don't want to make mistakes in the wiki

however, if i don't add it myself, i doubt someone will ever do it

if you feel like adding it to the wikiyourself, go ahead
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: MPEG playback problems
« Reply #6 on: April 13, 2008, 07:44:54 PM »
Your English seems fine to me.  I can toss it up there in a couple of hours if you haven't done it yet.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: MPEG playback problems
« Reply #7 on: April 13, 2008, 08:00:00 PM »
Are YouTube videos MPEG2?
Reason I ask is you use YouTube's 64k bitrate to explain the "value" of 128k.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline PaulPosition

  • Member
  • *
  • Posts: 76
Re: MPEG playback problems
« Reply #8 on: April 14, 2008, 02:17:32 AM »
I think Delta refered to youtube as a comparison because clips have a similar definition (or is it resolution?) to media player's screens and share some bandwidth/cpu-power issues because of being run on flash or some such script language.

That (and the fact most great vids could be found there!) makes them prime candidates for conversion, I'd say. :p
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: MPEG playback problems
« Reply #9 on: April 14, 2008, 06:20:24 AM »
Quote from: PaulPosition on April 14, 2008, 02:17:32 AM
I think Delta refered to youtube as a comparison because clips have a similar definition (or is it resolution?) to media player's screens and share some bandwidth/cpu-power issues because of being run on flash or some such script language.

Yes, but if they are H264 or XviD they need less than 1/2 the bitrate of MPEG2 to achieve the same quality.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline Delta009

  • Member
  • *
  • Posts: 25
Re: MPEG playback problems
« Reply #10 on: April 14, 2008, 06:36:16 PM »
youtube videos are in the FLV format (flash video)
the specs of FLV videos can be found there : http://blogs.chron.com/makingmovies/archives/2006/04/youtube_and_the.html

i made comparisons between mpeg and flv because the videos on youtube have a relatively low audio bitrate (64k) and it's in mono, so you don't need to set a higher audio bitrate for the output file if your original video is ripped from youtube

further, the videos on youtube are scaled to 320x240... which is the same size than the screen of an ipod !

even if the video bitrate on youtube is 200 kbps, we must set a higher bitrate than that for the output file, or else, because it would have been poorly converted twice, it would become very ugly

N.B..: i'm talking here about the standard videos we find on youtube. however, youtube plans to start a high-def service http://gizmodo.com/gadgets/clips/what-youtubehd-might-look-like-328366.php, which is in beta testing. also, some popular videos have a higher audio bitrate than the others.
Logged

Offline astro2

  • Member
  • *
  • Posts: 22
Re: MPEG playback problems
« Reply #11 on: October 02, 2008, 09:21:40 AM »
are you guys saying that ipod cpu isn't just crap when playing gameboy games but media files useless even with a mpeg viewer unless we rip the media ourselves and encode it suitable to rockbox??
Logged

Offline Delta009

  • Member
  • *
  • Posts: 25
Re: MPEG playback problems
« Reply #12 on: October 06, 2008, 06:47:06 PM »
the problem doesn't come from rockbox
it comes from the mpeg-4 decoding chip inside the ipod video

at the moment, rockbox can't access that chip to decode at reasonable speed mpeg-4 video
and, on old ipods such as the ipod photo and nano, this chip doesn't even exist

so, the firmware has to rely only on the ipod's cpu and ram to decode low quality and lagging mpeg-2 video

rockbox developers are doing the best they can
if you don't like it, you may develop your own mpeg-4 plugin if you wish (rockbox is open source)

EDIT: And, btw, I don't think that the main purpose of a customized ipod is to play gameboy games... especially when there are only 6 buttons on the mp3 player to control the 4 directions of the d-pad, the a and b buttons and select and start.
« Last Edit: October 06, 2008, 06:50:01 PM by Delta009 »
Logged

Offline Chronon

  • Rockbox Expert
  • Member
  • *
  • Posts: 4379
Re: MPEG playback problems
« Reply #13 on: October 06, 2008, 07:05:52 PM »
Quote from: astro2 on October 02, 2008, 09:21:40 AM
are you guys saying that ipod cpu isn't just crap when playing gameboy games but media files useless even with a mpeg viewer unless we rip the media ourselves and encode it suitable to rockbox??

I'm having some difficulty parsing that.  Punctuation helps readability a lot.

The bottom line is that every device needs media in a compatible format or it's unplayable.  This is as true for a Rockboxed device as it is for any other.

Part of the discussion upthread had to do with issues transcoding from FLV to MPEG.  This doesn't have anything intrinsic to do with Rockbox, only with how transcoding from one lossy format to another works.

Hopefully this addresses some of what you were asking, though I'm not totally sure what you were commenting about.
Logged
Sansa e280, Gigabeat F40, Gigabeat S60, Sansa Clip+, iPod Mini 2g

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  MPEG playback problems
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.115 seconds with 15 queries.