[Libav-user] Problem with particular mpegts file

Andrey Utkin andrey.krieger.utkin at gmail.com
Thu Oct 20 21:31:16 CEST 2011


Hi. I have an example dump of multi-program MPEG TS stream.
ftp://golosimperii.org/tmp/mpts.sample.ts
I need to pull particular program from it (lets say, 7 or 8 or ...),
transcode it to h264+aac, and save.
I try it with my program https://github.com/krieger-od/transcoder :
./transcoder -i mpts.sample.ts -p 7 -o out.ts
but resulting video plays badly:
ffplay and mplayer play it faster than normal,
vlc shows normal video with almost no sound (plays at some moments, silence
all other time).
VLC says: http://pastebin.com/G5VrFhbG

It is important to say that video from other sources is processed and plays
well.

I try to save it with ffmpeg util:
ffmpeg -i mpts.sample.ts -map 0:24 -map 0:22 -vcodec copy -acodec copy -f
mpegts out.ts
1) On revision N-33316-g825dd13 it gives me good save with original codecs.
Here is it: ftp://golosimperii.org/tmp/out.ts
2) On revision N-33758-gc4e02d3 gives 0-length file.
When i try to transcode at once, with command
3) ffmpeg -i mpts.sample.ts -map 0:24 -map 0:22 -vcodec libx264 -acodec
libfaac -f mpegts out.ts
I always get 0-length file, on both revisions.
When i try to transcode out.ts from "lucky" (1) case by ffmpeg, i get
0-length file.
When i try to transcode it with my app, i get the same screwed video:
ftp://golosimperii.org/tmp/outout.ts


But original file is played back by ffplay well:
ffplay mpts.sample.ts -vst 24

Can anybody direct me, what is bug in my app, and what's the trick ffplay
does to accomplish playback. And why ffmpeg cant save it correctly.
Can it be caused by timestamp discontinuities, detected by libavformat? As i
know, mpegts streams commonly contain permuted packets for error resilience.
But i also heard of libav* timestamping being uberbuggy...
Can it be caused by a shift between video and audio streams timestamps? Like
sound being late for 200 ms... My suspition comes from VLC log.

-- 
Andrey Utkin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20111020/197be2ff/attachment.html>


More information about the Libav-user mailing list