[vlc-devel] WORKS: Help with Transcoding

Kuldipsingh Pabla Kuldipsingh.Pabla at Sun.COM
Fri Apr 7 18:24:53 CEST 2006


Hi VLC Gurus,

Replay of the transcoded file works for me now. While debugging the 
issue, I found that *printf calls (like vprintf, sprintf,....) are the 
main cause of segmentation faults on Solaris (not sure about other Unix 
flavors). If the calling function passes a NULL value to *printf 
functions, the *printf do not check for NULL and replace them with "". 
As a result, they run into SEGFAULT. This is applicable to all the calls 
to *print calls on Solaris. So my question is how should this be fixed 
in the trunk? Should I provide you patches for all the *printf calls? Or 
  any other way??

-Kuldip

Kuldipsingh Pabla wrote:
> Hi VLC Gurus,
> 
> I am stuck with a few problems and would appreciate your help with them.
> 
> 
> 1) I am trying to transcode an mpeg2 file to a low resolution mpeg4 
> files. I am using the following command to do the transcode
> ./bin/vlc -vvv <filename.mpeg2> 
> :sout='#transcode{vcodec=mp4v,acodec=mp4a}:std{access=file,mux=mp4,url=/tmp/out.mp4}' 
> 
> I am able to generate .mp4 file. Unfortunately, I am not able to replay 
> the file. It segfaults. I am attaching the output.
> 
> 2) How can I display a clip and transcode it simultaneously?
> 
> 
> Thanx in advance,
> 
> -Kuldip
> 
> 
> ------------------------------------------------------------------------
> 
> VLC media player 0.8.5-test2 Janus
> [00000001] main vlc debug: checking builtin modules
> [00000001] main vlc debug: checking plugin modules
> [00000001] main vlc debug: loading plugins cache file /export/home/kuldeep/.vlc/cache/plugins-04041e.dat
> [00000001] main vlc debug: recursively browsing `modules'
> [00000001] main vlc debug: recursively browsing `/export/home/vlc/build/lib/vlc'
> [00000001] main vlc debug: recursively browsing `plugins'
> [00000001] main vlc debug: module bank initialized, found 182 modules
> [00000001] main vlc debug: opening config file /export/home/kuldeep/.vlc/vlcrc
> [00000001] main vlc warning: config file /export/home/kuldeep/.vlc/vlcrc does not exist yet
> [00000001] main vlc debug: CPU has capabilities 486 586 MMX 3DNow! MMXEXT FPU 
> [00000001] main vlc debug: looking for memcpy module: 4 candidates
> [00000001] main vlc debug: using memcpy module "memcpymmxext"
> [00000231] main playlist debug: waiting for thread completion
> [00000231] main playlist debug: thread 2 (playlist) created at priority 0 (playlist/playlist.c:184)
> [00000232] main private debug: waiting for thread completion
> [00000232] main private debug: thread 3 (preparser) created at priority 0 (playlist/playlist.c:210)
> [00000233] main interface debug: looking for interface module: 1 candidate
> [00000233] main interface debug: using interface module "hotkeys"
> [00000233] main interface debug: thread 4 (interface) created at priority 0 (interface/interface.c:231)
> [00000235] main interface debug: looking for interface module: 3 candidates
> [00000235] main interface debug: using interface module "screensaver"
> [00000235] main interface debug: thread 5 (interface) created at priority 0 (interface/interface.c:231)
> [00000231] main playlist debug: adding playlist item `/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2' ( /export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2 )
> [00000237] main interface debug: looking for interface module: 2 candidates
> [00000237] main interface debug: using interface module "wxwidgets"
> [00000237] main interface debug: thread 6 (manager) created at priority 0 (interface/interface.c:216)
> [00000231] main playlist debug: nothing requested, starting
> [00000231] main playlist debug: creating new input thread
> [00000240] main input debug: waiting for thread completion
> [00000240] main input debug: thread 7 (input) created at priority 0 (input/input.c:261)
> [00000240] main input debug: creating statistics handler
> [00000242] main stream output debug: stream=`transcode'
> [00000243] main private debug: looking for sout stream module: 1 candidate
> [00000242] main stream output debug: stream=`std'
> [00000246] main private debug: looking for sout stream module: 1 candidate
> [00000246] main private debug: set sout option: sout-standard-access to file
> [00000246] main private debug: set sout option: sout-standard-mux to mp4
> [00000246] main private warning: Option sout-standard-url is deprecated. You should use sout-standard-dst instead.
> [00000246] main private debug: set sout option: sout-standard-dst to /tmp/out.mp4
> [00000246] stream_out_standard private debug: creating `file/mp4:///tmp/out.mp4'
> [00000246] stream_out_standard private debug: extention is mp4
> [00000246] stream_out_standard private debug: extention -> mux=mp4
> [00000246] stream_out_standard private debug: using `file/mp4:///tmp/out.mp4'
> [00000248] main private debug: looking for sout access module: 1 candidate
> [00000248] access_output_file private debug: file access output opened (`/tmp/out.mp4')
> [00000248] main private debug: using sout access module "access_output_file"
> [00000246] stream_out_standard private debug: access opened
> [00000250] main private debug: looking for sout mux module: 1 candidate
> [00000250] mux_mp4 private debug: Mp4 muxer opend
> [00000250] main private debug: using sout mux module "mux_mp4"
> [00000246] stream_out_standard private debug: mux opened
> [00000246] main private debug: using sout stream module "stream_out_standard"
> [00000243] main private debug: set sout option: sout-transcode-vcodec to mp4v
> [00000243] main private debug: set sout option: sout-transcode-acodec to mp4a
> [00000243] main private warning: option aout is unknown
> [00000243] stream_out_transcode private debug: codec audio=mp4a 0Hz 0 channels 64Kb/s
> [00000243] stream_out_transcode private warning: bad aspect ratio 
> [00000243] stream_out_transcode private debug: codec video=mp4v 0x0 scaling: 1.000000 800kb/s
> [00000243] main private debug: using sout stream module "stream_out_transcode"
> [00000240] main input debug: `/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2' gives access `' demux `' path `/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2'
> [00000240] main input debug: creating demux: access='' demux='' path='/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2'
> [00000252] main demuxer debug: looking for access_demux module: 0 candidates
> [00000252] main demuxer warning: no access_demux module matched "any"
> [00000240] main input debug: creating access '' path='/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2'
> [00000253] main access debug: looking for access2 module: 2 candidates
> [00000253] access_file access debug: opening file `/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2'
> [00000253] main access debug: using access2 module "access_file"
> [00000257] main private debug: pre-buffering...
> [00000257] main private debug: received first data for our buffer
> [00000257] main private debug: pre-buffering done 1408981 bytes in 0s - 410979 kbytes/s
> [00000240] main input debug: creating demux: access='' demux='' path='/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2'
> [00000258] main demuxer debug: looking for demux2 module: 38 candidates
> [00000258] ts demuxer warning: TS module discarded (lost sync)
> [00000258] main demuxer debug: using demux2 module "ps"
> [00000240] main input debug: looking for a subtitle file in /export/home/vams/clips/playlist/
> [00000240] main input debug: starting in asynch mode
> [00000240] main input debug: `/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2' successfully opened
> [00000240] main input debug: selecting program id=0
> [00000290] main packetizer debug: looking for packetizer module: 15 candidates
> [00000290] main packetizer debug: using packetizer module "mpeg_audio"
> [00000240] main input debug: stream out mode -> no decoder thread
> [00000290] mpeg_audio packetizer debug: MPGA channels:2 samplerate:48000 bitrate:192
> [00000242] main stream output debug: adding a new input
> [00000243] stream_out_transcode private debug: creating audio transcoding from fcc=`mpga' to fcc=`mp4a'
> [00000315] main decoder debug: looking for decoder module: 18 candidates
> [00000315] main decoder debug: using decoder module "mpeg_audio"
> [00000316] main encoder debug: looking for encoder module: 4 candidates
> [00000316] ffmpeg encoder debug: libavcodec initialized (interface 3277056 )
> [00000316] ffmpeg encoder debug: found encoder MPEG AAC Audio
> [00000316] main encoder debug: using encoder module "ffmpeg"
> [00000321] main private debug: looking for audio filter2 module: 3 candidates
> [00000321] mpgatofixed32 private debug: mpga->fl32, bits per sample: 0
> [00000321] main private debug: using audio filter2 module "mpgatofixed32"
> [00000324] main private debug: looking for audio filter2 module: 3 candidates
> [00000324] audio_format private debug: fl32->s16l, bits per sample: 32
> [00000324] main private debug: using audio filter2 module "audio_format"
> [00000250] main private debug: adding a new input
> [00000250] mux_mp4 private debug: adding input
> [00000315] mpeg_audio decoder debug: MPGA channels:2 samplerate:48000 bitrate:192
> [00000328] main packetizer debug: looking for packetizer module: 15 candidates
> [00000328] main packetizer debug: using packetizer module "packetizer_mpegvideo"
> [00000240] main input debug: stream out mode -> no decoder thread
> [00000328] packetizer_mpegvideo packetizer debug: size 720x480 fps=29.970
> [00000242] main stream output debug: adding a new input
> [00000243] stream_out_transcode private debug: creating video transcoding from fcc=`mpgv' to fcc=`mp4v'
> [00000329] main decoder debug: looking for decoder module: 18 candidates
> [00000329] main decoder debug: using decoder module "libmpeg2"
> [00000330] main encoder debug: looking for encoder module: 4 candidates
> [00000330] ffmpeg encoder debug: libavcodec already initialized
> [00000330] ffmpeg encoder debug: found encoder MPEG-4 Video
> [00000330] main encoder debug: using encoder module "ffmpeg"
> [00000330] main encoder debug: removing module "ffmpeg"
> [00000329] libmpeg2 decoder debug: 720x480 (display 720,480), aspect 576000, sar 8:9, 29.971 fps
> [00000331] main private warning: dts != current_pts (94212)
> [00000243] stream_out_transcode private debug: decoder aspect is 576000:432000
> [00000243] stream_out_transcode private debug: source pixel aspect is 0.888889:1
> [00000243] stream_out_transcode private debug: scaled pixel aspect is 0.888889:1
> [00000243] stream_out_transcode private debug: source 720x480, crop 720x480, destination 720x480, padding 720x480
> [00000243] stream_out_transcode private debug: encoder aspect is 576000:432000
> [00000330] main encoder debug: looking for encoder module: 4 candidates
> [00000330] ffmpeg encoder debug: libavcodec already initialized
> [00000330] ffmpeg encoder debug: found encoder MPEG-4 Video
> [00000330] main encoder debug: using encoder module "ffmpeg"
> [00000250] main private debug: adding a new input
> [00000250] mux_mp4 private debug: adding input
> [00000331] main private warning: backward_pts != current_pts (-33367)
> [00000240] main input debug: EOF reached
> [00000240] main input debug: closing input
> [00000290] main packetizer debug: removing module "mpeg_audio"
> [00000290] main packetizer debug: killing decoder fourcc `mpga', 0 PES in FIFO
> [00000242] main stream output debug: removing an input
> [00000315] main decoder debug: removing module "mpeg_audio"
> [00000316] main encoder debug: removing module "ffmpeg"
> [00000321] main private debug: removing module "mpgatofixed32"
> [00000324] main private debug: removing module "audio_format"
> [00000250] mux_mp4 private debug: removing input
> [00000328] main packetizer debug: removing module "packetizer_mpegvideo"
> [00000328] main packetizer debug: killing decoder fourcc `mpgv', 0 PES in FIFO
> [00000242] main stream output debug: removing an input
> [00000329] main decoder debug: removing module "libmpeg2"
> [00000330] main encoder debug: removing module "ffmpeg"
> [00000250] mux_mp4 private debug: removing input
> [00000250] main private warning: no more input streams for this mux
> [00000240] main input debug: Program doesn't contain anymore ES
> [00000258] main demuxer debug: removing module "ps"
> [00000253] main access debug: removing module "access_file"
> [00000240] main input debug: destroying sout
> [00000243] main private debug: destroying chain... (name=transcode)
> [00000246] main private debug: destroying chain... (name=std)
> [00000250] mux_mp4 private debug: Close
> [00000250] mux_mp4 private debug: movie duration 9s
> [00000250] mux_mp4 private debug: created 278 chunks (stco)
> [00000250] mux_mp4 private debug: created 279 chunks (stco)
> [00000250] main private debug: removing module "mux_mp4"
> [00000248] access_output_file private debug: file access output closed
> [00000248] main private debug: removing module "access_output_file"
> [00000246] main private debug: removing module "stream_out_standard"
> [00000246] main private debug: destroying chain done
> [00000243] main private debug: removing module "stream_out_transcode"
> [00000243] main private debug: destroying chain done
> [00000240] main input debug: thread 7 joined (input/input.c:403)
> [00000231] main playlist: nothing to play
> [00000001] main vlc debug: removing all interfaces
> [00000237] main interface debug: thread 6 joined (interface/interface.c:258)
> [00000237] main interface debug: removing module "wxwidgets"
> [00000235] main interface debug: thread 5 joined (interface/interface.c:258)
> [00000235] main interface debug: removing module "screensaver"
> [00000233] main interface debug: thread 4 joined (interface/interface.c:258)
> [00000233] main interface debug: removing module "hotkeys"
> [00000001] main vlc debug: removing playlist handler
> [00000232] main private debug: thread 3 joined (playlist/playlist.c:247)
> [00000231] main playlist debug: thread 2 joined (playlist/playlist.c:248)
> [00000231] main playlist: stopping playback
> [00000231] main playlist debug: deleting playlist item `/export/home/vams/clips/playlist/11188cea-5692-4150-96a8-b0cf47d03133.mpeg2'
> [00000001] main vlc debug: removing all video outputs
> [00000001] main vlc debug: removing all audio outputs
> [00000001] main vlc debug: removing module "memcpymmxext"
> [00000001] main vlc debug: opening config file /export/home/kuldeep/.vlc/vlcrc
> [00000001] main vlc warning: config file /export/home/kuldeep/.vlc/vlcrc does not exist yet
> [00000001] main vlc debug: saving plugins cache file /export/home/kuldeep/.vlc/cache/plugins-04041e.dat
> 
> 
> ------------------------------------------------------------------------
> 
> VLC media player 0.8.5-test2 Janus
> [00000001] main vlc debug: checking builtin modules
> [00000001] main vlc debug: checking plugin modules
> [00000001] main vlc debug: loading plugins cache file /export/home/kuldeep/.vlc/cache/plugins-04041e.dat
> [00000001] main vlc debug: recursively browsing `modules'
> [00000001] main vlc debug: recursively browsing `/export/home/vlc/build/lib/vlc'
> [00000001] main vlc debug: recursively browsing `plugins'
> [00000001] main vlc debug: module bank initialized, found 182 modules
> [00000001] main vlc debug: opening config file /export/home/kuldeep/.vlc/vlcrc
> [00000001] main vlc debug: CPU has capabilities 486 586 MMX 3DNow! MMXEXT FPU 
> [00000001] main vlc debug: looking for memcpy module: 4 candidates
> [00000001] main vlc debug: using memcpy module "memcpymmxext"
> [00000231] main playlist debug: waiting for thread completion
> [00000231] main playlist debug: thread 2 (playlist) created at priority 0 (playlist/playlist.c:184)
> [00000232] main private debug: waiting for thread completion
> [00000232] main private debug: thread 3 (preparser) created at priority 0 (playlist/playlist.c:210)
> [00000233] main interface debug: looking for interface module: 1 candidate
> [00000233] main interface debug: using interface module "hotkeys"
> [00000233] main interface debug: thread 4 (interface) created at priority 0 (interface/interface.c:231)
> [00000235] main interface debug: looking for interface module: 3 candidates
> [00000235] main interface debug: using interface module "screensaver"
> [00000235] main interface debug: thread 5 (interface) created at priority 0 (interface/interface.c:231)
> [00000231] main playlist debug: adding playlist item `/tmp/out.mp4' ( /tmp/out.mp4 )
> [00000237] main interface debug: looking for interface module: 2 candidates
> [00000237] main interface debug: using interface module "wxwidgets"
> [00000237] main interface debug: thread 6 (manager) created at priority 0 (interface/interface.c:216)
> [00000237] wxwidgets interface debug: Using last windows config '(-1,0,0,1024,768)(0,6,24,371,88)(6,0,0,-1,150)'
> [00000237] wxwidgets interface debug: id=0 p=(6,24) s=(371,88)
> [00000237] wxwidgets interface debug: id=6 p=(0,0) s=(-1,150)
> [00000231] main playlist debug: nothing requested, starting
> [00000231] main playlist debug: creating new input thread
> [00000240] main input debug: waiting for thread completion
> [00000240] main input debug: thread 7 (input) created at priority 0 (input/input.c:261)
> [00000240] main input debug: creating statistics handler
> [00000240] main input debug: `/tmp/out.mp4' gives access `' demux `' path `/tmp/out.mp4'
> [00000240] main input debug: creating demux: access='' demux='' path='/tmp/out.mp4'
> [00000242] main demuxer debug: looking for access_demux module: 0 candidates
> [00000242] main demuxer warning: no access_demux module matched "any"
> [00000240] main input debug: creating access '' path='/tmp/out.mp4'
> [00000243] main access debug: looking for access2 module: 2 candidates
> [00000243] access_file access debug: opening file `/tmp/out.mp4'
> [00000243] main access debug: using access2 module "access_file"
> [00000247] main private debug: pre-buffering...
> [00000247] main private debug: received first data for our buffer
> [00000240] main input debug: creating demux: access='' demux='' path='/tmp/out.mp4'
> [00000248] main demuxer debug: looking for demux2 module: 38 candidates
> [00000247] mp4 private debug: found Box: ftyp size 20
> [00000247] mp4 private debug: found Box: moov size 11071
> [00000247] mp4 private debug: found Box: mvhd size 108
> [00000247] mp4 private debug: read box: "mvhd" creation 732328d-33h:14m:11s modification 732328d-33h:14m:11s time scale 90000 duration 694977d-48h:00m:12s rate 1.000000 volume 1.000000 next track id 3
> [00000247] mp4 private debug: found Box: trak size 6220
> [00000247] mp4 private debug: found Box: tkhd size 92
> [00000247] mp4 private debug: read box: "tkhd" creation 732328d-33h:14m:11s modification 732328d-33h:14m:11s duration -1526404507d-35h:28m:00s track ID 1 layer 0 volume 1.000000 width 0.000000 height 0.000000
> [00000247] mp4 private debug: found Box: edts size 48
> [00000247] mp4 private debug: found Box: elst size 40
> [00000247] mp4 private debug: read box: "elst" entry-count 0
> [00000247] mp4 private debug: out of bound child
> [00000247] mp4 private debug: found Box: mdia size 6072
> [00000247] mp4 private debug: found Box: mdhd size 32
> [00000247] mp4 private debug: read box: "mdhd" creation 732328d-33h:14m:11s modification 732328d-33h:14m:11s time scale 48000 duration 694982d-51h:26m:56s language ```
> [00000247] mp4 private debug: found Box: hdlr size 45
> [00000247] mp4 private debug: read box: "hdlr" handler type soun name SoundHandler
> [00000247] mp4 private debug: found Box: minf size 5987
> [00000247] mp4 private debug: found Box: smhd size 16
> [00000247] mp4 private debug: read box: "smhd" balance 0.000000
> [00000247] mp4 private debug: found Box: dinf size 36
> [00000247] mp4 private debug: found Box: dref size 28
> [00000247] mp4 private debug: found Box: url  size 12

-- 
Project Buz :: Orchestrated Communication :: http://software.sfbay/buz

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list