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
0
votes
0 answers

How to rewind the bitstream pointer?

I'm decoding a binary file byte-by-byte. No problem in reading variables that have a size which is a multiple of 8 bits, such as: #encoder bitstream.add(data_id, 16) #decoder data_id = struct.unpack('>H', in_file.read(2))[0] What if the data I'm…
user123892
  • 1,243
  • 3
  • 21
  • 38
0
votes
2 answers

Read and interpret mixed binary and text file in python

How can I read a file that consists of a line (string of 10 csv) of numbers and text and then after this line, there are 4096 bytes? Something like this: 117,47966,55,115,223,224,94,0,28,OK: …
rebrid
  • 430
  • 8
  • 27
0
votes
1 answer

How to convert a bitstream to a base20 number?

Given is a bitstream (continuous string of bits too long to be processed at once) and the result should be a matching stream of base20 numbers. The process is simple for a small number of bits: Assuming most significant bit right: 110010011 =…
Sebastian
  • 2,472
  • 1
  • 18
  • 31
0
votes
1 answer

How to detect GOP struct from H264/HEVC bitstream?Can I get it from sps info?

Is it possible to get gop struct from sps info? I need to know the num of b frames in a gop.
pango
  • 61
  • 1
  • 8
0
votes
0 answers

How can i make the video has no index positions and no total length just like raw bitstream format, but it can have audio stream go along?

How can i make the video has no index positions and no total lenght,it cannot speed up slow down on a video player and it can have audio stream go along, with ffmpeg code? I've research for a while but i only stuck at the way to exact raw bitstream…
Adam Estel
  • 27
  • 1
  • 6
0
votes
0 answers

Convert RGB blocks to Image in jpeg decoder

I am trying to design a simple jpeg decoder in MATLAB. I take a .jpg image and then decoding the headers of that image. Then decode scan data after SOS header and create blocks of 64 pixels (order of my decoding scan data: huffman…
Bashid
  • 433
  • 5
  • 15
0
votes
1 answer

Can a compressed JPEG have two legitimate EOI markers?

I have parsed the bitstream to extract each block. I have counted the correct number of blocks based on the size of my image (3440) and it brings me nicely to the EOI marker ([255, 217]), so I am confident I have done this much correctly. However…
Mike H
  • 21
  • 3
0
votes
1 answer

Accessing the bitstream of a video in WPF in order to introduce fake interference

I am working with a wpf application, and basically my goal is to be able to take a video that is being played in wpf, and somehow be able to modify its bitstream in order to make it look like it's being interfered with. I assume there are many…
0
votes
1 answer

Size of compressed Opus frame (bytes)

How do I calculate the size of the compressed opus frame (number of bytes)? I have read the OggS Page and the TOC-Header. The next bytes should belong to the compressed frame, but how do I get the number of bytes?
0
votes
1 answer

C# - convert any filetype to bitmap show in picturebox

I want a OpenFileDialog to select any file-types and show the file bits in a bitmap image. I mean the selected file contain some 0/1 bits, I want to show them in black and white image. Any Idea?
Vahid
  • 29
  • 6
0
votes
1 answer

pfSense PPPoE and BitStream / BSA / OneSession Hardware

I run my home network off of a pfSense (2.2.6) box, which is connected via PPPoE to my DSL (in Germany, Alice/O2/Telefonica). My modem is a deconfigured "Alice Modem WLAN 1421", which only provides PPPoE-Passthrough. My Carrier contacted me to…
0
votes
1 answer

Need troubleshooting advice for H.264 stream (works in PC VLC, but not on CumulusTV App)

I have an HDMI source connected to a Chinese HD HDMI Encoder box. Playback to VLC on my PC works (open network stream http://192.168.0.150:80/hdmi) Stream is NOT leaving my local network (on purpose) I cannot get a signal to display on my Google…
Don
  • 1
  • 2
0
votes
1 answer

How to encode/decode complex number to bitstream in MATLAB?

How to compress a complex number like 0.0332815625326639 + 0.000694052654051097i into a bit stream and then decode it to get back the same number?
Mohab Mostafa
  • 109
  • 1
  • 8
0
votes
0 answers

Write bitstream to file python 3

I have a bitstream, of 0s and 1s obviously. It can be represented as anything (because this is Python!) but for simplicity's sake let's say it's a string. bitStream = "1010110110110101" Now I need to write this bitstream to a file, however if I do…
Arcayn
  • 87
  • 7
0
votes
1 answer

Slice header flag of H.264 bitstream

I'm a beginner to H.264 data compression standard, and i need to know where the slice header flag (slc_hdr) of the H.264 bitstream is located ? Is it for example existed in the slice header? cause i need to extract it and set it to 1.