[FFmpeg-user] MPEG-TS trouble

roko roko98 at yahoo.com
Wed Mar 21 06:33:01 CET 2012


Hi all

I'm doing some testing with and IP camera.  If I do this:

ffmpeg -i rtsp://admin:admin@192.168.99.146/11 -vcodec copy -y -r 25 algo.mp4
...

Input #0, rtsp, from 'rtsp://admin:admin@192.168.99.146/11':                    
  Metadata:
    title           : \11
  Duration: N/A, start: 0.039956, bitrate: N/A
    Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 640x480, 25 tbr, 90k tbn, 180k tbc
Output #0, mp4, to 'algo.mp4':
  Metadata:
    title           : \11
    encoder         : Lavf53.31.100
    Stream #0:0: Video: h264 (![0][0][0] / 0x0021), yuv420p, 640x480, q=2-31, 90k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)

...

It works fine, I can play the file anywhere.  But, if I do this:

ffmpeg -i rtsp://admin:admin@192.168.99.146/11 -vcodec copy -y -r 25 algo.ts

I get an error:

[mpegts @ 0x666660] H.264 bitstream malformed, no startcode found, use the 
h264_mp4toannexb bitstream filter 
av_interleaved_write_frame(): Invalid data found when processing input 


If I include the filter, like this:

fmpeg -i rtsp://admin:admin@192.168.99.146/11 -vcodec copy -y -r 25 -vbsf h264_mp4toannexb algo.ts

The error changes to:

Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument 
[mpegts @ 0x666660] H.264 bitstream malformed, no startcode found, use the 
h264_mp4toannexb bitstream filter av_interleaved_write_frame(): Invalid data found when processing input 

Pls forgive me if I'm missing something very basic here.  I want to save the file to MPEG-TS without any transcoding.  

    Thx.


More information about the ffmpeg-user mailing list