[FFmpeg-user] Can ffmpeg transcode from mp4(h264/aac) to tsparallel
Tony Song
ssaoying at gmail.com
Fri Sep 28 11:45:43 CEST 2012
Yes, i do command lines following.
ffmpeg -i /data/a.ts -ss 00:00:10.00 -t 00:00:10.00 -f asetpts=10+PTS -f
vsetpts=10+PTS -c copy -f mpegts /data/b.ts
ffprobe /data/abc.ts -show_packets
And get pakets information:
[PACKET]
codec_type=audio
stream_index=1
pts=126720
pts_time=1.408000
dts=126720
dts_time=1.408000
duration=2160
duration_time=0.024000
convergence_duration=N/A
convergence_duration_time=N/A
size=576
pos=564
flags=K
[/PACKET]
[PACKET]
codec_type=video
stream_index=0
pts=216000
pts_time=2.400000
dts=212400
dts_time=2.360000
duration=3600
duration_time=0.040000
convergence_duration=N/A
convergence_duration_time=N/A
size=29566
pos=22748
flags=K
[/PACKET]
It seems that both of asetpts and vsetpts cant not change the pts_time.
Is there any way do not change the pts_time while segmenting the video file
with -ss and -t options.
Thanks.
On Fri, Sep 28, 2012 at 12:38 PM, Steven Liu <lingjiujianke at gmail.com>wrote:
> Hi Roger,
>
> my commandline is
> ffmpeg -y -i xuqu.mp3 -ss 00:00:10.00 -t 00:00:10.00 -c copy
> -af asetpts=PTS+10/1 -f mpegts a.ts
>
> ffmpeg -y -i xuqu.mp3 -ss 00:00:10.00 -t 00:00:10.00 -c copy
> -af asetpts=PTS+10/1 -f mpegts a.ts
> ffmpeg version N-44672-g41f7e06 Copyright (c) 2000-2012 the FFmpeg
> developers
> built on Sep 21 2012 23:19:42 with gcc 4.4.6 (GCC) 20110731 (Red Hat
> 4.4.6-3)
> configuration: --disable-yasm --enable-libx264 --enable-gpl
> libavutil 51. 73.101 / 51. 73.101
> libavcodec 54. 57.100 / 54. 57.100
> libavformat 54. 27.101 / 54. 27.101
> libavdevice 54. 2.101 / 54. 2.101
> libavfilter 3. 16.106 / 3. 16.106
> libswscale 2. 1.101 / 2. 1.101
> libswresample 0. 15.100 / 0. 15.100
> libpostproc 52. 0.100 / 52. 0.100
> [mp3 @ 0x17fb240] max_analyze_duration 5000000 reached at 5015510
> [mp3 @ 0x17fb240] Estimating duration from bitrate, this may be inaccurate
> Input #0, mp3, from 'xuqu.mp3':
> Duration: 00:02:54.83, start: 0.000000, bitrate: 191 kb/s
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
> [mpegts @ 0x17fbae0] muxrate VBR, pcr every 3 pkts, sdt every 200,
> pat/pmt every 40 pkts
> Output #0, mpegts, to 'a.ts':
> Metadata:
> encoder : Lavf54.27.101
> Stream #0:0: Audio: mp3, 44100 Hz, stereo, 192 kb/s
> Stream mapping:
> Stream #0:0 -> #0:0 (copy)
> Press [q] to stop, [?] for help
> size= 260kB time=00:00:10.00 bitrate= 212.8kbits/s
> video:0kB audio:234kB subtitle:0 global headers:0kB muxing overhead
> 10.865953%
>
> [PACKET]
> codec_type=audio
> stream_index=0
> pts=126441
> pts_time=1.404900
> dts=126441
> dts_time=1.404900
> duration=2351
> duration_time=0.026122
> convergence_duration=N/A
> convergence_duration_time=N/A
> size=626
> pos=564
> flags=K
>
>
> wrong too! :(
>
>
>
>
> 2012/9/28 Roger Pack <rogerdpack2 at gmail.com>:
> >>
> >> :( 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
> > 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
>
--
laugh out loud.
More information about the ffmpeg-user
mailing list