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

Steven Liu lingjiujianke at gmail.com
Mon Sep 24 10:08:37 CEST 2012


Hi All,

       I want to transcode multimedia from mp4 to ts.

       I have one file named "a.mp4", it's video codec is "h264" audio
codec is "aac"

       duration time is "00:03:00.000"

       I have three computer, I want to transcode the a.mp4 to ts use
the three computer.
       three computer name:  serv1 , serv2 , serv3

       I want to transcode the a.mp4 on serv1, serv2,serv3.

       serv1 transcode a.mp4 00:00:00.000 - 00:01:00.000 to a-1.ts
       serv2 transcode a.mp4 00:01:00.000 - 00:02:00.000 to a-2.ts
       serv3 transcode a.mp4 00:02:00.000 - 00:03:00.000 to a-3.ts

       which auguments can do it like this?

       I have try it like this, but it have pts/pcr error when i play
the m3u8 on VLC

       The error message is bellow:


main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 0 from stream 0
main debug: creating access 'http'
location='192.168.0.105/test/b1.ts', path='\\192.168.0.105\test\b1.ts'
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/b1.ts'
main debug: net: connecting to 192.168.0.105 port 80
main debug: connection succeeded (socket = 1352)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=7007512
access_http debug: Connection: close
access_http debug: stream size=7007512,pos=0,remaining=7007512
main debug: using access module "access_http"
main debug: TIMER module_need() : 19.088 ms - Total 19.088 ms / 1
intvls (Avg 19.088 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 2369 KiB/s
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 1 from stream 0
main debug: using stream_filter module "stream_filter_httplive"
main debug: TIMER module_need() : 8758.966 ms - Total 8758.966 ms / 1
intvls (Avg 8758.966 ms)
main debug: Inserted a stream filter
main debug: creating access 'http'
location='192.168.0.105/test/b2.ts', path='\\192.168.0.105\test\b2.ts'
main debug: looking for stream_filter module: 4 candidates
main debug: no stream_filter module matching "any" could be loaded
main debug: TIMER module_need() : 0.320 ms - Total 0.320 ms / 1 intvls
(Avg 0.320 ms)
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/b2.ts'
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 0.276 ms - Total 0.276 ms / 1 intvls
(Avg 0.276 ms)
main debug: creating demux: access='http' demux=''
location='192.168.0.105/test/a.m3u8.ts'
file='\\192.168.0.105\test\a.m3u8.ts'
main debug: looking for demux module: 55 candidates
main debug: net: connecting to 192.168.0.105 port 80
stream_filter_httplive info: playing segment 0 from stream 0
ts debug: PATCallBack called
ts debug: new PAT ts_id=1 version=0 current_next=1
ts debug:   * number=1 pid=4096
ts debug: PMTCallBack called
ts debug: new PMT program number=1 version=0 pid_pcr=256
ts debug:   * es pid=256 type=27 fcc=h264
main debug: selecting program id=1
ts error: MPEG-4 descriptor not found
ts debug:   * es pid=257 type=15 fcc=mp4a
main debug: using demux module "ts"
main debug: TIMER module_need() : 12.891 ms - Total 12.891 ms / 1
intvls (Avg 12.891 ms)
main debug: looking for decoder module: 31 candidates
main debug: connection succeeded (socket = 1380)
avcodec debug: libavcodec initialized (interface 0x361100)
avcodec debug: trying to use direct rendering
avcodec debug: allowing 4 thread(s) for decoding
avcodec debug: ffmpeg codec (H264 - MPEG-4 AVC (part 10)) started
avcodec debug: using frame thread mode with 4 threads
main debug: using decoder module "avcodec"
main debug: TIMER module_need() : 5.406 ms - Total 5.406 ms / 1 intvls
(Avg 5.406 ms)
main debug: looking for packetizer module: 21 candidates
main debug: using packetizer module "packetizer_h264"
main debug: TIMER module_need() : 1.416 ms - Total 1.416 ms / 1 intvls
(Avg 1.416 ms)
main debug: looking for decoder module: 31 candidates
main debug: using decoder module "faad"
main debug: TIMER module_need() : 0.168 ms - Total 0.168 ms / 1 intvls
(Avg 0.168 ms)
main debug: looking for packetizer module: 21 candidates
packetizer_mpeg4audio debug: running MPEG4 audio packetizer
packetizer_mpeg4audio debug: no decoder specific info, must be an ADTS
or LOAS stream
main debug: using packetizer module "packetizer_mpeg4audio"
main debug: TIMER module_need() : 0.096 ms - Total 0.096 ms / 1 intvls
(Avg 0.096 ms)
ts debug: DEMUX_SET_GROUP 0 00000000
main debug: looking for meta reader module: 2 candidates
lua debug: Trying Lua scripts in
C:\Users\LiuQi\AppData\Roaming\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:\Program Files
(x86)\VideoLAN\VLC\lua\meta\reader
lua debug: Trying Lua playlist script C:\Program Files
(x86)\VideoLAN\VLC\lua\meta\reader\filename.luac
main debug: no meta reader module matching "any" could be loaded
main debug: TIMER module_need() : 0.810 ms - Total 0.810 ms / 1 intvls
(Avg 0.810 ms)
main debug: `http://192.168.0.105/test/a.m3u8' successfully opened
main debug: Buffering 0%
main debug: Buffering 6%
packetizer_h264 debug: found NAL_SPS (sps_id=0)
main debug: Buffering 13%
packetizer_h264 debug: found NAL_PPS (pps_id=0 sps_id=0)
main debug: Buffering 20%
ts debug: PSINewTableCallBack: table 0x42(66) ext=0x1(1)
ts debug: SDTCallBack called
ts debug: new SDT ts_id=1 version=0 current_next=1 network_id=1
ts debug:   * service id=1 eit schedule=0 present=0 running=4 free_ca=0
ts debug:     - type=1 provider=FFmpeg name=Service01
main debug: EsOutProgramMeta: number=1
main debug: Buffering 26%
main debug: Buffering 33%
main debug: looking for text renderer module: 2 candidates
main debug: Buffering 40%
main debug: Buffering 46%
main debug: Buffering 53%
main debug: Buffering 60%
main debug: Buffering 66%
packetizer_mpeg4audio debug: detected ADTS format
packetizer_mpeg4audio info: AAC channels: 2 samplerate: 48000
faad warning: decoded zero sample
freetype debug: Using Arial as font from file C:\windows\Fonts\arial.ttf
main debug: Buffering 73%
main debug: Buffering 80%
main debug: Buffering 86%
freetype debug: using fontsize: 2
main debug: Buffering 93%
main debug: using text renderer module "freetype"
main debug: TIMER module_need() : 1.511 ms - Total 1.511 ms / 1 intvls
(Avg 1.511 ms)
main debug: Buffering 100%
main debug: looking for video filter2 module: 18 candidates
main debug: Stream buffering done (1066 ms in 2 ms)
swscale debug: 32x32 chroma: YUVA -> 16x16 chroma: RGBA with scaling
using Bicubic (good quality)
main debug: using video filter2 module "swscale"
main debug: TIMER module_need() : 0.946 ms - Total 0.946 ms / 1 intvls
(Avg 0.946 ms)
main debug: looking for video filter2 module: 18 candidates
yuvp debug: YUVP to YUVA converter
main debug: using video filter2 module "yuvp"
main debug: TIMER module_need() : 1.856 ms - Total 1.856 ms / 1 intvls
(Avg 1.856 ms)
main debug: Deinterlacing available
main debug: deinterlace 0, mode blend, is_needed 0
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=8637284
access_http debug: Connection: close
access_http debug: stream size=8637284,pos=0,remaining=8637284
main debug: using access module "access_http"
main debug: TIMER module_need() : 31.442 ms - Total 31.442 ms / 1
intvls (Avg 31.442 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: Opening vout display wrapper
main debug: looking for vout display module: 6 candidates
main debug: received first data after 9 ms
main debug: pre-buffering done 1024 bytes in 0s - 107 KiB/s
direct3d debug: creating Vout EventThread
direct3d debug: DirectXCreateWindow
main debug: looking for vout window hwnd module: 2 candidates
qt4 debug: requesting video...
qt4 debug: Video was requested 0, 0
main debug: using vout window hwnd module "qt4"
main debug: TIMER module_need() : 94.845 ms - Total 94.845 ms / 1
intvls (Avg 94.845 ms)
direct3d debug: created video sub-window
direct3d debug: Vout EventThread running
direct3d debug: disabling screen saver
direct3d debug: Direct3d Device: Mobile Intel(R) HD Graphics 32902 294 9
main debug: VoutDisplayEvent 'resize' 1296x758 window
direct3d warning: trying surface pixel format: YV12
direct3d debug: selected surface pixel format is YV12
direct3d debug: Using D3DTEXF_LINEAR for minification
direct3d debug: Using D3DTEXF_LINEAR for magnification
direct3d debug: Direct3D scene created successfully
direct3d debug: Direct3D device adapter successfully initialized
main debug: using vout display module "direct3d"
main debug: TIMER module_need() : 158.903 ms - Total 158.903 ms / 1
intvls (Avg 158.903 ms)
main debug: original format sz 1280x720, of (0,0), vsz 1280x720, 4cc
I420, sar 1:1, msk r0x0 g0x0 b0x0
main debug: removing module "freetype"
main debug: looking for text renderer module: 2 candidates
freetype debug: Using Arial as font from file C:\windows\Fonts\arial.ttf
freetype debug: using fontsize: 2
main debug: using text renderer module "freetype"
main debug: TIMER module_need() : 1.154 ms - Total 1.154 ms / 1 intvls
(Avg 1.154 ms)
avcodec debug: using direct rendering
main debug: creating audio output
main debug: looking for audio output module: 2 candidates
aout_directx debug: Opening DirectSound Audio Output
main debug: End of video preroll
main debug: VoutDisplayEvent 'resize' 1366x631 window
main debug: Received first picture
direct3d debug: Created 656x47 texture for OSD
aout_directx debug: found device: 主声音驱动程序
aout_directx debug: found device: 扬声器/耳机 (IDT High Definition Audio CODEC)
aout_directx debug: found device: 通讯耳机 (IDT High Definition Audio CODEC)
main debug: Post-processing available
aout_directx debug: device supports 2 channels (DEFAULT!)
aout_directx debug: device supports 1 channel
aout_directx debug: Windows says your SpeakerConfig is stereo
aout_directx debug: creating DirectSoundThread
main debug: using audio output module "aout_directx"
main debug: TIMER module_need() : 64.265 ms - Total 64.265 ms / 1
intvls (Avg 64.265 ms)
aout_directx debug: DirectSoundThread ready
main debug: output 's16l' 48000 Hz Stereo frame=1 samples/4 bytes
main debug: mixer 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes
main debug: filter(s) 'f32l'->'s16l' 48000 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module: 14 candidates
audio_format debug: f32l->s16l, bits per sample: 32->16
main debug: using audio filter module "audio_format"
main debug: TIMER module_need() : 2.314 ms - Total 2.314 ms / 1 intvls
(Avg 2.314 ms)
main debug: conversion pipeline completed
main debug: looking for audio mixer module: 2 candidates
main debug: using audio mixer module "float32_mixer"
main debug: TIMER module_need() : 0.314 ms - Total 0.314 ms / 1 intvls
(Avg 0.314 ms)
main debug: input 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes
main debug: looking for audio filter module: 1 candidate
scaletempo debug: format: 48000 rate, 2 nch, 4 bps, fl32
scaletempo debug: params: 30 stride, 0.200 overlap, 14 search
scaletempo debug: 1.000 scale, 1440.000 stride_in, 1440 stride_out,
1152 standing, 288 overlap, 672 search, 2400 queue, fl32 mode
main debug: using audio filter module "scaletempo"
main debug: TIMER module_need() : 0.514 ms - Total 0.514 ms / 1 intvls
(Avg 0.514 ms)
main debug: filter(s) 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo
main debug: conversion pipeline completed
main debug: filter(s) 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo
main debug: conversion pipeline completed
main debug: filter(s) 'f32l'->'f32l' 52800 Hz->48000 Hz Stereo->Stereo
main debug: looking for audio filter module: 14 candidates
main debug: using audio filter module "samplerate"
main debug: TIMER module_need() : 0.198 ms - Total 0.198 ms / 1 intvls
(Avg 0.198 ms)
main debug: conversion pipeline completed
main debug: End of audio preroll
main debug: Decoder buffering done in 260 ms
main warning: audio output out of sync, adjusting dates (61405 us)
main debug: auto hiding mouse cursor
main debug: picture might be displayed late (missing 0 ms)
main warning: not synchronized (61408 us), resampling
main warning: buffer too late  (60991), up-sampling
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 2 from stream 0
main debug: creating access 'http'
location='192.168.0.105/test/test-3.ts',
path='\\192.168.0.105\test\test-3.ts'
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/test-3.ts'
main debug: net: connecting to 192.168.0.105 port 80
main debug: connection succeeded (socket = 1388)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=867432
access_http debug: Connection: close
access_http debug: stream size=867432,pos=0,remaining=867432
main debug: using access module "access_http"
main debug: TIMER module_need() : 34.979 ms - Total 34.979 ms / 1
intvls (Avg 34.979 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 3 ms
main debug: pre-buffering done 1024 bytes in 0s - 281 KiB/s
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 3 from stream 0
main debug: creating access 'http'
location='192.168.0.105/test/test-4.ts',
path='\\192.168.0.105\test\test-4.ts'
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/test-4.ts'
main debug: net: connecting to 192.168.0.105 port 80
main debug: connection succeeded (socket = 1380)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=669656
access_http debug: Connection: close
access_http debug: stream size=669656,pos=0,remaining=669656
main debug: using access module "access_http"
main debug: TIMER module_need() : 17.322 ms - Total 17.322 ms / 1
intvls (Avg 17.322 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 9 ms
main debug: pre-buffering done 1024 bytes in 0s - 108 KiB/s
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 4 from stream 0
main debug: creating access 'http'
location='192.168.0.105/test/test-5.ts',
path='\\192.168.0.105\test\test-5.ts'
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/test-5.ts'
main debug: net: connecting to 192.168.0.105 port 80
main debug: connection succeeded (socket = 1388)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=725680
access_http debug: Connection: close
access_http debug: stream size=725680,pos=0,remaining=725680
main debug: using access module "access_http"
main debug: TIMER module_need() : 22.287 ms - Total 22.287 ms / 1
intvls (Avg 22.287 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 2 ms
main debug: pre-buffering done 1024 bytes in 0s - 449 KiB/s
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 5 from stream 0
main debug: creating access 'http'
location='192.168.0.105/test/test-6.ts',
path='\\192.168.0.105\test\test-6.ts'
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/test-6.ts'
main debug: net: connecting to 192.168.0.105 port 80
main debug: connection succeeded (socket = 1380)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=607992
access_http debug: Connection: close
access_http debug: stream size=607992,pos=0,remaining=607992
main debug: using access module "access_http"
main debug: TIMER module_need() : 13.225 ms - Total 13.225 ms / 1
intvls (Avg 13.225 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 2 ms
main debug: pre-buffering done 1024 bytes in 0s - 426 KiB/s
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 6 from stream 0
stream_filter_httplive info: playing segment 1 from stream 0
main debug: creating access 'http'
location='192.168.0.105/test/test-7.ts',
path='\\192.168.0.105\test\test-7.ts'
ts debug: SDTCallBack called
ts debug: PATCallBack called
ts debug: PMTCallBack called
ts warning: discontinuity received 0x0 instead of 0x6 (pid=256)
main warning: clock gap, unexpected stream discontinuity
main warning: feeding synchro with a new reference point trying to
recover from clock gap
main warning: PTS is out of range (95430825822), dropping buffer
main debug: looking for access module: 2 candidates
access_http debug: http: server='192.168.0.105' port=80 file='/test/test-7.ts'
main warning: PTS is out of range (95430805581), dropping buffer
main warning: PTS is out of range (95430785356), dropping buffer
main warning: PTS is out of range (95430765040), dropping buffer
main warning: PTS is out of range (95430744653), dropping buffer
main debug: net: connecting to 192.168.0.105 port 80
main warning: PTS is out of range (95430724333), dropping buffer
main warning: PTS is out of range (95430703990), dropping buffer
main warning: PTS is out of range (95430683701), dropping buffer
main warning: PTS is out of range (95430663407), dropping buffer
main debug: connection succeeded (socket = 1360)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=1007116
access_http debug: Connection: close
access_http debug: stream size=1007116,pos=0,remaining=1007116
main debug: using access module "access_http"
main debug: TIMER module_need() : 32.422 ms - Total 32.422 ms / 1
intvls (Avg 32.422 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 1253 KiB/s
ts warning: discontinuity received 0x0 instead of 0x8 (pid=257)
packetizer_mpeg4audio debug: emulated sync word (no sync on following frame)
packetizer_mpeg4audio debug: detected LOAS format
main warning: PTS is out of range (95430973027), dropping buffer
main warning: PTS is out of range (95442030202), dropping buffer
main warning: PTS is out of range (95442009913), dropping buffer
main warning: PTS is out of range (95441989597), dropping buffer
main warning: PTS is out of range (95441969275), dropping buffer
main warning: PTS is out of range (95441948949), dropping buffer
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 7 from stream 0
main warning: PTS is out of range (95442051547), dropping buffer
main warning: clock gap, unexpected stream discontinuity
main warning: feeding synchro with a new reference point trying to
recover from clock gap
main warning: picture is too late to be displayed (missing 95432419 ms)
main warning: picture is too late to be displayed (missing 95432352 ms)
main warning: picture is too late to be displayed (missing 95432286 ms)
main warning: picture is too late to be displayed (missing 95432219 ms)
main warning: picture is too late to be displayed (missing 95432152 ms)
main debug: creating access 'http'
location='192.168.0.105/test/test-8.ts',
path='\\192.168.0.105\test\test-8.ts'
stream_filter_httplive info: playing segment 2 from stream 0
ts debug: PATCallBack called
ts debug: PMTCallBack called
main warning: clock gap, unexpected stream discontinuity
main warning: feeding synchro with a new reference point trying to
recover from clock gap
main debug: looking for access module: 2 candidates
main warning: PTS is out of range (95422178030), dropping buffer
access_http debug: http: server='192.168.0.105' port=80 file='/test/test-8.ts'
main warning: PTS is out of range (95422157812), dropping buffer
main warning: PTS is out of range (95422137590), dropping buffer
main warning: PTS is out of range (95422117248), dropping buffer
main warning: PTS is out of range (95422096826), dropping buffer
main warning: PTS is out of range (95422076377), dropping buffer
main debug: net: connecting to 192.168.0.105 port 80
main warning: PTS is out of range (95422055896), dropping buffer
main debug: connection succeeded (socket = 1960)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: zehttpd/1.2.0
access_http debug: Content-Type: video/MP2T
access_http debug: this frame size=756888
access_http debug: Connection: close
access_http debug: stream size=756888,pos=0,remaining=756888
main debug: using access module "access_http"
main debug: TIMER module_need() : 27.756 ms - Total 27.756 ms / 1
intvls (Avg 27.756 ms)
main debug: Using stream method for AStream*
main debug: starting pre-buffering
main debug: received first data after 1 ms
main debug: pre-buffering done 1024 bytes in 0s - 695 KiB/s
main warning: PTS is out of range (95422463023), dropping buffer
main debug: removing module "access_http"
stream_filter_httplive info: downloaded segment 8 from stream 0
main warning: clock gap, unexpected stream discontinuity
main warning: feeding synchro with a new reference point trying to
recover from clock gap
main warning: received buffer in the future
main warning: buffer too late  (174660), up-sampling
main warning: picture is too late to be displayed (missing 95423820 ms)
main warning: picture is too late to be displayed (missing 95423753 ms)
main warning: picture is too late to be displayed (missing 95423687 ms)
main warning: picture is too late to be displayed (missing 95423620 ms)
main warning: picture is too late to be displayed (missing 95423553 ms)




Best Regards


More information about the ffmpeg-user mailing list