Support and General Use > Plugins/Viewers

AVI playback

<< < (4/11) > >>

sirdan:
Hello, sorry for reviving old thread but I thought recently about playing mpeg-4 videos in rockox and that's what has come to my mind:

Actually i find some advantages for it over mpeg2. Many mobile phones have feature to record videos in .mp4 container that actually contains mpeg-4 Single Profile video format and amr/aac for audio. So Rockbox could play that low resolution recordings out of the box!! :). So no transcode here. Using mpeg-4 Advanced Single Profile (xvid/divx) vastly decrease amount of needed space comparing to mpeg2, more visible when compressing full videos.
Rockbox actually recognizes mp4 container (but mobiles produce some kind of hybrid 3gp/mp4). And theres is also need to port decoder from xvid or from ffmpeg project.

Advantages:
- many mobiles recordings actually could be played without transcoding,
- many compression programs out there,
- high compression ratio - we save at minimum half the space needed for mpeg2 clips
   Im able to squizze 5 min clip into 5 MB file or so, incuding 32bit/s mono aac. Thats 176x144 24fps around 110kbit/s for my SE k600i with acceptable quality.
   Elephant Dream mpeg2: 11min 224x176 24fps 450kbit/s = 35 MB file
   Elephant Dream xvid no b frames : 11 min 224x176 24fps 185kbit/s = 15 MB ;)    >>Quality is worse and image is less sharper just a little as i reencoded previous mpeg2 ED (in megui HQ 2-pass mode). If RB would decode b frames, quality of encodes increase and cpu usage as well.

Disadvantages:
- higher cpu usage
   My k600i has ARM9 ~103MHZ processor and plays 176x144 mp4's.
   Logically, we can decrease cpu requirements, lowering fps for encoded video. Going from 24fps to 12fps can make   decoding faster almost twice(?) and on my k600 video is still smooth with that frame rate. There is no big smoothing impact on so small lcd's when lowering frame rate i think.
   Also compressing video without b frames reduce cpu decoding requirements.
- need someone to code it ;)

What do you guys think about this?

AlexP:

--- Quote from: sirdan on October 03, 2009, 01:41:14 PM ---What do you guys think about this?

--- End quote ---

The same as always - if someone were to code it (including all the associated stuff like making mpegplayer multi-codec capable) then I'm sure it would be appreciated and go in :)

saratoga:

--- Quote from: sirdan on October 03, 2009, 01:41:14 PM ---   Elephant Dream mpeg2: 11min 224x176 24fps 450kbit/s = 35 MB file
   Elephant Dream xvid no b frames : 11 min 224x176 24fps 185kbit/s = 15 MB ;)    >>Quality is worse and image is less sharper just a little as i reencoded previous mpeg2 ED (in megui HQ 2-pass mode). If RB would decode b frames, quality of encodes increase and cpu usage as well.

--- End quote ---

As you can see if you disable MPEG4 features its not much better then MPEG2.  Unfortunately, theres no such thing as free lunch and enabling better MPEG4 compression features means more CPU usage which means lower frame rates.

As our targets get faster MPEG4 codecs start to make more sense, but its a lot of work to benefit a small number of people.  If you're interested, we'd love to see more codecs in Rockbox, just don't expect everyone else to do the work :)

sirdan:

--- Quote from: saratoga on October 03, 2009, 06:03:58 PM ---As you can see if you disable MPEG4 features its not much better then MPEG2. 

--- End quote ---

Well too much said imho ;) I talk about disabling only b frames. With I and P frames, encodes are twice smaller at minimum. With b frames even more. And i think we still can go lower.


--- Quote ---As our targets get faster MPEG4 codecs start to make more sense, but its a lot of work to benefit a small number of people.
--- End quote ---

Yes, main problem is that we cannot estimate of how decoding of mpeg4 will be cpu demanding. I really dont want that, when someone spent much time on coding and it occured that videos cant play in realtime.
The edge is 80 MHZ dualcore (and up) that sit in more than a half of targets. But i see room for that especially for 16:9 format. Applying some tweaks to encoded videos may allow to realtime decode:
- no b frames
- lower fps for encodings (i hope the smoothness wont be sacrified)
- 16:9 format
- some decoder optimizations
- last resort is to lowering resolution.

Sorry if that all sounds silly but the truth is that mpeg-4 Single Profile (or h.263 in .3gp) is supposed to be the format for portable devices not mpeg-2. Thus i assume the former shouldnt be such decoding demanding as we think ::) .


--- Quote ---If you're interested, we'd love to see more codecs in Rockbox, just don't expect everyone else to do the work
--- End quote ---

I know guys, i know... if i would just can coding ;)

dar02:
For example Ipod 5G Video can play unscaled mpeg4 in .mp4 container but with it's orginal Apple firmware while on the same machine Rockbox can't cope with resized mpeg-1 witch low bitrate - i mean it's playing it but with low FPS.
I guess iPod must have some hardware accelerated mpeg4 decoder but Rockbox programmes don't know how to access it.
Probably (I am not a programmer, I have no idea, maybe I am wrong) iPod also is using dedicated co-processor to decode mp3 and aac music and because of this it is consuming less energy than Rockbox that is using main universal CPU.
You can forget about watching any movie on Rockbox - any of those little processors will never handle any video format in fair FPS.

But hey, do you want to listen to the music or watching movies on microscopical screen? ; )

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version