|
2008-05-04
, 07:31
|
Posts: 178 |
Thanked: 40 times |
Joined on Aug 2007
@ UK
|
#52
|
|
2008-05-04
, 07:55
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#53
|
Another possibly stoopid idea: do any of the encoding options support "key frames" and do they play any role in keeping a/v in sync?
|
2008-05-05
, 15:58
|
Posts: 178 |
Thanked: 40 times |
Joined on Aug 2007
@ UK
|
#54
|
|
2008-05-06
, 00:22
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#55
|
mplayer recorded.avi -vo yuv4mpeg:file=vout.yuv -ao pcm:file=aout.wav
|
2008-05-06
, 20:32
|
|
Posts: 2,427 |
Thanked: 2,986 times |
Joined on Dec 2007
|
#56
|
|
2008-05-06
, 23:59
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#57
|
Videocamera plays back its recorded videos better than mplayer. Why don't you ask that guy to see his code.
Or is that cheating?
|
2008-05-07
, 02:00
|
|
Posts: 2,427 |
Thanked: 2,986 times |
Joined on Dec 2007
|
#58
|
Well, it's a Nokia guy messing with the official Nokia camera app. For some reason, they're not very forthcoming with this kind of code. Note that they have no source for download.
It's not really his code, anyway. Videocamera just uses GStreamer pipes to do all the heavy lifting. Maybe I should figure out a way to get GStreamer to transcode the video! I'll look into that.
|
2008-05-09
, 15:19
|
Banned |
Posts: 82 |
Thanked: 3 times |
Joined on Feb 2008
@ Israel
|
#59
|
Hi everyone!
I have spent some more time trying to figure out gstreamer, and it looks like it IS possible to record fairly high-quality video (with audio) from the tablet, just using the built-in framework. You just have to fiddle with the encoder settings.
It looks like we're stuck with the Hantro 4200 software encoder (news release, skimpy specs), probably because Nokia already had a license for it. You can get a fairly detailed listing of the settings available by typing "gst-inspect hantro4200enc" at the command prompt.
You'll need to go into red pill mode and install, at least, the gstreamer0.10-tools package. If you don't have gstreamer0.10-plugins-good and gstreamer0.10-hantro installed, do that too. But you probably already have that, as I think OS2007 and OS2008 include them by default.
Here's my gstreamer test command line. Copy and paste this on the command line.
Code:gst-launch gconfv4l2src ! 'video/x-raw-yuv,width=320,height=240,framerate=(fraction)15/1' ! hantro4200enc profile-and-level=5 bit-rate=515 ! queue ! mux. dsppcmsrc ! 'audio/x-raw-int,rate=8000,channels=1' ! queue ! mux. avimux name=mux ! filesink location=/media/mmc1/gstest.avi
Here's my gstreamer test, explained:
1. Input:
Video Input - gconfv4l2srcAudio Input - dsppcmsrc
- This source is the Video 4 Linux 2 source, tweaked so that it can tell if you have flipped the N800's camera or not.
- This source is the name of the N8x0's microphone input.
2. Video codec:
- As I mentioned above, we've only got Hantro 4200. So I chose the highest bitrate and best MPEG-4 codec available: MP4 Simple Profile, Level 5, 515 kbps
3. Audio codec:
- There are two audio compression formats available to us, but, because I wanted to avoid any extra CPU use, I didn't compress the audio at all.
3. Output:
- I used AVIMUX to create a AVI container. As far as I can tell, this is a big weakness of the tablet's GStreamer framework. AVIMUX doesn't allow for uncompressed video, and there is a definite problem with audio-video sync in the final file.
- This version of the pipeline does NOT include a display of the video on the screen. I'm working on that, it shouldn't be hard, but it may hurt the quality of the recorded output.
Here is a test video that I made via this method and then uploaded directly to YouTube. Yes, it is very goofy. It was intended to test for quality and lip-sync. The quality is great, the lip-sync is NOT.
EDIT: Interestingly, mplayer plays the video without A/V sync issues, however all other media players have sync issues. I'm working on a mencoder command that will fix these problems...
EDIT2: See below for my theory on audio-video sync issues.
|
2008-05-29
, 17:33
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#60
|
So I want some way of getting MPlayer's A/V sync magic used in a transcoding solution that lets all players play the transcoded file the same way that MPlayer plays the original file. Some kind of "MPlayer-repair" solution.
I have not been able to figure this out, however. Nothing I have tried has been successful.
Last edited by qole; 2008-05-03 at 22:33.