Newest 'x264' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/x264

Les articles publiés sur le site

  • x264enc plugin settings for VBV buffer

    11 juin 2015, par Dundar

    I am trying to implement VBV buffer in x264enc plugin in gstreamer. What I want to achieve is setting rc.i_vbv_max_bitrate to 10K and rc.i_vbv_buffer_size to 10K. However, what I see in the x264enc source code,

    encoder->x264param.rc.i_vbv_max_bitrate = encoder->bitrate;
    encoder->x264param.rc.i_vbv_buffer_size
          = encoder->x264param.rc.i_vbv_max_bitrate
          * encoder->vbv_buf_capacity / 1000;
    

    Here is my settings:

     g_object_set(G_OBJECT(_videoEncoder),
                     "tune",             (guint)4,
                     "speed-preset",     (guint)1,
                     "byte-stream",      (gboolean)TRUE,
                     "bitrate",          (guint) 10000,
                     "vbv-buf-capacity", (guint) 1000,
                     "intra-refresh",    (gboolean)TRUE,
                     NULL);
    

    Do you see anything wrong in this? tune=4 means ultrafast, speed-preset=1 means zerolatency right?

    Thanks.

  • How to encode a series of .dpx files using X264

    4 juin 2015, par user3759710

    I am complete newbie to video encoding. I am trying to encode a series of .dpx files into one single encoded video O/P file in any of the following format. ( .mp4,.avi,.h264,.mkv etc)

    I have tried 2 different approaches. The first one works and the second one does not. I would like to know the difference between the two. Any help / input would be much appreciated.

    1) using FFMPEG along with x264 library and it works well. I am able to produce desired output

    ffmpeg -start_number 0 -i frame%4d.dpx -pix_fmt yuv420p -c:v libx264 -crf 28 
    -profile:v baseline fromdpx.h264
    

    2) I first try to concatenate all the dpx files into a single file using concate protocol in ffmpeg and then use x264 to encode the concatenated file. Here I see that the size of the concatenated file is the sum of all the files concatenated. But when I use x264 command to encode the concatenated file, I get a green screen (basically not the desired output) .

    ffmpeg -i "concat:frame0.dpx|frame01.dpx|frame2.dpx etc" -c copy output.dpx
    

    then

    x264 --crf 28 --profile baseline -o encoded.mp4 --input-res 1920x1080 --demuxer raw 
    output.dpx
    

    I also tried to encoded the concatenated file using ffmpeg as follows

    ffmpeg -i output.dpx -pix_fmt yuv420p -c:v libx264 -crf 28 -profile:v baseline fromdpx.h264
    

    This also gives me a blank video.

    Could someone please point out to me what is going on here? Why does the first method work and the second does not?

    Thank you.

  • Auto launch the video player in Android from the browser like an iPhone does

    2 juin 2015, par Gcoop

    I have just created and iPhone web app, which has some x264 (mp4) video files on it. When I link directly to the file on the iPhone and the user taps the link, the video player is loaded and the video starts playing.

    Using the app on an Android phone causes the browser to download the video instead of just playing it. Is there a way to force a video player to just boot up and play the video not download it?

    Thanks in advance.

  • Decoding H.264 individual nal units

    1er juin 2015, par madprogrammer2015

    I am currently sending individual NAL units across a network. These NAL units are generated by x264. Now is it possible to feed these NAL units individually into avcodec_decode_video2?

    Or do I have to concatenate the nal units until they represent the same frame? If thats the case then how is that done?

    I have also read that I might be able to receive the SPS and PPS packets. Then wait for at least one packet, and attempt to decode. Is this correct?

    Any advice that can be offered would be greatly appreciated

  • Fastest method to add .ass (ssa, aegisub) SubStationAlpha subs to mp4 ?

    23 mai 2015, par user3762355

    So i have video file mp4, and without changing its quality i want to add ass hardsubs. i am doin this with ffmpeg: on windows:

    ffmpeg -i input.mp4 -c:v libx264 -preset:v medium -profile:v baseline -level 3.0 -movflags +faststart -vf ass=insubs.ass -bufsize 4000k -qp 27 result.mp4
    

    But it takes long time, or quality is bad. It have to be most compatible, so baseline, and good for web.

    How to do it faster? When i change preset to ultrafast quality is very very bad.

    I dont want to use mkvtoolnix and handbrake or avisynth. And it has to be on Windows. It has to be something, possible to do with one simple bat file, very fast, good quality,small size, just like original mp4 only with subs hardcoded. Thanks.