On Fri, Sep 24, 2010 at 11:00, Matteo Mandelli <[email protected]> wrote:

> Hi all,
>
> I'm creating a Transport stream with the following ffmpeg
>
> ffmpeg -er 4 -i <infile> -f mpegts -acodec libmp3lame -ar 32000 -ab
> 48k -s 400x224 -vcodec libx264 -b 600k -flags +loop+mv4 -cmp 256
> -partitions +parti4x4+partp8x8+partb8x8 -subq 7 -trellis 1 -refs 5
> -coder 0 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71
> -bt 600k -maxrate 600k -bufsize 600k -rc_eq 'blurCplx^(1-qComp)'
> -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -level 30 -aspect 16:9 -r 30 -g
> 90 -async 2 <outfile>
>
> The problem I'm having is that at some point some access unit
> delimiters 00000109 are splitted between two transport Stream packets.
>
>
>
> 4741013D07100007B54C7E8F000001E0000080C00A31003DDA7111003DDA71A7B881938C8292BA6C293F5
>
> 86C4A4CCF521DA17AE2C2E2092C2865508427904DA87C660141AC9402D9948EFE362E4F944768CD29790
>
> CF617EEB184B8CE791449FE470508C93740E3938868DA9871D1C3ED3B77DD05227DCC1D3127F1FA1D81
>
> F04012F31A0523F62C1D912CD05E2E5448184A090F1477F192F2F12522E64192590EA1021FA7830092630B
> 31C4888712D988F3EA05C48BE21C713EA0 --> 0000 <--
>
> 4701011E0 --> 00109 <--
> F0000001419A3C3C027DE0045C03860B426ABE9B8D000A1802A23CD97FFE0C35ED654F
>
> 26F7841437962A69B0985F0EE130F4FBDFF6DBF1AA224FFC232D76130BE11EBB0985F08E08FC9FA5D84
>
> C2F843AEC2617CDFFD71C1010F9E6FF6FBBC6FAD736E4A4A9E4DF84240B9400D1C1674F7BE10C0BB8
>
> A814DA69FE5F0027809F83851C0C74CDFF1C7C7DFB5FB5CE934FDB6E21436654DFFCF2FEAAAB5AEB
> 8EC605269FFC00820070451F1C0388F373FF28EBAF9BF59B
>
>
> Is this standard?
> Do someone know how to avoid this?
>
> Thanks,
> Matteo
>

there is a subtle bug in ffmpeg in the sense that it does not put complete
TS packets in udp packets, but can mistakingly split a TS packet between two
udp packets.

you can avoid this by explicitly telling ffmpeg to use UDP packets that are
a multiple of a TS packet, like so

ffmpeg -i <infile> -f mpegts udp://<host>:<port>?packet_size=188
or a bit more efficiently:
ffmpeg -i <infile> -f mpegts udp://<host>:<port>?packet_size=1316
-- 
Aviad Rozenhek
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to