Page 1 of 1

Ability to modify fourcc code mid-stream

PostPosted: Thu Feb 09, 2012 3:45 am
by afn
I recently ran into an AVI file that played fine on my Playstation 3 but refused to play on my Sony SMP-N200 ("file is corrupt or unsupported"). The output of "ffmpeg -i" showed:

Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (DX50 / 0x30355844), yuv420p, 668x352 [SAR 1:1 DAR 167:88], 25 tbr, 25 tbn, 25 tbc

After searching these forums, I figured out two fixes:
(1) I could modify the profile to transcode all mpeg4 files.
(2) I could modify the fourcc code (changed from DX50 to XVID) and then the file would play fine on both devices.

The first fix is undesirable (I'd prefer to avoid the overhead of unnecessarily transcoding media) and the second is kind of a pain. I'm wondering if it would be worthwhile to allow each profile to define fourcc mappings which would transform the stream without updating the underlying file. For example, it could be implemented as a pseudo-transcode rule:

<OnlineTranscoding>
<!-- ... real transcoding rules ... -->
<Video targetFourCC="XVID">
<Matches container="avi" vCodec="mpeg4" fourCC="DX50"/>
</Video>
</OnlineTranscoding>

Is this a worthwhile feature? And if so, is this the right abstraction? I've only been using Serviio for about a week, so I haven't run into all of the corner cases yet. :)

Best,
Tony

Re: Ability to modify fourcc code mid-stream

PostPosted: Thu Feb 09, 2012 9:14 am
by zip
seems a lot of work for what it's worth, atm it's out of scope