Questions tagged [bitstream]

A Python library to manage binary data as bitstreams. Available from https://pypi.org

Bitstream three main features:

  • It is easy to use since the bitstream abstraction is simple.
  • It works seamlessly at the bit and byte level.
  • It supports Python, NumPy and user-defined types.
94 questions
2
votes
1 answer

Write bitstream to file in C

I'm currently trying to use a CMP decompressor: https://web.archive.org/web/20070113004119/http://rewiki.regengedanken.de:80/wiki/.CMP It does in fact decompress the cmp, but it does not write it into a file. So i tried myself. int main(int argc,…
Fabian M.
  • 37
  • 6
2
votes
3 answers

Is it possible to add more metadata to a bitstream in DSpace, like author, publisher etc..?

Is it possible to add more metadata to a bit streams in DSpace, like author, publisher etc..?
Ponni
  • 43
  • 5
2
votes
2 answers

How to encode integers into other integers?

As a follow up to Store 2 4-bit numbers in 1 8 bit number, I am wondering if there is a generalization to it where you can store n x-bit numbers into m y-bit numbers. For example, maybe you can store 5 8-bit numbers into 3 15-bit numbers. Or maybe 2…
Lance
  • 75,200
  • 93
  • 289
  • 503
2
votes
0 answers

How can i demux/remux video stream h264?

I'm looking for a command line in ffmpeg that demux audio and video in order to send the video in my bitstream filter and remux it in the output file. I have a video treatment to do in the bitstream filter without audio. I don't find the correct…
Benji Joa
  • 53
  • 7
2
votes
1 answer

How do you decode a continuous bit stream in node?

I am trying to implement this protocol using TCP. Most of it is received as a Buffer and can be read fine using .toString('hex') but there is the AVL part that mentions "Encoded using continuous bit stream. Last byte padded to align to byte…
Va5ili5
  • 749
  • 8
  • 20
2
votes
0 answers

ios h264 Bitstream with sliced IDR

I have an iOS app, which needs to display a h264-video stream. The stream is in bitstream format and working well when the IDR is one single H264-Frame/Unit. Now I have a video-source, which splits the IDR in 4 sepearte H264-Frames/Unit (each…
CMJ
  • 21
  • 2
2
votes
1 answer

Save/Read matrix of integers in a binary file and read them

I want to know how can I save a matrix of integers to a binary file and read them back. The matrix could be something like double mat[][] = {{1, 0, 0, 0}, {1, 0, 1, 1}, {0, 1, 1, 0}}; I am able to save this in binary form but I am not sure how I…
ealiaj
  • 1,525
  • 1
  • 15
  • 25
2
votes
1 answer

Bitstream parsing and Endianness

I am trying to parse a bitstream, and I am having trouble getting my head around endianness. I have a byte buffer, and I need to be able to read bitfields out which are of varying lengths, anywhere from 1 bit to 8 bits mostly. My problem comes with…
Luke
  • 2,434
  • 9
  • 39
  • 64
2
votes
2 answers

Bitstream of variable-length Huffman codes - How to write to file?

I'm working on a Huffman coding/decoding project in C and have a good understanding of how the algorithm should store information about the Huffman tree, re-build the tree during decoding, and decompress to the original input file using…
tiger2015
  • 31
  • 3
2
votes
1 answer

How is a h264 idea bitstream organized? / header start codes

I was trying to learn a bit about h264 by looking at the bitstream of a video file with a hex editor. I found here the start codes for a video object planes (0x000001b6) and for i-frames (0x000001b600). But I can't find many of those bytes in video…
Matt
  • 1,143
  • 1
  • 11
  • 19
2
votes
2 answers

Why are these patterns in Huffman coding bitstreams in (Photoshop-produced?) JPG files?

This is a question, out of curiosity, about some patterns I see in JPG files when I look at them in a hex editor. I guess it is a question about the JPEG file format; why not this part is "random noise" like the rest, when it is supposed to be…
2
votes
1 answer

How can I generate encoded HEVC bitstream using ffmpeg?

I am able to encoded YUV file to mp4 using HEVC: ffmpeg.exe -f rawvideo -s 1920x1080 -pix_fmt yuv420p -i input.yuv -c:v hevc -r 30 -x265-params crf=27 -vframes 300 -an -y test.mp4 Here is the mp4box -info test.mp4 shows: * Movie Info * …
jgmao
  • 147
  • 2
  • 8
2
votes
1 answer

Problems using javazoom's Player

I'm trying to play mp3-files using the JLayer Class Player. After starting the Thread containing myPlayer.play() you can hear some hundred milliseconds of the beginning of the song and then the player interrupts and I get the following error…
2
votes
3 answers

Get Arbitrary Slices of Bits from Bytestring

I want to use a lazy Bytestring to represent a stream of bits. I need to be able to take arbitrary slices of bits from this stream efficiently. For example, I might have a ByteString of length 10, and I'd like slice a new ByteString consisting of…
cdk
  • 6,698
  • 24
  • 51
2
votes
1 answer

bitstream details of wav, mp3 file

I would like to know about the meaning of each byte in a wav / mp3 files. But find nth from google...anyone knows where i can find such information? (Infact I would like to know all types of multimedia files in the bitstream level)
Kevin Ha
  • 21
  • 1