Go to advanced search

by dickon
Thu Apr 11, 2013 9:47 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

is there a way to convert the nals to I'll prroper codec with ffmpeg or will it need doing in code with libavcodec? Not quite sure what you're asking for there, but I think the answer is 'you don't need to'. NALs are an encapsulation for H.264 and anything which claims to understand H.264 will unde...
by dickon
Thu Apr 11, 2013 7:33 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

All the h264_mp4toannexb bitstream filter does is convert the H.264 framing from one format to another; it will have no effect on timing as that isn't what it does.
by dickon
Thu Apr 11, 2013 9:17 am
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

Hmm. No, I can't.
by dickon
Wed Apr 10, 2013 11:44 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

Good. Stick the first 81920 bytes into a buffer and feed it to the decoder, then stick the remaining bytes in a second buffer flagged as OMX_BUFFERFLAG_ENDOFFRAME, and feed that in. Repeat as needed, and you should see your state change.
by dickon
Wed Apr 10, 2013 5:01 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

This is where it gets complex... H.264 streams are often (but not always) split into NAL units. These are what the decoder expects to see; if it's not, you'll need to repacketise it using ffmpeg's libav* h264_mp4toannexb() bitstream filter (as you've already said if you write the bitstream to disc h...
by dickon
Wed Apr 10, 2013 4:27 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

Oh, yes. I see. You're actually reading an arbitrary amount of data -- arbitrary number of H.264 frames -- into a large buffer, then passing that to the decoder in 16K chunks, setting the 'end of frame' marker on the last bit of the buffer you send. This isn't right. You need to pass -- ideally -- o...
by dickon
Wed Apr 10, 2013 3:35 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

You're only calling VNCReadData() once at the top of HandleH264, which doesn't look right. The decoder may need more than one frame of data before it'll change state.
by dickon
Wed Apr 10, 2013 2:35 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

You'll have to stick your code up somewhere.
by dickon
Wed Apr 10, 2013 1:56 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

You're splitting a frame into chunks. The last chunk needs to have OMX_BUFFERFLAG_ENDOFFRAME set, or the decoder won't know it's got a full frame to decode.
by dickon
Wed Apr 10, 2013 12:58 pm
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

Are you reading whole frames, and setting the buffer flags appropriately when you're feeding it partials?
by dickon
Wed Apr 10, 2013 10:57 am
Forum: OpenMAX
Topic: OMX_EmptyThisBuffer segfault/no PortSettingsChanged [SOLVED]
Replies: 22
Views: 4153

Re: OMX_EmptyThisBuffer segfault

It doesn't.
by dickon
Mon Apr 08, 2013 10:15 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Added, ta. Not tested; haven't had a chance.
by dickon
Sat Apr 06, 2013 1:53 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

You're confusing container formats with codecs. NAL units are essentially raw H.264 video, and can be played as such. They can be encapsulated in a container -- such as mkv or mp4 -- along with other data (eg. audio or subtitles), but don't need to be. Sorry about the segfault; that should be fixed ...
by dickon
Sat Apr 06, 2013 12:25 am
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Update this evening.

End the output filename with '.nal', and it'll avoid ffmpeg's output altogether and dump the raw NALs to the output file.

Might be useful to some. Enjoy.
by dickon
Thu Apr 04, 2013 8:34 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Video is transcoded, and mostly works. The output is containered (guessed by filename), but there are issues. The H.264 SPS and PPS NAL units aren't repeated outside the container, which means when you seek, mplayer whinges constantly about missing units. The A/V is mostly in sync; at least, I haven...
by dickon
Mon Apr 01, 2013 4:21 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Paul Kulyk asked about deinterlacing support (in private email); I've just added it.

Have a play.
by dickon
Wed Mar 27, 2013 3:55 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Likely. You may have AV sync issues if you're dealing with the ridiculous US TV systems and their 1.001 framerate factor, as you'll have to tell it quite accurately the precise framerate you need (hint: 29.97 isn't quite right, and becomes noticeable after a surprisingly short amount of time; ISTR i...
by dickon
Wed Mar 27, 2013 3:30 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Earlier versions did just write it to a file... The output is a NAL stream of H.264 packets. These will play, but there's no timing data associated with them at all (other than the implicit DTS inherent in the ordering), and, importantly, no audio. To be useful, the output needs to be multiplexed wi...
by dickon
Wed Mar 27, 2013 12:11 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Software. The GPU seems to spit out timing data that it's given as I'd expect (ie, essentially pass-through). The problem is that I have no knowledge of how to drive ffmpeg (and libavformat in particular), which, given it's documentation, is a problem I'm unlikely to be able to do much about. I'm ba...
by dickon
Thu Mar 21, 2013 11:08 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

I think you're hitting the timing problems. mplayer plays the mkv OK, although it pauses for a few seconds after displaying the first frame; it doesn't like the mp4 at all.

Not sure, sorry.
by dickon
Wed Mar 20, 2013 11:50 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Hmm. I thought I'd pushed the latest; apologies.

Try that.

All I seem to've done is fiddle with SPS / PPS NALs, and I don't think that works anyway. Give it a go?
by dickon
Sun Mar 17, 2013 8:45 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

The files mine generated do have audio, but I'm still suffering from the timing issues mentioned above. mplayer plays them with sound, in sync -- as far as those clips go, anyway -- but only by rebasing all the clocks; it whinges about the computer being too slow and gets a bit concerned. I haven't ...
by dickon
Sun Mar 17, 2013 1:11 pm
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

It was at about two o'clock this morning that I thought, 'Oh, I bet he hasn't bought a licence.'. Thought I'd better test it before posting, though; you never can tell.

Glad to be of help.
by dickon
Sun Mar 17, 2013 10:40 am
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Well that, I think, was easy. You haven't bought an MPEG 2 licence (or you haven't installed the key correctly in config.txt). With a valid licence in place, it produces http://newsplodge.fluff.org/~dickon/720.mkv at about 48fps, and similar for the 1080i. Without it, it crashes at exactly the point...
by dickon
Sun Mar 17, 2013 1:21 am
Forum: OpenMAX
Topic: omxtx - open source transcoding example
Replies: 239
Views: 134338

Re: omxtx - open source transcoding example

Grabbed. Will look tomorrow, after I've finished watching the F1.

Go to advanced search