1

I have captured a SIP point to point video call using wireshark and I used the program 'videosnarf' on Ubuntu 12.04 to extract the raw H.264 stream from the PCAP. I am having some problems with ffmpeg when trying to convert it to MP4. Below is the ffprobe output:

[STREAM]
index=0
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
codec_type=video
codec_time_base=1/2400000
codec_tag_string=[0][0][0][0]
codec_tag=0x0000
width=704
height=396
has_b_frames=0
sample_aspect_ratio=1:1
display_aspect_ratio=16:9
pix_fmt=yuv420p
level=51
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/1200000
start_time=N/A
duration=N/A
[/STREAM]

Here is the command I used to generate the MP4:

ffmpeg -f h264 -i H264-media-3.264 -vcodec copy output.mp4

When I transfer the file to my Windows PC, I can't open the file in VLC. When opening in Windows Media Player (not sure the version but it's on Windows 8) it plays but very quickly (almost as if it's playing in fast forward. I also tried with:

ffmpeg -f h264 -i H264-media-3.264 -vcodec copy -r 25 output.mp4

I am able to play the raw H.264 stream using "MPC-HC" on Windows but I need it in MP4 format.

Daniel
  • 53
  • 2
  • 8
  • I don't think there is anything wrong with the way you are invoking ffmpeg. I have done something similar in the recent past and this ffmpeg command does work fine. ( Output does work fine with VLC). I guess there could be something missing in the H.264 bit-stream itself. Do you see NAL Access Unit Delimiter in the H.264 bit-stream? -Mukesh – Mukesh Mar 30 '15 at 20:12

0 Answers0