Questions tagged [h.264]

H.264/MPEG-4 Part 10 or AVC (Advanced Video Coding) is a standard for video compression

h.264
Filter by
Sorted by
Tagged with
984 votes
31 answers
1.0m views

How to concatenate two MP4 files using FFmpeg? [closed]

I'm trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I'm converting the two files into .ts files and then concatenating them and ...
Mark L's user avatar
  • 12.9k
359 votes
7 answers
172k views

FFMPEG (libx264) "height not divisible by 2"

I am trying to encode a .mp4 video from a set of frames using FFMPEG using the libx264 codec. This is the command I am running: /usr/local/bin/ffmpeg -r 24 -i frame_%05d.jpg -vcodec libx264 -y -an ...
Andy Hin's user avatar
  • 30.8k
104 votes
1 answer
83k views

Possible Locations for Sequence/Picture Parameter Set(s) for H.264 Stream

I'm working on a H.264 Decoder and I'm wondering where to find the SPS and PPS. My reference literature tells me that those are NAL Units encoded in the H.264-Stream, but when I look into an example-...
bananenbär's user avatar
  • 1,145
99 votes
5 answers
366k views

ffmpeg usage to encode a video to H264 codec format

I have a *.mp4 video file(MPEG4 video codec) and I am trying to convert this to a H264 video codec format(raw h.264 format) using ffmpeg on Linux(Version - FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, ...
goldenmean's user avatar
  • 18.7k
79 votes
7 answers
59k views

How to use VideoToolbox to decompress H.264 video stream

I had a lot of trouble figuring out how to use Apple's Hardware accelerated video framework to decompress an H.264 video stream. After a few weeks I figured it out and wanted to share an extensive ...
Olivia Stork's user avatar
  • 4,720
70 votes
2 answers
263k views

What is the difference between H.264 video and MPEG-4 video? [closed]

Are these both the same? Is H.264 codec of MPEG-4? What if I need to convert flv to high definition H.264 video format? I want make online tv streaming and want to use PHP or Python.
Ravi Sharma's user avatar
  • 1,162
69 votes
3 answers
55k views

How does one encode a series of images into H264 using the x264 C API?

How does one use the x264 C API to encode RBG images into H264 frames? I already created a sequence of RBG images, how can I now transform that sequence into a sequence of H264 frames? In particular,...
Rella's user avatar
  • 65.9k
56 votes
8 answers
79k views

h264 lossless coding

Is it possible to do completely lossless encoding in h264? By lossless, I mean that if I feed it a series of frames and encode them, and then if I extract all the frames from the encoded video, I will ...
cloudraven's user avatar
  • 2,524
51 votes
3 answers
82k views

errors when decode H.264 frames using ffmpeg

I am getting the following errors when decoding H.264 frames received from the remote end of a H.264 based SIP video call. Appreciate any help in understanding there errors. non-existing PPS 0 ...
John Qualis's user avatar
  • 1,673
46 votes
4 answers
52k views

How to process raw UDP packets so that they can be decoded by a decoder filter in a directshow source filter

Long Story: There is an H264/MPEG-4 Source I can able to connect this source with RTSP protocol. I can able to get raw UDP packets with RTP protocol. Then send those raw UDP packets to a Decoder[h264/...
Novalis's user avatar
  • 2,285
44 votes
4 answers
88k views

Convert videos from .264 to .265 (HEVC) with ffmpeg

I see that there are a few questions on this subject but I am still getting errors. All I want to do is convert videos in my library to HEVC so they take up less space. I've tried this: ffmpeg -i ...
John Terragnoli's user avatar
38 votes
5 answers
67k views

Suggested Compression Ratio with H.264?

Note bene: I realize this is an immensely complicated question with about a million levels of nuance that I'm trying to reduce to a single number... I'm about to undertake a large video encoding ...
Nuby's user avatar
  • 2,378
38 votes
4 answers
36k views

How to encode Bitmaps into a video using MediaCodec?

I would like to encode a set of Bitmaps that I have into an h264. Is this possible via MediaEncoder? I have written some code in order to do it, but the output cannot be played in any media player I ...
BVB's user avatar
  • 5,400
37 votes
4 answers
46k views

Live streaming through MP4

I am working on an online TV service. One of the goals is for the video to be played without any additional browser plug-ins (except for Flash). I decided to use MP4, because it is supported by the ...
Ivo's user avatar
  • 1,683
36 votes
3 answers
70k views

How to use hardware accelerated video decoding on Android?

I need hardware-accelerated H.264 decoding for a research project, to test a self-defined protocol. As I have Search on the web, I have found a few ways to perform hardware-accelerated video decoding ...
Glenn Yu's user avatar
  • 623
36 votes
2 answers
37k views

Raw H264 frames in mpegts container using libavcodec

I would really appreciate some help with the following issue: I have a gadget with a camera, producing H264 compressed video frames, these frames are being sent to my application. These frames are ...
Ferenc Deak's user avatar
  • 34.8k
35 votes
4 answers
56k views

How to get h264 video info?

How can I get specific h264 video information from video file? I need to know profile (Baseline/Main/High) and is there B-Frames in movie?
Zelenov's user avatar
  • 983
35 votes
2 answers
40k views

How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream correctly?

I posted an same question to another community Video Production that I've found later, and which seems to be a better place for this question: See: https://video.stackexchange.com/questions/12156/how-...
kaorukobo's user avatar
  • 2,303
35 votes
3 answers
36k views

Decoding Raw H264 stream in android?

I have a project where I have been asked to display a video stream in android, the stream is raw H.264 and I am connecting to a server and will receive a byte stream from the server. Basically I'm ...
will's user avatar
  • 711
34 votes
5 answers
20k views

MediaCodec and Camera: colorspaces don't match

I have been trying to get H264 encoding to work with input captured by the camera on an Android tablet using the new low-level MediaCodec. I have gone through some difficulties with this, since the ...
gleerman's user avatar
  • 1,803
33 votes
1 answer
84k views

convert H264 video to raw YUV format

Is it possible to create a raw YUV video from H264 encoded video using ffmpeg? I want to open the video with matlab and access Luma, Cb and Cr components frame by frame.
Onur's user avatar
  • 1,155
31 votes
5 answers
57k views

Encoding H.264 from camera with Android MediaCodec

I'm trying to get this to work on Android 4.1 (using an upgraded Asus Transformer tablet). Thanks to Alex's response to my previous question, I already was able to write some raw H.264 data to a file,...
gleerman's user avatar
  • 1,803
30 votes
3 answers
19k views

What h.264 format loads on android AND IOS?

Theoretically both IOS and ANDROID will play h.264 files, but I can't figure out a setting to encode them so they actually work cross platform. Does anybody know how to encode for both Android and IOS ...
JKirchartz's user avatar
  • 17.8k
30 votes
3 answers
101k views

Embedding a live RTSP stream of H.264 video in a webpage

I have a server providing live H.264 video over a network via RTSP (rtsp://...), and I've been trying to find a way to display the stream to users in their browser (on at least Windows and OS X - ...
jstol's user avatar
  • 856
29 votes
4 answers
33k views

Fetching the dimensions of a H264Video stream

I am trying to fetch the dimensions (Height and width) from a H264 stream. I know that to fetch the same details from a mpeg2 stream you have to look at the four bytes following the sequence header ...
DRT's user avatar
  • 291
29 votes
4 answers
70k views

Thread count option in FFmpeg for FASTEST conversion to h264?

I need to maximize speed while converting videos using FFmpeg to h264 Any input format of source videos User's machine can have any number of cores Power and memory consumption are non-issues Of ...
S B's user avatar
  • 8,184
28 votes
2 answers
5k views

Decode android's hardware encoded H264 camera feed using ffmpeg in real time

I'm trying to use the hardware H264 encoder on Android to create video from the camera, and use FFmpeg to mux in audio (all on the Android phone itself) What I've accomplished so far is packetizing ...
joebobfrank's user avatar
27 votes
2 answers
16k views

Is there a downside to putting the MOOV atom at the beginning of an MP4 file?

I see tons of questions about relocating the moov atom from the end of a MP4 video container to the beginning, to make the video "web optimized" or easier to stream. It seems like most tools require ...
Coderer's user avatar
  • 26.6k
26 votes
4 answers
64k views

What does this H264 NAL Header Mean?

0000 0109 1000 0001 6742 0020 e900 800c 3200 0001 68ce 3c80 0000 0001 6588 801a As far as I know, 0000 01 is the start prefix code to identify a NAL Unit. What does "09 .... " mean? Is it the ...
NonalcoholicBeer's user avatar
26 votes
3 answers
18k views

Best video format for HTML5?

I've got a set of videos that are going to be posted on a new site I'm developing, using our new html5 player. I know Firefox only supports .ogg format, whereas most others (including eventually IE9) ...
CodeMoose's user avatar
  • 3,025
24 votes
2 answers
19k views

How to use MediaCodec without MediaExtractor for H264

I need to use MediaCodec without the MediaExtractor and I'm reading the file using a FileInputStream. Currently it is not working, it is showing a greenish scrambled image on the screen. This is the ...
thiagolr's user avatar
  • 6,947
23 votes
1 answer
47k views

extracting h264 raw video stream from mp4 or flv with ffmpeg generate an invalid stream

I'm trying to extract the video stream from an mp4 or flv h264 video (youtube video) using ffmpeg. The original video (test.flv) play without trouble with ffplay , ffprobe gives an error as follow: ...
dhia's user avatar
  • 360
23 votes
3 answers
37k views

Convert mp4 to maximum mobile supported MP4 using FFMPEG [closed]

I would like to use ffmpeg to convert an mp4 to 'low size' mp4 ... I need an mp4 file with h263 video and aac audio (or some other settings supported by low cost mobile.) My main concern is that the ...
Susheel's user avatar
  • 1,679
22 votes
1 answer
28k views

In h264 NAL units means frame.?

I am working on a h264 video codec. I want to know: Is a single NAL unit in H264 equivalent to one video frame?
Jeegar Patel's user avatar
  • 26.7k
22 votes
4 answers
32k views

Encoding FFMPEG to MPEG-DASH – or WebM with Keyframe Clusters – for MediaSource API

I'm currently sending a video stream to Chrome, to play via the MediaSource API. As I understand it, MediaSource only supports MP4 files encoded with MPEG-DASH, or WebM files that have clusters ...
Chris Nolet's user avatar
  • 8,913
22 votes
1 answer
3k views

Forcing Mpeg2Demultiplexer to use ffdshow to render H264 Digital TV Video

I spend a lot of time trying to make DTVViewer sample of DirectShow work unfortunately with no success. The video format of DVBT network is H264 and I found that the IntelliConnect behavior of ...
Bakhshi's user avatar
  • 1,339
21 votes
3 answers
10k views

Extracting h264 from CMBlockBuffer

I'm using Apple Video Toolbox framework to compress raw frames captured by the device camera. My callback is being called with a CMSampleBufferRef object that contains CMBlockBuffer. The CMBlockBuffer ...
koby's user avatar
  • 213
21 votes
3 answers
33k views

H264 frame viewer

Do you know any application that will display me all the headers/parameters of a single H264 frame? I don't need to decode it, I just want to see how it is built up.
Ferenc Deak's user avatar
  • 34.8k
21 votes
5 answers
117k views

RTSP h.264 in google chrome browser

After we are moving over to html5 and many browsers like Google chrome bans VLC web plugin.... Is there any way to play h.264 / h.265 Rtsp streams in browsers this days?
Stweet's user avatar
  • 693
21 votes
3 answers
17k views

H.264 conversion with FFmpeg (from a RTP stream)

Environment: I have an IP Camera, which is capable of streaming it's data over RTP in a H.264 encoded format. This raw stream is recorded from the ethernet. With that data I have to work. Goal: In ...
Toby's user avatar
  • 3,845
21 votes
0 answers
386 views

Incorrect presentation timestamps when seeking backwards through MP4 video

I'm using MediaCodec and MediaExtractor to play video at variable rates, both forwards and backwards. The code is using something like SpeedControlCallback to establish inter-frame pauses - feeding ...
moe's user avatar
  • 462
20 votes
3 answers
29k views

H264 with multiple PPS and SPS

I have a card that produces a H264 stream with a SPS (Sequence Parameter Set) and a PPS (Picture Parameter Set), in that order, directly before each I-Frame. I see that most H264 streams contain a PPS ...
Paul Knopf's user avatar
  • 9,644
20 votes
5 answers
49k views

How to decode H.264 video frame in Java environment

Does anyone know how to decode H.264 video frame in Java environment? My network camera products support the RTP/RTSP Streaming. The service standard RTP/RTSP from my network camera is served and it ...
user avatar
19 votes
3 answers
16k views

Parsing H264 in mdat MP4

I have a file that only contains the mdat atom in a MP4 container. The data in the mdat contains AVC data. I know the encoding parameters for the data. The format does not appear to be in the Annex B ...
Steve McFarlin's user avatar
19 votes
1 answer
30k views

ffmpeg copyts to preserve timestamp

I am trying to modify an HLS segment transport stream, and preserve its start time with ffmpeg. However the output does not preserve the input file's start_time value, even if -copyts is mentioned. ...
Bala's user avatar
  • 821
19 votes
1 answer
15k views

FFmpeg can't decode H264 stream/frame data

Recently I had chance to work with two devices that are streaming the H264 through RTSP. And I've ran into some problem trying to decompress this stream using FFmpeg library. Every time the "...
Gediminas's user avatar
  • 1,850
18 votes
2 answers
34k views

H.264 over RTP - Identify SPS and PPS Frames

I have a raw H.264 Stream from an IP Camera packed in RTP frames. I want to get raw H.264 data into a file so I can convert it with ffmpeg. So when I want to write the data into my raw H.264 file I ...
Toby's user avatar
  • 3,845
17 votes
2 answers
45k views

Converting mkv to h264 FFmpeg

EDIT: This question has become very popular and is one of the top results for searching "convert mkv to h264 ffmpeg" and thus I feel it is appropriate to add that for anyone stumbling upon ...
Rikus Honey's user avatar
17 votes
2 answers
33k views

H.264 encoded MP4 presented in HTML5 plays on Safari but not iOS devices

I'm using Adobe Media Encoder CS5 to encode a FLV file to H.264 to present on the web via HTML5 and the video file plays just fine in Safari in OS X (and in Firefox encoded to OGG) but on any iOS ...
Tom's user avatar
  • 4,537
17 votes
1 answer
64k views

Stream H.264 video over rtp using gstreamer

I am newbie with gstreamer and I am trying to be used with it. My first target is to create a simple rtp stream of h264 video between two devices. I am using these two pipelines: Sender: gst-launch-1....
abir's user avatar
  • 295

1
2 3 4 5
56