Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to use IContainer with frame-by-frame data ?
12 novembre 2014, par AnilJWe have implemented a video client where it captures N number of pictures (from web cam), encodes them and packs them as a block. This block is delivered to the decoder, which then initializes a new IContainer object each time with a buffer containing this received block.
Although this design works well, by its design it introduces a time delay in the stream delivery. Since we are capturing N frames to build a block for delivery, the delay is N times the frame rate. Also we are not sure what is the cost (time) of creating and initializing IContainer object each time.
To improve on this, we thinking of sending frame-by-frame encoded data to the receiver. However, creating new IContainer object in this case won't work since it can not open/initialize with a P or B frame - It always requires an I-frame to initialize else open fails.
Now my question is, how do we use the IContainer APIs for such a requirement? We do not want to initialize/open the IContainer object each time. We want to know if it is possible to reuse the same IContainer object while we keep feeding it the received frames one by one in sequence. This way we completely avoid the source buffering as well as receiver buffering (we however will require a de-jitter buffer).
We are using this APIs. http://www.xuggle.com/public/documentation/java/api/com/xuggle/xuggler/IContainer.html
/anil.
-
Video won't play with Android's native MediaPlayer, however it plays with Dropbox's video player
12 novembre 2014, par NachiI'm having trouble playing a certain .3gp file (from a Dropbox link) with Android's MediaPlayer. However the file magically plays without problems from the Dropbox Android app.
I'm trying to play it using this:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW); intent.setData(Uri.parse("https://www.dropbox.com/s/zpiqwmxka6llavt/SketchyFile.3gp")); startActivity(intent);
and my manifest contains
which gives a "Can't play this video" error.
Logcat shows:
I/NuCachedSource2(89): new range: offset= 2245017 I/ChromiumHTTPDataSource(89): connect to https://dl.dropbox.com/0/view/a1crokuhpprsaeo/SketchyFile.3gp @2245017 I/NuCachedSource2(89): ERROR_END_OF_STREAM E/MediaPlayer(3629): error (1, -2147483648) E/MediaPlayer(3629): Error (1,-2147483648) D/VideoView(3629): Error: 1,-2147483648
If I try to play it from the Dropbox Android app, Dropbox's video player has no problem playing it.
According to ffmpeg's ffprobe tool I could verify that the media type is not something exotic to Android.
Is Dropbox performing some weird transcoding voodoo and is there a way I can make this work in a similar way?
EDIT: Here's some more insight into DropBox's encoding voodoo.
-
Incorrect frame rate in video (Xuggler + MPEG 4 + H.264)
12 novembre 2014, par Vladislav BauerI have a problem with incorrect value of frame rate in output file, after converting. I made a really simple example to describe a problem:
public static void main(String[] args) { // reader IMediaReader reader = ToolFactory.makeReader("/tmp/1/i3.avi"); IMediaWriter writer = ToolFactory.makeWriter("/tmp/1/o3.mp4", reader); reader.addListener(writer); while (true) { try { final IError error = reader.readPacket(); if(error != null) { System.err.println("Error decoding packet " + error.getDescription()); if (!reader.isOpen()) { break; } } } catch (final Exception ex) { System.err.println("Error decoding packet " + ex.getMessage()); if (!reader.isOpen()) { break; } } } }
Any additional parameters for video or audio streams/codecs aren't configured .
The input video file ("/tmp/1/i3.avi") has the following features:
- General
- Container: Audio Video Interleave (AVI)
- Video
- Dimensions: 624x352
- Codec: XVID MPEG-4
- Framerate: 24 frames per second
- Bitrate: N/A
- Audio:
- Codec: MPEG-1 Layer 3 (MP3)
- Channels: Stereo
- Sample rate: 48000 Hz
- Bitrate: 112 kbps
The output video file ("/tmp/1/o3.avi") has the following features:
- General
- Container: Quicktime
- Video
- Dimensions: 624x352
- Codec: H.264
- Framerate: 8 frames per second
- Bitrate: 378 kbps
- Audio:
- Codec: MPEG-4 AAC
- Channels: Stereo
- Sample rate: 48000 Hz
- Bitrate: 127 kbps
So, the frame rate in output file is 8 instead of 24. How can I fix it? Please, help me..
PS: I've already tried Xuggler H264 FPS encoding issue and few another solutions, it doesn't help..
UPD: After a long war with Xugler I wrote my own pure-java interface to the avconv and it works fine for me: https://github.com/vbauer/avconv4java
- General
-
When i try to convert live http streams to .flv file i am getting Unrecognized option 'c:v' error
12 novembre 2014, par user3932031C:\Program Files\ffmpeg>ffmpeg -re -i
http://82.135.224.134/udp/239.100.2.20:1234
-c:v libx264 -b:v 5M -pix_fmt yuv420p -c:a:0 libfdk_aac -b:a:0 480k -f flv abc.flvI am running above command. I am getting folloing error: [h264 @ 0154f300]sps_id out of range [h264 @ 0154f300]non-existing SPS 32 referenced in buffering period [h264 @ 0154f300]non-existing PPS referenced [h264 @ 0154f300]sps_id out of range [h264 @ 0154f300]non-existing SPS 32 referenced in buffering period [h264 @ 0154f300]non-existing PPS 0 referenced [h264 @ 0154f300]decode_slice_header error [h264 @ 0154f300]no frame! . . . . . [mpegts @ 023c1700]max_analyze_duration reached [mpegts @ 023c1700]Estimating duration from bitrate, this may be inaccurate Input #0, mpegts, from 'http://82.135.224.134/udp/239.100.2.20:1234': Duration: N/A, start: 63180.879433, bitrate: 62 kb/s Program 1 Stream #0.0[0x3e9]: Video: h264, yuv420p, 720x576 [PAR 1:1 DAR 5:4], 38.11 f ps, 25 tbr, 90k tbn, 50 tbc Stream #0.1[0x3ea]: Audio: aac, 22050 Hz, stereo, s16, 62 kb/s Unrecognized option 'c:v'
How can i solve this error? Please help me.
-
how to sox maximum amplitude 0.9 ?
12 novembre 2014, par Furkan ÇelikIn linux , sox or using ffmpeg (sox as a priority) to a wav audio file of the maximum amplitude of the I'm trying to 0.9. to do this, which command should I use?