[FFmpeg-user] Extracting avc from sec file
journeyman.05 at gmail.com
Wed Apr 19 16:41:02 EEST 2017
I've got a pile of these samsung dvr (.sec) files which appear to be avc in
mediaInfo, but I'm having trouble pulling the stream out successfully.
I've found multiple (old) mentions online suggesting "ffmpeg -i inputfile
-c:v copy output.avi" but this outputs two errors:
"H.264 bitstream malformed, no startcode found, use the video bitstream
filter h264_mp4toannexb to fix it"
"av_interleaved_write_frame(): Invalid data found when processing input"
I've tried adding the bsf, but then I get this:
"Packet header is not contained in global extradata, corrupted stream or
invalid MP4/AVCC bitstream"
"Error initializing bitsream filter: h264_mp4toannexb"
For kicks, I also tried this:
ffmpeg -i inputfile -c:v libx264 output.mp4
It actually kind of did something--every few frames it threw an error about
an Invalid NAL unit, an a whole slew of other errors less frequently, BUT
it actually created an mp4 containing the video, albeit sped up and in
black and white. It got me thinking that the data is somehow accessible,
but it's beyond my ability to diagnose.
It seems that the .sec file I'm trying must have some kind of proprietary
junk tossed in all around it; it plays fine in the special player
application but I'm looking to be able to do more with the video.
Would anyone mind taking a look? I'd appreciate any suggestions on how I
might wrangle this!
More information about the ffmpeg-user