Re: [FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?
One more question, why ffmpeg add -10ms for video delay relative to video? Thank you! 2014-09-19 21:39 GMT+08:00 linxs lin...@gmail.com: Thank you ! asetpts=PTS+0.010/TB works! 2014-09-18 18:40 GMT+08:00 Stefano Sabatini stefa...@gmail.com: On date Thursday 2014-09-18 08:58:33 +0800, linxs wrote: D:\ffprobe 0.mpg ffprobe version N-63439-g96470ca Copyright (c) 2007-2014 the FFmpeg developers built on May 25 2014 22:01:51 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab - -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 86.100 / 52. 86.100 libavcodec 55. 65.100 / 55. 65.100 libavformat55. 41.100 / 55. 41.100 libavdevice55. 13.101 / 55. 13.101 libavfilter 4. 5.100 / 4. 5.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc52. 3.100 / 52. 3.100 Input #0, mpeg, from '0.mpg': Duration: 00:00:14.98, start: 0.529978, bitrate: 953 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 16:1 5 DAR 4:3], max. 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s ffprobe -show_streams? Also you can check the PTS values of the first timestamps, something like: ffprobe -show_packets -of compact -select_streams v INPUT -read_intervals %+#1 ffprobe -show_packets -of compact -select_streams a INPUT -read_intervals %+#1 I added -af asetpts=PTS+0/TB to the options of ffmpeg. The audio delay relative to video of output mpg is -10ms too. nothing changed. What about: asetpts=PTS+0.010/TB Please don't top post. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?
On date Thursday 2014-09-18 08:58:33 +0800, linxs wrote: D:\ffprobe 0.mpg ffprobe version N-63439-g96470ca Copyright (c) 2007-2014 the FFmpeg developers built on May 25 2014 22:01:51 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab - -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 86.100 / 52. 86.100 libavcodec 55. 65.100 / 55. 65.100 libavformat55. 41.100 / 55. 41.100 libavdevice55. 13.101 / 55. 13.101 libavfilter 4. 5.100 / 4. 5.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc52. 3.100 / 52. 3.100 Input #0, mpeg, from '0.mpg': Duration: 00:00:14.98, start: 0.529978, bitrate: 953 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 16:1 5 DAR 4:3], max. 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s ffprobe -show_streams? Also you can check the PTS values of the first timestamps, something like: ffprobe -show_packets -of compact -select_streams v INPUT -read_intervals %+#1 ffprobe -show_packets -of compact -select_streams a INPUT -read_intervals %+#1 I added -af asetpts=PTS+0/TB to the options of ffmpeg. The audio delay relative to video of output mpg is -10ms too. nothing changed. What about: asetpts=PTS+0.010/TB Please don't top post. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?
On date Wednesday 2014-09-17 19:44:02 +0800, linxs wrote: Hi everybody, I transcode other video to mpg2 video as following command: ffmpeg -i other video -c:v mpeg2video -b:v 8000k -c:a mp2 -y 0.mpg / / d:\ffmpeg -i orig.mpg -c:v mpeg2video -c:a mp2 -y 0.mpg ffmpeg version N-63439-g96470ca Copyright (c) 2000-2014 the FFmpeg developers [...] I use MediaInfo.exe to view the ouput mpg, and get the result: / / General Complete name: D:\1.project\1.HDPlayer\audiolevel\FM_MIRROR\loop\0.mpg Format : MPEG-PS File size: 1.70 MiB Duration : 15s 24ms Overall bit rate mode: Variable Overall bit rate : 951 Kbps Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP: No Format settings, Matrix : Default Format settings, GOP : Variable Duration : 14s 960ms Bit rate mode: Variable Bit rate : 548 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: Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.053 Time code of first frame : 00:00:00:00 Time code source : Group of pictures header Stream size : 1 001 KiB (57%) Audio ID : 192 (0xC0) Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Duration : 15s 24ms Bit rate mode: Constant Bit rate : 384 Kbps Channel(s) : 2 channels Sampling rate: 48.0 KHz Compression mode : Lossy Delay relative to video : -10ms !!! how to make this delay relative to video value to 0ms? What values do you get with ffprobe? Did you try with the asetpts filter? This will require audio transcoding though. ___ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Re: [FFmpeg-user] (mpeg2) how to set audio delay relative to video as 0 ?
D:\ffprobe 0.mpg ffprobe version N-63439-g96470ca Copyright (c) 2007-2014 the FFmpeg developers built on May 25 2014 22:01:51 with gcc 4.8.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable- libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab - -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable- libxavs --enable-libxvid --enable-decklink --enable-zlib libavutil 52. 86.100 / 52. 86.100 libavcodec 55. 65.100 / 55. 65.100 libavformat55. 41.100 / 55. 41.100 libavdevice55. 13.101 / 55. 13.101 libavfilter 4. 5.100 / 4. 5.100 libswscale 2. 6.100 / 2. 6.100 libswresample 0. 19.100 / 0. 19.100 libpostproc52. 3.100 / 52. 3.100 Input #0, mpeg, from '0.mpg': Duration: 00:00:14.98, start: 0.529978, bitrate: 953 kb/s Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x576 [SAR 16:1 5 DAR 4:3], max. 104857 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 384 kb/s I added -af asetpts=PTS+0/TB to the options of ffmpeg. The audio delay relative to video of output mpg is -10ms too. nothing changed. 2014-09-17 20:10 GMT+08:00 Stefano Sabatini stefa...@gmail.com: On date Wednesday 2014-09-17 19:44:02 +0800, linxs wrote: Hi everybody, I transcode other video to mpg2 video as following command: ffmpeg -i other video -c:v mpeg2video -b:v 8000k -c:a mp2 -y 0.mpg / / d:\ffmpeg -i orig.mpg -c:v mpeg2video -c:a mp2 -y 0.mpg ffmpeg version N-63439-g96470ca Copyright (c) 2000-2014 the FFmpeg developers [...] I use MediaInfo.exe to view the ouput mpg, and get the result: / / General Complete name: D:\1.project\1.HDPlayer\audiolevel\FM_MIRROR\loop\0.mpg Format : MPEG-PS File size: 1.70 MiB Duration : 15s 24ms Overall bit rate mode: Variable Overall bit rate : 951 Kbps Video ID : 224 (0xE0) Format : MPEG Video Format version : Version 2 Format profile : Main@Main Format settings, BVOP: No Format settings, Matrix : Default Format settings, GOP : Variable Duration : 14s 960ms Bit rate mode: Variable Bit rate : 548 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: Progressive Compression mode : Lossy Bits/(Pixel*Frame) : 0.053 Time code of first frame : 00:00:00:00 Time code source : Group of pictures header Stream size : 1 001 KiB (57%) Audio ID : 192 (0xC0) Format : MPEG Audio Format version : Version 1 Format profile : Layer 2 Duration : 15s 24ms Bit rate mode: Constant Bit rate : 384 Kbps Channel(s) : 2 channels Sampling rate: 48.0 KHz Compression mode : Lossy Delay relative to video : -10ms !!! how to make this delay relative to video value to 0ms? What values do