convert H264 video to raw YUV format

Yes you can, you just have to specific the pixel format. To get the whole list of the format: ffmpeg -pix_fmts | grep -i pixel_format_name For example if you want to save the 1st video track of an mp4 file as a yuv420p (p means planar) file: ffmpeg -i video.mp4 -c:v rawvideo -pix_fmt yuv420p out.yuv

How to get h264 video info?

I’ve found out that the best way for this is using FFprobe with -show_streams parameter. It shows both h.264 profile and B-frames usage for video streams of the movie. ffprobe -show_streams -i “file.mp4” [STREAM] index=0 codec_name=h264 codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 profile=High codec_type=video codec_time_base=1001/48000 codec_tag_string=avc1 codec_tag=0x31637661 width=1920 height=1080 has_b_frames=0 sample_aspect_ratio=0:1 … Read more

How to use hardware accelerated video decoding on Android?

To answer the above question, let me introduce few concepts related to Android OpenMAX Android uses OpenMAX for codec interface. Hence all native codecs (hardware accelerated or otherwise) provide OpenMAX interface. This interface is used by StageFright(Player framework) for decoding media using codec NDK Android allows Java Applications to interact with underlying C/C++ native libraries … Read more

Raw H264 frames in mpegts container using libavcodec

I believe if you set the following, you will see video playback. packet.flags |= AV_PKT_FLAG_KEY; packet.pts = packet.dts = 0; You should really set packet.flags according to the h264 packet headers. You might try this fellow stack overflowian’s suggestion for extracting directly from the stream. If you are also adding audio, then pts/dts is going … Read more

Live streaming through MP4

You may use fragmented MP4. A fragmented MP4 file is built a follows: moov [moof mdat]+ The moov box then only contains basic information about the tracks (how many, their type , codec initialization and so on) but no information about the samples in the track. The information about sample locations and sample sizes is … Read more

tech