[FFmpeg-user] Can ffmpeg transcode from mp4(h264/aac) to tsparallel

Stefano Sabatini stefasab at gmail.com
Sat Sep 29 11:27:01 CEST 2012


On date Thursday 2012-09-27 10:22:19 -0600, Roger Pack encoded:
> >
> >           :(  asetpts is broken? I'm very sad :'(
> 
> Is asetpts broken? Or perhaps I'm missing something?
> 

> $ ffmpeg -i yo.mp3 -vf asetpts="PTS+10" yo.setpts.mp4

The presentation timestamp is expressed in timebase units. So simply
increasing the PTS by 10 units is not going to do what the OP thinks.

The correct expression:
asetpts="PTS+10/TB"

> ffmpeg version N-44726-gfd63c2f Copyright (c) 2000-2012 the FFmpeg developers
>   built on Sep 24 2012 14:45:43 with gcc 4.7.1 (GCC)
>   configuration: --enable-memalign-hack --arch=x86_64 --enable-gpl
> --enable-libx264 --enable-avisynth --enable-libxvid
> --target-os=mingw32
> --cross-prefix=/home/rogerdpack/dev/ffmpeg-windows-build-helpers/sandbox/mingw-w64-x86_64/bin/x86_64-w64-mingw32-
> --pkg-config=pkg-config --enable-libmp3lame --enable-version3
> --enable-libvo-aacenc --enable-libvpx --extra-libs=-lws2_32
> --extra-libs=-lpthread --enable-zlib --extra-libs=-lwinmm
> --extra-libs=-lgdi32 --enable-librtmp --enable-libvorbis
> --enable-libtheora --enable-libspeex --enable-libopenjpeg
> --enable-gnutls --enable-libgsm --enable-libfreetype
> --disable-optimizations --enable-mmx --disable-postproc
> --enable-fontconfig --enable-libass --enable-libutvideo
> --enable-libopus --disable-w32threads
> --extra-cflags=-DPTW32_STATIC_LIB --enable-runtime-cpudetect
>   libavutil      51. 73.101 / 51. 73.101
>   libavcodec     54. 58.100 / 54. 58.100
>   libavformat    54. 28.101 / 54. 28.101
>   libavdevice    54.  2.101 / 54.  2.101
>   libavfilter     3. 17.100 /  3. 17.100
>   libswscale      2.  1.101 /  2.  1.101
>   libswresample   0. 15.100 /  0. 15.100
> Input #0, mp3, from 'yo.mp3':
>   Metadata:
>     encoder         : Lavf54.25.104
>   Duration: 00:00:02.11, start: 0.000000, bitrate: 128 kb/s
>     Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16, 128 kb/s
> File 'yo.setpts.mp4' already exists. Overwrite ? [y/N] y
> Output #0, mp4, to 'yo.setpts.mp4':
>   Metadata:
>     encoder         : Lavf54.28.101
>     Stream #0:0: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz,
> stereo, s16, 128 kb/s
> Stream mapping:
>   Stream #0:0 -> #0:0 (mp3 -> libvo_aacenc)
> Press [q] to stop, [?] for help
> size=      34kB time=00:00:02.12 bitrate= 133.0kbits/s
> video:0kB audio:33kB subtitle:0 global headers:0kB muxing overhead 3.363117%
> 
> 
> $ ffmpeg-20120903-git-5d55830-win32-static\bin\ffprobe -show_packets
> yo.setpts.mp4
> [PACKET]
> codec_type=audio
> stream_index=0
> pts=0
> pts_time=0.000000
> dts=0
> dts_time=0.000000
> duration=1024

Sometimes muxers mess with the input timestamps, especially with the
initial offset, you may try with a different container (e.g. NUT).

See:
https://ffmpeg.org/trac/ffmpeg/ticket/1731
-- 
ffmpeg-user random tip #32
ffprobe supports multiple output formats since version 0.8, check out the
manpage for the option -print_format


More information about the ffmpeg-user mailing list