[FFmpeg-user] Transport Stream with h264 (Constrained baseline)/aac encoding for HLS streaming
Jay
jmuthialu at yahoo.com
Tue Sep 9 04:39:27 CEST 2014
Hello,
I am looking for ffmpeg command to do live streaming (.ts files) encoded by h264 (Constrained Baseline) + aac from an AV source (Ex: Webcam). I tried several attempts and till now I have not found a way to accomplish this. I could get .ts files encoded with mpeg2video, but this will not work with Apple's HLS implementation. Any guidance would be greatly appreciated.
Command used (OS: Windows)
>ffmpeg -f dshow -i video="USB2.0 Camera":audio="Microphone (Realtek High Definition Audio)" -r 29.97 -bsf h264_mp4toannexb -codec:v libx264 -codec:a libvo_aacenc -pix_fmt yuv420p -vprofile baseline -level 2.1 -f segment -segment_list Test\pindex.m3u8 -segment_time 10 Test\out%03d.ts
Output message:
Output #0, segment, to 'Test\out%03d.ts':
Metadata:
encoder : Lavf56.4.100
Stream #0:0: Video: h264 (libx264), yuv420p, 640x480, q=-1--1, 29.97 fps, 29
.97 tbn, 29.97 tbc
Metadata:
encoder : Lavc56.1.100 libx264
Stream #0:1: Audio: aac (libvo_aacenc), 44100 Hz, stereo, s16, 128 kb/s
Metadata:
encoder : Lavc56.1.100 libvo_aacenc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (libvo_aacenc))
Press [q] to stop, [?] for help
frame= 36 fps=0.0 q=0.0 size=N/A time=00:00:00.97 bitrate=N/A dup=32 drop=0
[libx264 @ 0000000006676a00] Packet header is not contained in global extradata,
corrupted stream or invalid MP4/AVCC bitstream
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec libx264
: Invalid argument
[mpegts @ 0000000004518020] H.264 bitstream malformed, no startcode found, use t
he video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb
' option with ffmpeg)
av_interleaved_write_frame(): Invalid data found when processing input
[libx264 @ 0000000006676a00] Packet header is not contained in global extradata,
corrupted stream or invalid MP4/AVCC bitstream
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec libx264
: Invalid argument
[libx264 @ 0000000006676a00] Packet header is not contained in global extradata,
corrupted stream or invalid MP4/AVCC bitstream
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec libx264
: Invalid argument
frame= 50 fps= 42 q=-1.0 Lsize=N/A time=00:00:01.50 bitrate=N/A dup=43 drop=0
video:28kB audio:24kB subtitle:0kB other streams:0kB global headers:0kB muxing o
verhead: unknown
[libx264 @ 0000000006676e60] frame I:1 Avg QP:17.91 size: 26705
[libx264 @ 0000000006676e60] frame P:49 Avg QP:20.37 size: 1267
[libx264 @ 0000000006676e60] mb I I16..4: 16.1% 0.0% 83.9%
[libx264 @ 0000000006676e60] mb P I16..4: 0.2% 0.0% 0.1% P16..4: 12.7% 2.7
% 1.1% 0.0% 0.0% skip:83.1%
[libx264 @ 0000000006676e60] coded y,uvDC,uvAC intra: 87.4% 98.6% 78.3% inter: 4
.3% 14.2% 0.3%
[libx264 @ 0000000006676e60] i16 v,h,dc,p: 3% 8% 2% 87%
[libx264 @ 0000000006676e60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 28% 15% 6% 7%
5% 6% 4% 9%
[libx264 @ 0000000006676e60] i8c dc,h,v,p: 58% 23% 13% 6%
[libx264 @ 0000000006676e60] ref P L0: 95.6% 3.4% 1.0%
[libx264 @ 0000000006676e60] kb/s:425.67
Conversion failed!
Thanks
Jay
More information about the ffmpeg-user
mailing list