[FFmpeg-user] ffmpeg conversion of mkv-extracted video & audio to mpg container fails, hangs CPU, requires `kill` ?

darx at sent.com darx at sent.com
Wed Jun 12 20:53:00 CEST 2013


Hi,

I have a test_video.mkv that plays/streams on all my devices without
problem.

I'm trying to convert it to a VIDEO_TS structure to burn to a DVD.

As it's got multiple audio tracks, Avidemux/release doesn't do it for
now.

So, I'm doing a multi-step manual process:

	mkvinfo
	mkvextract
	ffmpeg
	dvdauthor

The ffmpeg step starts, but eventually hangs -- pegging 1/4 CPUs, and
just sits there -- until I kill it.

I've no idea why it's hanging;  any advice would be appreciated.

Details of the process are:

	mkvinfo test_video.mkv
		...
		|+ Segment tracks
		| + A track
		|  + Track number: 1 (track ID for mkvmerge &
		mkvextract: 0)
		|  + Track UID: 681921945
		|  + Track type: video
		|  + Lacing flag: 0
		|  + Codec ID: V_MPEG4/ISO/AVC
		|  + CodecPrivate, length 51 (h.264 profile: High @L3.1)
		|  + Default duration: 41.708ms (23.976 frames/fields
		per second for a video track)
		|  + Default flag: 1
		|  + MinCache: 1
		|  + Video track
		|   + Pixel width: 704
		|   + Pixel height: 352
		|   + Display width: 834
		|   + Display height: 352
		| + A track
		|  + Track number: 2 (track ID for mkvmerge &
		mkvextract: 1)
		|  + Track UID: 529668650
		|  + Track type: audio
		|  + Lacing flag: 0
		|  + Codec ID: A_AAC
		|  + CodecPrivate, length 2
		|  + Language: eng
		|  + Default flag: 1
		|  + Audio track
		|   + Sampling frequency: 48000
		|   + Channels: 2
		| + A track
		|  + Track number: 3 (track ID for mkvmerge &
		mkvextract: 2)
		|  + Track UID: 1938833052
		|  + Track type: audio
		|  + Lacing flag: 0
		|  + Codec ID: A_AC3
		|  + Language: eng
		|  + Default flag: 0
		|  + Audio track
		|   + Sampling frequency: 48000
		|   + Channels: 6
		|+ Cluster

	mkvextract tracks "test_video.mkv" 0:v_out.mpg 1:a_out_2ch.aac
	2:a_out_6ch.ac3

then with

	ffmpeg -version
		ffmpeg version N-53971-g73d5cf8
		built on Jun 11 2013 11:31:12 with gcc 4.8 (SUSE Linux)
		configuration: --prefix=/usr/local
		--shlibdir=/usr/local/lib64
		--mandir=/usr/local/share/man --libdir=/usr/local/lib64
		--enable-shared --disable-static --disable-debug
		--enable-stripping --extra-cflags='-fmessage-length=0
		-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
		-funwind-tables -fasynchronous-unwind-tables -g -fPIC
		-I/usr/include/gsm' --enable-vaapi --enable-vda
		--enable-vdpau --enable-gpl --enable-x11grab
		--enable-version3 --enable-pthreads --enable-avfilter
		--disable-libpulse --enable-libvpx --enable-libopus
		--enable-libass --enable-libmp3lame --enable-libvorbis
		--enable-libtheora --enable-libspeex --enable-libxvid
		--enable-libx264 --enable-libschroedinger
		--enable-libgsm --enable-libopencore-amrnb
		--enable-libopencore-amrwb --enable-postproc
		--enable-libdc1394 --enable-librtmp --enable-libfreetype
		--enable-avresample --enable-libtwolame
		--enable-libvo-aacenc
		libavutil      52. 35.100 / 52. 35.100
		libavcodec     55. 16.100 / 55. 16.100
		libavformat    55.  8.102 / 55.  8.102
		libavdevice    55.  2.100 / 55.  2.100
		libavfilter     3. 75.101 /  3. 75.101
		libavresample   1.  1.  0 /  1.  1.  0
		libswscale      2.  3.100 /  2.  3.100
		libswresample   0. 17.102 /  0. 17.102
		libpostproc    52.  3.100 / 52.  3.100

the conversion to .mpg continer fails,

	ffmpeg -i v_out.mpg -i a_out_2ch.aac -i a_out_6ch.ac3 -target
	ntsc-dvd test_video.mpg
		...
		[audio format for output stream 0:1 @ 0x2ab0ba0] Setting
		'channel_layouts' to value
		'0x4|0x3|0x103|0x7|0x603|0x33|0x107|0x607|0x37|0xc|0xb|0x10b|0xf|0x60b|0x3b|0x10f|0x60f|0x3f'
		[AVFilterGraph @ 0x2483fc0] query_formats: 4 queried, 9
		merged, 0 already done, 0 delayed
		[mpeg2video @ 0x2484b80] intra_quant_bias = 96
		inter_quant_bias = 0
		Output #0, dvd, to 'test_video.mpg':
		  Metadata:
		    encoder         : Lavf55.8.102
		    Stream #0:0, 0, 1/90000: Video: mpeg2video, yuv420p,
		    720x480 [SAR 128:81 DAR 64:27], 1001/30000, q=2-31,
		    6000 kb/s, 90k tbn, 29.97 tbc
		    Stream #0:1, 0, 1/90000: Audio: ac3, 48000 Hz,
		    5.1(side), fltp, 448 kb/s
		Stream mapping:
		  Stream #0:0 -> #0:0 (h264 -> mpeg2video)
		  Stream #2:0 -> #0:1 (ac3 -> ac3)
		Press [q] to stop, [?] for help
		[h264 @ 0x2b97740] no picture 
		[h264 @ 0x2bdc420] no picture 
		[dvd @ 0x2484600] First SCR: 0 First DTS: 45000
		*** drop!
		    Last message repeated 409 times
		*** drop!11 fps=0.0 q=2.0 size=      10kB
		time=00:00:00.31 bitrate= 260.3kbits/s dup=0 drop=410    
		    Last message repeated 479 times
		( ... ~ 800 of these ... )
		*** drop!78 fps=0.4 q=6.4 size=    2198kB
		time=00:00:02.55 bitrate=7048.3kbits/s dup=0 drop=204728 
		    Last message repeated 550 times
		*** drop!78 fps=0.4 q=6.4 size=    2198kB
		time=00:00:02.55 bitrate=7048.3kbits/s dup=0 drop=205279 
		    Last message repeated 531 times
		[output stream 0:0 @ 0x2aa6320] EOF on sink link output
		stream 0:0:default.
		*** drop!
		    Last message repeated 5 times
		EOF on sink link output stream
		0:1:default.ime=02:23:00.02 bitrate=   2.1kbits/s dup=0
		drop=205817    
		No more output streams to write to, finishing.


Clearly there's some issue with the "no picture" and "no more output
streams".

What, specifically, might I be doing wrong here?

darx


More information about the ffmpeg-user mailing list