[FFmpeg-user] "Packet header is not contained in global metadata" when segmenting and encoding x264

Christian Ebert blacktrash at gmx.net
Wed Jul 23 14:46:03 CEST 2014


* Werner Robitza on Wednesday, July 23, 2014 at 13:53:51 +0200
> On Wed, Jul 23, 2014 at 12:42 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>> Why are you using a bitstream filter when re-encoding?
>> The normal usecase for a bitstream filter is remuxing.
> 
> If I don't use it, e.g.
> 
> ffmpeg -y -i tmp/tmpPass2.mp4 -c:v libx264 -acodec copy -map 0 -f
> segment -segment_time 5 -segment_format mpegts
> ./tsSegmentsDisplay/SRC04_Q1_%05d.ts
> 
> I get:
> 
> [mpegts @ 0x41437e0] H.264 bitstream malformed, no startcode found,
> use the h264_mp4toannexb bitstream filter (-bsf h264_mp4toannexb)

I guess you just want to copy (-c copy both video and audio), not
re-encode (-c:v libx264):

ffmpeg -y -i tmp/tmpPass2.mp4 -c copy -bsf:v h264_mp4toannexb
-map 0 -f segment -segment_time 5 -segment_format mpegts
./tsSegmentsDisplay/SRC04_Q1_%05d.ts

-- 
\black\trash movie           _COWBOY  CANOE  COMA_
            Ein deutscher Western/A German Western

--->> http://www.blacktrash.org/underdogma/ccc.php


More information about the ffmpeg-user mailing list