maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Multimedia (https://talk.maemo.org/forumdisplay.php?f=32)
-   -   Troubleshooting: video playback (https://talk.maemo.org/showthread.php?t=75301)

demolition 2011-07-28 12:22

Troubleshooting: video playback
 
Post moved from end of an old thread because its title wasn't, in fact, quite in line with what I need help with...

Aim:
Play video file, whose details are below, with stock media player.

Actual result:
(a) Stock media player (h/w acc): 5 dots then unsupported format message.
(b) KMplayer + mplayer: plays but a and v lose sync.

Context:
I'm having a little trouble with video playback. Below is output from various commands, including hexdump ( from new busybox ). I can't find an armv7 build of avinaptic at the moment so I hope what I've got is enough.

This file does play, technically, in mplayer but video runs about 10% slower than audio so it doesn't take long for a lot of lag to develop. I would like to make use of the video h/w with the built in media player but I get that format unsupported message. I have installed as many of the codecs as I can see in the repositories (not the -dev or -dbg ones).

How can I check to make sure it's profile is baseline? And if it's set to main or high, how can it be reset to baseline?

mplayer can cope at approx 500kbps but I generally playback to a tv so would be better if higher quality were possible. I have found I can stream about 400kbps via the stock player but any higher then it's very skippy (and not in a good way!). These are bbc iplayer downloads/streams so I'd have thought the encoding would be the same for all resolutions and bitrates, for non-HD.

All help gratefully received...

File info

file useful command but not sure how to get a more verbose output...
Code:

~/MyDocs/.videos/iplayerTV $ file movie.mp4
movie.mp4: ISO Media, MPEG v4 system

mplayer identify lots of stuff ...
Code:

~/MyDocs/.videos/iplayerTV $ mplayer -identify -frames 0 movie.mp4           
MPlayer SVN-r30099-4.2.1 (C) 2000-2009 MPlayer Team

Playing movie.mp4.
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] Video stream found, -vid 0
ID_AUDIO_ID=1
[lavf] Audio stream found, -aid 1
ID_AID_1_LANG=und
VIDEO:  [H264]  640x360  24bpp  25.000 fps  698.3 kbps (85.2 kbyte/s)
Clip info:
 major_brand: isom
ID_CLIP_INFO_NAME0=major_brand
ID_CLIP_INFO_VALUE0=isom
 minor_version: 512
ID_CLIP_INFO_NAME1=minor_version
ID_CLIP_INFO_VALUE1=512
 compatible_brands: isomiso2avc1mp41
ID_CLIP_INFO_NAME2=compatible_brands
ID_CLIP_INFO_VALUE2=isomiso2avc1mp41
 encoder: Lavf52.31.0
ID_CLIP_INFO_NAME3=encoder
ID_CLIP_INFO_VALUE3=Lavf52.31.0
ID_CLIP_INFO_N=4
ID_FILENAME=movie.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=698344
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=360
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=1.7778
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=94728
ID_AUDIO_RATE=24000
ID_AUDIO_NCH=2
ID_LENGTH=5338.98
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 24000 Hz, 2 ch, s16le, 94.7 kbit/12.33% (ratio: 11841->96000)
ID_AUDIO_BITRATE=94728
ID_AUDIO_RATE=24000
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 24000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=faad
Starting playback...


Exiting... (End of file)
ID_EXIT=EOF

hexdump command only available in upgraded busybox
Code:

~/MyDocs/.videos/iplayerTV $ hexdump -C movie.mp4 | head
00000000  00 00 00 20 66 74 79 70  69 73 6f 6d 00 00 02 00  |... ftypisom....|
00000010  69 73 6f 6d 69 73 6f 32  61 76 63 31 6d 70 34 31  |isomiso2avc1mp41|
00000020  00 00 00 08 66 72 65 65  1f 8c 35 d0 6d 64 61 74  |....free..5.mdat|
00000030  00 00 00 27 06 00 11 80  04 38 0c 80 00 00 03 00  |...'.....8......|
00000040  00 04 38 0c 80 00 00 03  00 40 01 0c 00 00 03 00  |..8......@......|
00000050  00 40 90 80 08 00 00 03  00 08 80 00 00 01 6a 65  |.@............je|
00000060  88 80 40 0d bf bc 11 f8  86 ff c1 66 0b 8f bd 26  |..@........f...&|
00000070  13 68 2a fa 13 67 0b ef  fd 3b 22 b2 09 d9 54 94  |.h*..g...;"...T.|
00000080  f1 ea b1 e6 0a 9f 82 d5  39 dc 37 ee 4a 9b a8 10  |........9.7.J...|
00000090  d8 64 ff d1 69 be fa 3f  ac 5c 7c a2 a2 c4 08 ce  |.d..i..?.\|.....|


vi_ 2011-07-28 12:24

Re: Troubleshooting: video playback
 
Quote:

Originally Posted by demolition (Post 1059963)
Post moved from end of an old thread because its title isn't, in fact, quite in line with what I need help with...

Aim:
Play video file, whose details are below, with stock media player.

Actual result:
(a) Stock media player (h/w acc): 5 dots then unsupported format message.
(b) KMplayer + mplayer: plays but a and v lose sync.

Context:
I'm having a little trouble with video playback. Below is output from various commands, including hexdump ( from new busybox ). I can't find an armv7 build of avinaptic at the moment so I hope what I've got is enough.

This file does play, technically, in mplayer but video runs about 10% slower than audio so it doesn't take long for a lot of lag to develop. I would like to make use of the video h/w with the built in media player but I get that format unsupported message. I have installed as many of the codecs as I can see in the repositories (not the -dev or -dbg ones).

How can I check to make sure it's profile is baseline? And if it's set to main or high, how can it be reset to baseline?

mplayer can cope at approx 500kbps but I generally playback to a tv so would be better if higher quality were possible. I have found I can stream about 400kbps via the stock player but any higher then it's very skippy (and not in a good way!). These are bbc iplayer downloads/streams so I'd have thought the encoding would be the same for all resolutions and bitrates, for non-HD.

All help gratefully received...

File info

file useful command but not sure how to get a more verbose output...
Code:

~/MyDocs/.videos/iplayerTV $ file movie.mp4
movie.mp4: ISO Media, MPEG v4 system

mplayer identify lots of stuff ...
Code:

~/MyDocs/.videos/iplayerTV $ mplayer -identify -frames 0 movie.mp4           
MPlayer SVN-r30099-4.2.1 (C) 2000-2009 MPlayer Team

Playing movie.mp4.
libavformat file format detected.
ID_VIDEO_ID=0
[lavf] Video stream found, -vid 0
ID_AUDIO_ID=1
[lavf] Audio stream found, -aid 1
ID_AID_1_LANG=und
VIDEO:  [H264]  640x360  24bpp  25.000 fps  698.3 kbps (85.2 kbyte/s)
Clip info:
 major_brand: isom
ID_CLIP_INFO_NAME0=major_brand
ID_CLIP_INFO_VALUE0=isom
 minor_version: 512
ID_CLIP_INFO_NAME1=minor_version
ID_CLIP_INFO_VALUE1=512
 compatible_brands: isomiso2avc1mp41
ID_CLIP_INFO_NAME2=compatible_brands
ID_CLIP_INFO_VALUE2=isomiso2avc1mp41
 encoder: Lavf52.31.0
ID_CLIP_INFO_NAME3=encoder
ID_CLIP_INFO_VALUE3=Lavf52.31.0
ID_CLIP_INFO_N=4
ID_FILENAME=movie.mp4
ID_DEMUXER=lavfpref
ID_VIDEO_FORMAT=H264
ID_VIDEO_BITRATE=698344
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=360
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=1.7778
ID_AUDIO_FORMAT=MP4A
ID_AUDIO_BITRATE=94728
ID_AUDIO_RATE=24000
ID_AUDIO_NCH=2
ID_LENGTH=5338.98
ID_SEEKABLE=1
ID_CHAPTERS=0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
ID_VIDEO_CODEC=ffh264
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 24000 Hz, 2 ch, s16le, 94.7 kbit/12.33% (ratio: 11841->96000)
ID_AUDIO_BITRATE=94728
ID_AUDIO_RATE=24000
ID_AUDIO_NCH=2
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 24000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=faad
Starting playback...


Exiting... (End of file)
ID_EXIT=EOF

hexdump command only available in upgraded busybox
Code:

~/MyDocs/.videos/iplayerTV $ hexdump -C movie.mp4 | head
00000000  00 00 00 20 66 74 79 70  69 73 6f 6d 00 00 02 00  |... ftypisom....|
00000010  69 73 6f 6d 69 73 6f 32  61 76 63 31 6d 70 34 31  |isomiso2avc1mp41|
00000020  00 00 00 08 66 72 65 65  1f 8c 35 d0 6d 64 61 74  |....free..5.mdat|
00000030  00 00 00 27 06 00 11 80  04 38 0c 80 00 00 03 00  |...'.....8......|
00000040  00 04 38 0c 80 00 00 03  00 40 01 0c 00 00 03 00  |..8......@......|
00000050  00 40 90 80 08 00 00 03  00 08 80 00 00 01 6a 65  |.@............je|
00000060  88 80 40 0d bf bc 11 f8  86 ff c1 66 0b 8f bd 26  |..@........f...&|
00000070  13 68 2a fa 13 67 0b ef  fd 3b 22 b2 09 d9 54 94  |.h*..g...;"...T.|
00000080  f1 ea b1 e6 0a 9f 82 d5  39 dc 37 ee 4a 9b a8 10  |........9.7.J...|
00000090  d8 64 ff d1 69 be fa 3f  ac 5c 7c a2 a2 c4 08 ce  |.d..i..?.\|.....|


Have you overclocked/undervolted perchance?

demolition 2011-07-28 12:38

Re: Troubleshooting: video playback
 
O/S: Maemo5 PR1.3-v0.46
Kernel Settings:
- frequency-range: 250MHz - 850MHz
- profile: "ideal"

Is there something I should do with these to make playback in the stock player possible. I can see how kernel settings would impact on mplayer performance, however, so please suggest optimal for playback.

vi_ 2011-07-28 12:41

Re: Troubleshooting: video playback
 
Quote:

Originally Posted by demolition (Post 1059970)
O/S: Maemo5 PR1.3-v0.46
Kernel Settings:
- frequency-range: 250MHz - 850MHz
- profile: "ideal"

Is there something I should do with these to make playback in the stock player possible. I can see how kernel settings would impact on mplayer performance, however, so please suggest optimal for playback.

1. Install pastebinit.
2. connect to internet.
3. enter:

Code:

kernel-config show | pastebinit
4. Paste URL here.

just for test sake, set the voltage/frequency back to default values and see how the stock player performs.

demolition 2011-07-28 13:09

Re: Troubleshooting: video playback
 
OK. I'll post back with how I get on. I hadn't thought frequency/voltage settings would effect the ability of media player to open.

Is there a way to check which profile the video is on the N900?

demolition 2011-07-28 14:02

Re: Troubleshooting: video playback
 
Pastebin...
http://pastebin.com/J5n53Pru

Ah. For some reason I thought it was 250 - 850, must have forgotten to set lower limit. Got to go out but I'll reset freq and profile as soon as I can.

Let me know if the above kernel settings might be contributing to the problem.

ps.Truly amazing service paste bin - thanks for alerting me to it!

anthonie 2011-07-28 14:24

Re: Troubleshooting: video playback
 
@Demolition

Clock speed does seem to have influence on playback. I use QCPUfreq and overclock on a per session basis (max @900), usually when I want to watch a movie from the phone, displayed on the TV. I only utilize mplayer from the command line, though, as my experiences with both the default media player as well as KMPlayer were not very good, especially when I wants to use (external) subtitles.

That being said, however, I have ran in to some files that had trouble playing. What I did find is that ffmpeg does a pretty good job converting these "unplayable" files to something that actually does work. An example for converting a .flv to mpg can be found at the link below:
http://www.ubuntugeek.com/convert-fl...ng-ffmpeg.html

If you insist on using the default media player, converting on your n900 might be helpfull with that.

demolition 2011-07-28 15:31

Re: Troubleshooting: video playback
 
@fabio: thanks for removing your post.
---------
@ anthonie
OK. I'll try winding the CPU up a bit. You say 900 can play full 360p on mplayer? I find KMplayer generally better than cli mplayer but suspect I'm not giving it the correct settings.
I would prefer to use stock media player because it's h/w accelerated so cpu wouldn't need to run so fast and battery would last a bit longer.

@ vi_
Made a mistake on the initial pastebin - think I must have been running post-crash so settings didn't load.
http://pastebin.com/4LwMWzuF

Set it to default - rebooting now so brb

maemouser1 2011-07-28 15:51

Re: Troubleshooting: video playback
 
Hi I have a similar query. I like to watch japanese anime. These are usually in .mkv format with dual audio. I use Sib as a front end because it has a library structure. Now using Mplayer is very good because I can switch the audio streams using the # shortcut key however sometimes certain videos lag using mplayer. I don't think it is hardware accelerated.

The same .mkv video plays well on the stock media player..but there is no way to switch the audio stream. Anything I can do?

I never tried overclocking during playback. Usually I overclock only for multitasking. Do you think it would help with video playback?

Or is there any way to make mplayer hardware accelerated?

Or any way to switch audio streams using the stock media player.

anthonie 2011-07-28 16:49

Re: Troubleshooting: video playback
 
Quote:

OK. I'll try winding the CPU up a bit. You say 900 can play full 360p on mplayer? I find KMplayer generally better than cli mplayer but suspect I'm not giving it the correct settings.
I would prefer to use stock media player because it's h/w accelerated so cpu wouldn't need to run so fast and battery would last a bit longer.
I have often noticed some tearing if I don't overclock. That being said: I have never run extensive benchmarks or anything. The only reason why I started looking at the cli version of mplayer is because my gf is spanish and she wanted subtitles. That didn't work with the "additional subtitle support" or whatever it is called in the repo's. Tried all the other options (logically as I didn't want to force gf to work without a GUI), vlc, sib KMPlayer, etc. None worked. So I ended up teaching her how to type a command in the terminal and do it like that. Apart from that, she also learnt how to use mplayer on her netbook, and use the hdmi output, which I don't think is possible with the stock player. So, for us, cli mplayer was the best choice. It might not be for you, though.

However, if you type mplayer --help, you'll notice there are some options like framedropping and post processing, which may or may not help you.

Conclusion: Your mileage may vary.


All times are GMT. The time now is 20:22.

vBulletin® Version 3.8.8