Newest 'x264' Questions - Stack Overflow
Les articles publiés sur le site
-
pipe raw video to x264 [on hold]
29 janvier 2015, par ancientloserI have a C code that captures a webcam feed. The default color format is the packed YUV color format, so first I change the color format of each frame to planar I420, then dump each raw frame to stdout. I then pipe this code into x264 in the terminal, like this:
./capturecam -d /dev/video0 -o | x264 --no-progress --profile baseline --tune zerolatency -I 32 -i 32 --no-scenecut --demuxer raw --input-res 640x480 --input-csp i420 --fps 15 -o compressed_stream.264 -
The problem is, when I decode the output of x264, I see that the rightmost side of the frame shows up in the leftmost side, along with some spatial shift of the chroma planes. Here is an example: http://imgur.com/sCC7hYN
I tried writing my webcam frames in I420 YUV format into a file and then reading them with both Matlab and VLC, which shows up frames without any error, so I'm pretty sure there is nothing wrong with the raw frames that I pass to x264. I also tried inputting another YUV video file to x264 and then decoding the output, which also worked without errors.
So I guess my question is: could this be a pipe problem? How can I solve this at this level? I know this question is way too general, but I do not have any more leads.
-
MP4 H264 VBR, How to get the bitrate for each second of video ?
27 janvier 2015, par ConstantiniI have some MP4 videos encoded with H264 and displayed on my website.
My concerns is about bandwith consomming. I'm trying to throttle bandwith to not send more than MP4 video data required in a time interval.
For instance, consider that first second of video bitrate is 100KB. In such case, I only need to send to browser 100KB of video data whitin the first second.
My question is to get such value for every second. Is there a way to get such information after video enconding? Is there a way to get such information by grabbing data from ffmpeg encoding console ? Or is there any low-level API (C,C++,...) to do such work ?
Thanks!
-
x264 : Using NAL size limitation ruins the stream
21 janvier 2015, par Dan TumaykinI'm using x264 to compress a video stream from a webcam with this settings:
x264_param_default_preset(¶m, "veryfast", "zerolatency"); param.i_threads = 1; param.i_fps_den = 1; param.b_annexb = 1; param.i_keyint_max = 30; param.rc.i_rc_method = X264_RC_CRF; param.rc.f_rf_constant = 25; param.rc.f_rf_constant_max = 35; param.b_repeat_headers = 1; x264_param_apply_profile(¶m, "baseline"); param.i_slice_max_size = X264_NAL_MAX_SIZE;
I would like to fit NAL into MTU size, but if I set a small max size, the stream is ruined - it blinks randomly between black and white, with some clues of original image in background. The bigger is the max_size, less probable is for the stream to be ruined. So my question is - can we have small NALUs and a correct video stream?
UPD: I use FFmpeg as a decoder.
-
x264 fails to build using MacPorts
2 janvier 2015, par ranguUsing MacPorts to install FFmpeg, I ran into an error with the dependency x264:
... ---> Computing dependencies for ffmpeg ---> Dependencies to be installed: x264 ---> Configuring x264 Error: Failed to configure x264, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_x264/x264/work/x264-956c8d8/config.log Error: org.macports.configure for port x264 returned: configure failure: command execution failed Error: Failed to install x264 ...
...which persists even after updating and upgrading everything else.
-
x264 fails to build on using MacPorts
1er janvier 2015, par ranguUsing MacPorts to install FFmpeg, I ran into an error with the dependency x264:
... ---> Computing dependencies for ffmpeg ---> Dependencies to be installed: x264 ---> Configuring x264 Error: Failed to configure x264, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_x264/x264/work/x264-956c8d8/config.log Error: org.macports.configure for port x264 returned: configure failure: command execution failed Error: Failed to install x264 ...
...which persists even after updating and upgrading everything else.