[FFmpeg-user] Setting audio delay when remuxing mpegts to mpegps
Georgi Chorbadzhiyski
gf at unixsol.org
Mon Dec 5 15:38:37 CET 2011
Guys I'm remuxing mpegts files into mpegps (-f vob) and the problem I'm having is that
mediainfo reports for the audio "Delay relative to video: -146ms"
Is there a way for this delay to be 0 (or at lease less that 40 ms) without
recompressing?
file1.ts, file2, and file3.ts each are 1 minute long.
cat file1.ts file2.ts file3.ts | \
./ffmpeg -f mpegts -i - -ss 00:01:00.000 -acodec copy -vcodec copy -vframes 1525 -f vob -y file.mpg
> ffmpeg version N-35458-g51177b1, Copyright (c) 2000-2011 the FFmpeg developers
> built on Dec 5 2011 16:09:01 with gcc 4.5.3
> configuration: --enable-gpl --enable-pic --enable-libx264
> libavutil 51. 30. 0 / 51. 30. 0
> libavcodec 53. 40. 0 / 53. 40. 0
> libavformat 53. 24. 0 / 53. 24. 0
> libavdevice 53. 4. 0 / 53. 4. 0
> libavfilter 2. 51. 0 / 2. 51. 0
> libswscale 2. 1. 0 / 2. 1. 0
> libpostproc 51. 2. 0 / 51. 2. 0
> [mp3 @ 0x14277e0] Header missing
> [mpegts @ 0x13ff7e0] max_analyze_duration 5000000 reached at 5016000
> [mpegts @ 0x13ff7e0] Estimating duration from bitrate, this may be inaccurate
> Input #0, mpegts, from 'pipe:':
> Duration: N/A, start: 94570.689189, bitrate: 10160 kb/s
> Program 1007
> Metadata:
> service_name : bTV
> service_provider: BULSATCOM
> Stream #0:0[0x50]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 10000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
> Stream #0:1[0x51](bul): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 160 kb/s
> Output #0, vob, to 'file.mpg':
> Metadata:
> encoder : Lavf53.24.0
> Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p, 720x576 [SAR 16:15 DAR 4:3], q=2-31, 10000 kb/s, 25 fps, 90k tbn, 25 tbc
> Stream #0:1(bul): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, 160 kb/s
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> Stream #0:1 -> #0:1 (copy)
> frame= 1526 fps= 0 q=-1.0 Lsize= 18630kB time=00:01:00.67 bitrate=2515.4kbits/s
> video:17211kB audio:1185kB global headers:0kB muxing overhead 1.273521%
Media info reports for file.mpg
> General
> Complete name : file.mpg
> Format : MPEG-PS
> File size : 18.2 MiB
> Duration : 1mn 1s
> Overall bit rate mode : Variable
> Overall bit rate : 2 502 Kbps
>
> Video
> ID : 224 (0xE0)
> Format : MPEG Video
> Format version : Version 2
> Format profile : Main at Main
> Format settings, BVOP : Yes
> Format settings, Matrix : Custom
> Format settings, GOP : M=3, N=12
> Duration : 1mn 1s
> Bit rate mode : Variable
> Bit rate : 2 292 Kbps
> Maximum bit rate : 10 000 Kbps
> Width : 720 pixels
> Height : 576 pixels
> Display aspect ratio : 4:3
> Frame rate : 25.000 fps
> Standard : PAL
> Color space : YUV
> Chroma subsampling : 4:2:0
> Bit depth : 8 bits
> Scan type : Interlaced
> Scan order : Top Field First
> Compression mode : Lossy
> Bits/(Pixel*Frame) : 0.221
> Stream size : 16.7 MiB (92%)
>
> Audio
> ID : 192 (0xC0)
> Format : MPEG Audio
> Format version : Version 1
> Format profile : Layer 2
> Duration : 1mn 0s
> Bit rate mode : Constant
> Bit rate : 160 Kbps
> Channel(s) : 2 channels
> Sampling rate : 48.0 KHz
> Compression mode : Lossy
> Delay relative to video : -146ms
Can this be lower or zero?
> Stream size : 1.16 MiB (6%)
--
Georgi Chorbadzhiyski
http://georgi.unixsol.org/
More information about the ffmpeg-user
mailing list